origin-crypto-sdk 0.5.2

Standalone cryptographic SDK with classical (Ed25519) and post-quantum (Falcon, SLH-DSA, ML-DSA, NTRU Prime, Curve41417) primitives. Hybrid signing by default.
Documentation
// SPDX-License-Identifier: Apache-2.0

//! Prelude — re-exports the most commonly used types.
//!
//! For most users, `use origin_crypto_sdk::prelude::*;` is enough:
//!
//! ```rust
//! use origin_crypto_sdk::prelude::*;
//!
//! let seed = [0x42u8; 32];
//! let bundle = HybridSigningKeyBundle::from_seed(&seed, "my-app")
//!     .expect("valid seed");
//! let sig = bundle.sign_hybrid(b"hello");
//! ```
//!
//! For low-level PQC primitives, import directly from their modules:
//!
//! ```rust,ignore
//! use origin_crypto_sdk::pqc::falcon1024;
//! use origin_crypto_sdk::pqc::ed448;
//! use origin_crypto_sdk::pqc::curve41417::ed41417;
//! ```
//!
//! For SLH-DSA and ML-DSA (feature-gated):
//!
//! ```rust,ignore
//! use origin_crypto_sdk::pqc::slhdsa;
//! use origin_crypto_sdk::pqc::mldsa;
//! ```

// ── Errors ──
pub use crate::error::{CryptoError, Result};

// ── Encryption ──
pub use crate::aead::XChaCha20Poly1305;
pub use crate::chacha20_blake3::ChaCha20Blake3;

// ── KDF ──
pub use crate::kdf::hkdf::{derive_subkeys, hkdf_sha3_256};
pub use crate::kdf::Argon2id;
pub use crate::kdf::Argon2idBuilder;

// ── MAC ──
pub use crate::kdf::mac::hmac_sha3_256;

// ── Hashes ──
pub use crate::primitives::blake3;
pub use crate::primitives::sha3;
pub use crate::primitives::{MemoryTier, Shake128, Shake256};

// ── DRBG ──
pub use crate::drbg::ChaCha20Drbg;

// ── Seed handling ──
pub use crate::seed::{derive_child_seed, derive_signing_keys, derive_verifying_keys, SeedHandle};

// ── Compression ──
pub use crate::compression::{compress, decompress};

// ── Hybrid signing (recommended default) ──
pub use crate::signing::hybrid::{falcon1024_keygen, HybridSigningKeyBundle};
pub use crate::signing::hybrid::{skein1024, skein512};

// ── Legacy hybrid re-exports (for callers upgrading from pre-0.3) ──
// Deprecated in 0.4, removed in 0.5. Use HybridSigningKeyBundle instead.
#[allow(deprecated)]
pub use crate::signing::{HybridSignatureOutput, HybridSigningKey, HybridVerifyingKey};