Skip to content

Normative · Part

Signature profile

This page is the normative home of the SOVM COSE profile. Both layers bind to this page; neither restates it. That is deliberate: a restatement is a copy that can drift, and a profile stated twice is two profiles the moment one statement is edited.

The profile adopts [RFC 9052] and [RFC 9053] as normative dependencies.

Every durable signed structure in SOVM/1 is a COSE_Sign1 message under a profile deliberately narrower than COSE allows:

Rule Value
Message types COSE_Sign1; plus COSE_Encrypt with exactly one A256KW recipient where a layer defines wrapped-key records
Signature algorithm ES256 only — section 5
Encryption algorithms A256GCM for content encryption and A256KW for key wrap, and only in COSE_Encrypt
Payload encoding Deterministic CBOR ([RFC 8949] section 4.2.1)
kid The signer’s 16-byte site_id, in the protected bucket
external_aad Per-record context under the context principle — at minimum the verifier’s own 16-byte mesh_id
Protected bucket Exactly alg, content type and kid (COSE_Sign1) or alg, content type and IV (COSE_Encrypt); any other header, critical or not, fails closed
Unprotected bucket MUST be empty, except a key-wrap recipient’s, which carries exactly alg
Unknown critical headers Fail closed
Unknown content type Fail closed
Algorithm agility None — a second suite is added only for a concrete interoperability need

The synchronization layer defines no encryption records, so it instantiates COSE_Sign1 only; the object plane adds COSE_Encrypt for its wrapped-key records and binds richer external_aad context. Those are instantiation choices, stated on the layer pages. The rules in the table are not.

The container is also written in CDDL ([RFC 8610]), and the CDDL is normative: where it and the prose of this page could be read apart, the CDDL is the specification. It states the shape — which members, which headers, how many bytes. What CDDL cannot state, the deterministic encoding and every clause from section 5 on, stays in the prose. The rules below are the substrate’s schema, published whole at /spec/cddl/substrate.cddl. A layer’s schema is checked appended to it and instantiates the container once per record, naming the record’s content type and its payload rule.

; A durable signed record (section 4), generic over its content type and its
; payload. It travels untagged: the frame or member that carries a record is
; defined as carrying exactly that record, so a tagged twin would be a second
; valid byte form of it.
;
; The protected bucket admits exactly the three headers below. A header the
; profile does not name, critical or not, has no member to occupy.
SOVM_Sign1<ContentType, Payload> = [
protected: bstr .cbor {
1 => -7, ; alg: ES256, the one signature suite (section 5)
3 => ContentType, ; content type
4 => site_id, ; kid: the signer
},
unprotected: empty_header_map,
payload: bstr .cbor Payload,
signature: es256_signature,
]

A wrapped-key record carries no signer, so it has no kid. It is a COSE_Encrypt ([RFC 9052] section 5.1) in two layers. The content layer is encrypted under A256GCM with a fresh random 256-bit content key drawn for that one record and never used again. Its unprotected bucket is empty like every other, so the A256GCM nonce travels in the protected bucket:

; A wrapped-key record (section 4), where a layer defines one: a COSE_Encrypt
; (RFC 9052 section 5.1). It has no signer, so no kid. The content is encrypted
; under A256GCM with a content key drawn for this record alone; the unprotected
; bucket is empty, so the A256GCM nonce (RFC 9053 section 4.1) travels in the
; protected bucket. Exactly one recipient carries the content key.
SOVM_Encrypt<ContentType> = [
protected: bstr .cbor {
1 => 3, ; alg: A256GCM, the content suite (section 5)
3 => ContentType, ; content type
5 => aes_gcm_iv, ; IV
},
unprotected: empty_header_map,
ciphertext: bstr,
recipients: [SOVM_KeyWrapRecipient],
]

The content key reaches its reader through exactly one recipient, which wraps it under the layer’s long-lived key with AES Key Wrap ([RFC 9053] section 6.2.1, [RFC 3394]). A second recipient, a recipient of any other algorithm, or a recipient that nests recipients of its own fails closed. RFC 9053 requires a key-wrap recipient’s protected bucket to be empty, because key wrap authenticates nothing but the key, so alg is the one header in the profile that travels unprotected. It is still authenticated: a recipient whose alg is altered no longer unwraps, and a content key that unwraps under the wrong algorithm does not open the content layer. The wrapped key is the 32-byte content key plus RFC 3394’s 8-byte integrity block:

; The one recipient of a wrapped-key record (section 4): the content key under
; AES Key Wrap (RFC 9053 section 6.2.1). RFC 9053 makes a key-wrap recipient's
; protected bucket empty, so alg is the one header the profile carries
; unprotected. Three members: a recipient nests no recipients of its own.
SOVM_KeyWrapRecipient = [
protected: bstr .size 0,
unprotected: {
1 => -5, ; alg: A256KW, the key-wrap suite (section 5)
},
ciphertext: aes_kw_wrapped_key,
]

Neither layer carries a nonce whose uniqueness depends on another writer. Key wrap is deterministic and takes no nonce, so no count of wraps bounds the wrapping key, however many issuers share it and however long it lives; the A256GCM nonce is drawn under a key that encrypts once. The residual is a collision between two independently drawn content keys, which at 2^64 records is a probability of 2^-128.

The profile also reaches the shared chained-record schema used by membership authorization records (SOP/1 §5.7) and sequencing receipts (SOP/1 §22.5): every link of either chain is a COSE_Sign1 under this profile.

Unknown critical headers or unsupported required algorithms MUST fail closed.

5. Exactly one signature suite, and it is ES256

Section titled “5. Exactly one signature suite, and it is ES256”

The profile permits exactly one suite: ES256 — ECDSA with P-256 and SHA-256, COSE algorithm -7 — for COSE_Sign1, and, for COSE_Encrypt, A256GCM (COSE algorithm 3) for the content and A256KW (COSE algorithm -5) for the recipient. Key wrap is the one addition a concrete need has made: a key shared by many issuers and kept for years cannot carry a nonce bound that no issuer can count.

ES256 is the only admissible COSE_Sign1 suite; EdDSA (-8) is not admitted alongside it. A second mandatory-to-implement suite is added only when a concrete platform or KMS interoperability requirement exists; unused algorithm agility is treated as attack surface, not as flexibility.

The signature is the RFC 9053 fixed-width r ‖ s encoding, 32 bytes each, 64 bytes total. Verifiers MUST reject a DER-encoded ECDSA signature, and MUST reject any signature whose length is not exactly 64 bytes.

; The fixed-width r || s encoding, 32 bytes each (section 5). DER is not this.
es256_signature = bstr .size 64

The curve is P-256 and only P-256. An implementation MUST use the domain parameters of [SEC 1] / [NIST SP 800-186] for secp256r1 and MUST NOT accept curve parameters, a crv value, or a named-curve identifier carried in or alongside a message. There is one curve; there is nothing to select; a message that appears to select one is malformed.

One deliberate asymmetry is worth naming here so nobody reads it as an oversight: the transport channel key of the default binding profile remains a 32-byte Ed25519 key. It is not a signing identity under this profile — it is a TLS raw-public-key authenticator ([RFC 7250] shape) whose format is what the transport ecosystem, iroh included, actually carries. The record that binds a channel key to a node identity is, like every durable record, signed under this profile.

A repeated or biased per-signature nonce k leaks an ECDSA private key outright, from as few as two signatures.

The rule is per key, not per node. key_protection (SSP/19 identity) describes custody of a node’s root identity key; it does not describe custody of every key that node signs with, and a nonce rule keyed on it would leave a software key on a hardware-attested node bound by nothing.

Where a signing key is held in a secure element, the nonce is generated inside that element under the certification that element carries.

Where a signing key is not held in a secure element, the signer MUST implement deterministic ECDSA per [RFC 6979]. This reaches every software signer, including:

  • a node whose key_protection is software, for all of its signatures; and
  • an event-signing subkey, on a node at any key_protection level — including hardware_attested.

The second case is the one a per-node trigger got wrong, and it is the case that matters most: an event-signing subkey signs at bulk-import volume, so a biased nonce generator has the largest possible sample to leak from.

For any valid ECDSA signature (r, s) over the group of order n, the pair (r, n − s) is also a valid signature over the same message under the same key.

Signers MUST produce the low-S form, s ≤ (n − 1) / 2. Verifiers MUST reject a signature whose s is not in low-S form. Rejecting is not optional and MUST NOT be normalised away by the verifier. One signature then has one admissible encoding, and interoperating verifiers agree on which byte strings are well-formed. A verifier that normalised would accept a record that a conforming peer rejects, and the two would partition on it.

Record identity does not depend on this clause. The identifier does not cover the signature (section 10), so a high-S copy of a record would carry the record’s own identifier. It is still rejected.

Before using a claimed public key, an implementation MUST check that both coordinates lie in [0, p − 1], that the point satisfies the curve equation, and that it is not the point at infinity.

P-256 has cofactor 1, so those checks are sufficient. An implementation MUST NOT add a subgroup check copied from a curve that needs one; it is not a harmless extra, it is a divergence in what the verifier accepts.

A P-256 point has more than one standard SEC 1 encoding: compressed, 33 bytes, and uncompressed, 65 bytes. They denote the same point and hash differently.

Every derivation or public-key comparison in SOVM/1 that takes an ES256 public key as input MUST take the 33-byte compressed encoding, and implementations MUST reject any other encoding rather than converting it. This reaches the node root public key and the sequencer’s receipt-signing public key of SOP/1 §22.5, wherever either is presented — in a node identity record, a pairing transcript, a COSE_Key, a kid resolution path, and in the fleet’s registration record for a sequencer’s receipt-signing identity.

; A P-256 public key in the 33-byte SEC 1 compressed encoding, the only
; encoding a derivation or comparison takes (section 9).
p256_public_key = bstr .size 33

The receipt-signing key is named because it is not a node root and would otherwise fall outside this clause, and because the check that makes sequencer equivocation actionable is a public-key comparison over exactly that key: a receipt is refused unless it is signed by the key the fleet currently has registered for that sequencer. With two admissible encodings of one point that comparison has two answers. Pinning the wire encoding alone is not sufficient, because a non-conforming encoding can be written into the registration record itself — implementations that normalise then accept receipts that conforming implementations reject, and the fleet partitions on the precise property that makes singularity enforceable. The record is where the rejection has to bite.

Because a P-256 point has more than one standard encoding, BLAKE3(IK_pub) is unambiguous only with its input pinned, and the derivations that depend on that are identities derived from keys:

Derivation Normative home Effect if the encoding is not pinned
site_id = BLAKE3(IK_pub) truncated SSP/1 terminology One key yields two node identities
mesh_id SSP/1 terminology One founding key yields two meshes
Pairing transcript commitment SSP/1 identity A commitment does not match a re-derivation over the same key
Sequencer receipt-signing key registration and comparison SOP/1 §22.5 A fleet partition on which receipts verify; equivocation detection and singularity both become implementation-dependent

Rejecting rather than converting matters. A verifier that normalises an uncompressed key to compressed form before hashing agrees with a conforming peer about the identity but disagrees with it about which byte strings are well-formed — so a record one accepts and the other rejects becomes a partition, and a site_id becomes reachable by two distinct presentations.

Note that this clause reaches the public key, which is not covered by section 7 — that clause reaches signature values, and neither reaches the other.

A COSE_Sign1 record under this profile MUST be identified by BLAKE3-256 (one hash) over its Sig_structure. That is RFC 9052 section 4.4’s ["Signature1", protected, external_aad, payload]:

  • protected and payload are the byte strings as received;
  • external_aad is the context the verifier supplies under the one context principle.

The structure is encoded under RFC 9052 section 9’s restriction to definite, shortest-form lengths. This is the exact input the signature covers, and every verifier assembles it before it verifies. The identifier adds no pre-image, separator or re-encoding of SOVM/1’s own. It is rendered as lowercase hex and lives in the one namespace.

The identifier is derived, never transmitted. No payload carries it, and a verifier MUST NOT take a record’s identity from anything a sender supplied.

Verify, then derive. An implementation MUST NOT derive an identifier from a record whose signature it has not verified over that record’s Sig_structure. It hashes the structure the verification ran over, never one rebuilt from parsed values. A record that fails verification has no identifier: it is dropped and surfaced, and it never enters a duplicate index or a held set. The order holds for a chained record whose predecessor has not yet arrived. Verification and derivation both happen at receipt, before the record is held. A byte string that carries a genuine record’s header and payload under a bad signature therefore cannot occupy that record’s identity anywhere.

One record, one identifier, under every signer. The signature is not covered. A secure element generates its own nonce (section 6), so it signs one record differently every time. Two byte strings that verify under one key and share a Sig_structure are one record, whatever their signature bytes, and the second is a duplicate. A second valid signature over a record already held is not evidence of anything. Different content is the evidence the layers surface, at one HLC or at one generation.

external_aad is part of the identity, so it MUST be a pure function of the record’s static context: mesh_id for an SSP/1 record, and the per-record context the object plane defines for a SOP/1 record. It MUST NOT depend on the delivery path, the peer or the time of receipt. Otherwise one record would have two identifiers. A party that does not hold the context, such as a blind relay or a mailbox, cannot compute a record’s identifier. It could never verify one either, and it deduplicates by the transport bytes it stores.

What this section does not reach: an identifier of a structure that is not signed. storage_id, an encrypted record’s identifier and a hash over attestation bytes are taken over exact bytes (one hash).

Section 7 and section 9 do not widen what a verifier accepts. A high-S signature, a DER signature and an uncompressed key are rejected before any identifier exists.

This section replaces, in place, a section that made canonicity an identity property. That section is withdrawn: under this rule a malleated signature cannot give one record a second identity. Ed25519 has canonicity pitfalls of its own: non-canonical S and R encodings, small-order public keys, and cofactored versus cofactorless verification. They are worth knowing wherever an Ed25519 key appears in the stack. The transport channel key of the default binding profile is one.

v0.17.0