way to see what cipher/algo was used to create your key?

vedaal at nym.hush.com vedaal at nym.hush.com
Tue Jun 19 19:50:47 CEST 2012


Sam Smith smickson at hotmail.com wrote on:
Tue Jun 19 01:30:44 CEST 2012 

>a way to learn what cipher & hash was used to create the secret 
key? 


export your secret key as seckey.asc
then do gpg --list-packets seckey.asc


here is an example of one of mine:

V:\z\>gpg --list-packets v:\seckey.asc
gpg: armor: BEGIN PGP PRIVATE KEY BLOCK
gpg: armor header: Version: GnuPG v1.4.12 (MingW32) 
gpg: armor header: Comment: Acts of Kindness better the World, and 
protect the Soul
:secret key packet:
        version 4, algo 1, created 1201031494, expires 0
        skey[0]: [4096 bits]
        skey[1]: [17 bits]
        iter+salt S2K, algo: 10, SHA1 protection, hash: 8, salt: 

'version 4'  describes the key-version 
(all current gnupg keys are v4, older keys from pgp were v3,  maybe 
when elliptic curve crypto gets done, there might be a v5 ;-) )

'algo 1' describes the 'type' of key (RSA, ELG, DSA, etc.) and the 
1
refers to RSA

the line beginning 'iter+salt' describes the algorithm used to 
encrypt the secret key, and the hash used.

'algo: 10' is Twofish
'hash 8' is SHA256

(not the 'defaults')  
your key will probably show 'algo: 9' (AES256) and 'hash: 2' (SHA1)


(btw, Should a listing explaining these things be in the FAQ ? )


vedaal




More information about the Gnupg-users mailing list