Lack of immediate access to GenericArray to view associated functions and trait impls leads to confusion and annoyance.
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
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- 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 aes-gcm và aes-gcm-siv cung cấp Nonce như thế nào và GenericArray được sử dụng ra sao, sau đó đọc phần thảo luận của issue để nắm được định hướng API đã thống nhất. Công việc được xem là hoàn tất khi các maintainer chọn và ghi lại tài liệu cho một cách tiếp cận—re-export GenericArray, thêm một wrapper hoặc một thiết kế khác—đồng thời giải quyết vấn đề tương thích và tài liệu hướng tới người dùng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
It's understandable that aes-gcm and aes-gcm-siv use generic_array's GenericArray's for the Nonce type. What's less understandable though is why this is left an opaque type and not either a wrapper with its own documentation of its methods custom to the uses of ges-gcm* or that GenericArray is not re-exported both for convenience as well as documentation. As a new user, I was really confused by the fact that I could not access the documentation for the underlying type to see what associated functions/methods it supports or even how to get one besides converting from a slice (as is demonstrated by the top-level crate documentation). Not everyone knows the generic_array crate and knows what GenericArray is and I had to look through the source to find the implementations of what I thought were a private type but turned out to be an import that is used on the front end by the user despite not only not being re-exported but there being no mention in the top-level crate documentation where this type comes from.
I would personally prefer turning Nonce into a newtype custom wrapper but I understand that this can be an issue due to the fact that it fundamentally introduces breaking changes.
The second best option is to simply re-export GenericArray. After all, aes-gcm-siv re-exports the entire aead crate just like aes-gcm which also re-exports aes in addition. I think this is by far the most uncontroversial option but the seemingly random re-export seems for some reason distasteful, I propose a third proposal:
This one is a compromise between the last two: create a new type called something like NonceWrapper that does exactly what I mentioned in the first proposal and then impl From for Nonce, unwrapping it. One could then have replace all instances of taking a Nonce type with impl Into. I can't see any breakage that would come of this but obviously it would still work even without the function refactors, just less convenient.
I would be willing to make a PR if and when a solution is agreed upon. I would love to hear others' thoughts.
- Ngôn ngữ chính
- Rust
- Star
- 967
- Fork
- 200
- 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/AEADs
-
xaes-256-gcm: C2SP standard's accumulated randomized test vectors not in testing suiteCó thể đã có người làm @eligrubb đã nhận 122 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
RustCrypto/AEADs#864 ·
-
deoxys+ocb3: plaintext exposed on tag decryption failureCó thể đã có người làm @ECD5A đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
RustCrypto/AEADs#888 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
RustCrypto/AEADs#765 ·
-
Doctests no longer build with default featuresCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
RustCrypto/AEADs#755 · 1 bình luận ·
-
ocb3: use parallel-capable APIsĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
RustCrypto/AEADs#706 · 1 bình luận · 1 reaction ·
Tất cả issue của RustCrypto/AEADs
Issue tương tự
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
IntersectMBO/developer-experience#347 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
registrystack/registry-stack#2168 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug crate: 3d help wanted triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
kornia/kornia-rs#1203 · 1 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 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] ComponentType classifies 0x8A8A-0xEAEA as GREASE; mls-extensions §7.5 makes them private useĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày