Commit Graph

78 Commits

Author SHA1 Message Date
str4d 0db0553a93
Merge pull request #12 from str4d/8-license
Add license information
2020-07-01 11:09:28 +12:00
str4d 2ccf58dc4b
Merge branch 'master' into 8-license 2020-07-01 11:09:20 +12:00
str4d e422953725
Merge pull request #11 from str4d/sapling-note-encryption
Sapling note encryption test vectors
2019-09-24 12:53:38 -04:00
Jack Grigg b6997acf38
Add license information 2019-07-03 17:37:23 +01:00
str4d 38cdeda51c
Merge pull request #10 from str4d/zip0243-spend-rk
Update ZIP 243 test vectors with valid rk values
2019-02-22 22:34:21 +00:00
Jack Grigg 281dc5b0c8
Only generate valueBalance and bindingSig for v4+ transactions
Reverts a change to the ZIP 143 test vectors caused by #9.
2019-02-22 22:16:56 +00:00
Jack Grigg 196c317d89
Explicitly check Points against None 2019-02-22 22:10:57 +00:00
Jack Grigg efc6495d95
Sapling note encryption test vectors 2018-11-14 13:13:06 +00:00
Jack Grigg 73b8401b9a
Use i64 for amounts in Rust test vectors 2018-10-11 18:38:33 +01:00
Jack Grigg 3f9edde19f
Generate a valid Jubjub point for SpendDescription test vectors 2018-10-11 18:37:24 +01:00
bitcartel 284942d46b
Merge pull request #9 from bitcartel/zip243_test_vectors
Implement ZIP 243 test vectors.
2018-08-28 16:12:12 -07:00
Jack Grigg a44f9f6c90
Fix chunk() output when given zero-length data 2018-08-23 14:25:41 +01:00
Simon 60db123206
Implement ZIP 243 test vectors.
Co-authored-by: Jack Grigg <jack@z.cash>
2018-08-23 14:23:08 +01:00
str4d 4e8e7425a2
Merge pull request #5 from str4d/zip-143
ZIP 143 test vectors
2018-08-22 20:22:40 +01:00
Jack Grigg 17d146b5a9
Refactor Rust output rendering to support reformatting
Used to convert a -1 for JSON to Option::None in Rust
2018-08-21 20:13:11 +01:00
Jack Grigg a9676cc9b4
Render Vec<u8> data correctly 2018-08-21 19:44:02 +01:00
Jack Grigg af98406307
Use snake_case for ZIP 143 test vector part names 2018-08-21 19:37:16 +01:00
Jack Grigg acdfe06c87
Implement CompactSize helper 2018-08-20 12:26:48 +01:00
Jack Grigg 07b7a6e8d8
Don't reverse 32-byte transactions in Zcash output 2018-08-20 12:26:48 +01:00
Jack Grigg 9448eeeee5
Implement JoinSplits in ZIP 143 test vectors 2018-08-20 12:26:48 +01:00
Ariel Gabizon 704a2ac14d
Implement ZIP 143 test vector generation
No support for JoinSplits yet.

Co-authored-by: Jack Grigg <jack@z.cash>
2018-08-20 12:26:43 +01:00
Jack Grigg fb4e0d6efe
Implement helper class for generating random values 2018-08-20 12:04:03 +01:00
Daira Hopwood 07dc43fd90 cm -> cmu
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-08-03 15:41:32 +01:00
Daira Hopwood 726688e6cc
Merge pull request #7 from daira/daira-zip32
Implement ZIP 32
2018-08-03 14:29:12 +01:00
Daira Hopwood 0fa7ce1127 Remove unused beos2bsp, and add a test assertion comparing leos2ip with lebs2ip o leos2bsp.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-08-03 14:05:42 +01:00
Daira Hopwood 8a6331e0a6 Add FF1 test vectors matching @str4d's Rust implementation.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-08-03 14:03:51 +01:00
Daira Hopwood d7228cc68f Correct the encoding of depth.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-07-31 19:22:25 +01:00
Daira Hopwood 45a21dc05c Rust identifiers must be lowercase.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-07-31 19:18:34 +01:00
Daira Hopwood 2a6b7c7733 Don't recompute len(tweak).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-07-31 19:14:38 +01:00
Daira Hopwood 7c392675b8 Add ZIP 32 implementation.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-07-25 01:16:22 +01:00
Daira Hopwood c67d4b1fc2 Add FF1 implementation.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-07-25 01:16:22 +01:00
Daira Hopwood f024c7dd8f Extract some SpendingKey methods into mixins that will be used by ZIP 32 classes.
Also use hex, not octal byte constants.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-07-25 01:16:22 +01:00
Daira Hopwood 61f7f70e7a Add diversify_hash function rather than repeating the personalization.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-07-25 01:16:22 +01:00
Daira Hopwood 5c00456ae5 Add more conversion utility functions.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-07-25 01:16:22 +01:00
Daira Hopwood bfcc98b327 Add a '-t json' option that gives JSON output without reversing 32-byte test vectors.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-07-25 01:16:22 +01:00
Daira Hopwood 5394ee1a15 Style nit: don't use list comprehensions for side-effecting code.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-07-25 01:16:22 +01:00
Daira Hopwood 3dfe532bac Support printing test vectors of Option type (needed for diversifiers).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-07-25 01:16:22 +01:00
Daira Hopwood c8036959ad Add assertions that we are running under Python 3.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-07-25 01:16:22 +01:00
str4d cbdb16ed55
Merge pull request #6 from daira/daira-misc-improvements
Additions to .gitignore; rename CRS to URS; add test vectors for Pedersen generators
2018-07-25 00:44:25 +02:00
Daira Hopwood 013efd4c87 Add test vectors for the first 4 Pedersen hash generators.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-07-03 15:04:41 +01:00
Daira Hopwood 4806d8494b Rename CRS to URS, matching version beta-21 of Sapling spec.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-07-03 15:04:41 +01:00
Daira Hopwood 3aa38fb3c9 Avoid shadowing a variable name.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-07-03 15:04:41 +01:00
Daira Hopwood 64664bc614 Additions to .gitignore.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-07-03 15:04:41 +01:00
str4d 0e854b1ddd
Merge pull request #4 from str4d/json-output
Implement Zcash test vector output format
2018-06-13 23:09:49 +12:00
Jack Grigg dd66ed8fec
Explicitly make the JSON output Bitcoin-flavoured (32-byte values reversed)
Also renames the 'json' output type to 'zcash' to make it more obvious.
2018-06-13 11:48:17 +12:00
Jack Grigg 145fe37af5
Implement JSON output 2018-06-05 20:36:37 +12:00
Jack Grigg 68263af2b5
Extract sapling_key_components Rust rendering 2018-06-05 17:30:16 +12:00
Jack Grigg d5d7d70a65
Extract sapling_signatures Rust rendering 2018-06-05 17:12:24 +12:00
Jack Grigg 9f4a41dcf3
Extract sapling_generators Rust rendering 2018-06-05 16:46:08 +12:00
Jack Grigg 7e37b8cc24
Move chunk() into tv_output module 2018-06-05 16:10:43 +12:00