Is there any better way (preferably using cryptography's tools) than this workaround (have I missed something in docs?) or cryptography really doesn't allow any other way to get needed information?ĮDIT: This is code I use to generate keys and encrypt, basically same as docs example: from import default_backendįrom import rsa Parse it, and extract needed information. I searched whole cryptography documentation regarding RSA and cannot find any method like get_modulus_or_exponents() or anything that would even hint on something like that. It's not for a real world usage, I am doing it for a class assignment. When I generate keys I need to get modulus n, public exponent and private exponent in hexadecimal form so that I can save them to a file in custom format. I am using Python cryptography library and I need to encrypt something with RSA.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |