From 1cfa817c589d3ff50b00b4bac04834629cd1e3f9 Mon Sep 17 00:00:00 2001 From: skaunov Date: Fri, 27 Oct 2023 12:32:40 +0300 Subject: [PATCH] Style --- rust-k256/src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rust-k256/src/lib.rs b/rust-k256/src/lib.rs index 744bd97..a92153d 100644 --- a/rust-k256/src/lib.rs +++ b/rust-k256/src/lib.rs @@ -117,6 +117,7 @@ impl PlumeSignature<'_> { let hashed_to_curve = hash_to_curve(self.message, self.pk); let hashed_to_curve_r = &hashed_to_curve * self.s - self.nullifier * &c_scalar; + // Check if the given hash matches let result = |components: Vec<&ProjectivePoint>| -> bool { if &c_sha256_vec_signal(components) == c { true @@ -124,7 +125,7 @@ impl PlumeSignature<'_> { false } }; - + if let Some(PlumeSignatureV1Fields { r_point: sig_r_point, hashed_to_curve_r: sig_hashed_to_curve_r, @@ -140,7 +141,6 @@ impl PlumeSignature<'_> { return false; } - // Check if the given hash matches result(vec![ &ProjectivePoint::GENERATOR, self.pk, @@ -150,7 +150,6 @@ impl PlumeSignature<'_> { &hashed_to_curve_r, ]) } else { - // Check if the given hash matches result(vec![self.nullifier, &r_point, &hashed_to_curve_r]) } }