Four Stars

Encryption and .ASC Key

I am using the tFileEncryptPGP component and am using a public key with an .ASC extension. I get an invalid header encountered message. Is there anything additional I need to install? invalid header encountered
at org.bouncycastle.bcpg.BCPGInputStream.readPacket(Unknown Source)
at org.bouncycastle.openpgp.PGPLiteralData.<init>(Unknown Source)
at org.bouncycastle.openpgp.PGPObjectFactory.nextObject(Unknown Source)
at org.bouncycastle.openpgp.PGPPublicKeyRingCollection.<init>(Unknown Source)
at org.talend.pgp.PGPEncrypt.readPublicKeyFromCol(
at org.talend.pgp.PGPEncrypt.encryptFile(
at cornerstone_lms.encrypt_grade_file_1_0.Encrypt_Grade_File.tFileEncryptPGP_1Process(
at cornerstone_lms.encrypt_grade_file_1_0.Encrypt_Grade_File.runJobInTOS(
at cornerstone_lms.encrypt_grade_file_1_0.Encrypt_Grade_File.main(

Thanks in advance.
One Star

Re: Encryption and .ASC Key

Which version of GnuPG do you use?
Sometimes this is due to previous GPG version.
I test it with gpg4win-2.1.0 and it works fine.
Four Stars

Re: Encryption and .ASC Key

Hi Pedro,
I am running the same version. Does Talend support the .ASC extension or does it need to have a .GPG extension? It looks like GPG4Win creates a key with a .GPG extension. I have also tried other public keys I have received and I get the same error. Am I missing anything else for setting up Talend to use the encryption component?
One Star

Re: Encryption and .ASC Key

I have been receiving the same error when using a .asc key.  After doing a bit of research I was able to export the .asc (ascii armor) to a binary .gpg file.  I then used the .gpg file to successfully encrypt my file using the tFileEncryptPGP component.
$ gpg --dearmor < filename.txt > filename.bin
Also be sure to install the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files
Hope this helps anyone else that my run into this issue.