Hylton Tregenza wrote: > > Hi all > > I am still battling with getting a key exported as a public > key blob from a MS platform into openssl on Linux to add to > a certificate. > I have learned that MS exports the key as a PKCS#1 > structure. the key is a 512 bit (64 Byte) key. When I write > this blob to file it is 84 Bytes in length. > When I create a similar key with open SSL and write it to > file it is only 74 bytes in length. > > I am trying to understand where the extra bytes come from. > On openSSL I am able to see that the last 3 bytes are the > exponent. The last 5 bytes and the first 5 bytes of the key > remain constant. > Can someone enlighten me as to what they represent. > On my machine they are > First 5 > 30 48 02 41 00 > last 5 > 02 03 01 00 01 > where 01 00 01 appears to be the exponent. > > If the PKCS1 format of the MS key is correct, why is it ten > bytes longer. Is there a procedure/function using openssl to > read this key. >
Since you don't include the complete MS key it is impossible to say what format it is using. You could try the RSA_PUBKEY functions which use the same format for public keys as certificates use. This is a bit larger then PKCS#1. Steve. -- Dr Stephen N. Henson. http://www.drh-consultancy.demon.co.uk/ Personal Email: [EMAIL PROTECTED] Senior crypto engineer, Gemplus: http://www.gemplus.com/ Core developer of the OpenSSL project: http://www.openssl.org/ Business Email: [EMAIL PROTECTED] PGP key: via homepage. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]