blog.pgpkeys.eu

An occasional blog about OpenPGP keyservers and related issues

OpenPGP Stack Layering

The OpenPGP application stack can be roughly considered to be divided into layers. These layers have no official meaning, and are somewhat fluid. They are however useful as a mental model, particularly when defining extensions to OpenPGP.

RFC9580 fully specifies only layers 2a, 2b, and 2f.

Layer 1: Cryptographic primitives

Layer 2: OpenPGP

Layer 2a: Data representation

Layer 2b: Packet structure

Layer 2c: Packet grammar

Layer 2d: Temporal evolution

Layer 2e: PGPKI

Layer 2f: Packet sequence encoding

Layer 3: Application

Validity

In OpenPGP, the word “valid” is used liberally - but there are at least five kinds of “validity” that must be distinguished:

  1. formal validity (layer 2b)
    • packet is well-formed and parseable
  2. cryptographic validity (layer 2a)
    • mathematically incorrect signature
    • incorrect digest (“implausible martian”)
  3. structural validity (layer 2c)
    • missing required packets (“evaporated key”)
    • disordered packets
    • missing self-signatures (unbound signable packet)
    • incorrect signature type (“structural martian”)
  4. temporal validity (layer 2d)
    • expired
    • revoked
      • hard and soft
    • post-dated
  5. issuer validity (layer 2e)
    • uncertified
    • incomplete certification chain
    • insufficient certification weight
    • lack of provenance
    • identity mismatch

In addition, there are other forms of breakage that fall outside the common usage of “validity”, such as malformed encodings at the packet level (below) and the sequence encoding level (above).

Andrew Gallagher, 6th February 2025