Hi Vadim

Great!
It works fine. When I got your mail I was just getting ready to test this function.
This public key I have loaded, shall be used to verify a signature.
I have the signature as a 128 byte binary blob.

I have been looking at the RSA_public_decrypt() function, but I'm not quite sure how 
it works.
How can I verify a signature without specifying what was signed in the first place?

Thanks for all your help,
Kim

-----Oprindelig meddelelse-----
Fra: Vadim Fedukovich [mailto:[EMAIL PROTECTED]]
Sendt: 30. maj 2002 12:15
Til: [EMAIL PROTECTED]
Emne: Re: Format of RSA public key ?


On Thu, May 30, 2002 at 08:59:59AM +0200, Hellan,Kim KHE wrote:
> Hi Vadim
> 
> I should have been more specific.
> I know it is modulus and public exponent, but what I'm looking for is some OpenSSL 
>function to load this key into a EVP_PKEY structure.
> 
> Any ideas?

d2i_RSAPublicKey() and EVP_PKEY_assign_RSA() should work

hope this helps,
Vadim

> 
> Thanks,
> Kim
> 
> 
> -----Oprindelig meddelelse-----
> Fra: Vadim Fedukovich [mailto:[EMAIL PROTECTED]]
> Sendt: 29. maj 2002 17:03
> Til: OpenSSL Users
> Emne: Re: Format of RSA public key ?
> 
> 
> hi Kim,
> 
> On Wed, 29 May 2002, Hellan,Kim KHE wrote:
> 
> > Hi
> >
> > When I use OpenSSL to extract 1024 bit RSA public keys to a binary file, I get a 
>162 byte file with the following ASN.1 structure:
> >
> >     0:d=0  hl=3 l= 159 cons: SEQUENCE
> >     3:d=1  hl=2 l=  13 cons: SEQUENCE
> >     5:d=2  hl=2 l=   9 prim: OBJECT            :rsaEncryption
> >    16:d=2  hl=2 l=   0 prim: NULL
> >    18:d=1  hl=3 l= 141 prim: BIT STRING
> >
> > These public keys can easily be loaded in OpenSSL.
> >
> > I now have to support some 1024 RSA public keys with a different structure. The 
>binary blob containing the public key is only 140 bytes and the ASN.1 structure looks 
>like this:
> >
> >     0:d=0  hl=3 l= 137 cons: SEQUENCE
> >     3:d=1  hl=3 l= 129 prim: INTEGER           
>:800000000000000000000000000000622FB09CAD2A75E84A00E2613FF1B52ED2382C6274E45364C140FE6639F437E07A135D824D99FEAE0C8BBF1782960AA9FF38C67373C41BD8DDB341754F78823BC3321581D5EF5349F5DAAD46B3B954CA9742280528DAABFC7B23229AF04FFDBE733E0AE310C3466224FC1A9628FF14F6ED
> 
> this is modulus
> 
> >   135:d=1  hl=2 l=   3 prim: INTEGER           :010001
> 
> ..and public exponent
> 
> good luck,
> Vadim
> 
> >
> > Does anyone know how to handle this "format" in OpenSSL. How do I load these 
>public keys ?
> >
> > Thanks,
> > Kim Hellan
> > KMD / KMD-CA
> > http://www.kmd-ca.dk
> > Mailto:[EMAIL PROTECTED]
> >
> > ______________________________________________________________________
> > OpenSSL Project                                 http://www.openssl.org
> > User Support Mailing List                    [EMAIL PROTECTED]
> > Automated List Manager                           [EMAIL PROTECTED]
> >
> 
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to