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

Commit

Permalink
function docs to focus on the action they perform
Browse files Browse the repository at this point in the history
  • Loading branch information
samkim-crypto committed Jun 26, 2023
1 parent 4547549 commit df7d07f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub struct BatchedGroupedCiphertext2HandlesValidityProof(GroupedCiphertext2Handl
#[allow(non_snake_case)]
#[cfg(not(target_os = "solana"))]
impl BatchedGroupedCiphertext2HandlesValidityProof {
/// Batched grouped ciphertext validity proof constructor.
/// Creates a batched grouped ciphertext validity proof.
///
/// The function simply batches the input openings and invokes the standard grouped ciphertext
/// validity proof constructor.
Expand All @@ -66,7 +66,7 @@ impl BatchedGroupedCiphertext2HandlesValidityProof {
))
}

/// Batched grouped ciphertext validity proof verifier.
/// Verifies a batched grouped ciphertext validity proof.
///
/// The function does *not* hash the public keys, commitment, or decryption handles into the
/// transcript. For security, the caller (the main protocol) should hash these public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub struct CiphertextCiphertextEqualityProof {
#[allow(non_snake_case)]
#[cfg(not(target_os = "solana"))]
impl CiphertextCiphertextEqualityProof {
/// The ciphertext-ciphertext equality proof constructor.
/// Creates a ciphertext-ciphertext equality proof.
///
/// The function does *not* hash the public key, ciphertext, or commitment into the transcript.
/// For security, the caller (the main protocol) should hash these public components prior to
Expand Down Expand Up @@ -120,8 +120,7 @@ impl CiphertextCiphertextEqualityProof {
}
}

/// The ciphertext-ciphertext equality proof verifier. The proof is with respect to two
/// ciphertexts.
/// Creates a ciphertext-commitment equality proof.
///
/// * `source_pubkey` - The ElGamal pubkey associated with the first ciphertext to be proved
/// * `destination_pubkey` - The ElGamal pubkey associated with the second ciphertext to be proved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub struct CiphertextCommitmentEqualityProof {
#[allow(non_snake_case)]
#[cfg(not(target_os = "solana"))]
impl CiphertextCommitmentEqualityProof {
/// Equality proof constructor. The proof is with respect to a ciphertext and commitment.
/// Creates a ciphertext-commitment equality proof.
///
/// The function does *not* hash the public key, ciphertext, or commitment into the transcript.
/// For security, the caller (the main protocol) should hash these public components prior to
Expand Down Expand Up @@ -120,7 +120,7 @@ impl CiphertextCommitmentEqualityProof {
}
}

/// Equality proof verifier. The proof is with respect to a single ciphertext and commitment.
/// Verifies a ciphertext-commitment equality proof.
///
/// * `source_pubkey` - The ElGamal pubkey associated with the ciphertext to be proved
/// * `source_ciphertext` - The main ElGamal ciphertext to be proved
Expand Down
2 changes: 1 addition & 1 deletion zk-token-sdk/src/sigma_proofs/fee_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ impl FeeSigmaProof {
}
}

/// Fee sigma proof verifier.
/// Verifies a fee sigma proof
///
/// * `fee_commitment` - The Pedersen commitment of the transfer fee
/// * `delta_commitment` - The Pedersen commitment of the "real" delta value
Expand Down
4 changes: 2 additions & 2 deletions zk-token-sdk/src/sigma_proofs/pubkey_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub struct PubkeyValidityProof {
#[allow(non_snake_case)]
#[cfg(not(target_os = "solana"))]
impl PubkeyValidityProof {
/// Public-key proof constructor.
/// Creates a public key validity proof.
///
/// The function does *not* hash the public key and ciphertext into the transcript. For
/// security, the caller (the main protocol) should hash these public key components prior to
Expand Down Expand Up @@ -80,7 +80,7 @@ impl PubkeyValidityProof {
Self { Y, z }
}

/// Public-key proof verifier.
/// Verifies a public key validity proof.
///
/// * `elgamal_pubkey` - The ElGamal public key to be proved
/// * `transcript` - The transcript that does the bookkeeping for the Fiat-Shamir heuristic
Expand Down
4 changes: 2 additions & 2 deletions zk-token-sdk/src/sigma_proofs/zero_balance_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub struct ZeroBalanceProof {
#[allow(non_snake_case)]
#[cfg(not(target_os = "solana"))]
impl ZeroBalanceProof {
/// Zero-balance proof constructor.
/// Creates a zero-balance proof.
///
/// The function does *not* hash the public key and ciphertext into the transcript. For
/// security, the caller (the main protocol) should hash these public components prior to
Expand Down Expand Up @@ -88,7 +88,7 @@ impl ZeroBalanceProof {
Self { Y_P, Y_D, z }
}

/// Zero-balance proof verifier.
/// Verifies a zero-balance proof.
///
/// * `elgamal_pubkey` - The ElGamal pubkey associated with the ciphertext to be proved
/// * `ciphertext` - The main ElGamal ciphertext to be proved
Expand Down

0 comments on commit df7d07f

Please sign in to comment.