From 96f1cba8d9a19b2e6eb0b3d2312e436b08397f87 Mon Sep 17 00:00:00 2001 From: Moshe Shababo <17073733+moshababo@users.noreply.github.com> Date: Wed, 1 Nov 2023 12:01:51 -0500 Subject: [PATCH] Make wrapped scalar/group elements private --- node/libs/crypto/src/bn254/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/node/libs/crypto/src/bn254/mod.rs b/node/libs/crypto/src/bn254/mod.rs index f0c7b551..0c24ac7a 100644 --- a/node/libs/crypto/src/bn254/mod.rs +++ b/node/libs/crypto/src/bn254/mod.rs @@ -22,7 +22,7 @@ pub mod hash; mod testonly; /// Type safety wrapper around a scalar value. -pub struct SecretKey(pub Fr); +pub struct SecretKey(Fr); impl SecretKey { /// Gets the corresponding [`PublicKey`] for this [`SecretKey`] @@ -55,7 +55,7 @@ impl ByteFmt for SecretKey { /// Type safety wrapper around G2. #[derive(Clone, PartialEq, Eq)] -pub struct PublicKey(pub G2); +pub struct PublicKey(G2); impl ByteFmt for PublicKey { fn decode(bytes: &[u8]) -> anyhow::Result { @@ -91,7 +91,7 @@ impl Ord for PublicKey { /// Type safety wrapper around a G1 value. #[derive(Clone, Debug, PartialEq, Eq)] -pub struct Signature(pub G1); +pub struct Signature(G1); impl Signature { /// Verifies a signature against the provided public key @@ -138,7 +138,7 @@ impl Ord for Signature { } /// Type safety wrapper around [Signature] indicating that it is an aggregated signature. #[derive(Clone, Debug, PartialEq, Eq)] -pub struct AggregateSignature(pub G1); +pub struct AggregateSignature(G1); impl AggregateSignature { /// Generates an aggregate signature from a list of signatures.