gpg symmetric to Java JCA decryption
dshaw at jabberwocky.com
Fri Mar 19 23:23:13 CET 2010
On Mar 19, 2010, at 4:51 PM, Juergen Weber wrote:
> has anybody tried to decrypt a symmetric gpg encryption with Java
> using Java Cryptography Architecture included in the JDK?
> echo hello | gpg -c --cipher-algo 3DES -a --passphrase "my pass" |
> java MyDeCrypt --cipher-algo 3DES --passphrase "my pass"
> should result in hello
> This should be possible, I googled for a sample, but there seems to be none.
GnuPG encrypts using the OpenPGP standard. The Java cryptography architecture doesn't follow that spec (that "file format" if you like). If you want to do OpenPGP in Java, I suggest http://www.bouncycastle.org/java.html which is a provider for the cryptography architecture.
More information about the Gnupg-users