Is there any way to convert an ECC private key to RSA PKCS#1 format? I have tried converting it to PKCS#8 first using OpenSSL:
openssl pkcs8 -topk8 -nocrypt -in EC_key.pem -out pkcs8_key.pem
This results in a pem file that is in (what i am assuming) the right PKCS8 format
-----BEGIN PRIVATE KEY-----
-----END PRIVATE KEY-----
When trying to then convert it from PKCS#8 to PKCS#1 using the following command: openssl pkcs8 -inform pem -nocrypt -in pkcs8_key.pem -out pkcs1_key.pem
I get the same file as from the previous step.
when using the following command for conversion: openssl rsa –in pkcs8_key.pem –out pkcs1_key.pem I get the following error:
47049676604576:error:0607907F:digital envelope routines:EVP_PKEY_get1_RSA:expecting an rsa key:p_lib.c:279:
Can EC keys be converted to RSA PKCS#1 keys? And if yes, how?
Aucun commentaire:
Enregistrer un commentaire