BC:.DataLengthException: input too large for RSA cipher.
843810Jun 21 2004 — edited Jun 22 2004I have a bloc of 128 bytes and I want to encrypt it with a RSA 's public key (1024 bit).
I use Bouncy Castle for that. But depending on the generated key sometimes I have this exception:
org.bouncycastle.crypto.DataLengthException: input too large for RSA cipher.
I read in the API java 1.4 taht for RSA ( the plain text muxt be 128-11 bytes) But what I don't understand is that if it is true why It accepts a 128 bytes as input from times to times.
Thank you for your help