Differences between debug and release versions in ct_eq
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 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 分钟
- 30 天内合并 PR
- 7
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
RustCrypto/elliptic-curves 的其他 Issue
-
ed448-goldilocks: `SigningKey::sign_ctx` docs say "Ed448ph", but it signs with Ed448 (phflag 0)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 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 一周以上 新手友好度 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可能重新可做 关联的 PR 已关闭且未合并。 未关闭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 天内回复