java RSA Multiple Encryption

Posted by user1763730 on Stack Overflow See other posts from Stack Overflow or by user1763730
Published on 2012-10-21T20:38:18Z Indexed on 2012/10/21 23:00 UTC
Read the original article Hit count: 132

Filed under:

I encrypt my message with a symmetric key and the symmetric key itself has to be further encrypted with different RSA public keys. When I tried to implement the above I got the following error:

javax.crypto.IllegalBlockSizeException: The input was invalid: Invalid input length.
        at com.rsa.shareCrypto.j.hD.engineDoFinal(Unknown Source)
        at javax.crypto.Cipher.doFinal(Cipher.java:2087)
        at wrap1.main(wrap1.java:69)

Is there a way to solve this problem ?

© Stack Overflow or respective owner

Related posts about java