How to get exponent from a PKey object?
flya flya <[email protected]> Fri, 27 Feb 2009 20:37:26 +0800
| Newsgroups | gmane.comp.python.cryptography |
|---|---|
| Message-ID | <[email protected]> |
I need read the public key from certificate, I can get a PKey object
use follow codes:
from M2Crypto import X509
cer = X509.load_cert('test.pem', X509.FORMAT_PEM)
pk = cer.get_pubkey()
and use pk.get_modulus() to get the modulus, but how can I get exponent?
I need these two values to make a new public key struct , and use it
as a param to call a function from a dll file using ctypes. I found E
is often 65537, but I ask a university teacher, he say it can be any
value, so how can I get it?