elliptic-curve: fields with lazy reduction
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- rust
- 領域
- cryptography
調査の方向性
まず、リンクされている curve25519-dalek の PR 787 と 813、およびここで説明されている LazyField、EagerField、LazyFieldWithCapacity の提案を確認します。Traits を ff、primefield、elliptic-curve のいずれか、または新しい RustCrypto crate に置くべきかを判断します。upstream の配置について合意し、設計をレビューすれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Rust
- スター
- 756
- フォーク
- 256
- 平均マージ
- 2時間 53分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RustCrypto/traits のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
RustCrypto/traits#2487 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
RustCrypto/traits#2482 · コメント 5 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 32/100
RustCrypto/traits#2478 · コメント 5 件 ·
-
cipher
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
RustCrypto/traits#2424 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
RustCrypto/traits#2401 ·
RustCrypto/traits の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
bytecodealliance/wasmtime#14433 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信