I'm trying to find if there is a standard way that we can permute that ensures the randomness of the permutation.
In my case, to shuffle a sequence of size n
, im doing this way.
- Read bytes from
/dev/urandom
as they appear and mod the byte withn
(consideringn
value is 52). - Then on the random sequence I'm applying Fisher-Yates shuffle, but for random picks I'm again relying upon
dev/urandom
.
Since I'm reading the random bits in KB's only from /dev/urandom
I believe it should be fine. So basically security of my shuffle is depend on the randomness of the data that is extracted from /dev/urandom
. I would like is this good enough or are there any well thought approaches exists on how we permute the numbers and are there any algos that exists that can validate the entropy of my permutation?