Ben Wooller <[EMAIL PROTECTED]>:

> I did a fair bit of testing, and found that with a 512 bit key, i can
> encrypt messages up to 53 bytes in length, and with a 1024 bit key i can
> encypt up to 117 bytes of data. 
> Is this a result of me not setting something up before i do the
> RSA_public_encrypt, or incorrectly calling the function? Or is it a
> limitation or a bug?
>  
> the call i use is: 
> success = RSA_public_encrypt(Len, (unsigned char *)From, (unsigned char
> *)To, mRSAPublic, RSA_PKCS1_PADDING);

This is because of the padding schemes used (PKCS #1 version 1.5 in
this case).  Read the specifications (see <URL:http://www.rsa.com/PUBS/>),
or look in one of various comprehensive crypto books that discuss
these issues.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to