I have a human readable private/public elliptic curve (ecdh) key pair in a hexadecimal string. The public key is 64 Bytes
(128 hex
characters) and the private key is 32 Bytes
.
Question :How can I load these into either a python cryptography key or convert them into pem or der format using python?
I can easily load a pem or der private/public key so converting them to one of those two formats should be enough.
I was able to figure this one out after more research. Python-ECDSA has functionality that allows loading the bytes of a human readable key and outputting them in either a PEM or DER format. See python-ecdsa here.