Commit Graph

25 Commits

Author SHA1 Message Date
samkim-crypto bc927097ce
[zk-token-sdk] add pubkey proof (#28392)
* add pubkey proof

* add pubkey sigma proof

* add docs for the sigma proof functions

* add pod public key sigma proof

* add public-key validity proof instruction

* add public-key validity proof instruction

* add VerifyPubkeyValidity instruction

* cargo fmt
2022-10-14 20:15:20 +09:00
Brennan Watt e4a7d01e10
Rust v1.63 (#27303)
* Upgrade to Rust v1.63.0

* Add nightly_clippy_allows

* Resolve some new clippy nightly lints

* Increase QUIC packets completion timeout

* Update quinn-udp crate

Co-authored-by: Michael Vines <mvines@gmail.com>
2022-08-22 18:01:03 -07:00
Brennan Watt 7573000d87
Revert "Rust v1.63.0 (#27148)" (#27245)
This reverts commit a2e7bdf50a.
2022-08-19 09:19:44 +01:00
Brennan Watt a2e7bdf50a
Rust v1.63.0 (#27148)
* Upgrade to Rust v1.63.0

* Add nightly_clippy_allows

* Resolve some new clippy nightly lints

* Increase QUIC packets completion timeout

Co-authored-by: Michael Vines <mvines@gmail.com>
2022-08-17 15:48:33 -07:00
Dmitri Makarov 569b00025c fix: replace rust cfg annotations that use bpf by target_os solana 2022-05-18 20:39:43 -07:00
samkim-crypto b4100a9b5d
Add additional zkp for fee (#23112)
* zk-token-sdk: add equality proof for fee

* zk-token-sdk: tweak some naming conventions for readability

* zk-token-sdk: add verify withdraw withheld instruction

* zk-token-sdk: add test for withdraw withheld verification

* zk-token-sdk: more renaming of variables for readability

* zk-token-sdk: cargo fmt

* zk-token-sdk: minor

* zk-token-sdk: resolve bpf compilation warnings

* zk-token-sdk: minor update to doc
2022-02-17 12:45:07 -05:00
samkim-crypto 65f8f43665
Zk instructions pass (#22851)
* 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
2022-02-01 14:11:28 -05:00
samkim-crypto d8cbb2a952
Elgamal pass (#22632)
* 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
2022-01-21 20:56:27 -05:00
Sam Kim 0944abc0e2 feat: update error types for sdk 2022-01-05 08:51:18 -08:00
Sam Kim 584c63bcc4 refactor: CloseAccount now uses zero-balance-proof 2022-01-05 08:51:18 -08:00
Sam Kim c26fa1d0e9 refactor: create pod struct for ZeroBalanceProof 2022-01-05 08:51:18 -08:00
Sam Kim 725781eaa7 add validity proof generation and verification 2022-01-05 08:51:18 -08:00
Sam Kim f0db6020eb updating close account zk proof 2022-01-05 08:51:18 -08:00
Michael Vines aba8c2f4af reformat imports 2022-01-05 08:51:18 -08:00
Michael Vines 93eb49a3e3 Rename ElGamalKeypair fields 2022-01-05 08:51:18 -08:00
Michael Vines c33e24de57 Rename ElGamal to ElGamalKeypair 2022-01-05 08:51:18 -08:00
Michael Vines f272c025bd Rename ElGamal::new() to ElGamal::default() 2022-01-05 08:51:18 -08:00
Michael Vines 2c1aa715b0 Adjust ElGamal::new() signature 2022-01-05 08:51:18 -08:00
Sam Kim a5d1efc207 Rust fmt and clippy 2022-01-05 08:51:18 -08:00
Sam Kim 1af1106b87 Add CloseAccount tests for edge cases 2022-01-05 08:51:18 -08:00
Michael Vines a622ee4b8d Rename ElGamal::keygen to ElGamal::new 2022-01-05 08:51:18 -08:00
Michael Vines 8bb6f0dc6f Rename ElGamalSK to ElGamalSecretKey 2022-01-05 08:51:18 -08:00
Michael Vines 78799640ea Rename ElGamalCT to ElGamalCiphertext, ElGamalPK to ElGamalPubkey 2022-01-05 08:51:18 -08:00
Michael Vines f3e7e62813 Refactor sdk/src/pod.rs 2022-01-05 08:51:18 -08:00
Michael Vines d01d425e4b Rename crypto crate to sdk 2022-01-05 08:51:18 -08:00