Re: Segfault when encrypting

2010-06-11 Thread Hannes Schüller
On Thu, Jun 10, 2010 at 03:55:40PM -0700, David Schwartz wrote: > > Hannes Schuller wrote: > > > > I'm very puzzled here. Why do you sign the reply and then sign a hash > > > of the signature? You say "Message encryption successful", but that's > > > a signature you're doing, not an encryption. >

RE: Segfault when encrypting

2010-06-10 Thread David Schwartz
Hannes Schuller wrote: > > I'm very puzzled here. Why do you sign the reply and then sign a hash > > of the signature? You say "Message encryption successful", but that's > > a signature you're doing, not an encryption. > I was under the impression that RSA_private_encrypt and > RSA_public_encr

Re: Segfault when encrypting

2010-06-10 Thread Hannes Schüller
"David Schwartz" wrote: > > Hannes Schuller wrote: > > > hash = (unsigned char *)malloc(RSA_size(rsa) * sizeof(unsigned > > char)); ciphertext = (char *)malloc(RSA_size(rsa) * sizeof(char)); > > signature = (char *)malloc(RSA_size(rsa) * sizeof(char)); > > if (ciphertext != NULL && signature !=

RE: Segfault when encrypting

2010-06-09 Thread David Schwartz
Hannes Schuller wrote: > hash = (unsigned char *)malloc(RSA_size(rsa) * sizeof(unsigned char)); > ciphertext = (char *)malloc(RSA_size(rsa) * sizeof(char)); > signature = (char *)malloc(RSA_size(rsa) * sizeof(char)); > if (ciphertext != NULL && signature != NULL && hash != NULL) { > memset(