Pagina 1 di 1

Vedere info chiave gpg senza importarla

Inviato: lun dic 28, 2015 14:05
da ZeroUno
Ciao.
Ho una chiave gpg di cui vorrei vedere le informazioni (subject e fingerprint) PRIMA di dare un gpg --import
È possibile?
Nel man di gpg non sono riuscito a trovarlo. Idem su google.

Re: Vedere info chiave gpg senza importarla

Inviato: lun dic 28, 2015 16:25
da ponce
https://stackoverflow.com/questions/221 ... porting-it

http://www.mew.org/~kazu/proj/pgpdump/en/

Codice: Seleziona tutto

$ gpg --list-packets GPG-KEY
:public key packet:
        version 4, algo 17, created 1046290516, expires 0
        pkey[0]: [1024 bits]
        pkey[1]: [160 bits]
        pkey[2]: [1023 bits]
        pkey[3]: [1024 bits]
        keyid: 6A4463C040102233
:user ID packet: "Slackware Linux Project <security@slackware.com>"
:signature packet: algo 17, keyid 6A4463C040102233
        version 4, created 1346264233, md5len 0, sigclass 0x13
        digest algo 2, begin of digest 8c ec
        hashed subpkt 11 len 3 (pref-sym-algos: 7 3 2)
        hashed subpkt 21 len 2 (pref-hash-algos: 2 3)
        hashed subpkt 22 len 2 (pref-zip-algos: 2 1)
        hashed subpkt 30 len 1 (features: 01)
        hashed subpkt 23 len 1 (key server preferences: 80)
        hashed subpkt 2 len 4 (sig created 2012-08-29)
        hashed subpkt 9 len 4 (key expires after 34y335d22h1m)
        subpkt 16 len 8 (issuer key ID 6A4463C040102233)
        data: [159 bits]
        data: [159 bits]
:public sub key packet:
        version 4, algo 16, created 1046290517, expires 0
        pkey[0]: [1024 bits]
        pkey[1]: [3 bits]
        pkey[2]: [1023 bits]
        keyid: 768737F94E523569
:signature packet: algo 17, keyid 6A4463C040102233
        version 4, created 1346264255, md5len 0, sigclass 0x18
        digest algo 2, begin of digest 2c 6d
        hashed subpkt 2 len 4 (sig created 2012-08-29)
        hashed subpkt 9 len 4 (key expires after 34y335d22h2m)
        subpkt 16 len 8 (issuer key ID 6A4463C040102233)
        data: [160 bits]
        data: [158 bits]

Codice: Seleziona tutto

$ ./pgpdump GPG-KEY
Old: Public Key Packet(tag 6)(418 bytes)
        Ver 4 - new
        Public key creation time - Wed Feb 26 21:15:16 CET 2003
        Pub alg - DSA Digital Signature Algorithm(pub 17)
        DSA p(1024 bits) - ...
        DSA q(160 bits) - ...
        DSA g(1023 bits) - ...
        DSA y(1024 bits) - ...
Old: User ID Packet(tag 13)(48 bytes)
        User ID - Slackware Linux Project <security@slackware.com>
Old: Signature Packet(tag 2)(95 bytes)
        Ver 4 - new
        Sig type - Positive certification of a User ID and Public Key packet(0x13).
        Pub alg - DSA Digital Signature Algorithm(pub 17)
        Hash alg - SHA1(hash 2)
        Hashed Sub: preferred symmetric algorithms(sub 11)(3 bytes)
                Sym alg - AES with 128-bit key(sym 7)
                Sym alg - CAST5(sym 3)
                Sym alg - Triple-DES(sym 2)
        Hashed Sub: preferred hash algorithms(sub 21)(2 bytes)
                Hash alg - SHA1(hash 2)
                Hash alg - RIPEMD160(hash 3)
        Hashed Sub: preferred compression algorithms(sub 22)(2 bytes)
                Comp alg - ZLIB <RFC1950>(comp 2)
                Comp alg - ZIP <RFC1951>(comp 1)
        Hashed Sub: features(sub 30)(1 bytes)
                Flag - Modification detection (packets 18 and 19)
        Hashed Sub: key server preferences(sub 23)(1 bytes)
                Flag - No-modify
        Hashed Sub: signature creation time(sub 2)(4 bytes)
                Time - Wed Aug 29 20:17:13 CEST 2012
        Hashed Sub: key expiration time(sub 9)(4 bytes)
                Time - Tue Jan 19 19:16:31 CET 2038
        Sub: issuer key ID(sub 16)(8 bytes)
                Key ID - 0x6A4463C040102233
        Hash left 2 bytes - 8c ec
        DSA r(159 bits) - ...
        DSA s(159 bits) - ...
                -> hash(DSA q bits)
Old: Public Subkey Packet(tag 14)(269 bytes)
        Ver 4 - new
        Public key creation time - Wed Feb 26 21:15:17 CET 2003
        Pub alg - ElGamal Encrypt-Only(pub 16)
        ElGamal p(1024 bits) - ...
        ElGamal g(3 bits) - ...
        ElGamal y(1023 bits) - ...
Old: Signature Packet(tag 2)(76 bytes)
        Ver 4 - new
        Sig type - Subkey Binding Signature(0x18).
        Pub alg - DSA Digital Signature Algorithm(pub 17)
        Hash alg - SHA1(hash 2)
        Hashed Sub: signature creation time(sub 2)(4 bytes)
                Time - Wed Aug 29 20:17:35 CEST 2012
        Hashed Sub: key expiration time(sub 9)(4 bytes)
                Time - Tue Jan 19 19:17:27 CET 2038
        Sub: issuer key ID(sub 16)(8 bytes)
                Key ID - 0x6A4463C040102233
        Hash left 2 bytes - 2c 6d
        DSA r(160 bits) - ...
        DSA s(158 bits) - ...
                -> hash(DSA q bits)