Skip to main content

coven_crypto/
lib.rs

1//! Store keys, circle keys, member keys, cryptography and key custody (Appendix D).
2//!
3//! Object and file chunks authenticate their storage path, cleartext prefix and
4//! coordinates. Every file has an independent key and uses its index as nonce.
5//! Secret material is erased on drop and redacted in diagnostic output.
6
7mod cipher;
8mod confirmation_number;
9mod derivation;
10mod error;
11mod file_key;
12mod hashing;
13mod keys;
14mod member;
15mod object_digest;
16mod randomness;
17pub use randomness::random_secret;
18#[cfg(any(test, feature = "test-utils"))]
19pub use randomness::refuse_randomness;
20mod s3_signing;
21mod secret;
22mod wire;
23
24pub mod custody;
25
26pub use cipher::{FILE_CHUNK_TAG_LEN, SEALED_OBJECT_CHUNK_OVERHEAD};
27pub use confirmation_number::ConfirmationNumber;
28pub use coven_foundation::id_source::CircleId;
29pub use derivation::{DerivedKeys, EncryptionKey};
30pub use error::{CryptoError, MaterialError};
31pub use file_key::FileKey;
32pub use hashing::{
33    authorship_empty, authorship_node, kept_value_digest, AuthorshipHasher, ContentHash,
34    ContentHasher,
35};
36pub use keys::{CircleKey, InviteSecret, StoreKey, StoreKeyring};
37pub use member::{
38    seal_circle_key, seal_store_key, MemberIdentity, MemberKeys, MemberPublicKeys, SealingKey,
39    Signature, SigningKey, KEY_BOX_HEAD_LEN, KEY_BOX_TAG_LEN, SIGNATURE_LEN,
40};
41pub use object_digest::{ObjectDigest, ObjectHasher};
42pub use s3_signing::{aws_request_signature, gcs_request_signature, s3_request_hash};
43pub use secret::{SecretBytes, SecretText};
44
45#[cfg(test)]
46#[path = "lib_tests.rs"]
47mod tests;