Daira Hopwood
efee9dcb03
chmod +x for scripts and make the shebang/preamble consistent.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-09-15 18:03:47 +01:00
Daira Hopwood
f15c51c680
zc_utils.py: restore 2^64 - 1 test vector.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-09-15 17:59:52 +01:00
Daira Hopwood
cbaca139a7
Split F4Jumble hashed test vectors into another file (`f4jumble_long.py`).
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-09-15 17:59:52 +01:00
Jack Grigg
33a95555dc
Use list comprehension to initialize paths
...
`[[]] * length` creates an array of the correct length, but where every
entry is an alias to the same inner array. Pushing to any of the arrays
was behaving as if we were pushing to all of them, instead of updating
independent paths.
2021-09-13 22:36:44 +01:00
therealyingtong
9e1563af0d
Merkle path test vectors for a depth-4 tree
...
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-09-13 22:36:32 +01:00
str4d
05a7a973d5
Merge pull request #42 from dannywillems/add-poetry
...
[Suggestion/Discussion] Support poetry
2021-09-13 15:58:24 +01:00
str4d
e06eb19135
Fill out poetry config
2021-09-13 15:57:58 +01:00
Daira Hopwood
bdf4c9ff9b
f4jumble: Use BLAKE2b hashes for the long test vectors.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-08-31 20:59:19 +01:00
therealyingtong
4cbfddd566
orchard_vesta.py: Add constants for Vesta curve.
2021-08-31 09:51:17 +08:00
Daira Hopwood
fa1bd3773a
zc_utils: Enforce canonicity in parse_compact_size.
...
(It's not strictly needed for generating test vectors, but just in case this code gets reused.)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-08-30 23:50:53 +01:00
Daira Hopwood
ce388d3783
Further simplify parsing.
...
This also ensures that the encoding ends with a receiver value, not a type or length.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-08-30 19:49:45 +01:00
Daira Hopwood
810c8bf275
Simplify parse_compact_size usage.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-08-30 19:42:51 +01:00
Daira Hopwood
29cae03b12
unified_address: updates for large UAs/UVKs.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-08-30 19:25:20 +01:00
Daira Hopwood
71e2a355c4
f4jumble: updates for large UAs/UVKs.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-08-30 19:16:52 +01:00
Daira Hopwood
87e0a6b57c
zc_utils: Add support for parsing a compactSize.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-08-30 19:14:55 +01:00
Daira Hopwood
a3fd15bc20
Merge pull request #46 from zcash-hackworks/rename-unified-addrs
...
Rename unified_addrs.py to unified_address.py
2021-08-08 05:01:18 +01:00
str4d
c00b8f2472
Merge pull request #45 from daira/poseidon-rounds-update
...
Update Poseidon instantiation from 58 to 56 partial rounds.
2021-08-05 14:24:20 +01:00
ying tong
b85498259b
Rename unified_addrs.py to unified_address.py
2021-08-05 16:26:30 +08:00
Daira Hopwood
80ea1ef46f
Update Poseidon instantiation from 58 to 56 partial rounds.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-08-04 12:59:58 +01:00
Daira Hopwood
ae90208ebb
Merge pull request #44 from zcash-hackworks/43-ua-hrp-padding
...
Include HRP inside Unified Address padding bytes
2021-07-30 20:22:32 +01:00
Jack Grigg
92164f5b5f
Include HRP inside Unified Address padding bytes
...
Closes #43 .
2021-07-30 14:59:09 +01:00
Danny Willems
7721bae4dd
Support poetry
2021-07-15 17:42:50 +02:00
str4d
39f44c3964
Merge pull request #40 from dconnolly/requirements.txt
...
Add a requirements.txt pip file compatible with Python 3
2021-06-29 13:32:01 +01:00
str4d
de3e09de1a
Merge pull request #37 from zcash-hackworks/orchard-empty-roots
...
Add Orchard empty root test vectors
2021-06-29 13:24:22 +01:00
Deirdre Connolly
1a60941a5d
Add a requirements.txt pip file compatible with Python 3
2021-06-24 21:37:13 -04:00
str4d
ec5fe3abef
Merge pull request #38 from zcash-hackworks/unified-addresses
...
Add test vectors for unified address encodings.
2021-06-18 20:02:02 +01:00
str4d
2c97e9a99a
Distinguish between P2PKH and P2SH in UA test vectors
2021-06-18 20:00:38 +01:00
Kris Nuttycombe
0392dd089c
Fix nondeterministic generation of UA test vectors.
...
Co-Authored By: Jack Grigg
2021-06-18 08:25:09 -06:00
Kris Nuttycombe
854a2ddd87
Allow unrecognized receivers.
2021-06-14 10:54:59 -06:00
Kris Nuttycombe
503a57bcbb
Add test vectors for unified address encodings.
...
This copies in the reference implementation of bech32m,
so that we can remove the 90 character length limitation.
2021-06-12 17:09:21 -06:00
Jack Grigg
f59d31132c
Add Orchard empty root test vectors
2021-06-10 23:57:45 +01:00
str4d
0b97f47e7c
Merge pull request #35 from zcash-hackworks/fix-orchard-note-enc-output
...
Fix output for Orchard note encryption test vectors
2021-06-10 19:44:27 +01:00
Jack Grigg
3179b97362
Fix output for Orchard note encryption test vectors
...
The test vectors were being generated correctly, but the output was
still Sapling-specific (rather than including Orchard components).
2021-06-10 19:26:38 +01:00
str4d
23f3d09f03
Merge pull request #34 from zcash-hackworks/33-zip-244-auth-digest
...
Add ZIP 244 auth digest test vectors
2021-06-08 19:07:08 +01:00
Jack Grigg
95b3a130df
Add ZIP 244 auth digest test vectors
2021-06-08 17:46:45 +01:00
str4d
cd50b88703
Merge pull request #20 from zcash-hackworks/tx-v5
...
Test vectors for ZIP 225 and ZIP 244
2021-06-04 18:13:27 +01:00
str4d
351f6cfc5f
Merge pull request #30 from zcash-hackworks/orchard-notes
...
Orchard note encryption
2021-05-30 21:40:49 +01:00
str4d
62a176014a
orchard_note_encryption: Use ephemeral_key local
2021-05-30 21:40:42 +01:00
str4d
41925bb669
Merge pull request #32 from zcash-hackworks/orchard-key-components-fix
...
Fix Orchard key components test vectors
2021-05-30 21:37:47 +01:00
therealyingtong
d25805a893
Address review comments
...
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-05-28 23:37:49 +08:00
ying tong
70ccff9bd9
Store v as integer instead of Scalar in NotePlaintext
...
Co-authored-by: str4d <jack@z.cash>
2021-05-28 23:28:01 +08:00
Jack Grigg
fea2456bef
Fix Orchard key components test vectors
...
- Removed `note_r` (scalar copied from Sapling)
- Added `note_rseed` (bytes)
- `note_psi` needs to be derived from `note_rseed`
- missing `dk`, `note_rho` from output
2021-05-28 11:51:57 +01:00
therealyingtong
f44fce557e
Set cm_star = cm.extract() instead of the point cm
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-05-27 13:02:29 +08:00
therealyingtong
8410648f87
Check esk using np.rseed in decrypt_using_ovk()
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-05-27 13:02:16 +08:00
ying tong
83074b2628
Document decoding of ephemeral_key from epk
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-05-27 12:53:27 +08:00
ying tong
2120658d5d
Check 'is None' instead of boolean false
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-05-27 12:51:54 +08:00
ying tong
dbf772b00d
Call rcm() and psi() using self.rho()
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-05-27 12:51:50 +08:00
Jack Grigg
445c2602f4
Rename header() to version_bytes()
...
Now that the v5 transaction format has an actual header region, this
old naming makes less sense.
2021-05-26 18:12:16 +01:00
Jack Grigg
bc75d044a1
Use specific tx formats compatible with sighash algorithms
...
ZIP 244 is only defined for v5 transactions, so use the TransactionV5
type directly; likewise use LegacyTransaction with the ZIP 143 and
ZIP 243 APIs.
2021-05-26 18:01:00 +01:00
str4d
a5a7340290
Remove unnecessary txin parameters
...
These were leftover from an earlier version of the PR.
Co-authored-by: ying tong <yingtong@z.cash>
2021-05-26 17:50:50 +01:00