cipher_magma/lib.rs
1//! Block Cipher "Magma"
2//!
3//! Implemented and tested according to specifications:
4//! 1. [RFC 8891](https://datatracker.ietf.org/doc/html/rfc8891.html) a.k.a **GOST R 34.12-2015**
5//! 2. [RFC 5830](https://datatracker.ietf.org/doc/html/rfc5830) a.k.a **GOST 28147-89**
6//! 3. Block Cipher Modes: [GOST R 34.13-2015](https://www.tc26.ru/standard/gost/GOST_R_3413-2015.pdf)
7//!
8//! [Cipher Modes](https://tc26.ru/standard/gost/GOST_R_3413-2015.pdf)
9//! * **ECB** - Electronic Codebook Mode
10//! * **CTR** - Counter Encryption Mode
11//! * **CTR-ACPKM** - Counter Encryption Mode as per [RFC8645](https://www.rfc-editor.org/rfc/rfc8645.html), [P 1323565.1.017— 2018](https://standartgost.ru/g/%D0%A0_1323565.1.017-2018)
12//! * **OFB** - Output Feedback Mode
13//! * **CBC** - Cipher Block Chaining Mode
14//! * **CFB** - Cipher Feedback Mode
15//! * **MAC** - Message Authentication Code Generation Mode
16
17pub mod core;
18pub mod stream;
19
20// re-export the core block-ciphering operations
21pub use crate::core::magma::Magma;
22
23// re-export constants
24pub use crate::core::constants;
25
26// re-export the stream ciphering operations
27pub use stream::magma_stream::MagmaStream;
28
29// re-export the CipherOperation
30pub use stream::cipher_operation::CipherOperation;
31
32// re-export the cipher modes
33pub use stream::cipher_mode::{CipherMode, ecb, ctr, ctr_acpkm, ofb, cbc, cfb, mac};