seq_runtime/crypto.rs
1//! Cryptographic operations for Seq
2//!
3//! FFI entry points are grouped into per-primitive sub-modules and
4//! re-exported here so the flat public surface is unchanged.
5//!
6//! # API
7//!
8//! - `sha256`, `hmac-sha256`, `constant-time-eq` — `hash`
9//! - `random-bytes`, `uuid4`, `random-int` — `random`
10//! - `aes-gcm-encrypt`, `aes-gcm-decrypt` — `aes`
11//! - `pbkdf2-sha256` — `pbkdf`
12//! - `ed25519-keypair`, `ed25519-sign`, `ed25519-verify` — `ed25519`
13
14pub(super) const AES_NONCE_SIZE: usize = 12;
15pub(super) const AES_KEY_SIZE: usize = 32;
16pub(super) const AES_GCM_TAG_SIZE: usize = 16;
17pub(super) const MIN_PBKDF2_ITERATIONS: i64 = 1_000;
18
19mod aes;
20mod ed25519;
21mod hash;
22mod pbkdf;
23mod random;
24
25#[cfg(test)]
26mod tests;
27
28pub use aes::*;
29pub use ed25519::*;
30pub use hash::*;
31pub use pbkdf::*;
32pub use random::*;