How do I see what algorithm is used for a signature

Robert J. Hansen rjh at sixdemonbag.org
Thu Oct 9 08:20:37 CEST 2014


On 10/9/2014 12:54 AM, Doug Barton wrote:
> I'm sure there is a way to determine what algorithm a signature was 
> created with...

gpg2 --fixed-list-mode --with-colons --list-key [keyID]

Once you learn how to read that output, you get a *ton* of information.
 It's kind of overkill for most tasks, but it's kind of like learning
how to use flex and bison: once you get the knowledge, you wind up using
it in places you never thought you would before.

Look for lines that look roughly like:

"sig:::17:..."

The number in the fourth field (third, if you're zero-indexing), which
here is 17, is the algorithm descriptor.

1: RSA (encrypt or sign)
2: RSA (encrypt-only -- if you see a sig with this, something's wrong)
3: RSA (sign-only)
16: Elgamal (encrypt-only -- ditto)
17: DSA
19: Reserved for ECDSA



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3744 bytes
Desc: S/MIME Cryptographic Signature
URL: </pipermail/attachments/20141009/8ce358cf/attachment-0001.bin>


More information about the Gnupg-users mailing list