Generally, you can either encode your data in a more compact form and if you need hex translate it out on the other side, or you can break it into multiple blocks, encrypt and send each block.
Andrew Mann
[EMAIL PROTECTED] wrote:
Hi.. I am using Crypto library of openSSL for RSA encryption and decryption. I am generating RSA parameters for public modulus size of 1024. if I use RSA_public_encrypt() using PKCS1 padding and give an input string to encrypt of lenght 128, I get the following error: "5977:error:0406D06E:rsa routines:RSA_padding_add_PKCS1_type_2:data too large for key size:rsa_pk1.c:151:"
Is there any way I can encrypt a string of length 128 with the same key size ? I want this because, I need to encrypt a random number of 512 bits which when represented in Hex gives me a string of 128 bytes. Please let me know if there is any work around.
Thanks in Advance, Aneel. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]