Expand description
Shared cryptographic primitives for the Flamberge tool suite.
Two ciphers here are bespoke to the ebook-DRM world and are implemented from scratch (they exist in no crate): the PC1 / Pukall stream cipher used by Mobipocket, and the Topaz stream cipher. Everything else (AES, DES, RC4, digests, PBKDF2) is a thin wrapper over standard implementations.
See docs/DEDRM_SCHEMES.md §1 for the reference specification.
Re-exports§
pub use error::CryptoError;
Modules§
- aes
- AES wrappers (CBC / ECB / CTR), all no-padding.
- crc32
- CRC-32 variants used by the PID / key-derivation code.
- des
- Single-DES wrappers (eReader content, Kindle Android V2 obfuscation).
- digest
- Hash digests used across the key-derivation code (MD5, SHA-1, SHA-256).
- error
- kdf
- Key-derivation helpers: HMAC-SHA256, PBKDF2-HMAC-SHA1, and PKCS#7 unpadding.
- pc1
- PC1 / Pukall Cipher 1 — the Mobipocket / Kindle stream cipher.
- rc4
- RC4 / ARC4 stream cipher (Adobe & B&N PDF per-object decryption).
- rsa
- RSA private-key operations for Adobe ADEPT (§7).
- topaz
- Topaz stream cipher (Amazon Kindle Topaz format).
Type Aliases§
- Result
- Convenience result alias for this crate.