The brief description: https://sheroz.com/pages/blog/rust-cipher-magma-28147-89.html
- ECB - Electronic Codebook Mode
- CTR - Counter Encryption Mode
- CTR-ACPKM - Counter Encryption Mode as per RFC8645
- OFB - Output Feedback Mode
- CBC - Cipher Block Chaining Mode
- CFB - Cipher Feedback Mode
- MAC - Message Authentication Code Generation Mode
- RFC 8891 a.k.a GOST R 34.12-2015: Block Cipher "Magma"
- RFC 5830 a.k.a GOST 28147-89
- Block Cipher Modes:
Tests are implemented using: crypto_vectors
- Linux Ubuntu 22.04 LTS / Intel® Core™ i7
- MacOS Ventura 13.4 / Apple Macbook Pro M1
Please look at magma_samples
- Block encryption encrypt_block.rs
- Text encryption encrypt_text.rs
- Message Authentication Code (MAC) calculate_mac.rs
- Buffer encryption encrypt_buffer.rs
- Buffer encryption by parallel processing encrypt_buffer_parallel.rs
- On a MacBook M1 Pro with 8+2 cores, the encryption speed increased ~ 8.3 times
- On an i7-3770 with 4 cores, running Linux, the encryption speed increased ~ 4.5 times
- File encryption encrypt_file.rs
- Bitmap file encryption encrypt_bmp.rs
Please note that the ECB mode has weaknesses. It does not hide data patterns well and leaks information about the plaintext. ECB mode is not recommended for use in cryptographic protocols.
This project was created for research purposes and is not intended for use in production systems.