Expand description
RFC-001 amendment (#182): same-owner same-machine signed attestation.
Wire already auto-pins sister sessions by reading their card off local
disk (pull::maybe_autopin_local_sister) — a filesystem witness. Coral’s
#182 review flagged that witness as too weak on its own: anything that can
write the data-dir tree could mint a sibling. This module is the
cryptographic hardening: an operator-signed claim, carried in the agent
card, that a receiver verifies against ITS OWN machine before auto-pinning
the sender at ORG_VERIFIED.
§The claim
same_machine_attestation = { machine_fingerprint, signature } where the
signature is the operator root key (op_sk) over the domain-separated
canonical message
wire-same-machine-v1|<fingerprint_hex>|<session_did>Signing with op_sk (not the session key) is the point: it proves the
operator who owns this session says all my sessions on machine X share this
fingerprint, which is the trust-model claim the receiver acts on.
§Receiver safety (the two checks that make it sound)
- Fingerprint strict-equality — the receiver recomputes its own
machine_fingerprintfrom its local(machine_id, os_user_id)and refuses unless the attestation’s fingerprint byte-equals it. A remote sender cannot know the receiver’s fingerprint without already being on the receiver’s machine. - Signature over the canonical bytes — verified under the same inline
op_pubkeythe op-chain already validated. A card that publishes the receiver’s fingerprint but signs a different one (the hostile-forge case, AC-SM3) fails here.
§Deviations from the amendment doc (deliberate, equivalent)
- sha256, not blake2b. A one-way 32-byte commitment; sha2 is already a
dependency, blake2 is not. Domain tag
wire-same-machine-v1is unchanged. - canonical message is a domain-separated string (mirroring
identity::succession_payload) rather than raw byte concatenation, so it reuses the auditedsign_did_cert/verify_payload_sigpath and can never be replayed as an op/member/succession cert.
Enums§
- Verify
Error - Errors verifying a received same-machine attestation. Every variant is a fall-through (the receiver drops the same-machine fast-path and proceeds with standard pairing), never a hard failure of the pull.
Constants§
- FINGERPRINT_
DOMAIN - Domain-separation tag. The
v1lets a future fingerprint construction ship asv2without renaming the card field. Protects against cross-protocol collision on the sharedmachine_ididentifier.
Functions§
- attestation_
payload - The canonical message the operator key signs / a receiver verifies.
Domain-separated; the fingerprint is lowercase hex so the message is a plain
printable string on the same
sign_did_certpath as the other certs. - auto_
pin_ decision - Receiver decision (amendment §C, all 7 steps): should a received
peer_cardbe auto-pinned atORG_VERIFIEDbecause it proves it is on THIS machine, owned by the SAME operator? ReturnsSome(peer_op_did)when every check passes,Noneto fall through to standard pairing. Fully offline. - build_
attestation - Build the attestation:
op_sksigns the canonical message over(fingerprint, session_did). Returns(machine_fingerprint_b64, signature_b64)ready to drop into the card’ssame_machine_attestation. - local_
fingerprint - Read this machine’s local fingerprint from platform sources.
Nonewhen either source can’t be read (the session still functions; it just can’t participate in the same-machine lane — fail-closed per §A). - machine_
fingerprint - Compute the 32-byte machine fingerprint from raw platform inputs.
- verify_
attestation - Verify a received attestation (amendment §C steps 4–6). Fail-closed.