'How to make your own RSA key from bitstream?

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.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source