Skip to main content

Suite

Trait Suite 

Source
pub trait Suite: Sync {
    // Required methods
    fn id(&self) -> u16;
    fn seal_body(&self, blob: &[u8]) -> Vec<u8> ;
    fn open_body(&self, body: &[u8]) -> Option<Vec<u8>>;
}
Expand description

A pluggable crypto suite. Each posture level — null, Classic, Hybrid, PQ, PQ-Max — is one Suite registered in suite_for, so adding a primitive is a registration, not a change to seal / open. The seam stays suite-agnostic; all cryptography lives behind this trait (work/QUANTUM_MAP.md §3 — crypto-agility).

Required Methods§

Source

fn id(&self) -> u16

The wire suite id bound into the envelope header.

Source

fn seal_body(&self, blob: &[u8]) -> Vec<u8>

Transform an opaque blob into the envelope body — identity for null; for a real suite, handshake/sequence ‖ AEAD(blob)+tag.

Source

fn open_body(&self, body: &[u8]) -> Option<Vec<u8>>

Reverse Suite::seal_body, or None on a tampered / malformed body.

Implementors§