aspose file tools*
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
Author

Problem with DS/DSS encryption and decryption

kiran raja
Greenhorn

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,
Kiran
PramodP Kumar
Greenhorn

Joined: Jul 02, 2009
Posts: 1
Hi,

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
e)
at org.bouncycastle.openpgp.PGPSecretKey.extractPrivateKey(Unknown Sou
e)
at Test.findSecretKey(Test.java:135)
at Test._decrypt(Test.java:209)
at Test.decrypt(Test.java:178)
at Test.main(Test.java:270)
Caused by: java.lang.SecurityException: Cannot verify jar:file:/C:/Program%20F
es/Java/jdk1.5.0_15/bin/!/
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: java.security.PrivilegedActionException: java.io.FileNotFoundExcept
n: C:\Program Files\Java\jdk1.5.0_15\bin (Access is denied)
at java.security.AccessController.doPrivileged(Native Method)
... 13 more
Caused by: java.io.FileNotFoundException: C:\Program Files\Java\jdk1.5.0_15\bi
(Access is denied)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:203)
at java.util.jar.JarFile.<init>(JarFile.java:132)
at java.util.jar.JarFile.<init>(JarFile.java:70)
at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:56)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:41)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:78)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.
va:102)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnecti
.java:69)
at javax.crypto.SunJCE_e.run(DashoA12275)

Im using jdk 1.5 with jce_policy1.5

Please help me to resolve this problem.

Thanks
Pramod
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with DS/DSS encryption and decryption