Chapter 04 · Foundations
A raw signature is ambiguous in a system where the same 20 bytes can mean different things under different keys. The verifiable container removes the ambiguity.
FIGURE 4.1 · The self-describing signature container.
A raw signature says "someone with this key signed these bytes". It does not say which identity, which chain, which hash function, or which VDXF keys the signer intended. In a system where the same 20-byte payload can mean different things under different keys, that ambiguity is an attack surface.
VerifiableSignatureData makes the signature self-describing: identity and system as
compact addresses, a hash type, the signature version, optional key list, optional bound hashes,
optional statements, and the signature bytes. A verifier can reconstruct the exact message without
trusting the transport to have preserved context.
| Flag | Value | Means |
|---|---|---|
FLAG_HAS_VDXF_KEYS | 1 | A list of vdxf keys qualifies the signature |
FLAG_HAS_VDXF_KEY_NAMES | 2 | Those keys also carry their names |
FLAG_HAS_BOUND_HASHES | 4 | Signature is bound to specific hashes |
FLAG_HAS_STATEMENTS | 8 | Additional signed statements |
FLAG_HAS_SYSTEM | 16 | A non-default system chain is named |
GenericEnvelope.signature is a VerifiableSignatureData, and
FLAG_SIGNED on the envelope is what tells the reader to parse it. The signature covers
the envelope's own hash — which is why changing details after signing invalidates it,
and why createdAt and salt participate in uniqueness.
src/vdxf/classes/VerifiableSignatureData.ts toBuffer / fromBuffer # flags, version, sigversion, hashtype, compact ids toJson / fromJson # vdxfkeys, vdxfkeynames, boundhashes, statements fromCLIJson # adapts `verus signdata` output src/pbaas/SignatureData.ts # the underlying DER signature container