EME2 Mode (wide-block mode)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- rust
- Ambito
- cryptography
Direzione di ricerca
Inizia esaminando il crate eme2 esistente e il suo design basato su IEEE P1619.2, quindi confronta la sua API con l’ecosistema block-modes di RustCrypto. Controlla i test AES e Serpent segnalati e il comportamento di ciphertext-stealing. Il lavoro è completato quando esistono un percorso di integrazione upstream concordato, un’API pubblica compatibile e vettori di test adeguati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi everyone!
I would like to propose adding the EME2 (Encrypt-Mix-Encrypt Version 2) mode of operation to the RustCrypto workspace. I've implemented it in pure Rust based on the IEEE P1619.2 specification, and it is currently published independently on crates.io as eme2.
If merged, this would introduce the first truly wide-block encryption mode to the RustCrypto block-modes ecosystem.
Implementation Details
- Pure Rust: The current crate is written entirely in Rust.
- It is EME2, not EME: It implements the ciphertext stealing logic described in the "EME*" which is standard for the EME2. No padding required.
- Cipher Agnostic: It is successfully tested against RustCrypto's
aesandserpentbackends. - Testing: Verified against self-computed test vectors. (Note: I can integrate the official IEEE 1619.2 test vectors during the PR process, IF any of you have the IEEE PDF or test vectors for EME2 which are hidden behind paywall).
API Design & Trait Compatibility
I have designed the API to be as compatible as possible with the broader RustCrypto ecosystem, but there is one necessary architectural divergence:
Because EME2 is a two-pass wide-block cipher mode, it inherently requires different logic for encryption and decryption. Therefore, it cannot implement the StreamCipher trait's .apply_keystream() method (where encryption and decryption are identical XOR operations). Instead, the crate currently exposes explicit .encrypt() and .decrypt() methods to handle the distinct multi-pass operations. There is simply NO way to squeeze EME2 into a single .apply_keystream operation per it's design.
It is documented in the crate descriptions as well as edge case with the threefish cipher.
Next Steps
I would love to upstream this into the RustCrypto organization so others can easily access a modern, wide-block mode.
Are the maintainers open to a Pull Request for this? If so, I am more than happy to open PR request or hear recommendation before submitting.
- Lingua principale
- Rust
- Stelle
- 95
- Fork
- 23
- Merge medio
- 3m
- PR unite (30g)
- 1
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di RustCrypto/block-modes
-
XTS mode Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
RustCrypto/block-modes#73 · 3 commenti · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
RustCrypto/block-modes#31 · 5 commenti ·
-
Missing algorithms Apertahelp wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
RustCrypto/block-modes#1 · 8 commenti ·
Tutte le issue di RustCrypto/block-modes
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
TheLarkInn/aipm#2413 ·
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
alexgorbatchev/simple-ptt#15 ·
-
tooling
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
todo:ticket
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
taikoxyz/taiko-mono#22168 · 1 commento ·