Results 1 to 3 of 3
  1. #1
    Deepa is offline Member
    Join Date
    Nov 2008
    Posts
    85
    Rep Power
    0

    Default PGP Encryption&Decryption

    Hi,
    I want to encrypt and decrypt a text by using bouncy castle in PGP.I'm getting the following error in PGP decryption..

    org.bouncycastle.openpgp.PGPException: Exception decrypting key
    java.security.InvalidKeyException: Illegal key size

  2. #2
    fxRichard is offline Member
    Join Date
    Dec 2008
    Posts
    64
    Rep Power
    0

    Default

    I don't know the specs for bouncy castle as I do encryption/decryption differently but from that exception it sounds like your encryption key length is too short, I usually use an md5 hash of something else for the key, usually you need at least 24 characters for a key, check out the api for bouncy castle

  3. #3
    angryboy's Avatar
    angryboy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    742
    Rep Power
    6

Similar Threads

  1. Re: Exception in PGP Decryption
    By Deepa in forum New To Java
    Replies: 27
    Last Post: 07-18-2012, 06:16 AM
  2. Encryption/Decryption
    By Echilon in forum New To Java
    Replies: 2
    Last Post: 03-24-2009, 12:58 PM
  3. Encryption-Decryption Problem
    By dinesh.1.sharma in forum Advanced Java
    Replies: 1
    Last Post: 07-17-2008, 11:03 PM
  4. encryption
    By Joe2003 in forum Advanced Java
    Replies: 2
    Last Post: 02-06-2008, 11:27 AM
  5. Encryption/Decryption Through AOP
    By SirRawlins in forum Advanced Java
    Replies: 0
    Last Post: 12-19-2007, 04:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •