forked from zcash/zcash-test-vectors
-
Notifications
You must be signed in to change notification settings - Fork 0
Merge branch 'master' into zsa1 #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
7340991
Make it possible to generate testnet test vectors for ZIP 320 addresses.
nuttycom db9c9b9
Merge pull request #99 from nuttycom/zip_0320_testnet_tv
nuttycom 580dc95
Add Orchard ZIP 32 test vectors
str4d 346740a
Modify the `regenerate` script to be more user-friendly.
nuttycom bff71ae
Generate test vectors for orchard_zip32
nuttycom 5b76d4b
Merge pull request #102 from zcash/orchard-zip32
nuttycom ff8eb51
Extract ZIP 32 hardened-only key derivation from Orchard
str4d f80ca40
Add test vectors for ZIP 32 arbitrary key derivation
str4d 53cc8e2
Merge pull request #103 from zcash/arbitrary-key-derivation
str4d 4505cb8
Improve the ZIP 32 arbitrary key derivation test vectors
str4d 2a08204
Add ZIP 32 arbitrary key derivation test vector to ZIP 32 account
str4d 1ac6808
Merge pull request #104 from zcash/improve-arbitrary-key-tvs
str4d ced24bc
Update authors.
daira 9dc587d
Update Rust output to use `const`.
daira 92f2ff2
Refactor output to allow (but not yet use) `&'static [T]` and the cas…
daira 7de2348
Use `&'static` arrays in `zip_0032_arbitrary` Rust test vectors.
daira 0f20d79
Update `CKDh` to match ZIP 32 changes.
daira cbfe5ed
Add test vectors for `zip_0032_registered`.
daira ba707b1
Merge pull request #105 from daira/add-registered-test-vectors
str4d 218372b
Merge branch 'master' into merge_master_20250408
ConstanceBeguier c79cd3a
Merge branch 'zsa1' into merge_master_20250408
ConstanceBeguier 483e640
Run rustfmt on generated rust files
ConstanceBeguier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,41 +1,93 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| tv_scripts=( | ||
| bip_0032 | ||
| f4jumble | ||
| f4jumble_long | ||
| orchard_empty_roots | ||
| orchard_generators | ||
| orchard_group_hash | ||
| orchard_key_components | ||
| orchard_map_to_curve | ||
| orchard_merkle_tree | ||
| orchard_note_encryption | ||
| orchard_poseidon | ||
| orchard_poseidon_hash | ||
| orchard_sinsemilla | ||
| orchard_zsa_asset_base | ||
| orchard_zsa_issuance_auth_sig | ||
| orchard_zsa_key_components | ||
| orchard_zsa_note_encryption | ||
| sapling_generators | ||
| sapling_key_components | ||
| sapling_note_encryption | ||
| sapling_signatures | ||
| sapling_zip32 | ||
| sapling_zip32_hard | ||
| unified_address | ||
| unified_full_viewing_keys | ||
| unified_incoming_viewing_keys | ||
| zip_0143 | ||
| zip_0243 | ||
| zip_0244 | ||
| orchard_zsa_digests | ||
| zip_0316 | ||
| zip_0320) | ||
| case "$1" in | ||
| "rust" ) | ||
| gen_types=(rust) | ||
| ;; | ||
| "zcash" ) | ||
| gen_types=(zcash) | ||
| ;; | ||
| "json") | ||
| gen_types=(json) | ||
| ;; | ||
| "all") | ||
| gen_types=(rust zcash json) | ||
| ;; | ||
| *) | ||
| echo "Unexpected generation type: $1" | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| for generator in "${tv_scripts[@]}" | ||
| case "$2" in | ||
| "all" ) | ||
| tv_scripts=( | ||
| bip_0032 | ||
| f4jumble | ||
| f4jumble_long | ||
| orchard_empty_roots | ||
| orchard_generators | ||
| orchard_group_hash | ||
| orchard_key_components | ||
| orchard_map_to_curve | ||
| orchard_merkle_tree | ||
| orchard_note_encryption | ||
| orchard_poseidon | ||
| orchard_poseidon_hash | ||
| orchard_sinsemilla | ||
| orchard_zsa_asset_base | ||
| orchard_zsa_issuance_auth_sig | ||
| orchard_zsa_key_components | ||
| orchard_zsa_note_encryption | ||
| orchard_zip32 | ||
| sapling_generators | ||
| sapling_key_components | ||
| sapling_note_encryption | ||
| sapling_signatures | ||
| sapling_zip32 | ||
| sapling_zip32_hard | ||
| unified_address | ||
| unified_full_viewing_keys | ||
| unified_incoming_viewing_keys | ||
| zip_0032_registered | ||
| zip_0032_arbitrary | ||
| zip_0143 | ||
| zip_0243 | ||
| zip_0244 | ||
| orchard_zsa_digests | ||
| zip_0316 | ||
| zip_0320) | ||
| ;; | ||
| *) | ||
| tv_scripts=($2) | ||
| ;; | ||
| esac | ||
|
|
||
| for gen_type in "${gen_types[@]}" | ||
| do | ||
| echo "# $generator" | ||
| poetry run $generator -t $1 >test-vectors/$1/$generator.$2 | ||
| echo "Generating $gen_type test vectors..." | ||
| case "$gen_type" in | ||
| "rust" ) | ||
| extension="rs" | ||
| ;; | ||
| "zcash" ) | ||
| extension="json" | ||
| ;; | ||
| "json") | ||
| extension="json" | ||
| ;; | ||
| esac | ||
|
|
||
| for generator in "${tv_scripts[@]}" | ||
| do | ||
| echo "# $generator" | ||
| poetry run $generator -t $gen_type >test-vectors/$gen_type/$generator.$extension | ||
| done | ||
|
|
||
| if [ "$gen_type" = "rust" ]; then | ||
| echo "Running rustfmt on generated Rust files..." | ||
| rustfmt --edition 2021 test-vectors/rust/*.rs | ||
| fi | ||
|
|
||
| echo "Finished $gen_type." | ||
| done | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| [ | ||
| ["From https://github.com/zcash-hackworks/zcash-test-vectors/blob/master/orchard_zip32.py"], | ||
| ["sk, c, xsk, fp"], | ||
| ["7eee3c1017870990a3dd6891b82f80be8976c1e7dc20d60817a5e88e8b2cd4b8", "ab8b7a00509ef20e469b5292b61d474b7cffcb1657924cda720250ae40526677", "000000000000000000ab8b7a00509ef20e469b5292b61d474b7cffcb1657924cda720250ae405266777eee3c1017870990a3dd6891b82f80be8976c1e7dc20d60817a5e88e8b2cd4b8", "ff4cda5002c8d182058807b84e616b6d339e1bbeecea01650568d891a438e706"], | ||
| ["98d703fcb40504c95b3b6ed10ecd50082cff97dfd1dd9aa0913c78f977c962af", "6a041dfb9cfebee97cb1854fdc481cc04f02c9577aa6f13b2c445b80a9669a22", "01ff4cda50010000806a041dfb9cfebee97cb1854fdc481cc04f02c9577aa6f13b2c445b80a9669a2298d703fcb40504c95b3b6ed10ecd50082cff97dfd1dd9aa0913c78f977c962af", "32bbdc921d066f235dc93e913b8fe1fd5b9f7f6a13d56f18ec0d3620d1f7b9a6"], | ||
| ["99afd8894baad58784d0ec08f5148ee2c2a17b2b294b08ef9e0a0cf14bcc0920", "6da8b57a36c77ad6412a9dc0115f12aced0ee01c402a0cf0a507cb17fc7bbd1d", "0232bbdc92020000806da8b57a36c77ad6412a9dc0115f12aced0ee01c402a0cf0a507cb17fc7bbd1d99afd8894baad58784d0ec08f5148ee2c2a17b2b294b08ef9e0a0cf14bcc0920", "36a57c4fc5b8b4a3d62f22a5500878f393856b7ecce771ad597ca964b98637d9"], | ||
| ["96439ea348a4b2ce4ec7beb4543c70274c8f76495d60c5fa5f018b68f3c32367", "b196e9b5809d76577a8944c3f8c8a83f93f0c8f5ace6e7bc9ce4396c034d93fe", "0336a57c4f03000080b196e9b5809d76577a8944c3f8c8a83f93f0c8f5ace6e7bc9ce4396c034d93fe96439ea348a4b2ce4ec7beb4543c70274c8f76495d60c5fa5f018b68f3c32367", "be1a1b661d2ca319822a32550d6dc488b6571e0cd781d5078b8f7ba366ddd368"] | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| [ | ||
| ["From https://github.com/zcash-hackworks/zcash-test-vectors/blob/master/zip_0032_arbitrary.py"], | ||
| ["context_string, seed, ikm, path, sk, c"], | ||
| ["5a63617368207465737420766563746f7273", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", "125a63617368207465737420766563746f727320000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", [], "e9da8806409dc3c3ebd1fc2a71c879c13dd7aa93ede803bf1a83414b9d3b158a", "65a748f2905f7a8aab9f3d02f1b26c3d65c82994ce59a086d4c651d8a81cec51"], | ||
| ["5a63617368207465737420766563746f7273", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", null, [2147483649], "e8409aaa832cc2378f2badeb77150562153742fee876dcf4783a6ccd119da66a", "cc084922a0ead2da5338bd82200a1946bc8585b8d9ee416df6a09a71ab0e5b58"], | ||
| ["5a63617368207465737420766563746f7273", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", null, [2147483649, 2147483650], "464f90a364cff805fee93a85b72f4894ce4e1358dcdc1e61a3d430301c60910e", "f9d2544a5528ae6bd9f036f42f9f05d83dff507aeb2a8141af11d9f167e221ae"], | ||
| ["5a63617368207465737420766563746f7273", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", null, [2147483649, 2147483650, 2147483651], "fc4b6e93b0e42f7a762ca0c6522ccd1045cab506b372452af7306c87389ab62c", "e89bf2ed73f5e0887542e36793fac82c508ab5d99198578227b241fbac198429"], | ||
| ["5a63617368207465737420766563746f7273", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", null, [2147483680], "c430c4defd03d7578b2bb09e58135cdd1d7b7c975f01a890847ee0b5c468bc98", "0f473789fe7d5585b79ad5f7e0a469d9a30146647764485150db78d7209dcb30"], | ||
| ["5a63617368207465737420766563746f7273", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", null, [2147483680, 2147483781], "43e5484679fdfa0f6176ae86795d0d44c40e149ef4ba1b0e2ebd883c71f49187", "db42c3b725f32459b2cf8215418b8e8f8e7b1b3f4aba2f5b5e8129e6f0575784"], | ||
| ["5a63617368207465737420766563746f7273", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", null, [2147483680, 2147483781, 2147483648], "bf60078362a09234fcbc6bf6c8a87bde9fc73776bf93f37adbcc439a85574a9a", "2b657e08f67a570c53b9ed30611e6a2f822662b4887a8cfb469e9d0d9817011a"] | ||
| ] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.