SecureBlackbox 16: Why am I getting an "Input too long" error when trying to encrypt or decrypt the data?


Asymmetric (public-key) algorithms operate with relatively small chunks of data. The exact size depends on the key length and other factors.

For example, with an RSA 1024-bit key, the length of data that you can encrypt or decrypt is a bit more than 100 bytes. If you need to encrypt a larger block, use the session symmetric key to encrypt the data, then encrypt the session key using the asymmetric algorithm.

We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@nsoftware.com.