Run cargo fmt
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -820,6 +820,3 @@ impl TryFrom<&[u8]> for SpendProof {
|
||||
Ok(spend_proof)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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`),
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user