Commit Graph

302 Commits

Author SHA1 Message Date
Jack Grigg 943aa69e66 Remove bitstring dependency
Instead we just allow an iterable of bit-like elements.
2021-04-27 15:14:12 +12:00
Taylor Hornby 0c6c988e2e Call iso_map in map_to_curve_simple_swu 2021-04-26 18:34:31 -06:00
Taylor Hornby 027b362773 Some cleanup and move group_hash into its own file 2021-04-26 18:29:39 -06:00
Taylor Hornby a2bf6c5a04 Check for incomplete addition exceptional cases in Sinsemilla 2021-04-26 18:21:01 -06:00
Taylor Hornby fb45bda972 Document bitstring dependency in the README 2021-04-26 18:06:04 -06:00
Taylor Hornby 756abfbb9c Delete sinsemilla_hash_bytes which was unused and not guaranteed to have correct endianness 2021-04-22 14:36:38 -06:00
Taylor Hornby 9f02018465
Clarify index-vs-exponent variable naming
Co-authored-by: str4d <jack@z.cash>
2021-04-22 14:34:47 -06:00
Taylor Hornby e141b76203
Fix missing divide-by-Z
Co-authored-by: str4d <jack@z.cash>
2021-04-22 14:31:55 -06:00
Taylor Hornby d9750457b9
Update orchard_sinsemilla.py
Co-authored-by: str4d <jack@z.cash>
2021-04-22 14:31:31 -06:00
Taylor Hornby 4e70886918 Document the fact that the iso-Pallas generator is arbitrary 2021-04-22 14:30:45 -06:00
Taylor Hornby b8dccde4c4
Update orchard_sinsemilla.py
Co-authored-by: str4d <jack@z.cash>
2021-04-22 14:17:21 -06:00
Taylor Hornby 8c2275a4b5
Update orchard_sinsemilla.py
Co-authored-by: str4d <jack@z.cash>
2021-04-22 14:17:12 -06:00
Taylor Hornby 75ce7b22be
Update orchard_sinsemilla.py
Co-authored-by: str4d <jack@z.cash>
2021-04-22 14:17:02 -06:00
Taylor Hornby a5579bab84
Update orchard_sinsemilla.py
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-04-22 14:16:44 -06:00
str4d 88788d5476
Merge pull request #19 from zcash-hackworks/doc-fix
Fix doc comment
2021-04-22 12:57:17 +01:00
Jack Grigg efa8a9ac2f Fix doc comment
Too much Rust :P
2021-04-22 23:56:37 +12:00
str4d c3b4e454b3
Merge pull request #14 from zcash-hackworks/orchard
Implementation of Pallas
2021-04-21 01:09:52 +01:00
str4d 3b868bb182
Add comment documenting ROOT_OF_UNITY
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-04-21 00:01:57 +01:00
Daira Hopwood 57c2894522
Update orchard_pallas.py
Replace 0 with Fp.ZERO in `extract`.

Co-authored-by: Taylor Hornby <taylor@defuse.ca>
2021-04-06 22:51:29 +01:00
Daira Hopwood 28370d5fe9 orchard_sinsemilla.py: corrections, and add test vector for SinsemillaHash.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-04-02 17:57:29 +01:00
Daira Hopwood 9184c78c0f Remove trailing spaces, and make orchard_iso_pallas.py and orchard_sinsemilla.py executable.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-04-02 17:56:14 +01:00
Daira Hopwood 816cfa0059
Apply suggestions from code review 2021-04-01 23:14:28 +01:00
Taylor Hornby c3a70e269b Add iso-Pallas, SWU hash-to-curve, and Sinsemilla
Co-authored-by: Kris Nuttycombe <kris.nuttycombe@gmail.com>
2021-03-30 11:03:55 -06:00
Jack Grigg 65ed28c661 Add implementation of Pallas 2021-02-25 14:52:13 +00:00
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