Wednesday, 11 September 2013

#EANF#

#EANF#

I have developed a stand alone java project for encryption, decryption(AES
& RSA) using org.bouncycastle. I got encrypted file successfully, but
while decrypting the same file getting following exception:
Exception in thread "main" [1378903775771] PKI Crypto Error details [input
too large for RSA cipher.]. Stack trace details [
org.bouncycastle.crypto.DataLengthException: input too large for RSA
cipher.
at org.bouncycastle.crypto.engines.RSACoreEngine.convertInput(Unknown
Source)
at
org.bouncycastle.crypto.engines.RSABlindedEngine.processBlock(Unknown
Source)
at org.bouncycastle.crypto.encodings.OAEPEncoding.decodeBlock(Unknown
Source)
at org.bouncycastle.crypto.encodings.OAEPEncoding.processBlock(Unknown
Source)
at org.bouncycastle.jce.provider.JCERSACipher.engineDoFinal(Unknown
Source)
at javax.crypto.Cipher.doFinal(DashoA12275)
at
com.ing.common.utils.crypto.DecryptorUtil.rsaDecrypt(DecryptorUtil.java:58)
at
com.ing.common.utils.crypto.AESKeyUtil.decryptAesKey(AESKeyUtil.java:34)
at com.ing.crypto.pki.PkiDecryptor.decrypt(PkiDecryptor.java:44)
at com.ing.crypto.pki.PkiCrypto.processFile(PkiCrypto.java:100)
at com.ing.crypto.pki.PkiCrypto.main(PkiCrypto.java:31)
]

No comments:

Post a Comment