Re: Updating RSA public key generation and signature verification from 1.1.1 to 3.0

2022-10-01 Thread Tomas Mraz
very much, > > Diego Gonzalez > - > - >   > > -Original Message- > From: Tomas Mraz > Sent: Friday, September 30, 2022 1:22 AM > To: GonzalezVillalobos, Diego ; > openssl-users@openssl.org > Subject: Re: Updating RSA public key generation and signature >

RE: Updating RSA public key generation and signature verification from 1.1.1 to 3.0

2022-09-30 Thread GonzalezVillalobos, Diego via openssl-users
Subject: Re: Updating RSA public key generation and signature verification from 1.1.1 to 3.0 Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. Hi, unfortunately I do not see anything wrong with the code. Does

RE: Updating RSA public key generation and signature verification from 1.1.1 to 3.0

2022-09-30 Thread Michael Wojcik via openssl-users
> From: openssl-users On Behalf Of Tomas > Mraz > Sent: Friday, 30 September, 2022 00:22 > > unfortunately I do not see anything wrong with the code. Does the > EVP_DigestVerifyFinal return 0 or negative value? I do not think this > is a bug in OpenSSL as this API is thoroughly tested and it is h

Re: Updating RSA public key generation and signature verification from 1.1.1 to 3.0

2022-09-29 Thread Tomas Mraz
ret == 0) { >     cout << "EC Verify digest fails" << endl; >     break; >         } else if (ret < 0) { >     printf("Failed Final Verify > %s\n",ERR_error_string(ERR_get_error(),NULL)); &

RE: Updating RSA public key generation and signature verification from 1.1.1 to 3.0

2022-09-29 Thread GonzalezVillalobos, Diego via openssl-users
that, it is the same. Could it be a bug? Thank you, Diego Gonzalez --   -Original Message- From: Tomas Mraz Sent: Thursday, September 29, 2022 1:12 AM To: Gon

Re: Updating RSA public key generation and signature verification from 1.1.1 to 3.0

2022-09-28 Thread Tomas Mraz
Hi, comments below. On Wed, 2022-09-28 at 22:12 +, GonzalezVillalobos, Diego wrote: > [AMD Official Use Only - General] > > Hello Tomas, > > I generated the key as you suggested, and I am no longer getting an > error message! Thank you for that. Here is how I'm generating the key > now: >

RE: Updating RSA public key generation and signature verification from 1.1.1 to 3.0

2022-09-28 Thread GonzalezVillalobos, Diego via openssl-users
break; } found_match = true; cout << "SEV EC verification Succesful" << endl; Could it be because I'm creating a ECDSA SIG object and then turning it into a der format to verify? Again, suggestions would

Re: Updating RSA public key generation and signature verification from 1.1.1 to 3.0

2022-09-22 Thread Tomas Mraz
  break; >     } > >     if (EVP_DigestVerifyUpdate(verify_md_ctx, child_cert, > pub_key_offset) <= 0){    // Calls SHA256_UPDATE >     cout << "updating digest fails" << endl; >     break; >     } > >         int ret = EVP_DigestVerifyFinal(verify_md_ctx, > signature, sig_len); >    

RE: Updating RSA public key generation and signature verification from 1.1.1 to 3.0

2022-09-22 Thread GonzalezVillalobos, Diego via openssl-users
cesful" << endl; My current output when I reach EVP_DigestVerifyFinal is showing this error: Failed Final Verify error:0395:digital envelope routines::no operation set I have been playing around with it for a while, but I am stuck at this point. Any advice would be appreciated. Than

Re: Updating RSA public key generation and signature verification from 1.1.1 to 3.0

2022-09-09 Thread Tomas Mraz
deprecated > 1.1.1 functions to the appropriate 3.0 versions. The function takes > in 2 certificate objects (parent and cert), which are not x509 > certificates, but certificates the company had previously defined. > Using the contents from parent we create an RSA public key and using >

Updating RSA public key generation and signature verification from 1.1.1 to 3.0

2022-09-08 Thread GonzalezVillalobos, Diego via openssl-users
cert), which are not x509 certificates, but certificates the company had previously defined. Using the contents from parent we create an RSA public key and using the contents from cert we create the digest and grab the signature to verify. In the 1.1.1 version we were using the RSA Object and the

Re: Extracting the public modulus from an RSA public key?

2020-05-05 Thread Thomas Dwyer III
Ugh. So simple! I don't know how I missed that. I found get0 & get1 accessors for many other structures but I didn't see that one. Thanks, Tom.III On Tue, May 5, 2020 at 9:50 PM Dr Paul Dale wrote: > Might I suggest reading the documentation? > > RSA_get0_n() is the function you are wanting.

Re: Extracting the public modulus from an RSA public key?

2020-05-05 Thread Dr Paul Dale
Might I suggest reading the documentation? RSA_get0_n() is the function you are wanting. Pauli -- Dr Paul Dale | Distinguished Architect | Cryptographic Foundations Phone +61 7 3031 7217 Oracle Australia > On 6 May 2020, at 2:20 pm, Thomas Dwyer III wrote: > > I'm porting some old legacy

Extracting the public modulus from an RSA public key?

2020-05-05 Thread Thomas Dwyer III
I'm porting some old legacy code from OpenSSL 1.0.2 to OpenSSL 3.0.0. A portion of this code reads X509 certificates, extracts the public key, and passes it to firmware that I cannot modify. Unfortunately, this legacy firmware API was very poorly designed such that the public key is passed in a way

Re: [openssl-users] RSA Public Key error

2018-12-17 Thread Erwann Abalea via openssl-users
such a structure, the function fails. What you can do is : * Take your public keys (for example Key2_w16) * Check that the first 16 bytes are what you expect to have * Pass the remainder of the file to the d2i_RSAPublicKey() function * Use the resulting RSA public key the way you

Re: [openssl-users] RSA Public Key error

2018-12-12 Thread Erwann Abalea via openssl-users
das Répondre à : "openssl-users@openssl.org" Date : mercredi 12 décembre 2018 à 08:08 À : "openssl-users@openssl.org" Objet : [openssl-users] RSA Public Key error Hi, I have a RSA public key(PKCS 1v1.5) that I have obtained from somewhere. That key has been obtained afte

[openssl-users] RSA Public Key error

2018-12-11 Thread prithiraj das
Hi, I have a RSA public key(PKCS 1v1.5) that I have obtained from somewhere. That key has been obtained after removing the first 24 bytes from the originally generated RSA public key. Those 24 bytes are being replaced by some custom 16 byte information which is being used as some sort of

Re: [openssl-users] how to import external rsa public key in openssl.

2018-06-08 Thread Viktor Dukhovni
> On Jun 8, 2018, at 3:02 AM, Sangsub wrote: > > pem_base64:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAirjFSROMxZ9gW1AmX2nsO4zjs+mvXhdNJs/iQmUBBL6gUQEYlnbHopLMa1rnGeEZ46wp6dOtna3NpJby9xhfnAxIcqLbEk8BmSsjjoP9WC2KKQ8pc/nPdE8eU/iqU6IlwSKZscw2WPtgfLWrpXmDLWwmh/cTAKTfPfHBQH4X0ipcGcgw7QxYJAcjCaYSu

Re: [openssl-users] how to import external rsa public key in openssl.

2018-06-08 Thread Matt Caswell
On 08/06/18 11:29, Sangsub wrote: > char buf[2] = {0,}; > memcpy(buf, pStr, sizeof(buf)); > > out[i] = (unsigned char)strtol(buf, NULL, 16); This looks wrong. "buf" is not NUL terminated so strtol could give an incorrect result.

Re: [openssl-users] how to import external rsa public key in openssl.

2018-06-08 Thread Sangsub
Thanks Matt for your reply. The purpose I am doing this is to find the modulus and exponent in the RSA public key. My sample code and the current results are shown below. = void fnStr2Hex(char* out, char* in) { int data_len = strlen

Re: [openssl-users] how to import external rsa public key in openssl.

2018-06-08 Thread Matt Caswell
On 08/06/18 08:02, Sangsub wrote: > > I would like to perform operations such as RSA signature verification > through an RSA public key file received from an external server. > Key values are given in der format or pem format as follo

[openssl-users] how to import external rsa public key in openssl.

2018-06-08 Thread Sangsub
I would like to perform operations such as RSA signature verification through an RSA public key file received from an external server. Key values are given in der format or pem format as follows. der

Re: [openssl-users] Get raw RSA public key from X509 certificate

2018-04-27 Thread Matt Caswell
On 27/04/18 15:01, Ken Goldman wrote: > That was it!  What threw me off is that the documentation says: > > TYPE *d2i_TYPE(TYPE **a, unsigned char **ppin, long length); > > but RSAPublicKey isn't a type.  So the pattern of TYPE being a structure > name didn't hold. Ahh. Interesting. In mo

Re: [openssl-users] Get raw RSA public key from X509 certificate

2018-04-27 Thread Ken Goldman
On 04/27/18 04:50, Matt Caswell wrote: On 26/04/18 23:48, Ken Goldman wrote: On 04/26/18 16:37, Matt Caswell wrote: On 26/04/18 21:17, Ken Goldman wrote: I have to get the raw public modulus, but I cannot X509_get_pubkey() because of a non-standard object identifier. I can use X509_get_X5

Re: [openssl-users] Get raw RSA public key from X509 certificate

2018-04-27 Thread Matt Caswell
On 26/04/18 23:48, Ken Goldman wrote: > On 04/26/18 16:37, Matt Caswell wrote: >> >> >> On 26/04/18 21:17, Ken Goldman wrote: >>> I have to get the raw public modulus, but I cannot X509_get_pubkey() >>> because of a non-standard object identifier. >>> >>> I can use X509_get_X509_PUBKEY() to get p

Re: [openssl-users] Get raw RSA public key from X509 certificate

2018-04-26 Thread Ken Goldman
On 04/26/18 16:37, Matt Caswell wrote: On 26/04/18 21:17, Ken Goldman wrote: I have to get the raw public modulus, but I cannot X509_get_pubkey() because of a non-standard object identifier. I can use X509_get_X509_PUBKEY() to get part way there.  I see the DER wrapped key in the public_key.d

Re: [openssl-users] Get raw RSA public key from X509 certificate

2018-04-26 Thread Matt Caswell
On 26/04/18 21:17, Ken Goldman wrote: > I have to get the raw public modulus, but I cannot X509_get_pubkey() > because of a non-standard object identifier. > > I can use X509_get_X509_PUBKEY() to get part way there.  I see the DER > wrapped key in the public_key.data element, but I don't know an

[openssl-users] Get raw RSA public key from X509 certificate

2018-04-26 Thread Ken Goldman
I have to get the raw public modulus, but I cannot X509_get_pubkey() because of a non-standard object identifier. I can use X509_get_X509_PUBKEY() to get part way there. I see the DER wrapped key in the public_key.data element, but I don't know an API to get to that element. Am I on the rig

Re: [openssl-users] Generating unsigned RSA Public Key with openssl

2018-03-24 Thread Salz, Rich via openssl-users
The API cannot do it. The encoding requires that numbers with the high-bit on have a leading zero to avoid being interpreted as negative numbers as you noticed. You could maybe generate our own RSA numbers with the high-bit off – i.e., make your own RSA_new kind of API. The BN code can have f

[openssl-users] Generating unsigned RSA Public Key with openssl

2018-03-24 Thread Jan Bilek
Hi, Following code is simplified to demonstrate plain RSA public key with the OpenSSL library: RSA_ptr rsa(RSA_new(), ::RSA_free); BN_ptr bn(BN_new(), ::BN_free); BN_set_word(bn.get(), RSA_F4); //65535 RSA_generate_key_ex(rsa.get(), 320, bn.get(), NULL); BIO * keybio

Re: [openssl-users] How can I generate an RSA Public Key with OAEP padding?

2016-07-28 Thread Viktor Dukhovni
> On Jul 28, 2016, at 2:33 AM, Socrates wrote: > > The question is how can I use openssl command line tool to create a public > key using RSAES-PKCS1-v1_5, RSA-OAEP, or RSA-OAEP-256 (paddings?)? RSA public keys don't have padding, signature and encryption formats have padding. -- Vi

[openssl-users] How can I generate an RSA Public Key with OAEP padding?

2016-07-27 Thread Socrates
Hi, Even though I have used openssl or ssh-keygen for years to generate key pairs mainly for SSH purposes, I don't know much about the underlying theory and finer details of cryptography. I want to use JSON Web Encryption (JWE) and there we have this concept of Key Encryption. Key Encryption c

RE: What's the right way to make a RSA public key from two BIGNUM n and e?

2014-10-12 Thread bernard Hauzeur
Subject: What's the right way to make a RSA public key from two BIGNUM n and e? What's the right way to make a RSA public key from two BIGNUM n (modulus) and e (public exponent)? RSA* pubKeyRSA = RSA_new(); pubKeyRSA->n = n; pubKeyRSA->e = e; This way seems working. B

Re: What's the right way to make a RSA public key from two BIGNUM n and e?

2014-10-10 Thread Ken Goldman
On 10/10/2014 2:27 AM, Zihan, Sheldon Liu wrote: What's the right way to make a RSA public key from two BIGNUM n (modulus) and e (public exponent)? RSA* pubKeyRSA = RSA_new(); pubKeyRSA->n = n; pubKeyRSA->e = e; This way seems working. But I didn't find it is documented anyw

What's the right way to make a RSA public key from two BIGNUM n and e?

2014-10-10 Thread Zihan, Sheldon Liu
What's the right way to make a RSA public key from two BIGNUM n (modulus) and e (public exponent)? RSA* pubKeyRSA = RSA_new(); pubKeyRSA->n = n; pubKeyRSA->e = e; This way seems working. But I didn't find it is documented anywhere. Is there a direct API taking n and e, and return

Re: openssl RSA public key does not match key read from C code

2014-01-22 Thread lists
On 01/06/2014 10:34 PM, Alan Cabrera wrote: I should have obtained the DER form using i2d_RSA_PUBKEY(). Also, passing &buf to the method should have warned me that the pointer was being modified. I have no idea why it gets modified and what it points to after the call. So now I do |der_f

Re: openssl RSA public key does not match key read from C code

2014-01-06 Thread Alan Cabrera
On Jan 5, 2014, at 11:49 AM, Alan D. Cabrera wrote: > I've created a public key file using the following commands: > > openssl genrsa -out mykey.pem 2046 > openssl rsa -in mykey.pem -pubout > mykey.pub > > I then read it from some C code: > > public_key = PEM_read_RSA_PUBKEY(fp, NULL, NULL, N

Re: openssl RSA public key does not match key read from C code

2014-01-06 Thread Dr. Stephen Henson
On Sun, Jan 05, 2014, Alan D. Cabrera wrote: > I've created a public key file using the following commands: > > openssl genrsa -out mykey.pem 2046 > openssl rsa -in mykey.pem -pubout > mykey.pub > > I then read it from some C code: > > public_key = PEM_read_RSA_PUBKEY(fp, NULL, NULL, NULL); >

Re: openssl RSA public key does not match key read from C code

2014-01-06 Thread Viktor Dukhovni
ULL, NULL, NULL); >From the documentation: d2i_RSAPublicKey() and i2d_RSAPublicKey() decode and encode a PKCS#1 RSAPublicKey structure. d2i_RSA_PUBKEY() and i2d_RSA_PUBKEY() decode and encode an RSA public key using a SubjectPublicKeyInfo (certificate public key) struct

Re: openssl RSA public key does not match key read from C code

2014-01-06 Thread Dereck Hurtubise
There is currently a parsing bug when converting from PEM to DER. I encountered this as well, but with DSA keys. I suppose the same bug occurs with RSA keys. In DSA the G component gets copied to the pub component when converting from PEM to DER. >From DER to PEM works fine. Regards, Dereck

openssl RSA public key does not match key read from C code

2014-01-05 Thread Alan D. Cabrera
I've created a public key file using the following commands: openssl genrsa -out mykey.pem 2046 openssl rsa -in mykey.pem -pubout > mykey.pub I then read it from some C code: public_key = PEM_read_RSA_PUBKEY(fp, NULL, NULL, NULL); and then obtain the DER form of this public key: int len = i2d_

Re: Problem loading der encoded RSA public key inlined with objcopy.

2013-04-11 Thread Jakob Bohm
On 4/11/2013 8:31 PM, Dave Thompson wrote: From: Lee Hambley Sent: Thursday, 11 April, 2013 02:33 ... extern unsigned char _binarycertificates_der_start; extern unsigned char _binarycertificates_der_size; I see below this is apparently a very weird object-file trick. int main(int arg

RE: Problem loading der encoded RSA public key inlined with objcopy.

2013-04-11 Thread Dave Thompson
>From: owner-openssl-us...@openssl.org On Behalf Of Lee Hambley >Sent: Thursday, 11 April, 2013 02:33 >I've been battling the following code for a couple of hours >armed with my Network Security With OpenSSL book to little avail. >#include >#include >#include >extern unsigned char _binary

Problem loading der encoded RSA public key inlined with objcopy.

2013-04-11 Thread Lee Hambley
Hi List, I've been battling the following code for a couple of hours armed with my *Network Security With OpenSSL* book to little avail. #include #include #include extern unsigned char _binarycertificates_der_start; extern unsigned char _binarycertificates_der_size; int main(int argc,

Fwd: Problem loading der encoded RSA public key inlined with objcopy.

2013-04-11 Thread Lee Hambley
t matches the "openssl enc -base64" output. - Lee Hambley -- Forwarded message -- From: Lee Hambley Date: 11 April 2013 08:32 Subject: Problem loading der encoded RSA public key inlined with objcopy. To: openssl-users@openssl.org Hi List, I've been battling the following code fo

Re: RSA public key in x509 format

2012-11-03 Thread Taraniteja Vishwanatha
Thanks Dave. Will give a shot using PEM_write_bio_RSAPUBKEY. On Fri, Nov 2, 2012 at 7:12 PM, Dave Thompson wrote: > >From: owner-openssl-us...@openssl.org On Behalf Of Taraniteja Vishwanatha > >Sent: Friday, 02 November, 2012 18:29 > > Answering only -users, this is not a -dev question. > > >I w

RE: RSA public key in x509 format

2012-11-02 Thread Dave Thompson
>From: owner-openssl-us...@openssl.org On Behalf Of Taraniteja Vishwanatha >Sent: Friday, 02 November, 2012 18:29 Answering only -users, this is not a -dev question. >I want to generate a RSA key pair in x509 format and pem encoded >( BEGIN PUBLIC KEY .END PUBLIC KEY). >Can anyone give m

RE: how to extract an RSA public key

2012-09-03 Thread Dave Thompson
> From: owner-openssl-us...@openssl.org On Behalf Of Carolin Latze > Sent: Monday, 03 September, 2012 10:48 > I guess I just got it if the only way is to use the PEM API? > > > Hi all, > > > > is there an API call that allows to extract an RSA public key (out of an

Re: how to extract an RSA public key

2012-09-03 Thread Carolin Latze
I guess I just got it if the only way is to use the PEM API? > Hi all, > > is there an API call that allows to extract an RSA public key (out of an > RSA structure) or should I just access rsa->n and rsa->e directly? I > cannot find an API call RSA_* that gives me th

how to extract an RSA public key

2012-09-03 Thread Carolin Latze
Hi all, is there an API call that allows to extract an RSA public key (out of an RSA structure) or should I just access rsa->n and rsa->e directly? I cannot find an API call RSA_* that gives me the public key, but the documentation (http://www.openssl.org/docs/crypto/rsa.html) says one shou

答复: EVP_VerifyFinal fail use RSA public key, openssl-1.0.0d, win32, vc2008sp1

2011-05-24 Thread bs1
日 22:52 收件人: openssl-users@openssl.org 主题: EVP_VerifyFinal fail use RSA public key, openssl-1.0.0d, win32, vc2008sp1 Hello, EVP_VerifyFinal fail when use RSA public key, can anyone help? I use openssl cmd line tool generate a key pair of RSA and store them to two pem files. And RSA_sign and RSA_

EVP_VerifyFinal fail use RSA public key, openssl-1.0.0d, win32, vc2008sp1

2011-05-24 Thread bs1
Hello, EVP_VerifyFinal fail when use RSA public key, can anyone help? I use openssl cmd line tool generate a key pair of RSA and store them to two pem files. And RSA_sign and RSA_verify work fine with the pem files. To support large buffer , I change the code to work with EVP_Sign and

Re: problem loading rsa public key.

2010-11-22 Thread Neil Dugan
On 22/11/10 23:48, Dr. Stephen Henson wrote: On Mon, Nov 22, 2010, Neil Dugan wrote: I have generated a rsa public and private key with. openssl genrsa -out server.pem 2048 openssl rsa -in server.pem -pubout -out server.pub When I use the PEM_read_RSAPublicKey() command to load that public ke

Re: problem loading rsa public key.

2010-11-22 Thread Dr. Stephen Henson
On Mon, Nov 22, 2010, Neil Dugan wrote: > I have generated a rsa public and private key with. > > openssl genrsa -out server.pem 2048 > openssl rsa -in server.pem -pubout -out server.pub > > When I use the PEM_read_RSAPublicKey() command to load that public key I > get the error "error:0906D06C:P

problem loading rsa public key.

2010-11-22 Thread Neil Dugan
I have generated a rsa public and private key with. openssl genrsa -out server.pem 2048 openssl rsa -in server.pem -pubout -out server.pub When I use the PEM_read_RSAPublicKey() command to load that public key I get the error "error:0906D06C:PEM routines:PEM_read_bio:no start line" I don't un

Re: How to convert RSA public key XML format to PEM or ASCII format

2010-09-19 Thread Mounir IDRASSI
DE? > I only have UNIX command line and Windows available. > > Regards > Vivek Panikulam > > > > > > From: Mounir IDRASSI > To: openssl-users@openssl.org > Sent: Fri, September 17, 2010 10:07:10 PM > Subject: Re: How to convert

Re: How to convert RSA public key XML format to PEM or ASCII format

2010-09-18 Thread Mounir IDRASSI
DE? > I only have UNIX command line and Windows available. > > Regards > Vivek Panikulam > > > > > > From: Mounir IDRASSI > To: openssl-users@openssl.org > Sent: Fri, September 17, 2010 10:07:10 PM > Subject: Re: How to convert

Re: How to convert RSA public key XML format to PEM or ASCII format

2010-09-18 Thread Panikulam Vivek
Subject: Re: How to convert RSA public key XML format to PEM or ASCII format Hi, To perform the conversion, use your favorite XML library to extract the BASE64 values in the Modulus and Exponent nodes, then create an EVP_PKEY structure from these using the functions I'm pasting below. From

Re: How to convert RSA public key XML format to PEM or ASCII format

2010-09-17 Thread Mounir IDRASSI
return NULL; } } Cheers, -- Mounir IDRASSI IDRIX http://www.idrix.fr > Hi All  > > I have a RSA public key provided in the below format and would like to > know how > to convert it into a format like PEM or any other format which can be read > by > openssl. I didnt find

How to convert RSA public key XML format to PEM or ASCII format

2010-09-17 Thread Panikulam Vivek
Hi All  I have a RSA public key provided in the below format and would like to know how to convert it into a format like PEM or any other format which can be read by openssl. I didnt find any conclusive solutions for this on www. Will the application which generated this key format be capable

Re: Extracting RSA public key from private key

2010-04-10 Thread Julien Kauffmann
Thank you very much ! It worked ;) Dr. Stephen Henson wrote: On Sat, Apr 10, 2010, Julien Kauffmann wrote: Hello, I need to extract the RSA public key from a RSA private key using OpenSSL. I'm currently using |RSAPublicKey_dup()| passing the |RSA*| private key to get the publi

Re: Extracting RSA public key from private key

2010-04-10 Thread Dr. Stephen Henson
On Sat, Apr 10, 2010, Julien Kauffmann wrote: > Hello, > > I need to extract the RSA public key from a RSA private key using OpenSSL. > > I'm currently using |RSAPublicKey_dup()| passing the |RSA*| private key to > get the public key. However, while the call seems to wor

Extracting RSA public key from private key

2010-04-10 Thread Julien Kauffmann
Hello, I need to extract the RSA public key from a RSA private key using OpenSSL. I'm currently using |RSAPublicKey_dup()| passing the |RSA*| private key to get the public key. However, while the call seems to work, I cannot load (or use) this public key using the openssl command-line

Re: Verify with RSA Public Key Fails

2010-03-01 Thread Dr. Stephen Henson
On Mon, Mar 01, 2010, Paul Suhler wrote: > Does anyone else have any speculation on why I'm failing the padding > check? I'm definitely using the public exponent and public modulus from > the CAVP sample request file. After conversion to BIGNUMs, the bytes in > the d, top, and dmax fields of eac

Re: Verify with RSA Public Key Fails

2010-03-01 Thread Paul Suhler
...@openssl.org] On Behalf Of Paul Suhler Sent: Saturday, February 27, 2010 6:17 AM To: openssl-users@openssl.org; openssl-users@openssl.org Subject: RE: Verify with RSA Public Key Fails Hi, Mounir. I misspoke. The value of the public exponent is in fact 3. Any idea what is the purpose of th

Re: Verify with RSA Public Key Fails

2010-02-27 Thread Dr. Stephen Henson
On Sat, Feb 27, 2010, Paul Suhler wrote: > Hi, Mounir. > > I misspoke. The value of the public exponent is in fact 3. > > Any idea what is the purpose of the padding check or why it should fail? > Most likely cause is that the verification failed for example the key not correctly set of the s

RE: Verify with RSA Public Key Fails

2010-02-27 Thread Paul Suhler
-users@openssl.org Subject: Re: Verify with RSA Public Key Fails Hi Paul, You say that the exponent is 1024 bit long. This means you are using the private exponent because usually the public exponent is much smaller: typically the public exponent is 3 or 65537. So in order to construct your RSA

Re: Verify with RSA Public Key Fails

2010-02-27 Thread Mounir IDRASSI
Hi Paul, You say that the exponent is 1024 bit long. This means you are using the private exponent because usually the public exponent is much smaller: typically the public exponent is 3 or 65537. So in order to construct your RSA public key, replace the value of the private exponent you are

Verify with RSA Public Key Fails

2010-02-26 Thread Paul Suhler
Hi, everyone. In Openssl 0.9.8i, I'm trying to take an RSA public exponent and public modulus, assemble them into an RSA key, and use that to verify a signature for a message. However, EVP_VerifyFinal() always fails, apparently because of the wrong use of padding. My code: RSA * RsaKey

Re: Please Help: RSA Public Key Exponent size

2009-10-30 Thread Jeffrey Walton
Hi Bizhan, > The command BN_num_bytes(rsa_public_key->e) returns the size > of the exponent part of the public key, and it is 3 bytes. "10001". > Could this be a valid value? Yes. Typical values are 3, 17, and 65535. > We have a system that requires public key exponent to be 4 bytes, > could I pa

Please Help: RSA Public Key Exponent size

2009-10-30 Thread Bizhan Gholikhamseh (bgholikh)
Hi All, In our environment a secure server creates Private/Public RSA keys. We Can never access the Private key but we are able to access the Public Key. The command BN_num_bytes(rsa_public_key->e) returns the size of the exponent part of the public key, and it is 3 bytes. "10001". Could this be

Re: Read DER-encoded RSA public key in memory?

2009-07-20 Thread Mounir IDRASSI
drix.fr Jeremy R. wrote: I'm trying to make a simple application which uses a 4096-bit RSA public key (encoded in DER format, statically compiled into the program itself. I generated this key with OpenSSL itself and I am able to do operations with it from the command-line. And I kno

Re: Read DER-encoded RSA public key in memory?

2009-07-20 Thread Jeremy R.
code : BIO* keyBio = BIO_new_mem_buf(TESTING_PUBLIC_KEY, sizeof(TESTING_PUBLIC_KEY)); public_key = d2i_PUBKEY_bio(keyBio, NULL); That's it! I hope this will help. Cheers, -- Mounir IDRASSI IDRIX http://www.idrix.fr Jeremy R. wrote: I'm trying to make a simple application which uses a 4096

Re: Read DER-encoded RSA public key in memory?

2009-07-20 Thread Mounir IDRASSI
ple application which uses a 4096-bit RSA public key (encoded in DER format, statically compiled into the program itself. I generated this key with OpenSSL itself and I am able to do operations with it from the command-line. And I know I encoded it in the program correctly, because if I

Read DER-encoded RSA public key in memory?

2009-07-20 Thread Jeremy R.
I'm trying to make a simple application which uses a 4096-bit RSA public key (encoded in DER format, statically compiled into the program itself. I generated this key with OpenSSL itself and I am able to do operations with it from the command-line. And I know I encoded it in the pr

Re: Error Encrytping Symmetric key with RSA Public Key

2008-09-30 Thread William Estrada
nssl-users@openssl.org Subject: Error Encrytping Symmetric key with RSA Public Key Hi group, I have written a simple program to test my understanding of the OpenSSL APIs. And of course I have a problem with one of them. My problem is that when I use RSA_public_encrypt to encrypt my Symmetric key

RE: Error Encrytping Symmetric key with RSA Public Key

2008-09-30 Thread Bill Colvin
--Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of William Estrada Sent: September 30, 2008 4:31 PM To: openssl-users@openssl.org Subject: Error Encrytping Symmetric key with RSA Public Key Hi group, I have written a simple program to test my understanding of th

Error Encrytping Symmetric key with RSA Public Key

2008-09-30 Thread William Estrada
Hi group, I have written a simple program to test my understanding of the OpenSSL APIs. And of course I have a problem with one of them. My problem is that when I use RSA_public_encrypt to encrypt my Symmetric key is get the following error: Testing RSA encryption of Symmertic key 1

Re: OpenSSL FIPS module doesn't support RSA public-key encryption scheme?

2007-07-10 Thread Steve Marquess
ng the API in strange and terrible ways then it's legal. -Steve M. > > > > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Raymond Yuan > Sent: July 5, 2007 7:33 PM > To: openssl-users@openssl.org > Subject: Re: OpenSSL FIPS module doesn&

RE: OpenSSL FIPS module doesn't support RSA public-key encryption scheme?

2007-07-05 Thread Bill Colvin
algorithms are disabled once you enable FIPS MODE. Bill From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Raymond Yuan Sent: July 5, 2007 7:33 PM To: openssl-users@openssl.org Subject: Re: OpenSSL FIPS module doesn't support RSA publi

Re: OpenSSL FIPS module doesn't support RSA public-key encryption scheme?

2007-07-05 Thread Raymond Yuan
Marek, Thanks for your reply. That page in security policy, 17& 18, is really what I'm referring to. Based on that I drew a conclusion that RSA public-key encyrption is not approvied algorithms in the OpenSSL FIPS module. However in the FIPS source code in /fips-1.0/rsa/fips_

Re: OpenSSL FIPS module doesn't support RSA public-key encryption scheme?

2007-07-05 Thread Marek Marcola
Hello, > > According to my understanding on OpenSSL FIPS module security > policy, RSA public-key encryption scheme is not approved algorithm in > the module. However, in OpenSSL FIPS module source code, I saw the API > like RSA_eay_public_encrypt(). Could someone shed a ligh

OpenSSL FIPS module doesn't support RSA public-key encryption scheme?

2007-07-05 Thread Raymond Yuan
Hi, According to my understanding on OpenSSL FIPS module security policy, RSA public-key encryption scheme is not approved algorithm in the module. However, in OpenSSL FIPS module source code, I saw the API like RSA_eay_public_encrypt(). Could someone shed a light on this? Thanks Raymond

Re: Importing RSA Public Key generated by JRE

2006-09-14 Thread Marek Marcola
Hello, > I am attempting to import a RSA Public Key file generated by JRE 5.0 using > OpenSSL. > > As I understand it, JRE's RSA Public Key is in X.509's SubjectPublicKeyInfo > structure. Then you should try d2i_RSA_PUBKEY(). Best regards, -- Marek

Importing RSA Public Key generated by JRE

2006-09-13 Thread Hon.Hwang
Hi all, I am attempting to import a RSA Public Key file generated by JRE 5.0 using OpenSSL. As I understand it, JRE's RSA Public Key is in X.509's SubjectPublicKeyInfo structure. I saved the byte array returned by JRE's RSAPublicKey.getEncoded() into a file. Now I like to i

Re: Extract (RSA) Public Key from an x509 certificat

2006-05-19 Thread Sarnov (sent by Nabble.com)
Tks for you help. -- View this message in context: http://www.nabble.com/Extract+%28RSA%29+Public+Key+from+an+x509+certificat-t1649149.html#a4469361 Sent from the OpenSSL - User forum at Nabble.com. __ OpenSSL Project

Re: Extract (RSA) Public Key from an x509 certificat

2006-05-19 Thread Marek Marcola
Hello, > I'm looking for a way to extract a RSA public key form an x509 certifcat. > > Ps: I'm programming with C. X509_get_pubkey() Best regards, -- Marek Marcola <[EMAIL PROTECTED]> _

Extract (RSA) Public Key from an x509 certificat

2006-05-19 Thread Sarnov (sent by Nabble.com)
Hi, I'm looking for a way to extract a RSA public key form an x509 certifcat. Ps: I'm programming with C. Tks -- View this message in context: http://www.nabble.com/Extract+%28RSA%29+Public+Key+from+an+x509+certificat-t1649149.html#a4466507 Sent from the OpenSSL - User forum at

RE: Working with RSA Public Key in a local char []

2005-10-11 Thread Frédéric Donnat
: Tue 10/11/2005 7:42 AM To: openssl-users@openssl.org Cc: Subject:Working with RSA Public Key in a local char [] Hello, Instead of reading the public key from a file (PEM), I would like to be able to keep the key string in a local char[] variable and be able to generate the RSA

Working with RSA Public Key in a local char []

2005-10-10 Thread guvenma (sent by Nabble.com)
Hello, Instead of reading the public key from a file (PEM), I would like to be able to keep the key string in a local char[] variable and be able to generate the RSA*rsa object from it. Can anyone tell me what BIO_xxx steps would be needed to achieve that? Any suggestions would be appreciated.  I

Re: RSA Public Key Cryptography.

2005-04-25 Thread Haikel Mejri
Hi, Yes Layala, you can use the following command line : openssl genrsa -out your_file 1024 where 1024 reprents the number of bits of your key. Best Regards Le lun 25/04/2005 à 09:47, Layla a écrit : > Hi all, > I would like to use RSA public key cryptography. My question is: Is it >

Re: RSA Public Key Cryptography.

2005-04-25 Thread Herman
Layla wrote: Hi all, I would like to use RSA public key cryptography. My question is: Is it possible to generate RSA keys from command line and have them stored in a file in order for a C application to access/use them? If not, then what is it the best way to go about this? Probably the easiest

RSA Public Key Cryptography.

2005-04-25 Thread Layla
Hi all, I would like to use RSA public key cryptography. My question is: Is it possible to generate RSA keys from command line and have them stored in a file in order for a C application to access/use them? If not, then what is it the best way to go about this?   Thanks in advance. Layla

Steps to RSA Public Key

2005-01-04 Thread colinval
Hi, Iam new to RSA and SSL development Can someone tell me the steps to make and destroying an RSA eg, list the order the functions should be Help appricated Thanks http://www.iol.ie __ OpenSSL Project

Re: Problems with RSA public key

2004-12-01 Thread Dr. Stephen Henson
On Wed, Dec 01, 2004, Darío Mariani wrote: > Hello: > I found that the resultin file from PEM_write_RSAPublicKey() > function is diferent to the output of openssl x509 -in cert.pem -noout > -pubkey (generated with the same key pair). Is there any way to > extract the public key from a certificat

Problems with RSA public key

2004-12-01 Thread Darío Mariani
Hello: I found that the resultin file from PEM_write_RSAPublicKey() function is diferent to the output of openssl x509 -in cert.pem -noout -pubkey (generated with the same key pair). Is there any way to extract the public key from a certificate in the same format as what PEM_write_RSAPublicKey()

Re: RSA public key

2004-09-07 Thread Dr. Stephen Henson
On Tue, Sep 07, 2004, Niklas Olsson wrote: > > maybe I have misunderstood but I havn't encrypted the data yet > I'm trying to understand how to read my certificate so I can get the RSA > *rsa to point to the public key in the certicate so I am able to encrypt my > data. The certificate comes to

Re: RSA public key

2004-09-07 Thread Niklas Olsson
t want to encrypt the pre master key and send it back... thanks! RSA encrypted data should be just read in verbatim into a buffer. From: "Niklas Olsson" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: RSA public key Date: Tue, 07 Sep 2004 17:33:3

Re: RSA public key

2004-09-07 Thread Dr. Stephen Henson
On Tue, Sep 07, 2004, Niklas Olsson wrote: > > Hi, > thanks for the help, I havn't got it to work yet though. > One question. > The RFC states > "An RSA encrypted value is encoded with PKCS #1 block type 2 as > described in [PKCS1]." > should I use d2i_X509 for that? > d2i_X509() is for DER f

Re: RSA public key

2004-09-07 Thread Niklas Olsson
PROTECTED] To: [EMAIL PROTECTED] Subject: Re: RSA public key Date: Tue, 07 Sep 2004 13:46:56 +0800 Vadym Fedyukovych wrote: Tan Eng Ten wrote: If you have the cert buffer in ASN1 DER encoding, why don't you just use the d2i function like this: - unsigned char *ptr; X509 *x509; EVP_PKEY *pu

  1   2   >