From 2a46cd3b20e0aafa6a9d1e55875288423d0c1bbb Mon Sep 17 00:00:00 2001 From: root <287494524@qq.com> Date: Thu, 1 Aug 2019 15:02:15 +0800 Subject: [PATCH 1/2] add non-zero assert in field batch_invert --- src/field.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/field.rs b/src/field.rs index e154f24..58dd60a 100644 --- a/src/field.rs +++ b/src/field.rs @@ -154,6 +154,9 @@ impl FieldElement { acc = &acc * input; } + // acc is nonzero iff all inputs are nonzero + assert_eq!(acc.is_zero().unwrap_u8(), 0); + // Compute the inverse of all products acc = acc.invert(); From ccaf86ea86dd65dc3b2f312f7a5632556cda88e6 Mon Sep 17 00:00:00 2001 From: root <287494524@qq.com> Date: Tue, 6 Aug 2019 16:40:47 +0800 Subject: [PATCH 2/2] curve_models link in comment mismatch --- src/edwards.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/edwards.rs b/src/edwards.rs index c60069c..53f1499 100644 --- a/src/edwards.rs +++ b/src/edwards.rs @@ -84,7 +84,7 @@ //! successful decompression of a compressed point, or else by //! operations on other (valid) `EdwardsPoint`s. //! -//! [curve_models]: https://doc-internal.dalek.rs/curve25519_dalek/curve_models/index.html +//! [curve_models]: https://doc-internal.dalek.rs/curve25519_dalek/backend/serial/curve_models/index.html // We allow non snake_case names because coordinates in projective space are // traditionally denoted by the capitalisation of their respective