Peter.Seiderer> I have a little problem with the function
Peter.Seiderer> 'RSA_public_encrypt(..)'. From the documentation:
Peter.Seiderer>
Peter.Seiderer> int RSA_public_encrypt(int flen, unsigned char *from,
Peter.Seiderer> unsigned char *to, RSA *rsa, int padding);
Peter.Seiderer>
Peter.Seiderer> flen must be less than RSA_size(rsa) - 11 for the PKCS #1
Peter.Seiderer> v1.5 based padding modes, and less than RSA_size(rsa) - 21
Peter.Seiderer> for RSA_PKCS1_OAEP_PADDING. The random number generator
Peter.Seiderer> must be seeded prior to calling RSA_public_encrypt().
[...]
Peter.Seiderer> This would mean that for RSA_PKCS1_OAEP_PADDING flen
Peter.Seiderer> must be less than RSA_size(rsa) - 41 !!
Peter.Seiderer>
Peter.Seiderer> Is this a bug in the documentation or a bug in the RSA functions?
>From looking at the source, I'd say it's a documentation bug. There
are two SHA1-blobs lurking in the result. Each of them being 20 bytes
long, and then needing to leave space for the type byte, that removes
41.
Of course, I currently know about nothing about OAEP_PADDING, so I
might be very wrong...
--
Richard Levitte \ Spannv�gen 38, II \ [EMAIL PROTECTED]
Chairman@Stacken \ S-168 35 BROMMA \ T: +46-8-26 52 47
Redakteur@Stacken \ SWEDEN \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis -- [EMAIL PROTECTED]
Member of the OpenSSL development team
Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]