Hello Christoph,

Christoph Hansen wrote:
I have a problem, I cannot really cover.

I'm using public key encryption together with RSA_NO_PADDING. The
Key-/Modulus-Size is 128Byte and the message to be encrypted are also
128Byte sized.

There exist choosen plain text attacks against RSA...

Now my problem:
Using the same (!) binary code (running in a debugging environment or not)
it sometimes work properly, sometimes it failes with the following message:

"error:04068084:rsa routines:RSA_EAY_PUBLIC_ENCRYPT:data too large for
modulus"

The RSA key and the data are handled as two big numbers. RSA requires that the key must be numerically bigger as the data.

Bye

Goetz

--
Goetz Babin-Ebell, TC TrustCenter AG, http://www.trustcenter.de
Sonninstr. 24-28, 20097 Hamburg, Germany
Tel.: +49-(0)40 80 80 26 -0,  Fax: +49-(0)40 80 80 26 -126

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Reply via email to