From 784ee8e517cac280c950e48724a1ed8f8eb8e47a Mon Sep 17 00:00:00 2001 From: skaunov Date: Thu, 7 Mar 2024 16:30:10 +0300 Subject: [PATCH] `_arkworks` checked, `_rustcrypto` updated --- rust-k256/src/lib.rs | 4 ++-- rust-k256/src/randomizedsigner.rs | 2 +- rust-k256/tests/verification.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rust-k256/src/lib.rs b/rust-k256/src/lib.rs index 7e20514..6af0ca4 100644 --- a/rust-k256/src/lib.rs +++ b/rust-k256/src/lib.rs @@ -77,9 +77,9 @@ pub struct PlumeSignature { #[derive(Debug)] pub struct PlumeSignatureV1Fields { /// Part of the signature data, a curve point. - pub r_point: ProjectivePoint, + pub r_point: AffinePoint, /// Part of the signature data, a curve point. - pub hashed_to_curve_r: ProjectivePoint, + pub hashed_to_curve_r: AffinePoint, } impl PlumeSignature { /// Verifies a PLUME signature. diff --git a/rust-k256/src/randomizedsigner.rs b/rust-k256/src/randomizedsigner.rs index 793cf25..bb0d14a 100644 --- a/rust-k256/src/randomizedsigner.rs +++ b/rust-k256/src/randomizedsigner.rs @@ -100,7 +100,7 @@ impl<'signing> RandomizedSigner for PlumeSigner<'signing> { v1specific: if self.v1 { Some(PlumeSignatureV1Fields { r_point: r_point.into(), - hashed_to_curve_r: hashed_to_curve_r.to_point(), + hashed_to_curve_r: hashed_to_curve_r.to_point().to_affine(), }) } else { None diff --git a/rust-k256/tests/verification.rs b/rust-k256/tests/verification.rs index b0a436c..25c6c65 100644 --- a/rust-k256/tests/verification.rs +++ b/rust-k256/tests/verification.rs @@ -38,8 +38,8 @@ fn plume_v1_test() { c: NonZeroScalar::from_repr(C_V1.into()).unwrap(), s: NonZeroScalar::new(test_data.3).unwrap(), v1specific: Some(PlumeSignatureV1Fields { - r_point, - hashed_to_curve_r, + r_point: r_point.into(), + hashed_to_curve_r: hashed_to_curve_r.into(), }), }; let verified = sig.verify();