Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

hex-literal instead of blobby?

Đang mở
#642 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
cryptography, testing

Hướng nghiên cứu

Xem xét cách xử lý các vector kiểm thử trong các crate dưới traits và các PR stream-ciphers được liên kết, tập trung vào cách blobby hiện đang biểu diễn các vector. So sánh cách tiếp cận đó với hex-literal và xác định phạm vi của việc định nghĩa các struct và mảng vector kiểm thử riêng cho từng crate. Khi hoàn tất, các vector cần dễ đọc và có thể truy nguyên về nguồn của chúng; feature riêng biệt test-vectors sẽ cần một thiết kế riêng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

In https://github.com/RustCrypto/stream-ciphers/pull/244 and https://github.com/RustCrypto/stream-ciphers/pull/245 we encountered the problem of the blobby test vectors being opaque. As serendipity would have it two people opened PRs because they thought test vectors were missing.

It appears they were, but it's presently difficult to ascertain that because all of the test vectors are in an opaque binary blob. I ended up having to write a small tool to dump the test vectors as hex so I could compare them to the ones in the RFC.

If the goal of blobby is to reduce the size of the test vectors in a compiled binary, it seems like hex-literal accomplishes that by encoding the test vectors as binary at compile time.

If the goal is to reduce the size of the crate, I really doubt it's accomplishing much over gzipped hex. But in the process, we also lose comments about the progeny of test vectors, which makes it difficult to answer questions like what ones we have included for each crate (see aforementioned PRs).

I would suggest that each of the crates in traits defines a test vector struct, and we populate an array of those using hex-literal.

Separately I think it'd be great to have a test-vectors crate feature for each of the algorithms that would allow such vectors to be used as part of an initialization self-test (which is a common thing for e.g. FIPS).

Ngôn ngữ chính
Rust
Star
756
Fork
256
Merge trung bình
1 giờ 27 phút
Pull request đã merge (30 ngày)
2

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của RustCrypto/traits

Tất cả issue của RustCrypto/traits

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.