• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Problem with DS/DSS encryption and decryption

Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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(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
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.
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnecti
at javax.crypto.SunJCE_e.run(DashoA12275)

Im using jdk 1.5 with jce_policy1.5

Please help me to resolve this problem.

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic