Hi,
The PKCS#1 encoding is dedicated to RSA keys and consists of an ASN.1
collection of the RSA key components (a description can be found on
the PKCS#1 spec from RSA, section A.1.1 and A.1.2,
ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1.pdf).
SubjectPublicKeyInfo is more generic:
Hi Mounir,
> Your file pk.der contains a public key encoded as a SubjectPublicKeyInfo
> and NOT as a PKCS#1 encoding. So, you should use the function
> d2i_RSA_PUBKEY instead of d2i_RSAPublicKey in order to read the public
> key.
Ah I thought I tried this one but apparently I did not. It works in
Hi,
Your file pk.der contains a public key encoded as a SubjectPublicKeyInfo
and NOT as a PKCS#1 encoding. So, you should use the function
d2i_RSA_PUBKEY instead of d2i_RSAPublicKey in order to read the public
key.
Cheers,
--
Mounir IDRASSI
IDRIX
http://www.idrix.fr
> Dear all,
>
> I am working