Re: Importing an OpenPGP keyring to Cryptlib

Lahiru Dissanayake <[email protected]> Sun, 17 Feb 2013 12:18:04 +0800
Newsgroups gmane.comp.encryption.cryptlib
Message-ID <CAHeAcfD0DmKgA_fQ7zycsm+9MjQfKt0f_BRv7tnoxqnL+FAnrA@mail.gmail.com>
Hi Peter,


> That's a pretty odd file
>
>
I actually thought this was a standard format since it was exported from
GPG Keychain Access program *and* Cryptlib was able to load it into a
keyset.

The actual requirement is to import a PGP public/secret key pair generated
by org.bouncycastle.openpgp.PGPPrivateKey class's public byte[]
getEncoded()method. GPG Keychain Access was able to import the keys
using the above
binary data, but Cryptlib's cryptKeysetOpen() method couldn't.

Seeing however, that Cryptlib *could* load* *the keyring* generated *by GPG
Keychain Access (only later did I find out that it couldn't import the
private key to a context), I thought this was a standard format. We also
figured out that it was identical to the concatenation of the outputs
of PGPPublicKey.getEncoded()
and PGPPrivateKey.getEncoded() methods in Bouncy Castle. So that's how we
ended up with the above file format.

If you could let me know of a better way to import the keys generated by
the PGPPrivateKey.getEncoded() method, I'd be happy to use it.

Thanks,
Lahiru

_______________________________________________
Cryptlib mailing list
[email protected] via Mail: [email protected]
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.