Re: Decrypting openpgp data created by gpg

Peter Gutmann <[email protected]> Wed, 20 Feb 2013 00:05:36 +1300
Newsgroups gmane.comp.encryption.cryptlib
Message-ID <[email protected]>
Lahiru Dissanayake <[email protected]> writes:

>I'm having a hard time decrypting openpgp public key encrypted data using
>Cryptlib envelopes. The encrypted data in question was created using gpg. All
>the status codes returned in the decryption process are normal, but the data
>that's popped out is not equal to the plaintext.

The PGP data format can use multiple levels of nesting, you need to check the
CRYPT_ENVINFO_CONTENTTYPE attribute to see what the inner content is and if
necessary process that further.  My guess is that what you're getting out of
the encrypted envelope is signed data (CRYPT_CONTENT_SIGNEDDATA) or compressed
data (CRYPT_CONTENT_COMPRESSEDDATA), so you need to de-envelope that as well
until you get to plain data, CRYPT_CONTENT_DATA.

Peter.

_______________________________________________
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.