Algorithm used to encrypt
Kevin Kammer
mephisto at fastmail.net
Mon Nov 9 04:57:46 CET 2009
On Sun, Nov 08, 2009 at 05:52:37PM +0100 Heinz Diehl wrote:
> Hi,
>
> seems I'm just too stupid today to find what's maybe obvious:
> given an ascii armored gpg encrypted file, how can I find out what
> algorithm has been used to encrypt the file?
>
> Thanks,
> Heinz.
I should preface what I say by indicating that I always use "verbose"
mode (set in gpg.conf):
When I invoke gpg on a file encrypted with my public key, it displays
the public key algorithm used to encrypt the session key before it asks
for a passphrase. After I enter the passphrase, the symmetric algorithm
is displayed as well. I would infer (perhaps mistakenly) that data
identifying the symmetric algo is stored, encrypted, with the session
key, and is therefore only accessible after the first phase of the
decryption process (i.e. decrypting the session key material using the
appropriate private key) is successful.
If my inference is correct, then it is possible (in fact, necessary) to
be able to ascertain the public key algo on any OpenPGP encrypted
document, but it is only possible to determine the symmetric algo if you
have access to the appropriate private key.
-Kevin
--
"Le hasard favorise l'esprit préparé."
--Louis Pasteur
More information about the Gnupg-users
mailing list