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 trust;
39
40pub use age::secrecy::{ExposeSecret, SecretString};
41pub use dictionary::{DEFAULT_DICTIONARY_BYTES, Dictionary, MAX_DICTIONARY_BYTES, train};
42pub use dictionary_pointer::{sign_pointer, verify_pointer};
43pub use dictionary_seal::{open_dictionary, seal_dictionary};
44pub use error::{Error, Result};
45pub use identity::Identity;
46pub use keys::{LookupKey, RecordKey, RootKey, SegmentKey};
47pub use object_keys::ObjectKeys;
48pub use record_context::RecordContext;
49pub use record_entry::{Entry, EntryFields, FileEntry};
50pub use record_open::{OpenedRecord, open_record};
51pub use record_seal::seal_record;
52pub use roster_draft::RosterDraft;
53pub use roster_member::MemberEntry;
54pub use roster_verify::{RosterPins, VerifiedRoster};
55pub use segment_info::{SegmentSeal, sealed_segment_len};
56pub use segment_open::{SegmentExpectation, open_segment};
57pub use segment_seal::{DEFAULT_ZSTD_LEVEL, SealOptions, seal_compressed, seal_segment};
58pub use trust::{AcceptedRecord, Provenance};