Pycrypto - Using Crypto.Random to generate a secret key and an initialisation vector
13,838
According to the PyCryto docs, the answer is yes:
from Crypto.PublicKey import RSA
from Crypto import Random
rng = Random.new().read
RSAkey = RSA.generate(1024, rng)
Author by
Imran Azad
Updated on September 16, 2022Comments
-
Imran Azad over 1 year
Can Crypto.Random be used to safely generate a strong secret key and an initialisation vector?