samkim-crypto
5cef4c0a4c
Sigma pass ( #22801 )
...
* zk-token-sdk: add zeroize and reference arithmetic to zero-balance proof
* zk-token-sdk: add zeroize and reference arithmetic to equality proof
* zk-token-sdk: add zeroize and reference arithmetic to validity proof
* zk-token-sdk: add aggregated validity proof
* zk-token-sdk: use subtle choice for fee
* zk-token-sdk: add test for fee proof
* zk-token-sdk: add documentation for sigma protocols
* zk-token-sdk: add edge case tests for equality proof
* zk-token-sdk: add edge case tests for zero-balance proof
* zk-token-sdk: add edge case tests for validity proof
* zk-token-sdk: add some docs for fee sigma proof
* zk-token-sdk: clippy
2022-01-27 19:53:15 -05:00
dependabot[bot]
66b44b48a4
chore: remove time dep ( #22665 )
...
* chore: bump time from 0.3.5 to 0.3.6
Bumps [time](https://github.com/time-rs/time ) from 0.3.5 to 0.3.6.
- [Release notes](https://github.com/time-rs/time/releases )
- [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md )
- [Commits](https://github.com/time-rs/time/compare/v0.3.5...v0.3.6 )
---
updated-dependencies:
- dependency-name: time
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* Remove separate time dependency
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2022-01-25 16:30:21 -07: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
Tyera Eulberg
7be533a770
Add zeroed default for ElGamalCiphertext ( #22639 )
2022-01-21 19:52:36 +00:00
samkim-crypto
41fb98c771
zk-token_sdk: define defaults for pod ElGamal/AES ciphertexts ( #22532 )
2022-01-20 16:27:31 -05:00
Sam Kim
705084a25b
zk-token-sdk: rustfmt
2022-01-06 11:18:06 -05:00
samkim-crypto
f81f926a0c
zk-token-sdk: fix transfer verification / set up for fee proof ( #22337 )
2022-01-06 11:01:27 -05:00
samkim-crypto
bc654bf865
feat: add error types for each sigma protocol ( #22336 )
2022-01-06 08:10:37 -05:00
Michael Vines
005ca7759e
Remove stray printlns
2022-01-05 16:49:47 -08:00
Michael Vines
69e632a337
Adapt zk-token-{sdk,proof-program} for use in the monorepo
2022-01-05 08:51:18 -08:00
Sam Kim
1a254ec098
feat: use proper constructor syntax for inner product
2022-01-05 08:51:18 -08:00
Sam Kim
5b41d62f8a
feat: fix clippy for new error types
2022-01-05 08:51:18 -08:00
Sam Kim
0944abc0e2
feat: update error types for sdk
2022-01-05 08:51:18 -08:00
Sam Kim
1cbcda71cb
feat: add separate error types for sigma proofs
2022-01-05 08:51:18 -08:00
Sam Kim
7439d2424b
feat: add a separate TranscriptError
2022-01-05 08:51:18 -08:00
Sam Kim
a211fe1cf4
feat: add errors for range proof module
2022-01-05 08:51:18 -08:00
Sam Kim
e1d3883893
feat: clean up range proof constructor
2022-01-05 08:51:18 -08:00
Sam Kim
826c3bee4a
feat: add verification for fee proof
2022-01-05 08:51:18 -08:00
Sam Kim
e561fbc25a
feat: add test for fee proof
2022-01-05 08:51:18 -08:00
Sam Kim
bc7ac42f2a
feat: proof generation for max and equality proof
2022-01-05 08:51:18 -08:00
Sam Kim
601247d958
feat: add zk-proof certifying that a ciphertext encrypts specified max fee value
2022-01-05 08:51:18 -08:00
Sam Kim
08ef612361
refactor: add mod.rs for sigma_proofs
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
208621e3cf
refactor: create a separate zero-balance-proof for CloseAccount instruction
2022-01-05 08:51:18 -08:00
Sam Kim
c6cd0a5591
refactor: group equality and validity proofs in sigma_proofs module
2022-01-05 08:51:18 -08:00
Michael Vines
31737406da
Adapt to changes to native program entrypoint
2022-01-05 08:51:18 -08:00
Sam Kim
9a43fbe3b2
clean up authenticated encryption implementation and also rename aes to auth_encryption
2022-01-05 08:51:18 -08:00
Sam Kim
7a568482de
cargo fmt and fix clippy
2022-01-05 08:51:18 -08:00
Sam Kim
30871784e4
incorporate validity proof into transfer proof
2022-01-05 08:51:18 -08:00
Sam Kim
c7bf9958e7
add validity proof serialization and deserialization
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
dcc961ae00
fix clippy for the updated transfer
2022-01-05 08:51:18 -08:00
Sam Kim
ccdbe65c87
cleaning up transfer proof
2022-01-05 08:51:18 -08:00
Sam Kim
30e12aef9a
Update withdraw instruction to use equality proof
2022-01-05 08:51:18 -08:00
Sam Kim
6c329e2431
add equality proof struct
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
c61775664e
Add decrypt helper function
2022-01-05 08:51:18 -08:00
Michael Vines
69fab16e83
ElGamalKeypair::new() now generates valid keypairs
2022-01-05 08:51:18 -08:00
Michael Vines
88ce934bd7
Derive thiserror::Error for ProofError
2022-01-05 08:51:18 -08:00
Michael Vines
2c51288afd
Add Copy to Role
2022-01-05 08:51:18 -08:00
Sam Kim
8d731f1a70
set ciphertext_lo and ciphertext_hi methods to private
2022-01-05 08:51:18 -08:00
Sam Kim
c59e8f7c8d
resolve conflict
2022-01-05 08:51:18 -08:00
Sam Kim
973287ad66
add decryption functionality to transfer data
2022-01-05 08:51:18 -08:00
Michael Vines
15aea0fe47
Avoid runtime discrete log table precomputation
2022-01-05 08:51:18 -08:00
Michael Vines
c1db2b4866
Wrap a struct around the discrete log precompute hashmap
2022-01-05 08:51:18 -08:00
Michael Vines
425a4a4082
cargo fmt
2022-01-05 08:51:18 -08:00
Michael Vines
fdb658fff4
Various program refinements
2022-01-05 08:51:18 -08:00
Michael Vines
c155519ae1
Generate AesKey/ElGamalSecretKey from an ed25519 signature instead of secret key
2022-01-05 08:51:18 -08:00