Re: Decryption using public key

2007-10-23 Thread Robert Relyea
Wan-Teh Chang wrote: On 10/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Well, contrary to my expectations, I have now got the code working with PK11_PubEncryptRaw - so again a big thank you. Glad to hear that. If after you decrypt the data with the RSA public key, you check fo

Re: Decryption using public key

2007-10-23 Thread Wan-Teh Chang
On 10/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Well, contrary to my expectations, I have now got the code working > with PK11_PubEncryptRaw - so again a big thank you. Glad to hear that. If after you decrypt the data with the RSA public key, you check for PKCS #1 padding and decod

Re: Decryption using public key

2007-10-23 Thread alan . morris
On 19 Oct, 22:31, "Wan-Teh Chang" <[EMAIL PROTECTED]> wrote: > On 19 Oct 2007 13:17:53 -0700, [EMAIL PROTECTED] > > <[EMAIL PROTECTED]> wrote: > > > I know that you suggest PK11_PubEncryptRaw but I am trying to > > decrypt. > > You are trying to verify an RSA signature (by decrypting it with the >

Re: Decryption using public key

2007-10-22 Thread Robert Relyea
David E. Ross wrote: On 10/19/2007 9:49 AM, Wan-Teh Chang wrote: On 10/19/07, David E. Ross <[EMAIL PROTECTED]> wrote: On 10/19/2007 5:35 AM, [EMAIL PROTECTED] wrote: I am currently trying to convert from OpenSSL to NSS (seemed like a good idea at the time). The code that I cu

Re: Decryption using public key

2007-10-19 Thread David E. Ross
On 10/19/2007 9:49 AM, Wan-Teh Chang wrote: > On 10/19/07, David E. Ross <[EMAIL PROTECTED]> wrote: >> On 10/19/2007 5:35 AM, [EMAIL PROTECTED] wrote: >>> I am currently trying to convert from OpenSSL to NSS (seemed like a good >>> idea at the time). The code that I currently have an issue with i

Re: Decryption using public key

2007-10-19 Thread Wan-Teh Chang
On 19 Oct 2007 13:17:53 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I know that you suggest PK11_PubEncryptRaw but I am trying to > decrypt. You are trying to verify an RSA signature (by decrypting it with the public key). RSA public and private keys can be used symetrically. The mat

Re: Decryption using public key

2007-10-19 Thread alan . morris
On Oct 19, 1:35 pm, [EMAIL PROTECTED] wrote: > I am currently trying to convert from OpenSSL to NSS (seemed like a good > idea at the time). The code that I currently have an issue with is > essentially ... > > key=RSA_new(); > if (key) { > key->n=BN_bin2bn(IssPubKey,IssPubKeyLgth,NULL);

Re: Decryption using public key

2007-10-19 Thread alan . morris
On Oct 19, 3:17 pm, "Wan-Teh Chang" <[EMAIL PROTECTED]> wrote: > On 10/19/07, [EMAIL PROTECTED] > > > > > > <[EMAIL PROTECTED]> wrote: > > I am currently trying to convert from OpenSSL to NSS (seemed like a good > > idea at the time). The code that I currently have an issue with is > > essentiall

Re: Decryption using public key

2007-10-19 Thread a_d . morris
On Oct 19, 2:38 pm, David Stutzman wrote: > [EMAIL PROTECTED] wrote: > > I am currently trying to convert from OpenSSL to NSS (seemed like a good > > idea at the time). > > Most here would argue it's a good idea :). > > That's a fairly small look at the code. What is it that you are > actually tr

Re: Decryption using public key

2007-10-19 Thread Wan-Teh Chang
On 10/19/07, David E. Ross <[EMAIL PROTECTED]> wrote: > On 10/19/2007 5:35 AM, [EMAIL PROTECTED] wrote: > > I am currently trying to convert from OpenSSL to NSS (seemed like a good > > idea at the time). The code that I currently have an issue with is > > essentially ... > > > > key=RSA_new();

Re: Decryption using public key

2007-10-19 Thread David E. Ross
On 10/19/2007 5:35 AM, [EMAIL PROTECTED] wrote: > I am currently trying to convert from OpenSSL to NSS (seemed like a good > idea at the time). The code that I currently have an issue with is > essentially ... > > key=RSA_new(); > if (key) { > key->n=BN_bin2bn(IssPubKey,IssPubKeyLgth,N

Re: Decryption using public key

2007-10-19 Thread Wan-Teh Chang
On 10/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I am currently trying to convert from OpenSSL to NSS (seemed like a good > idea at the time). The code that I currently have an issue with is > essentially ... > > key=RSA_new(); > if (key) { > key->n=BN_bin2bn(IssPubKey,IssPubKe

Re: Decryption using public key

2007-10-19 Thread David Stutzman
[EMAIL PROTECTED] wrote: > I am currently trying to convert from OpenSSL to NSS (seemed like a good > idea at the time). Most here would argue it's a good idea :). That's a fairly small look at the code. What is it that you are actually trying to accomplish with the crypto code? How did you e

Decryption using public key

2007-10-19 Thread alan . morris
I am currently trying to convert from OpenSSL to NSS (seemed like a good idea at the time). The code that I currently have an issue with is essentially ... key=RSA_new(); if (key) { key->n=BN_bin2bn(IssPubKey,IssPubKeyLgth,NULL); key->e=BN_bin2bn(PubKeyExponent->value,PubKeyExponen