dimanche 16 juillet 2017

Should rand be used for an IV?

CBC mode for AES specifies that to make each message unique, an IV should be used. The IV should be random and only used once, otherwise it may allow people to decrypt other cipher texts which used the same key.

Is the rand() function in C suitable for generating this IV? Does the fact that it is normally seeded with the current time make it vulnerable to some sort of attack?




Aucun commentaire:

Enregistrer un commentaire