Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
remove unnecessary generic parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
samkim-crypto committed Sep 16, 2023
1 parent ae387fa commit 8ce07ca
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
38 changes: 18 additions & 20 deletions token/client/src/proof_generation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ pub fn transfer_with_fee_split_proof_data(
};

// encrypt the transfer amount under the destination and auditor ElGamal public key
let transfer_amount_destination_auditor_ciphertext_lo = GroupedElGamal::<2>::encrypt_with(
let transfer_amount_destination_auditor_ciphertext_lo = GroupedElGamal::encrypt_with(
[destination_elgamal_pubkey, auditor_elgamal_pubkey],
transfer_amount_lo,
&transfer_amount_opening_lo,
);
let transfer_amount_destination_auditor_ciphertext_hi = GroupedElGamal::<2>::encrypt_with(
let transfer_amount_destination_auditor_ciphertext_hi = GroupedElGamal::encrypt_with(
[destination_elgamal_pubkey, auditor_elgamal_pubkey],
transfer_amount_hi,
&transfer_amount_opening_hi,
Expand Down Expand Up @@ -228,24 +228,22 @@ pub fn transfer_with_fee_split_proof_data(
.map_err(|_| TokenError::ProofGeneration)?;

// encrypt the fee amount under the destination and withdraw withheld authority ElGamal public key
let fee_destination_withdraw_withheld_authority_ciphertext_lo =
GroupedElGamal::<2>::encrypt_with(
[
destination_elgamal_pubkey,
withdraw_withheld_authority_elgamal_pubkey,
],
fee_amount_lo,
&fee_opening_lo,
);
let fee_destination_withdraw_withheld_authority_ciphertext_hi =
GroupedElGamal::<2>::encrypt_with(
[
destination_elgamal_pubkey,
withdraw_withheld_authority_elgamal_pubkey,
],
fee_amount_hi,
&fee_opening_hi,
);
let fee_destination_withdraw_withheld_authority_ciphertext_lo = GroupedElGamal::encrypt_with(
[
destination_elgamal_pubkey,
withdraw_withheld_authority_elgamal_pubkey,
],
fee_amount_lo,
&fee_opening_lo,
);
let fee_destination_withdraw_withheld_authority_ciphertext_hi = GroupedElGamal::encrypt_with(
[
destination_elgamal_pubkey,
withdraw_withheld_authority_elgamal_pubkey,
],
fee_amount_hi,
&fee_opening_hi,
);

// generate fee ciphertext validity data
let fee_ciphertext_validity_proof_data =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ pub fn transfer_split_proof_data(
};

// encrypt the transfer amount under the destination and auditor ElGamal public key
let transfer_amount_destination_auditor_ciphertext_lo = GroupedElGamal::<2>::encrypt_with(
let transfer_amount_destination_auditor_ciphertext_lo = GroupedElGamal::encrypt_with(
[destination_elgamal_pubkey, auditor_elgamal_pubkey],
transfer_amount_lo,
&transfer_amount_opening_lo,
);
let transfer_amount_destination_auditor_ciphertext_hi = GroupedElGamal::<2>::encrypt_with(
let transfer_amount_destination_auditor_ciphertext_hi = GroupedElGamal::encrypt_with(
[destination_elgamal_pubkey, auditor_elgamal_pubkey],
transfer_amount_hi,
&transfer_amount_opening_hi,
Expand Down

0 comments on commit 8ce07ca

Please sign in to comment.