AES EVP Encryption and Decryption

2009-07-27 Thread JT
I apologize if that has been asked/answered before. After lots of googling I could find no satisfactory answer. I have a question about the way AES-CBC EVP has been implemented. Specifically how EVP handles the IV. I have an application using the AES EVP functions in CBC mode. Most examples you

RE: EVP_Open* with a public key

2009-07-27 Thread David Schwartz
Jeremy R. wrote: > But RSA, from what I understand, doesn't by definition make one key > "public" and the other "private". Unless I'm really mistaken, you > create a key pair, whereby data encrypted with either can be decrypted > only by the other. I think it's only by convention that one is priv

Re: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

2009-07-27 Thread Rij
Hi Dave, Thanks for your reply. I was able to fix it a while ago. And your guess is correct. My port number was getting messed up. And extra thinks for the tip on the libraries. :) On Mon, Jul 27, 2009 at 1:31 PM, Dave Thompson wrote: >> From: owner-openssl-us...@openssl.org On Behalf Of Rij >> S

Re: EVP_Open* with a public key

2009-07-27 Thread Jeremy R.
On 27-Jul-09, at 9:59 PM, Dave Thompson wrote: From: owner-openssl-us...@openssl.org On Behalf Of David Schwartz Sent: Monday, 27 July, 2009 12:06 Jeremy R. wrote: Okay, forgive my ignorance, but isn't the most common way of signing data simply taking a cryptographic hash (SHA-1, RIPEMD-1

RE: EVP_Open* with a public key

2009-07-27 Thread Dave Thompson
> From: owner-openssl-us...@openssl.org On Behalf Of David Schwartz > Sent: Monday, 27 July, 2009 12:06 > Jeremy R. wrote: > > > Okay, forgive my ignorance, but isn't the most common way > of signing > > data simply taking a cryptographic hash (SHA-1, RIPEMD-160, > WHIRLPOOL, > > etc.) and the

Re: EVP_Open* with a public key

2009-07-27 Thread Jeremy R.
On 27-Jul-09, at 12:05 PM, David Schwartz wrote: Jeremy R. wrote: Okay, forgive my ignorance, but isn't the most common way of signing data simply taking a cryptographic hash (SHA-1, RIPEMD-160, WHIRLPOOL, etc.) and then encrypting it with a public-key technology? Yes, that's the most co

RE: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

2009-07-27 Thread Dave Thompson
> From: owner-openssl-us...@openssl.org On Behalf Of Rij > Sent: Thursday, 23 July, 2009 21:17 > I have a simple client operating in blocking mode. When I try > to connect to the server, I get the error: > error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol > Sounds like your ser

Re: Certificate Request issued by HSM versus CR issued by plain openssl

2009-07-27 Thread Patrick Patterson
On July 22, 2009 04:00:15 pm Eduardo M.Cavalcanti wrote: > Hello, > In case I use a HSM to generate a certificate request is it possible > to differentiate this cerificate request from a certificate request > issued from plain openssl? Short answer: no. Longer answer: Still no, but if you are work

RE: EVP_Open* with a public key

2009-07-27 Thread David Schwartz
Jeremy R. wrote: > Okay, forgive my ignorance, but isn't the most common way of signing > data simply taking a cryptographic hash (SHA-1, RIPEMD-160, WHIRLPOOL, > etc.) and then encrypting it with a public-key technology? Yes, that's the most common way. But it is not a general property of publi

Re: read rsa keys & segmentation fault

2009-07-27 Thread Neil Dugan
Neil Dugan wrote: Dr. Stephen Henson wrote: On Mon, Jul 27, 2009, Neil Dugan wrote: Hi, I have been trying to read the keys generated by "openssl genrsa ..." and "openssl rsa -pubout ..." commands. I successfully (according to the return code) read the private key with if (in = BIO_new_f

Re: read rsa keys & segmentation fault

2009-07-27 Thread Neil Dugan
Neil Dugan wrote: Dr. Stephen Henson wrote: On Mon, Jul 27, 2009, Neil Dugan wrote: Hi, I have been trying to read the keys generated by "openssl genrsa ..." and "openssl rsa -pubout ..." commands. I successfully (according to the return code) read the private key with if (in = BIO_new_f

Re: Assertion failure

2009-07-27 Thread Michael Kurecka
That seemed to work using export LD_LIBRARY_PATH=/usr/local/ssl/fips/lib I'm not getting the assertion failure but I am now getting a segmentation fault "in memcpy () from /lib/libc.so.6" which I need to look into. Back to my previous question of -- Is my script wrong or am I doing something wrong

Re: Assertion failure

2009-07-27 Thread Dr. Stephen Henson
On Mon, Jul 27, 2009, Michael Kurecka wrote: > I tried > > export LD_LIBRARY_PATH=/usr/local/ssl/fips > and > export LD_LIBRARY_PATH=/usr/local/ssl/fips/bin > and > export LD_LIBRARY_PATH=/usr/local/ssl/fips-1.0 > You need to set that to a directory that contains libssl.so.0.9.8 that is FIPS ca

Re: Fwd: where to check error# and translate it to human readable format?

2009-07-27 Thread Dr. Stephen Henson
On Mon, Jul 27, 2009, loody wrote: > Dear all: > When executing my sample code, I got the message below: > error:0406B07A:lib(4):func(107):reason(122) > > My question are: > 1. after checking crypto/err/err.h >    #define ERR_LIB_RSA         4 >    the error seems comes from RSA, but how can I fi

Re: read rsa keys

2009-07-27 Thread Dr. Stephen Henson
On Mon, Jul 27, 2009, Neil Dugan wrote: > Dr. Stephen Henson wrote: >> On Mon, Jul 27, 2009, Neil Dugan wrote: >>> Hi, >>> >>> I have been trying to read the keys generated by "openssl genrsa ..." and >>> "openssl rsa -pubout ..." commands. >>> >>> I successfully (according to the return code) re

Re: Assertion failure

2009-07-27 Thread Michael Kurecka
I tried export LD_LIBRARY_PATH=/usr/local/ssl/fips and export LD_LIBRARY_PATH=/usr/local/ssl/fips/bin and export LD_LIBRARY_PATH=/usr/local/ssl/fips-1.0 and all three failed to avert the assertion failure. How can I be assured that the FIPS library is being run? Self-tests seem to run and pass wh

Re: read rsa keys

2009-07-27 Thread Neil Dugan
Dr. Stephen Henson wrote: On Mon, Jul 27, 2009, Neil Dugan wrote: Hi, I have been trying to read the keys generated by "openssl genrsa ..." and "openssl rsa -pubout ..." commands. I successfully (according to the return code) read the private key with if (in = BIO_new_file("rsakey.pem", "r