java - Get an illegal blocksizeexception: data cannot exceed 256 bytes when using RSA
I am using rsa key to encrypt a long string which I will send to my server(will encrypt it with server's public key and my private key) But it throws an exception like javax.crypto.IllegalBlockSizeException: Data must not be longer than 256 bytes
I feel that I have not understood the working of rsa properly till now(using the inbuilt libraries are the cause for this).
Can some one please explain why this exception is being thrown. Is it not at all possible to send long string encrypted?
This question and all comments follow the
"Attribution Required."
Similar questions
- java - Password: what is the reason for the illegal blocksizeexception?
- java - When to initialize an array with 256
- java - RSA decryption error - illegallblocksizeexception: data must not exceed 128 bytes
- encryption - Android 8.0: illegal blocksizeexception when using RSA / ECB / oaepwithsha-512andmgf1padding
- java - An illegal blocksizeexception occurred while trying to encrypt and decrypt strings using AES
- More similar questions >>
All Answers
Leave a Reply