3 ms·
I'm no cryptographer, but while the warning is valid, I don't think it's crucial here. There are two potential sources of problem, the seed and the PRNG. The s
by icebraining 9y ago
I'm no cryptographer, but while the warning is valid, I don't think it's crucial here.
There are two potential sources of problem, the seed and the PRNG. The seed should be OK, because Python will use urandom as long as it's available in the system. As for the PRNG, a non-secure one shouldn't be used in encryption because it has statistically predictable behavior, but as far as I know that requires access to the ciphertext, which isn't the case here.
Still, replacing random with SystemRandom is easy and would fix the problem.