Skip to main content

flamberge_crypto/
lib.rs

1//! Shared cryptographic primitives for the Flamberge tool suite.
2//!
3//! Two ciphers here are bespoke to the ebook-DRM world and are implemented from
4//! scratch (they exist in no crate): the **PC1 / Pukall** stream cipher used by
5//! Mobipocket, and the **Topaz** stream cipher. Everything else (AES, DES, RC4,
6//! digests, PBKDF2) is a thin wrapper over standard implementations.
7//!
8//! See `docs/DEDRM_SCHEMES.md` ยง1 for the reference specification.
9
10pub mod aes;
11pub mod crc32;
12pub mod des;
13pub mod digest;
14pub mod error;
15pub mod kdf;
16pub mod pc1;
17pub mod rc4;
18pub mod rsa;
19pub mod topaz;
20
21pub use error::CryptoError;
22
23/// Convenience result alias for this crate.
24pub type Result<T> = std::result::Result<T, CryptoError>;