pub struct RedactedEnvelope {
pub header: AttestationHeader,
pub signature: Vec<u8>,
}Expand description
A redacted envelope (REQ-700): the authenticated header of a signed
message plus the R4 v2 signature over that header’s attestation
preimage — and nothing else. Its size is bounded by role-set size and
:caused-by arity, independent of the redacted payload (NFR-700).
Field trustworthiness: the header fields are claims until
RedactedEnvelope::verify succeeds; after that, every field is
exactly what the sender’s key vouched for (REQ-701). Store acceptance
goes through ThreadedMessageStore::append_envelope, which verifies
first and places the envelope in the thread its authenticated thread
field names (REQ-702).
Fields§
§header: AttestationHeaderThe authenticated header: content hash, performative, sender key,
recipient set, thread, :caused-by — the exact fields the v2
attestation preimage commits to (ADR-700).
signature: Vec<u8>R4 v2 signature over attest::attestation_preimage(&header).
Implementations§
Source§impl RedactedEnvelope
impl RedactedEnvelope
Sourcepub fn content_hash(&self) -> &str
pub fn content_hash(&self) -> &str
Content hash of the message this envelope redacts (f1220<hex64>).
Sourcepub fn performative(&self) -> &str
pub fn performative(&self) -> &str
Performative name of the redacted message.
Sourcepub fn thread(&self) -> &str
pub fn thread(&self) -> &str
Thread identifier — the envelope carries its thread, and store placement is by this authenticated field (REQ-702).
Sourcepub fn verify(&self, signer: &dyn Signer) -> Result<(), AttestError>
pub fn verify(&self, signer: &dyn Signer) -> Result<(), AttestError>
REQ-701: verify the envelope from its own fields alone — the payload is never an input. Reconstructs the identical attestation preimage a full-message holder would, and dispatches on the key’s signature suite (typed rejection for unimplemented suites, REQ-708).
Sourcepub fn verify_under_marker(
&self,
marker: SignatureDiscipline,
signer: &dyn Signer,
) -> Result<(), AttestError>
pub fn verify_under_marker( &self, marker: SignatureDiscipline, signer: &dyn Signer, ) -> Result<(), AttestError>
Verify under an explicitly presented discipline marker (REQ-701).
The envelope form is the v2 discipline, so a signature declaring
v1 is the typed AttestError::DisciplineMismatch — a v1
full-bytes signature never satisfies an envelope path, and no guess
is attempted (fail closed, review finding 6).
Sourcepub fn to_sexpr(&self) -> SExpr
pub fn to_sexpr(&self) -> SExpr
Serialise to the CON-700 envelope production.
Canonical choices: keys in suite-explicit spelling, the recipient set in its canonical (suite, name) order, the thread as a string, the signature as lowercase hex — so serialise ∘ parse is identity and any holder re-derives identical bytes.