Re: how to extract the private key out of the KEY.PEM

2013-11-20 Thread Robert W Weaver
Kenneth Goldman/Watson/IBM@IBMUS wrote on 11/20/2013 10:37:04 AM: > > Encrypt with a private key for integrity purposes: this shows that the > > data that was encrypted corresponds to the owner of the key. > > Encrypt with a public key for confidentiality purposes: this shows that > > the data can

Re: how to extract the private key out of the KEY.PEM

2013-11-20 Thread Ken Goldman
On 11/18/2013 11:29 AM, Robert W Weaver wrote: owner-openssl-us...@openssl.org (Kenneth Goldman/Watson/IBM@IBMUS) wrote on 11/18/2013 10:03:29 AM: > Do not encrypt with a private key. Encrypt with the public key and > decrypt with the private key. Encrypt with a private key for integrity purp

Re: how to extract the private key out of the KEY.PEM

2013-11-19 Thread sampo
"Dave Thompson" said: > privatekeys - man PEM -- but the PEM_read routines can handle This is how I do it... #define PEM_CERT_START "-BEGIN CERTIFICATE-" #define PEM_CERT_END "-END CERTIFICATE-" #define PEM_RSA_PRIV_KEY_START "-BEGIN RSA PRIVATE KEY---

RE: how to extract the private key out of the KEY.PEM

2013-11-18 Thread Robert W Weaver
> "Dave Thompson" wrote on 11/18/2013 05:07:14 PM: > For RSA the private key is at least (d,n), and OpenSSL always generates > the “CRT” form which has half a dozen other elements to allow more Oh, well if you are going to be *helpful* ... >> So our question is how do we extract the private key

RE: how to extract the private key out of the KEY.PEM

2013-11-18 Thread Dave Thompson
re *always* different and the only way to verify is to verify. From: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org] On Behalf Of Ameet Lann Sent: Sunday, November 17, 2013 05:12 To: 'openssl-users@openssl.org' Subject: *** Spam *** how to extract the private key o

Re: how to extract the private key out of the KEY.PEM

2013-11-18 Thread Robert W Weaver
owner-openssl-us...@openssl.org (Kenneth Goldman/Watson/IBM@IBMUS) wrote on 11/18/2013 10:03:29 AM: > Do not encrypt with a private key. Encrypt with the public key and > decrypt with the private key. Encrypt with a private key for integrity purposes: this shows that the data that was encrypted c

Re: how to extract the private key out of the KEY.PEM

2013-11-18 Thread Ken Goldman
Do not encrypt with a private key. Encrypt with the public key and decrypt with the private key. I would extract the key parts by converting the pem format to an RSA structure, get the BIGNUMs from the structure, and convert BIGNUM to bin. I don't guarantee that this is the best way, but it

how to extract the private key out of the KEY.PEM

2013-11-17 Thread Ameet Lann
Hi, We work on verification of code in our company. We use the openssl to generate the key-pair and then to encrypt data using the key-pair. However we would like to verify that we do everything correctly so we want to encrypt independently using the private key. So our question is how do we ext