handle bad randomness during IV creation
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Tue, 16 May 2017 08:57:01 +0000 (10:57 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 2 Apr 2018 11:34:08 +0000 (13:34 +0200)
commitbe124bcafb47debe8b9544ea6034dbcc9455993d
tree4b13b6651d1f5571a96841274a2bc123b93a7a2c
parent704ceaa5b8fed2807c47b9ef4a0b997ba6e222cc
handle bad randomness during IV creation

Since IVs must be unique we rely on /dev/urandom to yield a
different sequence of bytes when requesting a new fixed part.
In the unlikely event that a new fixed part has already been
used earlier, repeat it for number of times.

Abort if no unique IV could be generated this way since it
most likely indicates a faulty RNG.
deltatar/crypto.py
testing/test_crypto.py