EME2 Mode (wide-block mode)
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- rust
- 領域
- cryptography
調査の方向性
まず既存の eme2 crate と IEEE P1619.2 ベースの設計を確認し、次にその API を RustCrypto block-modes エコシステムと比較します。報告されている AES および Serpent のテストと ciphertext-stealing の動作を確認します。合意された upstream 統合パス、互換性のある公開 API、適切なテストベクトルが揃えば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Rust
- スター
- 95
- フォーク
- 23
- 平均マージ
- 3分
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RustCrypto/block-modes のほかの issue
-
XTS mode オープン
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
RustCrypto/block-modes#73 · コメント 3 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
RustCrypto/block-modes#31 · コメント 5 件 ·
-
Missing algorithms オープンhelp wanted
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
RustCrypto/block-modes#1 · コメント 8 件 ·
RustCrypto/block-modes の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
TheLarkInn/aipm#2413 ·
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
alexgorbatchev/simple-ptt#15 ·
-
tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
todo:ticket
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
taikoxyz/taiko-mono#22168 · コメント 1 件 ·