I would like to create a small cryptographically secure random number generator that doesn't depend on any external library or API.
This isn't a homework assignment despite the name (cryptostudent)
I've already looked at Yarrow and Fortuna which are surplus to requirements but have considered using features of various block ciphers unencumbered by patents.
From Twofish, the MDS matrix. From Serpent, Linear Transformation. From Rijndael (AES), MixColumns
The other functions from AES would be SubBytes which only uses GF(2^8) and perhaps ShiftRows.
These 3-5 functions take care of confusion/diffusion and can be implemented in relatively little code so I was wondering if they would be useful in the generation of random numbers which wouldn't repeat often?
The initial entropy would come from using rdtsc instruction on x86 cpu. I realize this probably isn't a good source of entropy but I'm thinking that with the confusion/diffusion functions it would be possible to generate random numbers much harder to predict than using some Linear Congruent Generator.
Go easy on me folks, I'm just learning about cryptography and realize this might provoke some negative reactions. I welcome constructive criticism. Thanks.
Aucun commentaire:
Enregistrer un commentaire