Jack Grigg
90e64cbac0
Remove redundant checks during note encryption
...
The consistency check between `esk` and `ephemeral_key` is checked
inside `zcash_note_encryption::try_output_recovery_with_ock`, and the
requirement to check it inside the `Domain` implementation is being
lifted in zcash/librustzcash#848 .
Removing the check here improves performance, both because we avoid an
extra scalar multiplication from `esk.derive_public()`, and because we
avoid an unnecessary `spec::diversify_hash()` call which is expensive
for Orchard.
2023-05-19 16:43:17 +00:00
Kris Nuttycombe
dca33119b4
Migrate to zcash_note_encryption 0.3.0
2023-03-21 10:48:47 -06:00
Jack Grigg
050b2f231e
Add `memuse::DynamicUsage` impls for types used for batch scanning
2022-10-15 23:29:06 +00:00
Jack Grigg
0b4d7bc9c6
Migrate note encryption to use prepared w-NAF APIs
2022-10-15 23:27:57 +00:00
Kris Nuttycombe
b81d0d1198
Merge pull request #344 from zingolabs/publicize_note_and_diversifier_construction
...
Publicize necessary functionality for creating diversifiers and notes from data
2022-09-15 12:39:56 -06:00
Hazel OHearn
0800d23fe7
Publicize diversifier method of Address, fix comments, etc
2022-09-15 14:40:21 -03:00
Daira Hopwood
2ff7ff4a54
Dummy implementation of Domain methods for prepared ivk and epk.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-09-15 03:33:04 +01:00
Hazel OHearn
22b77c028f
Remove unneeded generic type from for_nullifier
2022-06-23 16:29:55 -03:00
Hazel OHearn
6956c18d31
Add CompactAction::nullifier getter fn
2022-06-23 16:06:37 -03:00
Hazel OHearn
4e12b4e90a
Add OrchardDomain::for_nullifier and CompactAction::from_parts
2022-06-22 17:41:24 -03:00
Jack Grigg
c0b7fa2007
Add nullifier field to `CompactAction`
...
Also reorders the fields to match the ZIP 244 order.
Closes zcash/orchard#243 .
2022-05-04 15:01:05 +00:00
Jack Grigg
5c5c999439
Move `orchard::bundle::Action` to its own module
...
The `Bundle` struct is variable in size and requires allocations, but
`Action` is not. This split will make it cleaner to disable the bundle
logic for no-std support.
2022-04-28 22:59:07 +00:00
Jack Grigg
b1ce38405a
Use `core` instead of `std` where possible
2022-04-28 20:20:23 +00:00
Jack Grigg
4574d4793a
Migrate to 2021 edition
2022-04-28 17:23:30 +00:00
Jack Grigg
17ad25ee35
Merge branch 'non-consensus-changes-on-branchid-c4cd541e' into merge-non-consensus-changes
2022-02-15 22:46:47 +00:00
Kris Nuttycombe
ae3cc78a56
Add decryption of the diversifier index for an address to the IVK.
...
Also correct a spelling error.
2022-02-14 17:04:38 -07:00
Jack Grigg
f300cea2c8
Fix clippy lints
...
These became stable lints between 1.51 and 1.54.
2022-01-28 23:00:00 +08:00
Jack Grigg
0e1220acc9
Merge branch 'main' into orchard-mainnet-circuit
2021-12-20 15:20:33 +00:00
Jack Grigg
4b0b32275f
Migrate to latest `zcash_note_encryption` API
2021-12-17 05:31:24 +00:00
Jack Grigg
0378898289
Replace `FieldExt::{from, to}_bytes` with `PrimeField::{from, to}_repr`
2021-12-09 15:39:37 +00:00
Jack Grigg
8c018eff7e
Migrate to `zcash_note_encryption::BatchDomain`
2021-11-17 12:15:21 +00:00
Jack Grigg
79988a5317
Move the interpolation logic into `SharedSecret::batch_to_affine`
...
This makes the method interface clearer, as the same pattern of shared
secrets is returned as was provided.
2021-08-13 14:27:20 +01:00
Jack Grigg
8e13986101
Implement `Domain::batch_epk` for note decryption
...
Improves throughput of batched trial decryption by around 10%.
2021-08-12 01:36:38 +01:00
Jack Grigg
2283310236
Expose `orchard::note_encryption::{CompactAction, OrchardNoteEncryption}`
...
This also removes the `orchard::OrchardDomain` re-export, which is now
available at `orchard::note_encryption::OrchardDomain`.
2021-08-06 01:01:12 +01:00
Kris Nuttycombe
ab2622f59c
Make note encryption OrchardDomain type public.
2021-06-30 12:47:37 -06:00
Kris Nuttycombe
234eed9cbb
Update src/note_encryption.rs
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-06-30 11:58:28 -06:00
Kris Nuttycombe
1e95360a74
Add for_action method for constructing an OrchardDomain
2021-06-30 11:21:07 -06:00
Daira Hopwood
81fb944997
Make this crate clippy clean for warnings on nightly.
...
One .clone() removal; all of the other changes are removing needless borrows that are immediately
dereferenced: https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-06-21 18:04:00 +01:00
Daira Hopwood
1c19bea842
Fix clippy lints.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-06-16 19:13:40 +01:00
Jack Grigg
769be6c080
Note encryption test vectors
2021-06-11 23:55:17 +01:00
Jack Grigg
99665572a2
Orchard note encryption
2021-06-11 23:55:16 +01:00