EME2 Mode (wide-block mode)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- rust
- Lĩnh vực
- cryptography
Hướng nghiên cứu
Bắt đầu bằng cách xem xét crate eme2 hiện có và thiết kế dựa trên IEEE P1619.2 của nó, sau đó so sánh API của nó với hệ sinh thái block-modes của RustCrypto. Kiểm tra các bài kiểm thử AES và Serpent đã được báo cáo cũng như hành vi của ciphertext-stealing. Công việc được xem là hoàn tất khi có một hướng tích hợp upstream được thống nhất, một API công khai tương thích và các vector kiểm thử phù hợp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Rust
- Star
- 96
- Fork
- 23
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của RustCrypto/block-modes
-
XTS modeĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
RustCrypto/block-modes#73 · 3 bình luận · 1 reaction ·
-
cfb8 Buf Encryptor and DecryptorĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
RustCrypto/block-modes#31 · 5 bình luận ·
-
Missing algorithmsĐang mởhelp wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
RustCrypto/block-modes#1 · 8 bình luận ·
Tất cả issue của RustCrypto/block-modes
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
bytecodealliance/rustix#1703 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug discussion
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
medialab/xan#1201 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
farion1231/cc-switch#8298 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ajeetdsouza/zoxide#1323 ·
Maintainer thường phản hồi trong vòng 1 ngày