Rename ElGamalSK to ElGamalSecretKey
This commit is contained in:
@@ -5,7 +5,7 @@ use {
|
||||
#[cfg(not(target_arch = "bpf"))]
|
||||
use {
|
||||
crate::{
|
||||
encryption::elgamal::{ElGamalCiphertext, ElGamalSK},
|
||||
encryption::elgamal::{ElGamalCiphertext, ElGamalSecretKey},
|
||||
errors::ProofError,
|
||||
instruction::Verifiable,
|
||||
transcript::TranscriptProtocol,
|
||||
@@ -39,7 +39,7 @@ pub struct CloseAccountData {
|
||||
|
||||
#[cfg(not(target_arch = "bpf"))]
|
||||
impl CloseAccountData {
|
||||
pub fn new(source_sk: &ElGamalSK, balance: ElGamalCiphertext) -> Self {
|
||||
pub fn new(source_sk: &ElGamalSecretKey, balance: ElGamalCiphertext) -> Self {
|
||||
let proof = CloseAccountProof::new(source_sk, &balance);
|
||||
|
||||
CloseAccountData {
|
||||
@@ -74,7 +74,7 @@ impl CloseAccountProof {
|
||||
Transcript::new(b"CloseAccountProof")
|
||||
}
|
||||
|
||||
pub fn new(source_sk: &ElGamalSK, balance: &ElGamalCiphertext) -> Self {
|
||||
pub fn new(source_sk: &ElGamalSecretKey, balance: &ElGamalCiphertext) -> Self {
|
||||
let mut transcript = Self::transcript_new();
|
||||
|
||||
// add a domain separator to record the start of the protocol
|
||||
|
@@ -6,7 +6,7 @@ use {
|
||||
use {
|
||||
crate::{
|
||||
encryption::{
|
||||
elgamal::{ElGamalCiphertext, ElGamalPubkey, ElGamalSK},
|
||||
elgamal::{ElGamalCiphertext, ElGamalPubkey, ElGamalSecretKey},
|
||||
pedersen::{Pedersen, PedersenBase, PedersenComm, PedersenDecHandle, PedersenOpen},
|
||||
},
|
||||
errors::ProofError,
|
||||
@@ -38,7 +38,7 @@ impl TransferData {
|
||||
spendable_balance: u64,
|
||||
spendable_ct: ElGamalCiphertext,
|
||||
source_pk: ElGamalPubkey,
|
||||
source_sk: &ElGamalSK,
|
||||
source_sk: &ElGamalSecretKey,
|
||||
dest_pk: ElGamalPubkey,
|
||||
auditor_pk: ElGamalPubkey,
|
||||
) -> Self {
|
||||
@@ -234,7 +234,7 @@ impl TransferProofs {
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
#[allow(clippy::many_single_char_names)]
|
||||
pub fn new(
|
||||
source_sk: &ElGamalSK,
|
||||
source_sk: &ElGamalSecretKey,
|
||||
source_pk: &ElGamalPubkey,
|
||||
dest_pk: &ElGamalPubkey,
|
||||
auditor_pk: &ElGamalPubkey,
|
||||
|
@@ -6,7 +6,7 @@ use {
|
||||
use {
|
||||
crate::{
|
||||
encryption::{
|
||||
elgamal::{ElGamalCiphertext, ElGamalPubkey, ElGamalSK},
|
||||
elgamal::{ElGamalCiphertext, ElGamalPubkey, ElGamalSecretKey},
|
||||
pedersen::PedersenBase,
|
||||
},
|
||||
errors::ProofError,
|
||||
@@ -55,9 +55,9 @@ impl UpdateAccountPkData {
|
||||
current_balance: u64,
|
||||
current_ct: ElGamalCiphertext,
|
||||
current_pk: ElGamalPubkey,
|
||||
current_sk: &ElGamalSK,
|
||||
current_sk: &ElGamalSecretKey,
|
||||
new_pk: ElGamalPubkey,
|
||||
new_sk: &ElGamalSK,
|
||||
new_sk: &ElGamalSecretKey,
|
||||
) -> Self {
|
||||
let new_ct = new_pk.encrypt(current_balance);
|
||||
|
||||
@@ -105,8 +105,8 @@ impl UpdateAccountPkProof {
|
||||
|
||||
fn new(
|
||||
current_balance: u64,
|
||||
current_sk: &ElGamalSK,
|
||||
new_sk: &ElGamalSK,
|
||||
current_sk: &ElGamalSecretKey,
|
||||
new_sk: &ElGamalSecretKey,
|
||||
current_ct: &ElGamalCiphertext,
|
||||
new_ct: &ElGamalCiphertext,
|
||||
) -> Self {
|
||||
|
@@ -6,7 +6,7 @@ use {
|
||||
use {
|
||||
crate::{
|
||||
encryption::{
|
||||
elgamal::{ElGamalCiphertext, ElGamalPubkey, ElGamalSK},
|
||||
elgamal::{ElGamalCiphertext, ElGamalPubkey, ElGamalSecretKey},
|
||||
pedersen::{PedersenBase, PedersenOpen},
|
||||
},
|
||||
errors::ProofError,
|
||||
@@ -43,7 +43,7 @@ impl WithdrawData {
|
||||
pub fn new(
|
||||
amount: u64,
|
||||
source_pk: ElGamalPubkey,
|
||||
source_sk: &ElGamalSK,
|
||||
source_sk: &ElGamalSecretKey,
|
||||
current_balance: u64,
|
||||
current_balance_ct: ElGamalCiphertext,
|
||||
) -> Self {
|
||||
@@ -96,7 +96,7 @@ impl WithdrawProof {
|
||||
}
|
||||
|
||||
pub fn new(
|
||||
source_sk: &ElGamalSK,
|
||||
source_sk: &ElGamalSecretKey,
|
||||
final_balance: u64,
|
||||
final_balance_ct: &ElGamalCiphertext,
|
||||
) -> Self {
|
||||
|
Reference in New Issue
Block a user