Skip to main content
added 830 characters in body
Source Link
grawity_u1686
  • 465.3k
  • 66
  • 977
  • 1.1k

If you want, you can do this with the signer's key (certificate) as well. Just export it to a file first:


# gpg --export D24F6CB2C1B52632 | gpg --list-packets
:public key packet:
    version 4, algo 1, created 1256993643, expires 0
    pkey[0]: [4096 bits]
    pkey[1]: [17 bits]
    keyid: D24F6CB2C1B52632
:user ID packet: "Mantas Mikul\xc4\x97nas "
:signature packet: algo 1, keyid D24F6CB2C1B52632
    version 4, created 1256993643, md5len 0, sigclass 0x13
    digest algo 10, begin of digest 5a e2
[many more lines]

The certificates also consist ouf of packets, starting with a public key, userid's (text labels) with a self-signature for each (to protect against someone attaching fake userids to the pubkey), then several public subkey packets (again with self-signatures).


If you want, you can do this with the signer's key (certificate) as well. Just export it to a file first:


# gpg --export D24F6CB2C1B52632 | gpg --list-packets
:public key packet:
    version 4, algo 1, created 1256993643, expires 0
    pkey[0]: [4096 bits]
    pkey[1]: [17 bits]
    keyid: D24F6CB2C1B52632
:user ID packet: "Mantas Mikul\xc4\x97nas "
:signature packet: algo 1, keyid D24F6CB2C1B52632
    version 4, created 1256993643, md5len 0, sigclass 0x13
    digest algo 10, begin of digest 5a e2
[many more lines]

The certificates also consist ouf of packets, starting with a public key, userid's (text labels) with a self-signature for each (to protect against someone attaching fake userids to the pubkey), then several public subkey packets (again with self-signatures).

added 37 characters in body
Source Link
grawity_u1686
  • 465.3k
  • 66
  • 977
  • 1.1k

It's preceded by a "onepass_sig" packet, whose only purpose is to provide the keyid without having to read until end of the whole message – so GnuPG can start searching for the keyid and proceed with verifying the message at once. (When reading from a pipe, e.g. cat|gpg, it is impossible to seek forwards and backwardsbackwards; everything must be read in one pass.)

It's preceded by a "onepass_sig" packet, whose only purpose is to provide the keyid without having to read until end of the whole message – so GnuPG can start searching for the keyid and proceed with verifying the message at once. (When reading from a pipe, e.g. cat|gpg, it is impossible to seek forwards and backwards.)

It's preceded by a "onepass_sig" packet, whose only purpose is to provide the keyid without having to read until end of the whole message – so GnuPG can start searching for the keyid and proceed with verifying the message at once. (When reading from a pipe, e.g. cat|gpg, it is impossible to seek forwards and backwards; everything must be read in one pass.)

added 25 characters in body
Source Link
grawity_u1686
  • 465.3k
  • 66
  • 977
  • 1.1k

Aside: Note that your example has a short 4-byte keyid, which is very bad as there have been a few hundred known short-keyid collisions, both intentional and accidental. Using keyid-format long in your ~/.gnupg/gnupg.conf would make it display longer keyids, though those are still easy to collide intentionally, so you should always check the fingerprint when importing a new key.

Aside: Note that your example has a short 4-byte keyid, which is very bad as there have been a few hundred known short-keyid collisions, both intentional and accidental. Using keyid-format long in your ~/.gnupg/gnupg.conf would make it display longer keyids, though those are still easy to collide intentionally, so you should always check the fingerprint.

Aside: Note that your example has a short 4-byte keyid, which is very bad as there have been a few hundred known short-keyid collisions, both intentional and accidental. Using keyid-format long in your ~/.gnupg/gnupg.conf would make it display longer keyids, though those are still easy to collide intentionally, so you should always check the fingerprint when importing a new key.

Source Link
grawity_u1686
  • 465.3k
  • 66
  • 977
  • 1.1k
Loading