Expand description
Client-only cryptography: key hierarchy, lookup ids, seal and open, signatures, roster.
Every function that takes bytes from outside treats them as hostile: it checks lengths
against the format limits before allocating and returns Error instead of panicking.
Secret types zeroize on drop and never print their contents. The server must never link
this crate.
The seal feature (on by default) adds records, segments, dictionaries and telemetry, which
need aws-lc-rs and zstd. Without it, the portable feature gives identities, rosters and ID
token checks in pure Rust, which build for WebAssembly.
Re-exports§
pub use dictionary::DEFAULT_DICTIONARY_BYTES;pub use dictionary::Dictionary;pub use dictionary::MAX_DICTIONARY_BYTES;pub use dictionary::train;pub use dictionary_pointer::sign_pointer;pub use dictionary_pointer::verify_pointer;pub use error::Error;pub use error::Result;pub use identity::Identity;pub use keys::LookupKey;pub use keys::RootKey;pub use keys::RecordKey;pub use keys::SegmentKey;pub use object_keys::ObjectKeys;pub use record_context::RecordContext;pub use record_entry::Entry;pub use record_entry::EntryFields;pub use record_entry::FileEntry;pub use record_open::OpenedRecord;pub use record_open::open_record;pub use record_seal::seal_record;pub use roster_draft::RosterDraft;pub use roster_member::MemberEntry;pub use roster_verify::RosterPins;pub use roster_verify::VerifiedRoster;pub use segment_info::SegmentSeal;pub use segment_info::sealed_segment_len;pub use segment_open::SegmentExpectation;pub use segment_open::open_segment;pub use segment_seal::DEFAULT_ZSTD_LEVEL;pub use segment_seal::SealOptions;pub use segment_seal::seal_compressed;pub use segment_seal::seal_segment;pub use telemetry::open_telemetry;pub use telemetry::seal_telemetry;pub use telemetry::telemetry_epoch;pub use trust::AcceptedRecord;pub use trust::Provenance;
Modules§
- dictionary
- Trained zstd dictionaries.
- dictionary_
pointer - The signed pointer to a cache’s dictionary segment.
- error
- id_
token - Verifying an OIDC ID token on the client: an owner’s client checks, by itself, the sign-in a join request rests on, without trusting the cache server.
- identity
- Member identities: one X25519 key to receive the root key and one Ed25519 key to sign.
- identity_
env - Loading an identity from the environment.
- identity_
file - Passphrase-protected identity files: an age file with one scrypt recipient.
- identity_
string - The Bech32 forms of an identity and its public descriptor.
- join
- Join requests: the nonce that binds a device to a sign-in, and an owner’s own check of it.
- keys
- The cache root key of an epoch and the sub-keys derived from it.
- lookup
- Lookup ids: the keyed hash of a compile key.
- object_
keys - Single-use keys of one sealed object, derived from a sub-key and the object’s salt.
- record_
context - What a record is bound to: cache, epoch, namespace kind and lookup id.
- record_
entry - The content of a record, as owned values.
- record_
open - Opening a record: commitment, AEAD, strict decoding and the signature over the transcript.
- record_
seal - Sealing a record: sign the transcript, pad to 256 bytes, encrypt as one AEAD message.
- roster_
draft - Building and changing rosters: genesis, add member, remove member, rotate.
- roster_
member - Roster members as owned values, and the rules every roster must satisfy.
- roster_
verify - Verifying a roster against the pins in the customer’s repository.
- segment_
info - What sealing a segment reports, and the size a sealed segment will have.
- segment_
open - Opening: id, header and commitment checks, STREAM decryption, then bounded decompression.
- segment_
seal - Sealing: zstd, Padmé padding and AES-256-GCM STREAM into an
OXSGsegment. - telemetry
- Sealed telemetry reports: AES-256-GCM under a key derived from the cache root key, bound to the cache and the epoch, so only members of that epoch read them and the server reads none.
- trust
- Trust tiers: which signer a reader accepts for which namespace.
- vault
- The owner vault: an owner identity with the pins it trusts, encrypted to a generated passphrase so that the cache server can keep it for the dashboard without reading it.
Traits§
- Expose
Secret - Expose a reference to an inner secret
Functions§
- open_
dictionary - Verifies
sealedagainst the signed dictionary id, opens it and prepares the dictionary for compression atlevel. - seal_
dictionary - Seals a raw dictionary as a dictionary-kind segment.
Type Aliases§
- Secret
String - Secret string type.