* make `ElGamalKeypair` fields private
* update the rest of `zk-token-sdk` for the visibility update
* update `zk-token-proof-tests` for the visibility update
* update `zk-keygen` for the visibility update
* update `zk-token-proof` benches for the updated visibility
* cargo fmt
* rename `ElGamalKeypair::new` to `ElGamalKeypair::new_for_tests`
* remove decoded `TransferWithFeePubkeys`
* remove decoded `TransferPubkey`
* rename `TransferPubkeys` and `TransferWithFeePubkeys` fields
* relocate `TransferPubkeys` and `TransferWithFeePubkeys`
* reorder proof verify parameters for transfer and transfer with fee
* clippy
* replace `decoded::TransferAmountCiphertext` to `DecodedTransferAmountCiphertext`
* refactor pod convert logic for fee parameters
* remove manual byte conversions for `FeeParameters`
* fix error from rebase
* define `FeeEncryption` as a wrapper around `GroupedElGamalCiphertext`
* define pod `FeeEncryption` as a wrapper around `GroupedElGamalCiphertext2Handles`
* update proof data computation
* add comments about unwraps
* define `TransferAmountEncryption` as a wrapper around `GroupedElGamalCiphertext`
* implement `From<GroupedElGamalCiphertext<3>>` for `GroupedElGamalCiphertext3Handles`
* define pod `TransferAmountEncryption` as a wrapper around pod `GroupedElGamalCiphertext3Handles`
* derive `Copy`, `Debug`, `Eq`, and `PartialEq` traits for `TransferAmountEncryption`
* rename `TransferAmountEncryption` to `TransferAmountCiphertext`
* clippy
* fix target arch
* add comment on why it is safe to unwrap
* refactor `instruction::transfer` and `instruction::transfer_with_fee` into separate submodule
* rename `transfer.rs` to `transfer_without_fee.rs` to satisfy clippy
* refactor transfer encryptions into separate submodule
* refactor `FeeParameters` to parent transfer module
* refactor `Role` and ciphertext arithmetic specific to transfer instruction into transfer submodule
* fix visibility
* cargo fmt
* change `transfer_with_fee` and `transfer_without_fee` to `with_fee` and `without_fee`
* fix rebase errors
* refactor `DecryptHandle` into `pod::elgamal` from `pod::pedersen`
* refactor conversion for elgamal
* refactor conversion for pedersen
* change variable names
* add brief description of the types
* fix variable names in comments
* rename `sigma_proof::ctxt_comm_equality_proof` to non-abbreviated name
* rename `sigma_proof::ctxt_ctxt_equality_proof` to non-abbreviated name
* rename `instruction::ctxt_ctxt_equality` to non-abbreviated name
* move `pod.rs` to separate submodule
* refactor `ElGamalCiphertext` and `ElGamalPubkey` to separate submodule
* refactor `PedersenCommitment` and `DecryptHandle` to separate submodule
* refactor pod sigma proof types to separate submodule
* refactor pod range proof types to separate submodule
* refactor `AeCiphertext` into a separate submodule
* refactor instruction-related pod types to separate submodule
* Apply suggestions from code review
Co-authored-by: Tyera <teulberg@gmail.com>
---------
Co-authored-by: Tyera <teulberg@gmail.com>
* rename and restruct ProofInstruction::VerifyCloseAccount to ProofInstruction::VerifyZeroBalance
* rename `PubkeySigmaProof` to `PubkeyValidityProof`
* refactor equality proofs into separate modules
* rename and restructure ProofInstruction::VerifyWithdrawWithheld to ProofInstruction::VerifyCiphertextCiphertextEquality
* add and reorg documentation for the proof instructions
* generalize ciphertext-ciphertext equality proof data constructor
* Update zk-token-sdk/src/instruction/ctxt_ctxt_equality.rs
Co-authored-by: Jon Cinque <joncinque@pm.me>
---------
Co-authored-by: Jon Cinque <joncinque@pm.me>
Changes:
marshallpierce/rust-base64@v0.13.1...v0.21.0
`base64::{encode,decode}` are now deprecated in favor of an API that
explicitly selects an `Engine`. Migrated all calls to the new API.
* reorganize error using DRY principle
* rename error `Format` to `Deserialization`
* Rename `EncryptionError` to `DiscreteLogError`
* resolve errors from rebase
* resolve clippy
* change `ProofInstructionError` to `ProofError`
Move all syscall declarations under solana_program::syscalls. If the target
supports static syscalls (sbfv2), then actually define them statically to avoid
dynamic relocations.
* zk-token-sdk: add decryption for pod elgamal ciphertexts
* zk-token-sdk: add decryption for pod elgamal ciphertexts
* zk-token-sdk: cargo fmt
* zk-token-sdk: minor update to docs
* zk-token-sdk: minor
* zk-token-sdk: fix bpf build error
* zk-token-sdk: more simplifying discrete log
* zk-token-sdk: fmt
* zk-token-sdk: minor update to doc
* zk-token-sdk: re-organize transcript
* zk-token-sdk: add pod ElGamal group encryption
* zk-token-sdk: add transcript domain separators for sigma proofs
* zk-token-sdk: clean up transfer tx decryption
* zk-token-sdk: resolve encoding issues for transfer
* zk-token-sdk: fix transfer test
* zk-token-sdk: clean up transcript for close account and withdraw instructions
* zk-token-sdk: add transfer with fee instruction
* zk-token-sdk: add transfer with fee instruction
* zk-token-sdk: add pod for cryptographic structs needed for fee
* zk-token-sdk: add pod for fee sigma proof
* zk-token-sdk: fix test for transfer with fee instruction
* zk-token-sdk: add range proof verification for transfer with fee
* zk-token-sdk: add transfer amount decryption for transfer-with-fee
* zk-token-sdk: add proof generation error for instruction
* zk-token-sdk: cargo fmt and clippy
* zk-token-sdk: fix bpf build
* zk-token-sdk: change G and H to static and optimize pedersen arithmetic
* zk-token-sdk: remove unnecessary copy in elgamal arithmetic
* zk-token-sdk: fix elgamal tests for new syntax
* zk-token-sdk: use lazy-static for pedersen base
* zk-token-sdk: add dlog test for elgamal decryption
* zk-token-sdk: reflect changes in elgamal in the rest of the sdk
* zk-token-sdk: rustfmt and clippy
* zk-token-sdk: some documentation for elgamal and pedersen
* zk-token-sdk: minor remove whitespace
* zk-token-sdk: update lock files
* zk-token-sdk: change random() to new_rand()
* zk-token-sdk: add explanation for suppressing clippy::op_ref