Skip to main content

oxabl_cache_crypto/
lib.rs

1//! Client-only cryptography: key hierarchy, lookup ids, seal and open, signatures, roster.
2//!
3//! Every function that takes bytes from outside treats them as hostile: it checks lengths
4//! against the format limits before allocating and returns [`Error`] instead of panicking.
5//! Secret types zeroize on drop and never print their contents. The server must never link
6//! this crate.
7
8mod aead;
9mod compress;
10mod dictionary_seal;
11mod domain;
12mod keyring;
13mod nonce;
14mod random;
15mod secret;
16mod signing;
17
18pub mod dictionary;
19pub mod dictionary_pointer;
20pub mod error;
21pub mod identity;
22pub mod identity_env;
23pub mod identity_file;
24pub mod identity_string;
25pub mod keys;
26pub mod lookup;
27pub mod object_keys;
28pub mod record_context;
29pub mod record_entry;
30pub mod record_open;
31pub mod record_seal;
32pub mod roster_draft;
33pub mod roster_member;
34pub mod roster_verify;
35pub mod segment_info;
36pub mod segment_open;
37pub mod segment_seal;
38pub mod telemetry;
39pub mod trust;
40
41pub use age::secrecy::{ExposeSecret, SecretString};
42pub use dictionary::{DEFAULT_DICTIONARY_BYTES, Dictionary, MAX_DICTIONARY_BYTES, train};
43pub use dictionary_pointer::{sign_pointer, verify_pointer};
44pub use dictionary_seal::{open_dictionary, seal_dictionary};
45pub use error::{Error, Result};
46pub use identity::Identity;
47pub use keys::{LookupKey, RecordKey, RootKey, SegmentKey};
48pub use object_keys::ObjectKeys;
49pub use record_context::RecordContext;
50pub use record_entry::{Entry, EntryFields, FileEntry};
51pub use record_open::{OpenedRecord, open_record};
52pub use record_seal::seal_record;
53pub use roster_draft::RosterDraft;
54pub use roster_member::MemberEntry;
55pub use roster_verify::{RosterPins, VerifiedRoster};
56pub use segment_info::{SegmentSeal, sealed_segment_len};
57pub use segment_open::{SegmentExpectation, open_segment};
58pub use segment_seal::{DEFAULT_ZSTD_LEVEL, SealOptions, seal_compressed, seal_segment};
59pub use telemetry::{open_telemetry, seal_telemetry, telemetry_epoch};
60pub use trust::{AcceptedRecord, Provenance};