org.bouncycastle.mail.smime.SMIMEEnvelopedGenerator$WrappingIOException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Install Java Cryptopraphic Extention for your JDK version

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Bouncy Castle - Dev - Key Inappropriate for algorithm
    via by Unknown author,
  • Crypto key logic is broken
    via GitHub by gaydenko
    ,
  • Please Help-Stuck Invalid Key Exception
    via Stack Overflow by Raghvendra
    ,
    • org.bouncycastle.mail.smime.SMIMEEnvelopedGenerator$WrappingIOException: org.bouncycastle.cms.CMSException: key inappropriate for algorithm. at org.bouncycastle.mail.smime.SMIMEEnvelopedGenerator$ContentEncryptor.write(Unknown Source) at org.bouncycastle.mail.smime.handlers.PKCS7ContentHandler.writeTo(Unknown Source) at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:839) at javax.activation.DataHandler.writeTo(DataHandler.java:295) at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1350) at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1683) at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1659) at SigningTeste3.EncryptMail(SigningTeste3.java:314) at SigningTeste3.main(SigningTeste3.java:328) Caused by: org.bouncycastle.cms.CMSException: key inappropriate for algorithm. at org.bouncycastle.cms.CMSEnvelopedDataStreamGenerator.open(Unknown Source) at org.bouncycastle.cms.CMSEnvelopedDataStreamGenerator.open(Unknown Source) ... 9 more Caused by: java.security.InvalidKeyException: Illegal key size or default parameters at javax.crypto.Cipher.a(DashoA12275) at javax.crypto.Cipher.init(DashoA12275) at org.bouncycastle.cms.CMSEnvelopedGenerator$RecipientInf.toRecipientInfo(Unknown Source) ... 11 more

    Users with the same issue

    Andreas Häber
    16 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    22 more bugmates