samkim-crypto
4796e2fd84
[zk-token-sdk] Generate proof transcript directly from proof contexts ( #31725 )
...
* generate transcript directly from proof contexts
* Update zk-token-sdk/src/instruction/transfer.rs
Co-authored-by: Jon Cinque <joncinque@pm.me>
* Update zk-token-sdk/src/instruction/transfer.rs
Co-authored-by: Jon Cinque <joncinque@pm.me>
---------
Co-authored-by: Jon Cinque <joncinque@pm.me>
2023-05-20 07:08:40 +09:00
samkim-crypto
f9b0691eb4
[zk-token-sdk] rename and restructure `CloseAccount` and `WithdrawWithheld` proof instructions ( #31608 )
...
* 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>
2023-05-18 08:43:00 +09:00
samkim-crypto
6de581ac08
[clap-v3-utils, sdk, zk-token-sdk] Split `EncodableKey` into `EncodableKey` + `SeedDerivable` ( #31668 )
...
* add `SeedDerivable` trait
* implement `SeedDerivable` for `Keypair`
* implement `SeedDerivable` for `ElGamalKeypair`
* update clap-v3-utils to use `EncodableKey + SeedDerivable`
* implement `SeedDerivable` trait for `AeKey`
* implement `EncodableKey` and `SeedDerivable` for `ElGamalSecretKey`
* implement `SeedDerivable` trait for `ElGamalPubkey`
2023-05-17 17:42:35 +09:00
samkim-crypto
e14384d8ff
[clap-v3-utils] Add `EncodableKeypair` trait and make `confirm_keypair_pubkey` generic ( #31642 )
...
* add `EncodableKeypair` trait
* implement `EncodableKeypair` for `Keypair`
* implement `EncodableKeypair` for `ElGamalKeypair
* make confirm pubkey functions generic
* fix a typo
* Update sdk/src/signer/keypair.rs
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* Update clap-v3-utils/src/keypair.rs
Co-authored-by: Tyera <teulberg@gmail.com>
* fix a typo
---------
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
Co-authored-by: Tyera <teulberg@gmail.com>
2023-05-17 05:37:59 +09:00
Illia Bobyr
43c0f05ca0
Bumps base64 from 0.13.1 to 0.21.0. ( #31522 )
...
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.
2023-05-11 11:34:58 -07:00
Ryo Onodera
4d4dddcaea
Update to nightly rustc to 2023-04-19 ( #31381 )
...
* Update to nightly rustc to 2023-04-19
* pray...
* Not enough pray..
* skip check...
* hope merciful shellcheck
* ci hack...
* Restore ci/test-checks.sh
* Restore debug_assertions with proper workaround...
* small cleanup
* seems this isn't needed?
* Make the workaround more robust...
* Remove now-resolved clippy exception
2023-05-11 15:48:13 +09:00
samkim-crypto
39701fa560
[zk-token-sdk] Refactor encryption error types ( #31569 )
...
* reorganize encryption error types
* remove encryption errors module
* cargo fmt
2023-05-11 04:43:25 +09:00
samkim-crypto
21667660e9
[zk-token-sdk, clap-v3-utils] Implement `EncodableKey` for encryption keys ( #31496 )
...
* implement EncodableKey for ElGamalKeypair
* implement EncodableKey for AeKey
* add keypair_from_path and keypair_from_seed support for encryption keys
* remove duplicate methods from traits
2023-05-10 06:37:29 +09:00
Tyera
3442f184f7
Remove unneeded `clippy::new_ret_no_self` allows ( #31035 )
...
Remove unneeded allows
2023-04-03 20:35:20 -06:00
Tyera
193a6d90fc
Remove unused dependency ( #30881 )
2023-03-24 02:34:10 +00:00
samkim-crypto
2d58bb287d
[zk-token-sdk] Add option to create proof context state in the proof verification program ( #29996 )
...
* extend verifiable trait
* add PodBool
* implement ZkProofData trait
* add proof context program to zk-token-proof program
* update tests for close account
* add close account instruction
* reorganize tests
* complete tests
* clean up and add docs
* clean up pod
* add proof program state
* update tests
* move proof program tests as separate module
* clippy
* cargo sort
* cargo fmt
* re-organize visibility
* add context state description
* update maintainer reference
* change `VerifyProofData` and `ProofContextState` to pod
* add tests for mixing proof types
* add tests for self owned context state accounts
* cargo fmt
* remove unnecessary scoping and add comments on scopes
* re-organize proof instructions
* clippy
* update zk-token-proof-test to 1.16.0
* upgrade spl-token-2022 to 0.6.1
* reoganize proof type
* cargo lock
* remove ZkProofContext trait
2023-03-16 07:35:20 +09:00
Yihau Chen
af59cced5a
chore: bump bincode to 1.3.3 ( #30489 )
2023-02-25 02:48:24 +08:00
Yihau Chen
df3ef111f7
chore: workspace inheritance ( #29893 )
...
* introduce workspace.package
* introduce workspace.dependencies
* read version from root cargo.toml
* pass check when version = { workspace = true }
* don't bump version when version = { workspace = true }
* including workspace Cargo.toml when bump version
* programs/sbf use workspace inheritance
* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-02-23 22:01:54 +08:00
Will Hickey
04a6a631bc
Bump version to v1.16 ( #30028 )
2023-01-31 17:48:33 -06:00
joeaba
a12bf8c003
Update maintainers references ( #29997 )
...
* update maintainers references
* chore: update maintainers reference
2023-01-31 08:07:13 -05:00
Illia Bobyr
23531fc659
ledger: Remove `clippy::wrong_self_convention` ( #29916 )
...
Clippy does not seem to be complaining anymore.
It looks like this rule is now only applied to `as_` methods that take `&self`
or `&mut self` as the first argument:
a9c251f11d/clippy_lints/src/methods/wrong_self_convention.rs (L14)
For `Copy` types, `to_` rule is applied only when the method takes `self` as the
first argument:
a9c251f11d/clippy_lints/src/methods/wrong_self_convention.rs (L25)
Enforcement is here:
a9c251f11d/clippy_lints/src/methods/wrong_self_convention.rs (L106)
2023-01-26 15:12:35 -08:00
Yihau Chen
9193b4221d
Revert "chore: workspace inheritance ( #29509 )" ( #29892 )
...
This reverts commit a67d239dde
.
2023-01-25 15:50:41 +08:00
Yihau Chen
a67d239dde
chore: workspace inheritance ( #29509 )
...
* introduce workspace.package
* introduce workspace.dependencies
* read version from root cargo.toml
* pass check when version = { workspace = true }
* don't bump version when version = { workspace = true }
* including workspace Cargo.toml when bump version
* programs/sbf use workspace inheritance
* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-01-25 13:59:59 +08:00
behzad nouri
12da2da389
fixes errors from clippy::redundant_clone ( #29536 )
...
https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
2023-01-05 18:42:19 +00:00
behzad nouri
5c9beef498
fixes errors from clippy::useless_conversion ( #29534 )
...
https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
2023-01-05 18:05:32 +00:00
behzad nouri
9524c9dbff
patches errors from clippy::uninlined_format_args
...
https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
2022-12-06 19:32:15 +00:00
samkim-crypto
ae57a14ef6
[zk-token-sdk] reorganize errors ( #29005 )
...
* reorganize error using DRY principle
* rename error `Format` to `Deserialization`
* Rename `EncryptionError` to `DiscreteLogError`
* resolve errors from rebase
* resolve clippy
* change `ProofInstructionError` to `ProofError`
2022-12-01 20:29:14 +09:00
samkim-crypto
11efaf75a4
[zk-token-sdk] divide fee encryption into two ciphertexts ( #28472 )
...
* divide fee encryption into two ciphertexts
* clippy
* update range proof
* add fee ciphertext decryption
* clean up split_u64 function
* remove unnecessary casting
2022-11-30 15:11:38 +09:00
samkim-crypto
f1e7ffba0c
[zk-token-sdk] use canonical decoding for scalars ( #28870 )
...
use canonical decoding for scalars
2022-11-18 15:11:06 +09:00
samkim-crypto
c828031d9a
[zk-token-sdk] Fix ElGamal key derivation ( #28792 )
...
* fix ElGamal key derivation
* cargo fmt
2022-11-12 08:44:02 +09:00
Brooks Prumo
d1ba42180d
clippy for rust 1.65.0 ( #28765 )
2022-11-09 19:39:38 +00:00
samkim-crypto
636baaf494
[zk-token-sdk] Update docs for encryption in zk-token-sdk ( #28760 )
...
clean up docs for encryption
2022-11-08 10:03:24 +00:00
samkim-crypto
491ec1e275
[zk-token-sdk] clean up pod ciphertext arithmetic operations ( #28470 )
...
* clean up pod ciphertext arithmetic operations
* rename add_ciphertext to add
2022-10-19 17:36:57 +09:00
samkim-crypto
00b1d0930f
[zk-token-sdk] Restructure proof error types ( #28407 )
...
* add pubkey sigma proof
* cargo fmt
* add EncryptionError
* add encryption errors
2022-10-16 07:06:57 +09:00
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
samkim-crypto
3f63283eda
add curve25519 multiscalar multiplication syscall ( #28216 )
...
* add curve25519 multiscalar multiplication syscall
* update compute unit costs
* update tests
* add update to compute budget
* add syscall call function
* update compute costs in tests
* update syscall syntax
2022-10-12 14:43:02 +09:00
dependabot[bot]
c4fa849844
chore: bump itertools from 0.10.3 to 0.10.5 ( #27962 )
...
* chore: bump itertools from 0.10.3 to 0.10.5
Bumps [itertools](https://github.com/rust-itertools/itertools ) from 0.10.3 to 0.10.5.
- [Release notes](https://github.com/rust-itertools/itertools/releases )
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-itertools/itertools/commits )
---
updated-dependencies:
- dependency-name: itertools
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-09-21 15:28:49 -06:00
samkim-crypto
bac6ebcd88
zk-token-sdk: update errors in comments ( #27602 )
...
update errors in comments
2022-09-15 17:11:14 +09:00
Will Hickey
c0e4379f43
Whickey/version v1.15 ( #27739 )
...
* Bump version to v1.13.0
* Bump version to v1.14.0
* Bump version to v1.15.0
2022-09-13 09:06:15 -05:00
samkim-crypto
bd88e2a11c
Zk token sdk/batch discrete log ( #27412 )
...
* zk-token-sdk: optimize discrete log search with batch compression
* zk-token-sdk: include batch size as part of discrete log struct
* zk-token-sdk: add a note on discrete log timings
* zk-token-sdk: add upper bound on the number of threads
* zk-token-sdk: minor
* zk-token-sdk: cargo.lock
2022-08-27 06:54:59 +09:00
samkim-crypto
4c944931c5
zk-token-sdk:add length checks ( #27389 )
...
* zk-token-sdk: add length check for ristretto encodings
* zk-token-sdk: add type check for sigma proofs
2022-08-25 14:22:52 +09:00
samkim-crypto
5e8b8abd84
zk-token-sdk: constant time equality check for elgamal and aes key derivation ( #27364 )
...
zk-token-sdk: use constant time equality check for elgamal and aes key derivation
2022-08-24 18:56:55 +09:00
samkim-crypto
0ea984ae20
zk-token-sdk: calculate transfer fee without conditional branch ( #27356 )
2022-08-24 17:29:23 +09:00
samkim-crypto
19fc4fcbf8
zk-token-sdk: use constant-time msm for inner product proof generation ( #27355 )
2022-08-24 14:56:21 +09:00
samkim-crypto
804dfe0f1a
zk-token-sdk: remove non-constant time assign for fee_proof transcript ( #27354 )
2022-08-24 14:25:09 +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
Will Hickey
ed8c224374
Bump version to v1.12 ( #26967 )
2022-08-06 13:20:30 -05:00
github-actions[bot]
fbf1bf6d86
Bump Version to 1.11.6 ( #26906 )
...
Co-authored-by: willhickey <willhickey@users.noreply.github.com>
2022-08-03 12:48:43 -05:00
dependabot[bot]
cd4340ed06
chore: bump bytemuck from 1.10.0 to 1.11.0 ( #26792 )
...
* chore: bump bytemuck from 1.10.0 to 1.11.0
Bumps [bytemuck](https://github.com/Lokathor/bytemuck ) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/Lokathor/bytemuck/releases )
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.10.0...v1.11.0 )
---
updated-dependencies:
- dependency-name: bytemuck
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-07-26 20:50:30 -06:00
Tyera Eulberg
2114136e59
Add Display implementations for various ConfidentialTransfer pod structs ( #26783 )
2022-07-25 21:09:41 -06:00
github-actions[bot]
5d038b9d2a
Bump Version to 1.11.5 ( #26758 )
...
Co-authored-by: willhickey <willhickey@users.noreply.github.com>
2022-07-25 13:05:14 -06:00
samkim-crypto
700da0fc83
zk-token-sdk: implement Display for ciphertexts ( #26755 )
2022-07-23 21:59:40 +09:00
github-actions[bot]
fd5df1cf25
Bump Version to 1.11.4 ( #26578 )
...
Co-authored-by: willhickey <willhickey@users.noreply.github.com>
2022-07-11 23:30:38 -05:00