Differences between debug and release versions in ct_eq
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 28/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust
- 領域
- cryptography
調査の方向性
Start with the sqrt_ratio_3mod4_one test in k256/src/arithmetic/hash2curve.rs, run it with and without --release as the issue shows, then read the ct_eq comparison near line 82 of primeorder/src/osswu.rs. Done means the test gives the same result in both builds and the constant-time comparison is fixed. This is cryptographic code, so a maintainer should review any change.
索引モデルが issue の本文から書いたものです。
説明
See tests below:
diff --git a/k256/src/arithmetic/hash2curve.rs b/k256/src/arithmetic/hash2curve.rs
index 0ef28ebb..602c7603 100644
--- a/k256/src/arithmetic/hash2curve.rs
+++ b/k256/src/arithmetic/hash2curve.rs
@@ -289,6 +289,17 @@ mod tests {
use hex_literal::hex;
use proptest::{num::u64::ANY, prelude::ProptestConfig, proptest};
+ #[test]
+ fn sqrt_ratio_3mod4_one() {
+ use primeorder::osswu::OsswuMap;
+
+ let (is_square, root) =
+ FieldElement::sqrt_ratio_3mod4(FieldElement::ONE, FieldElement::ONE);
+
+ assert!(bool::from(is_square), "1 / 1 must be a quadratic residue");
+ assert_eq!(root.square().normalize(), FieldElement::ONE);
+ }
+
The release differs from the debug version:
cargo test -p k256 --features hash2curve --release sqrt_ratio_3mod4_one
cargo test -p k256 --features hash2curve sqrt_ratio_3mod4_one
It affects this line: https://github.com/RustCrypto/elliptic-curves/blob/189246045ba2ab93b68111dc4be30ba825eb93df/primeorder/src/osswu.rs#L82
- 主要言語
- Rust
- スター
- 884
- フォーク
- 319
- 平均マージ
- 18時間 34分
- マージ済み PR(30日)
- 7
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RustCrypto/elliptic-curves のほかの issue
-
ed448-goldilocks: `SigningKey::sign_ctx` docs say "Ed448ph", but it signs with Ed448 (phflag 0)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
RustCrypto/elliptic-curves#1990 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
RustCrypto/elliptic-curves#1989 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ed448-goldilocks: `MontgomeryPoint * Scalar` returns [k+1]P for odd k (Montgomery ladder is missing the final conditional swap)対応中かも @lyn1dev が 12 日前に担当しました。 オープン
難易度 4/5 1〜2日 初心者へのやさしさ 55/100
RustCrypto/elliptic-curves#1988 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
RustCrypto/elliptic-curves#1972 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ed448-goldilocks: decompress_unchecked ignores bits 448–454 and does not check y < p (RFC 8032 §5.2.3), so Wycheproof #63–65 verify and y + p decodes対応中かも @DefaultMo が 43 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
RustCrypto/elliptic-curves#1970 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
RustCrypto/elliptic-curves の issue をすべて見る
似ている issue
-
The new tests repeat each other and one only checks a two-line helper再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンinfra
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
storytold/wordcraft#9405 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
in-progress
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
area: ai-assistants documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
BetaBots-LLC/latticegate#17 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
storytold/craft-libs#5594 ·
メンテナーはふだん 1 日以内に返信
-
available documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Nixitov/Riptide-Native#932 ·
メンテナーはふだん 1 日以内に返信