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
therealyingtong
646ff15777
Use ff1 for default diversifier
2021-05-26 13:29:59 +08:00
ying tong
12a07b4f61
Merge pull request #28 from zcash-hackworks/orchard-commitments
...
Add Orchard commitments
2021-05-26 11:38:36 +08:00
Kris Nuttycombe
5e1e5498f7
Merge pull request #31 from zcash-hackworks/f4jumble
...
Test vector generator for F4Jumble
2021-05-19 09:02:44 -06:00
therealyingtong
f1342994dd
Case ivk as Scalar in default_pkd()
2021-05-14 11:16:34 +08:00
therealyingtong
04587ac9ba
Fix Scalar typecasting
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-05-14 11:16:34 +08:00
therealyingtong
d5a8927316
Remove unnecessary to_base()
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-05-14 11:16:34 +08:00
therealyingtong
77f1299d9b
Add derive_nullifier() method
2021-05-14 11:16:34 +08:00
Daira Hopwood
8ce3cfb8d9
Add orchard_key_components.py.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-05-14 11:16:34 +08:00
ying tong
99e7184038
Remove whitespace in note_commit and commit_ivk personalisations
...
Co-authored-by: str4d <jack@z.cash>
2021-05-13 12:57:07 +08:00
str4d
232aaa3474
Update f4jumble.py
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-05-12 13:06:52 +01:00
Jack Grigg
bd1eef9c16
Test vector generator for F4Jumble
2021-05-12 08:16:06 +08:00
therealyingtong
e0b8fd639a
Return base field element from commit_ivk()
...
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-05-11 20:06:32 +08:00
ying tong
fb08eeeb39
Pass rand instead of randbytes
...
Co-authored-by: str4d <jack@z.cash>
2021-05-09 12:46:09 +08:00
Daira Hopwood
af04017407
orchard_pallas.py: add constants for Scalar.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-05-09 12:44:40 +08:00
Daira Hopwood
29c40dc885
orchard_commitments.py and orchard_group_hash.py: type fixes.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-05-09 12:44:40 +08:00
Daira Hopwood
929692ecdc
Rename sapling_utils.py to utils.py.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-05-09 12:44:39 +08:00
Daira Hopwood
a7a1e5b217
Use rejection sampling to implement `random` for `Fp` and `Scalar`.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-05-09 12:41:18 +08:00
therealyingtong
72cae20b61
Add Orchard commitments
...
HomomorphicPedersenCommit -> ValueCommit
SinsemillaCommit -> NoteCommit
SinsemillaShortCommit -> CommitIvk
2021-05-09 12:41:18 +08:00
ying tong
bd7c367590
Apply suggestions from code review
...
Co-authored-by: str4d <jack@z.cash>
2021-05-09 12:41:18 +08:00
therealyingtong
43de24d88c
Add Orchard generators
2021-05-09 12:41:18 +08:00
str4d
03157edaf2
Merge pull request #27 from zcash-hackworks/poseidon
...
Poseidon implementation
2021-05-08 19:54:01 +01:00
str4d
deee246420
Add numpy dependency to README
2021-05-09 06:53:31 +12:00
str4d
cb9348e7a9
Apply suggestions from code review
2021-05-08 19:51:33 +01:00
ying tong
bb16eca2c0
Only return first state element from Poseidon hash
...
Co-authored-by: str4d <jack@z.cash>
2021-05-07 12:59:38 +08:00
therealyingtong
25f5ccd445
Generate Poseidon hash test vectors
2021-05-07 12:58:33 +08:00
therealyingtong
6184981ccd
Generate Poseidon perm test vectors
2021-05-07 12:58:33 +08:00
therealyingtong
99feaed0f4
Render array of bytearrays in tv_output
2021-05-07 12:58:33 +08:00
therealyingtong
48fca9ad62
Add Poseidon implementation
2021-05-07 12:58:33 +08:00
ying tong
b2c074a8d1
Merge pull request #21 from zcash-hackworks/orchard-merkle-crh
...
Add Orchard MerkleCRH
2021-05-07 01:38:32 +08:00