elliptic-curve: fields with lazy reduction
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
- 30/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- 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 việc xem xét các PR 787 và 813 được liên kết của curve25519-dalek cùng đề xuất về LazyField, EagerField và LazyFieldWithCapacity được mô tả ở đây. Xác định xem các traits nên thuộc về ff, primefield, elliptic-curve hay một crate RustCrypto mới; công việc được xem là hoàn tất khi đạt được sự đồng thuận về vị trí upstream và thiết kế đã được xem xét.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When exposing FieldElement from curve25519-dalek (https://github.com/dalek-cryptography/curve25519-dalek/pull/787), it was noted how curve25519-dalek only reduces its field element occasionally and how the proposed PR fails to model that in the name of safety. https://github.com/dalek-cryptography/curve25519-dalek/pull/813 resolved this by introducing LazyField, a trait for a field which only occasionally performs reductions, using typenum to track capacity consumption via the Rust type system. This allows reducing when reductions occur, while ensuring operations remain well-defined.
In practice, for performance, there's no reason not to use LazyFieldWithCapacity<U1>. Any existing field can be wrapped with EagerField to achieve API compatibility. Any field with any capacity is benefited. It is suboptimal for fields with even greater capacity, yet those would already lose their benefit if Field alone was used (which would mandate performing a reduction after every single operation to remain well-defined in a constant-time context).
Ideally, these traits do not permanently reside in curve25519-dalek yet are upstreamed somewhere they can achieve wider adoption from. This would mean ff(which so far hasn't adopted typenum) or somewhere in the RustCrypto ecosystem (primefield, elliptic-curve, or a new crate). I wanted to create this issue to discuss the traits and where would be optimal for them. I'd also like to invite review over them. While I believe my prototype accomplishes its goals, and is fine to be published under curve25519_dalek::hazmat for now to accomplish the goals of finally exposing the curve25519_dalek FieldElement type, I also believe they could benefit from further review and fine-tuning.
- Ngôn ngữ chính
- Rust
- Star
- 756
- Fork
- 256
- Merge trung bình
- 2 giờ 53 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. 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/traits
-
try_sign_digest() is confusing.Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
RustCrypto/traits#2487 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
RustCrypto/traits#2482 · 5 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 32/100
RustCrypto/traits#2478 · 5 bình luận ·
-
cipher: tracking issue for v0.6Đang mởcipher
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
RustCrypto/traits#2424 ·
-
`signature` v4 tracking issueĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
RustCrypto/traits#2401 ·
Tất cả issue của RustCrypto/traits
Issue tương tự
-
backend::vllm diffusion multimodal
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/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 85/100
lambdaclass/ethrex#7329 ·
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 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
shadowsocks/shadowsocks-rust#2186 · 1 bình luận ·
-
[Chore]: Inconsistent wasm-pack binary invocation in justfile breaks cross-platform executionĐang mởC-bug S-awaiting-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
juspay/hyperswitch#14479 ·
Maintainer thường phản hồi trong vòng 1 ngày