cancel
Showing results for 
Search instead for 
Did you mean: 

PGP Encryption Error using OpenPGP

former_member204873
Contributor
0 Kudos

Hi all,

I am trying PGP Encrption using Custom module in one of the scenario's.

While Executing the code on my local system(simple java project) i am getting following error.

Exception in thread "main" java.lang.RuntimeException: NYI

at cryptix.jce.provider.elgamal.ElGamalCipher.engineGetParameters(ElGamalCipher.java:120)

at javax.crypto.Cipher.a(DashoA12275)

at javax.crypto.Cipher.init(DashoA12275)

at cryptix.openpgp.algorithm.PGPElGamal.encrypt(PGPElGamal.java:550)

at cryptix.openpgp.packet.PGPPublicKeyEncryptedSessionKeyPacket.encrypt(PGPPublicKeyEncryptedSessionKeyPacket.java:153)

at cryptix.openpgp.provider.PGPEncryptedMessageBuilder.engineBuild(PGPEncryptedMessageBuilder.java:283)

at cryptix.message.EncryptedMessageBuilder.build(EncryptedMessageBuilder.java:253)

at text.Encrypt.main(Encrypt.java:128)

Has anyone experienced similar error.

Please Help!

Mayank

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi mayank,

PGP means Pretty Good Privacy. This is the Technique of encryption & decryption for security purpose. It is ralated with sun JAVA.

You have got this error due to missing of JCE security Policy.

So you better to download compatible version of java from u201Chttp://java.sun.comu201D

& put this policy into JRE/lib/security folder.

Hope it will work.

Thanks,

Atul Amrutkar.

former_member204873
Contributor
0 Kudos

It got resolved after replacing latest US_export_policy.jar and local_policy.jar files downloded from SDN

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

This usually happens when Unlimited strength jurisdiction policy files are missing for your JDK ...

Hope this helps

Chris