Hi David, thanks for your suggestion. I already had an eye on BouncyCastle but thought it could not be that hard to get the key data :) But I will try BC for they can handle the package format of the gpg-files too.
Thanks again! Michael -----Ursprüngliche Nachricht----- Von: David Shaw [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 12. August 2008 16:19 An: gnupg-users@gnupg.org Betreff: Re: transfer private key data between applications On Aug 12, 2008, at 5:16 AM, Lorenz, Michael wrote: > Hello GNU-PG users, > > I have a question regarding the export of a private key. > > I want to transfer the key-pair of a GPG installation to a Java > program (using for example the GNU-Crypto library). Since there is a > very large amount of encrypted records I want to avoid to create a > big convert-process that decrypts with GPG and encrypts again with > Java. > > As GNU-Crypto supports "ElGamal" I thought it would be possible to > export the private key as bytes and use this information in Java to > decrypt the data. But I have difficulties doing this. You could probably work through this and get it to work, but it's not going to be easy. For one, OpenPGP uses a somewhat strange cipher mode (a variant on CFB). You'd also have to deal with the OpenPGP encoding on the packets. Rather than do all that, take a look at http://www.bouncycastle.org/ They have a Java library that can do OpenPGP directly. David _______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users _______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users