EME2 Mode (wide-block mode)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- rust
- Área
- cryptography
Línea de trabajo
Comienza revisando el crate eme2 existente y su diseño basado en IEEE P1619.2; después, compara su API con el ecosistema de RustCrypto block-modes. Comprueba las pruebas de AES y Serpent notificadas y el comportamiento de ciphertext-stealing. Se considera terminado cuando exista una ruta de integración upstream acordada, una API pública compatible y vectores de prueba adecuados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 95
- Forks
- 23
- Merge medio
- 3 min
- PR fusionados (30 d)
- 1
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de RustCrypto/block-modes
-
XTS mode Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
RustCrypto/block-modes#73 · 3 comentarios · 1 reacción ·
-
cfb8 Buf Encryptor and Decryptor Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
RustCrypto/block-modes#31 · 5 comentarios ·
-
Missing algorithms Abiertohelp wanted
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
RustCrypto/block-modes#1 · 8 comentarios ·
Todos los issues de RustCrypto/block-modes
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
bug core
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW Abiertofuzz
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
ClickHouse/ClickHouse#122114 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
linebender/vello_svg#90 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100