I have a task to generate private and public RSA keys. However, for private key I am supposed to use a bitstream generated from random generator that I implemented. I don't know how to transform a bitstream into a Cryto.PublicKey.RSA.RsaKey object
. I need it to use a key.public_key()
function.
Asked
Active
Viewed 111 times
0
-
[`RSA.generate()`](https://www.pycryptodome.org/en/latest/src/public_key/rsa.html#Crypto.PublicKey.RSA.generate) accepts a `randfunc` keyword argument. – President James K. Polk May 17 '22 at 17:07
-
Problem is, I already have generated bits and I have to use them – Gre1234 May 17 '22 at 17:12
-
2So create a randfunc() that returns the bits you already have. – Frank Yellin May 17 '22 at 17:40
-
I don't really know how to do that. Can you explain? – Gre1234 May 17 '22 at 19:11