diff --git a/common/nym_offline_compact_ecash/src/lib.rs b/common/nym_offline_compact_ecash/src/lib.rs index c699982a79..b9423d26fa 100644 --- a/common/nym_offline_compact_ecash/src/lib.rs +++ b/common/nym_offline_compact_ecash/src/lib.rs @@ -9,8 +9,8 @@ pub use scheme::keygen::generate_keypair_user; pub use scheme::keygen::ttp_keygen; pub use scheme::keygen::{PublicKeyUser, SecretKeyUser, VerificationKeyAuth}; pub use scheme::setup; -pub use scheme::withdrawal::issue_verify; pub use scheme::withdrawal::issue; +pub use scheme::withdrawal::issue_verify; pub use scheme::withdrawal::withdrawal_request; pub use scheme::PartialWallet; pub use scheme::PayInfo; diff --git a/common/nym_offline_compact_ecash/src/proofs/proof_spend.rs b/common/nym_offline_compact_ecash/src/proofs/proof_spend.rs index 1ee3e42ff3..00cbca8dd7 100644 --- a/common/nym_offline_compact_ecash/src/proofs/proof_spend.rs +++ b/common/nym_offline_compact_ecash/src/proofs/proof_spend.rs @@ -820,6 +820,3 @@ impl TryFrom<&[u8]> for SpendProof { Ok(spend_proof) } } - - - diff --git a/common/nym_offline_compact_ecash/src/scheme/identify.rs b/common/nym_offline_compact_ecash/src/scheme/identify.rs index db8a6b441b..046aee7352 100644 --- a/common/nym_offline_compact_ecash/src/scheme/identify.rs +++ b/common/nym_offline_compact_ecash/src/scheme/identify.rs @@ -120,8 +120,8 @@ mod tests { use crate::scheme::keygen::{PublicKeyUser, SecretKeyUser}; use crate::scheme::setup::setup; use crate::{ - aggregate_verification_keys, aggregate_wallets, generate_keypair_user, issue_verify, - issue, ttp_keygen, withdrawal_request, PartialWallet, PayInfo, VerificationKeyAuth, + aggregate_verification_keys, aggregate_wallets, generate_keypair_user, issue, issue_verify, + ttp_keygen, withdrawal_request, PartialWallet, PayInfo, VerificationKeyAuth, }; use itertools::izip; diff --git a/common/nym_offline_compact_ecash/src/scheme/mod.rs b/common/nym_offline_compact_ecash/src/scheme/mod.rs index 335cd4403f..b90bfef76c 100644 --- a/common/nym_offline_compact_ecash/src/scheme/mod.rs +++ b/common/nym_offline_compact_ecash/src/scheme/mod.rs @@ -791,10 +791,14 @@ impl Payment { }; // verify the zk-proof - if !self - .zk_proof - .verify(¶ms, &instance, &verification_key, &rr, &pay_info, self.spend_value) - { + if !self.zk_proof.verify( + ¶ms, + &instance, + &verification_key, + &rr, + &pay_info, + self.spend_value, + ) { return Err(CompactEcashError::Spend( "ZkProof verification failed".to_string(), )); @@ -818,7 +822,7 @@ impl Payment { self.tt.len() * 48 + // tt bytes 4 + // aa_len_bytes self.aa.len() * 48 + // aa bytes - self.zk_proof.to_bytes().len(), // zk_proof bytes + self.zk_proof.to_bytes().len(), // zk_proof bytes ); bytes.extend_from_slice(&self.kappa.to_affine().to_compressed()); diff --git a/common/nym_offline_compact_ecash/src/scheme/withdrawal.rs b/common/nym_offline_compact_ecash/src/scheme/withdrawal.rs index d6e9cb375a..de67acc6dc 100644 --- a/common/nym_offline_compact_ecash/src/scheme/withdrawal.rs +++ b/common/nym_offline_compact_ecash/src/scheme/withdrawal.rs @@ -386,7 +386,6 @@ pub fn blind_sing_private_attribute( private_attribute_commitment * yi } - /// Signs an expiration date using a joined commitment hash and a secret key. /// /// Given a joined commitment hash (`joined_commitment_hash`), an expiration date (`expiration_date`), diff --git a/common/nym_offline_compact_ecash/src/tests/e2e.rs b/common/nym_offline_compact_ecash/src/tests/e2e.rs index 700f105169..6e07db0fc2 100644 --- a/common/nym_offline_compact_ecash/src/tests/e2e.rs +++ b/common/nym_offline_compact_ecash/src/tests/e2e.rs @@ -14,9 +14,7 @@ use crate::scheme::setup::{ aggregate_indices_signatures, setup, sign_coin_indices, CoinIndexSignature, Parameters, PartialCoinIndexSignature, }; -use crate::scheme::withdrawal::{ - issue_verify, issue, withdrawal_request, WithdrawalRequest, -}; +use crate::scheme::withdrawal::{issue, issue_verify, withdrawal_request, WithdrawalRequest}; use crate::scheme::PayInfo; use crate::scheme::{PartialWallet, Payment, Wallet}; use bls12_381::Scalar;