Too much data for RSA block fail. What is PKCS#7?

Posted by Tom Brito on Stack Overflow See other posts from Stack Overflow or by Tom Brito
Published on 2010-04-05T15:08:56Z Indexed on 2010/04/05 15:13 UTC
Read the original article Hit count: 277

Filed under:
|
|

Talking about javax.crypto.Cipher;

I was trying to encrypt data using Cipher.getInstance("RSA/None/NoPadding", "BC"); but I got the exception: ArrayIndexOutOfBoundsException: too much data for RSA block

Looks like is something related to the "NoPadding", so, reading about padding, looks like CBC is the best approach to use here.

I found at google something about "RSA/CBC/PKCS#7", what is this "PKCS#7"? And why its not listed on sun's standard algorithm names?

© Stack Overflow or respective owner

Related posts about java

Related posts about security