Question

How to load a RSA public key file into a pyCrypto publickey object in python?

Was it helpful?

Solution

The RSA Class has an importKey method for this:

importKey(externKey) Import an RSA key (public or private half).

externKey: the RSA key to import, encoded as a string. The key can be in DER (PKCS#1) or in unencrypted PEM format (RFC1421).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top