Hi,

I have a simple application which encrypts a piece of text using RSA.

when I call RSA_public_encrypt, it should return a char * of 256 chars,
right ? The returned char is not 256 chars long.

I measure with pointer hopping like this

while (*sp++)
;
This way it should hop to the end of the unsigned char * and it returns the
pointer value. (I know this works, its tested)

The return of RSA_public_encrypt differs every time. sometimes it returns
86, sometimes 132 and some other values.

The source char * is 214 char long (should be because of 256(blocksize) -
paddingbytes (41 for OAEP), I throw it to stdout for verification and it
looks OK.
I use PKCS1_OAEP padding. The error classes of openssl do not return an
error. so it seems to go fine but it doesnt.

If anyone has a clue please reply.

Met vriendelijke groet / With kind regards,

Thijs Volders.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to