This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes Problem with DS/DSS encryption and decryption Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Java in General
Bookmark "Problem with DS/DSS encryption and decryption" Watch "Problem with DS/DSS encryption and decryption" New topic

Problem with DS/DSS encryption and decryption

kiran raja

Joined: May 11, 2004
Posts: 22
Hello ,
I am developing a application using java language. In my project i am using openPGP "Bouncy Castle Crypto API" for PGP cryptographic operations. I am using keyring file to encypt or decrypt files in my application.But If I try to use a DH/DSS keypair , I get an error message saying :

org.bouncycastle.openpgp.PGPException: unknown parameters or keysize

I am not able to PGPencryt or PGPdecrypt using DH/DSS key pair.
Does "Bouncy Castle Crypto API" support DH/DSS algorithm ?? or
Are there any other packages that supports both RSA as well as DH/DSS encryption and decrytion .

please suggest.This is a very urgent requirement.

Thanks in advance,
PramodP Kumar

Joined: Jul 02, 2009
Posts: 1

I am also facing similar kind of problem.

I am trying to decrypt an PGP encrypted file using private key and pass phrase using bouncy castle api

When I am trying to run the java file Im getting the below error.

org.bouncycastle.openpgp.PGPException: Exception creating cipher
java.lang.SecurityException: JCE cannot authenticate the provider BC
at javax.crypto.Cipher.getInstance(DashoA12275)
at org.bouncycastle.openpgp.PGPSecretKey.extractKeyData(Unknown Source
at org.bouncycastle.openpgp.PGPSecretKey.extractPrivateKey(Unknown Sou
at org.bouncycastle.openpgp.PGPSecretKey.extractPrivateKey(Unknown Sou
at Test.findSecretKey(
at Test._decrypt(
at Test.decrypt(
at Test.main(
Caused by: java.lang.SecurityException: Cannot verify jar:file:/C:/Program%20F
at javax.crypto.SunJCE_d.b(DashoA12275)
at javax.crypto.SunJCE_d.a(DashoA12275)
at javax.crypto.SunJCE_d.a(DashoA12275)
at javax.crypto.SunJCE_b.b(DashoA12275)
at javax.crypto.SunJCE_b.a(DashoA12275)
... 8 more
Caused by:
n: C:\Program Files\Java\jdk1.5.0_15\bin (Access is denied)
at Method)
... 13 more
Caused by: C:\Program Files\Java\jdk1.5.0_15\bi
(Access is denied)
at Method)
at java.util.jar.JarFile.<init>(
at java.util.jar.JarFile.<init>(

Im using jdk 1.5 with jce_policy1.5

Please help me to resolve this problem.

Have you checked out Aspose?
subject: Problem with DS/DSS encryption and decryption
It's not a secret anymore!