openssl-users  

Re: ciphertext length longer than mod len

Edgar Ricardo Gonzalez Lazaro
Mon, 08 Feb 2010 19:02:48 -0800

Have you tried without padding (RSA_NO_PADDING) or may be RSA_PKCS1_PADDING
or RSA_PKCS1_OAEP_PADDING

;-)

Greetings!

2010/2/7 ambika cp <ambika_sep...@rediffmail.com>

> Hi,
>
> I have an application encryting the data using RSA algorithm. I am using
> the encrypted data and want to decrypt the data to get plaintext. For this I
> am calling a RSA_private_decrypt() open ssl call in my C file. The publickey
> size is 2048bytes. The ciphertext passed from application is 246bytes around
> and the mod len of the key iam getting as 128. because of this i am getting
> the error as :
>
> error:0406506C:rsa routines:RSA_EAY_PRIVATE_DECRYPT:data greater than mod
> len
>
> I dont have control on the ciphertext. I have to provide the user-name on
> the application UI and it has the intelligency to encrypt it using RSA
> algorithm.
>
> How can I get this work.An further information required I can post. Please
> any suggestions are welcome.
>
> Regards
> Ambika
>
> <http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline....@middle?>




-- 
"Hay que darle un sentido a la vida por el hecho mismo de que la vida carece
de sentido."