Commit Graph

193 Commits

Author SHA1 Message Date
str4d 3e0835b140
Merge pull request #52 from zcash-hackworks/merkle-path
Merkle path test vectors for a depth-4 tree
2021-09-17 01:16:21 +12: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 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
Jack Grigg da4e9b22dc Test vectors for ZIP 244 2021-05-26 17:46:54 +01:00
Jack Grigg b9ce8224b6 Implement structural generator for v5 transaction format (ZIP 225) 2021-05-26 17:46:53 +01:00
Daira Hopwood c056ec5dc0
Merge pull request #29 from zcash-hackworks/orchard-key-components
Orchard key components
2021-05-26 11:05:19 +01:00
therealyingtong cbf2e840b9 Remove bytes() coercion for OrchardNotePlaintext.rseed
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-05-26 14:32:28 +08:00
therealyingtong c182edabd4 Address review comments.
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-05-26 14:26:08 +08:00
therealyingtong 406747099a Test decryption using ivk and fvk 2021-05-26 14:10:36 +08:00
therealyingtong 11ad2d4f95 Add orchard_note_encryption.py 2021-05-26 14:10:36 +08:00
therealyingtong 6f395a5750 Add orchard_note.py 2021-05-26 14:10:36 +08:00
therealyingtong 63a1e76fb9 Add orchard_utils.py 2021-05-26 14:10:36 +08:00
therealyingtong e50da335f5 Use randomness in test and address review comments 2021-05-26 13:30:52 +08:00