Kris Nuttycombe
be89e81534
Remove `esk` and `ephemeral_key` arguments from `parse_note_plaintext_without_memo_ovk`
...
Fixes #850
2023-05-26 09:24:22 -06:00
Jack Grigg
a115a8f00f
zcash_note_encryption: Remove `esk` check requirement from `Domain::parse_note_plaintext_without_memo_ovk`
...
This method is only called from `try_output_recovery_with_ock`, and we
can instead rely on the check performed in `check_note_validity`,
reducing the number of checks that `Domain` implementations need to
perform.
The `esk` and `ephemeral_key` parameters become unused, and will be
removed in a subsequent commit (as this change needs to be synchronized
with the `orchard` crate).
2023-05-19 16:30:47 +00:00
Jack Grigg
5f7ccb6d84
zcash_address 0.2.1
2023-04-15 00:51:29 +00:00
Jack Grigg
f82866dbb9
Migrate to `bech32 0.9`
2023-04-11 16:01:19 +00:00
Kris Nuttycombe
1a27a7f9ce
Update zcash_note_encryption changelog for 0.3.0 release.
2023-03-22 09:54:18 -06:00
Kris Nuttycombe
d6fafa291b
Update Sapling note encryption for `zcash_note_encryption 0.3.0`
...
Fixes zcash/librustzcash#455
2023-03-21 11:09:38 -06:00
Kris Nuttycombe
c696069f93
Bump zcash_note_encryption to version 0.3.0 for release.
...
This removes the path-based dependencies on the `zcash_note_encryption`
crate in favor of using versioned dependencies locally. This better
reflects the future state in which `zcash_note_encryption` is factored
out of the workspace and maintained in a separate repository.
2023-03-20 16:16:34 -06:00
Kris Nuttycombe
c88f3e1b9d
Remove the `recipient` parameter from zcash_note_encyption::Domain::note_plaintext_bytes
...
The `Domain::Note` type is now expected to contain information about the
recipient of the note, eliminating the need to pass this information in
via the encryption context.
2023-03-20 16:16:00 -06:00
Sean Bowe
bd7f9d7c3c
Bump zcash_encoding and zcash_address crate versions to 0.2.
2022-10-19 16:51:59 -06:00
Kris Nuttycombe
42fd3c1091
Fix changelogs for `zcash_encoding` and `zcash_history`
2022-10-19 15:52:42 -06:00
Jack Grigg
8f068b3b71
zcash_note_encryption 0.2.0
2022-10-13 21:35:39 +00:00
Jack Grigg
9a010d42ff
zcash_note_encryption: Clean up changelog and readme
...
We no longer depend on the previously-mentioned dependencies.
2022-10-13 21:23:09 +00:00
Jack Grigg
8842de18cc
Remove unused dependencies
...
These were mostly detected with `cargo-udeps`, for which I've also added
exclusions for the dependencies it can't detect are used in doc-tests.
2022-10-13 20:06:52 +00:00
Kris Nuttycombe
34a7abd653
Update unified address test vectors
...
This updates unified address test vectors after
https://github.com/zcash-hackworks/zcash-test-vectors/pull/89
to check addresses across multiple diversifier indices, and also
removes the superfluous binary encoding of UA strings.
2022-10-07 19:50:32 -06:00
Kris Nuttycombe
03c3370de8
Fix problems identified by clippy's beta lints
2022-09-17 08:57:37 -06:00
Kris Nuttycombe
29220c716f
Remove `zcash_primitives` as a zcash_note_encryption dev dependency.
...
This was only used to provide example code for Sapling usage of
the `NoteEncryption` struct; this example code has been moved
to `sapling::note_encryption`.
2022-09-16 12:52:00 -06:00
Kris Nuttycombe
72b5e6dfc3
Upgrade chacha20poly1305 dependency to version 0.10
...
Also upgrade the `chacha20`, `cipher`, and `subtle` dependency
versions.
2022-09-16 12:52:00 -06:00
Daira Hopwood
515b0a40ec
zcash_note_encryption: Add API to prepare epk.
...
Co-authored-by: Jack Grigg <jack@electriccoin.co>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-09-15 03:22:41 +01:00
Kris Nuttycombe
8439f1a4f7
Add binary encoding for unified spending keys.
...
This encoding is wallet-internal-only and is currently
guarded under the `unstable` feature flag.
2022-09-08 11:05:59 -06:00
Kris Nuttycombe
a93f5945ab
Remove redundant TryFrom/TryInto imports.
2022-09-02 12:05:15 -06:00
Kris Nuttycombe
16a0e43f2d
Update to Rust 2021 and explicitly set MSRVs
2022-09-02 12:05:09 -06:00
Kris Nuttycombe
199c49760b
Use the new name rustdoc::broken_intra_doc_links
2022-07-29 15:56:44 -06:00
Kris Nuttycombe
73314dc682
Use batch decryption in wallet scanning.
...
This modifies wallet scanning to perform per-block batched
decryption. It also alters the structure of the `ScanningKey`
trait to correctly include internal (change) keys in the scan
process.
2022-07-28 17:28:31 -06:00
Kris Nuttycombe
5873950648
Restructure batch decryption to avoid cartesian product of results.
...
While it is necessary in the worst case to perform `m * n` decryptions,
where `m` is the number of outputs being decrypted and `n` is the number
of IVKs, it is possible to stop performing trial decryptions when the
first successful decryption is performed. Also, it's inconvenient and
unnecessary to return the full cartesian product of these results, as
only one IVK will decrypt a given output. This commit modifies batch
trial decryption to stop on the first successful decryption, and instead
of returning the cartesian product of results we return the index of the
input IVK along with the output it decrypted. Note that this means that
trial decryption is not constant-time with respect to the number and/or
order of IVKs.
2022-07-28 15:23:21 -06:00
Daira Hopwood
a9aa2929d2
Address feedback about the use of "permissive".
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-06-28 16:46:13 +01:00
Daira Hopwood
75ca854005
Projects that rely on BOSL exceptions should say that they do.
...
fixes #576
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-06-28 12:29:16 +01:00
Jack Grigg
e952ff637e
zcash_primitives 0.7.0
2022-06-24 17:00:39 +00:00
Jack Grigg
a3cae5d36a
equihash 0.2.0
2022-06-24 17:00:26 +00:00
str4d
3f5ba8de48
Merge pull request #569 from zcash/f4jumble-readme-link-fix
...
Fix a broken link to ZIP 316 in F4Jumble crate README.
2022-06-14 00:45:57 +01:00
Nathan Wilcox
e2b688ea61
Fix a broken link to ZIP 316.
2022-06-13 09:50:01 -07:00
Jack Grigg
b8e8a0c491
zcash_address: Add `ZcashAddress::convert_if_network`
...
This, along with the corresponding `TryFromRawAddress` trait, enables
converting `ZcashAddress` into a network-agnostic type.
Closes zcash/librustzcash#564 .
2022-06-10 15:19:42 +00:00
Jack Grigg
16938d1c4f
zcash_address: Replace `FromAddress` with `TryFromAddress`
...
This enables the user-defined conversions to be fallible, which they
will almost always want to be (as address data needs to be validated
before it can be used).
2022-06-07 18:09:42 +00:00
Jack Grigg
3ecfd26d79
zcash_primitives 0.6.0
2022-05-10 23:33:05 +00:00
Jack Grigg
54e9eb8708
zcash_address 0.1.0
2022-05-10 23:33:05 +00:00
Jack Grigg
6976d3fe85
zcash_encoding 0.1.0
2022-05-10 23:33:05 +00:00
Jack Grigg
a27a5428f0
f4jumble 0.1.0
2022-05-10 23:33:05 +00:00
Jack Grigg
144512b547
Migrate to `ff 0.12`
2022-05-06 20:03:49 +00:00
Kris Nuttycombe
073d939859
Add `Vector::read_collected_mut` and `Array::read_collected_mut`
...
These variants allow parsing to be informed by additional
mutable external state.
2022-05-04 09:25:07 -06:00
Jack Grigg
32d6b57d71
f4jumble: Document APIs that require feature flags
2022-04-25 16:53:27 +00:00
Jack Grigg
b02d64a6ef
f4jumble: Add method documentation
2022-04-25 16:52:56 +00:00
Jack Grigg
0756ea2f3e
f4jumble: Add crate-level documentation
2022-04-25 16:52:28 +00:00
Kris Nuttycombe
981fc62b08
Add `ZcashAddress::encode` method.
...
This provides the encoding corresponding to
`ZcashAddress::try_from_encoded` and documents the fact that the
`Display` instance can also provide this encoding.
Fixes #463
2022-04-11 10:36:27 -06:00
Kris Nuttycombe
990b0afe5d
Update unified address test vectors
2022-03-29 14:56:00 -06:00
Kris Nuttycombe
abd63166c0
Apply suggestions from code review
...
Co-authored-by: str4d <jack@electriccoin.co>
2022-03-11 17:17:21 -07:00
Kris Nuttycombe
71657b4f18
Generalize vector and array writes & reads.
...
In a number of places, we transform other kinds of collections with
known length information into vectors simply to be able to use them with
`Vector::write` or `Vector::read`. We can avoid these extra allocations
by writing from iterators directly, and similarly by reading directly
into our desired collection types.
2022-03-11 16:48:28 -07:00
Kris Nuttycombe
600c06a408
Update MSRV to 1.56.1
2022-02-24 12:26:14 -07:00
Jack Grigg
fa75c9587c
zcash_address: Avoid an unnecessary allocation while parsing a UA
2022-02-03 00:02:03 +00:00
Jack Grigg
4a30679491
f4jumble: Return `Error` from allocating functions
2022-02-03 00:02:03 +00:00
Kris Nuttycombe
a304c3953b
Fix Clippy beta linting complaints.
2022-02-02 16:02:45 -07:00
Kris Nuttycombe
3a20176092
Apply suggestions from code review
...
Co-authored-by: str4d <jack@electriccoin.co>
2022-01-27 15:00:37 -07:00
Squirrel
c910ffdb41
Remove unused dependencies ( #479 )
...
Remove unused dependencies
Co-authored-by: Kris Nuttycombe <kris.nuttycombe@gmail.com>
Co-authored-by: str4d <thestr4d@gmail.com>
2022-01-18 12:04:14 -07:00
Kris Nuttycombe
8d34e62114
Clean up proptest generation for unified containers.
2022-01-04 15:31:20 -07:00
Kris Nuttycombe
6065c07003
Update test vectors to respect item ordering.
2022-01-04 11:48:23 -07:00
Kris Nuttycombe
2fa73ed368
Remove `Ord` instances for sealed items.
...
There are two canonical orderings for sealed items: preference
order and encoding order. Removing the `Ord` instances means
that a user can't accidentally choose the wrong ordering;
these orderings are replaced by explicit `preference_order`
and `encoding_order` comparison functions.
2022-01-04 11:48:23 -07:00
Kris Nuttycombe
e413f12fb5
Apply suggestions from code review
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-01-04 11:48:23 -07:00
Kris Nuttycombe
4c4c0b1e63
Makes unified container parsing enforce typecode order.
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-01-04 11:48:23 -07:00
Jack Grigg
d5a375919d
blake2{b,s}_simd 1
2021-12-17 23:44:06 +00:00
Jack Grigg
142a38e792
zcash_note_encryption 0.1.0
2021-12-17 20:00:46 +00:00
Jack Grigg
c4cbb2dd74
zcash_note_encryption: License files and readme
2021-12-17 15:16:17 +00:00
Jack Grigg
e8a755f633
zcash_note_encryption: Clean up dependencies
...
Several dependencies were copied over during the extraction of this
crate's logic from `zcash_primitives`, but are in fact only required for
the protocol-specific logic. We can also remove the `std` feature flag,
since we no longer have a dependency on `blake2b_simd` that needs its
`std` flag exposed for performance.
2021-12-17 15:06:22 +00:00
Jack Grigg
d511a788c4
zcash_note_encryption: Crate documentation
2021-12-17 15:06:22 +00:00
Jack Grigg
edc3557e30
zcash_note_encryption: Document APIs
2021-12-17 14:12:18 +00:00
Jack Grigg
5409291b0c
zcash_note_encryption: Add `doc_cfg` annotations
2021-12-17 14:12:18 +00:00
Jack Grigg
76f364593a
zcash_note_encryption: Constrain outgoing ciphertext size
...
This replaces a length assertion, making the API more predictable.
2021-12-17 05:23:53 +00:00
Jack Grigg
4fcd83d74e
zcash_note_encryption: Constrain `ShieldedOutput` ciphertext size
...
Previously we were returning the ciphertext as a slice, and then
asserting its length within the APIs the caller passed it into. Now
instead we require the caller to define whether or not the output is
compact, to make the API more predictable.
This doesn't place any additional constraints on users of this trait,
because the assertions already prevented a full output from being passed
to a compact trial decryption API.
2021-12-17 05:23:53 +00:00
Jack Grigg
d54e1f0bf7
zcash_note_encryption: Remove `Domain::check_epk_bytes`
...
`Domain::derive_esk` provides sufficient information to determine
whether or not we need to enforce `EphemeralSecretKey`-specific
decryption checks, as it returns `None` for pre-ZIP 212 notes.
2021-12-17 04:30:57 +00:00
Jack Grigg
7c1687dcc1
zcash_note_encryption: Use `*PlaintextBytes` structs in `Domain` APIs
...
`Domain::parse_note_plaintext_without_memo_ivk` is used with both full
note plaintexts and compact notes, so continues to accept a slice. For
all other `Domain` APIs, we constrain the input to `NotePlaintextBytes`
or `OutPlaintextBytes` as appropriate.
2021-12-17 04:30:57 +00:00
Jack Grigg
01c768dbeb
zcash_note_encryption: Place pre-ZIP 212 APIs behind a feature flag
2021-12-17 04:30:57 +00:00
Kris Nuttycombe
fd786f28b7
Ensure unrecognized prefixes map to ParseError::NotZcash
2021-12-07 12:59:41 -07:00
Kris Nuttycombe
4e906508ae
Make unified container construction correctly sort items.
...
Newly constructed unified containers now obey ZIP 316 item
ordering rules, while parsing and reserialization preserve
order.
2021-12-07 11:07:15 -07:00
Kris Nuttycombe
e7c57e4a02
Use `from` instead of a possibly-future-incompatible cast
2021-12-07 09:25:50 -07:00
Kris Nuttycombe
cc8c2868eb
Ensure that unknown typecodes don't duplicate known typecodes.
2021-12-07 09:16:55 -07:00
Kris Nuttycombe
cccc493067
Add unknown typecodes to UA proptests.
2021-12-06 11:34:12 -07:00
Kris Nuttycombe
e30f4bd094
Fix incorrect ordering of receivers in writing raw encoding.
2021-12-06 08:32:07 -07:00
Kris Nuttycombe
9144aaef0a
Ensure shrinking will work properly for ufvk proptests.
2021-12-03 15:27:25 -07:00
Kris Nuttycombe
fd300e0061
Apply suggestions from code review
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-12-03 14:26:02 -07:00
Kris Nuttycombe
a6420858f4
Fix clippy lints.
2021-12-03 14:21:40 -07:00
Kris Nuttycombe
76082e4287
Return correct errors for incorrectly encoded unified containers.
2021-12-03 14:15:02 -07:00
Kris Nuttycombe
ba3ff42e13
Address comments from code review.
2021-12-03 12:07:26 -07:00
Kris Nuttycombe
8cf43d255f
Fix clippy complaints.
2021-12-02 14:44:38 -07:00
Kris Nuttycombe
914363f9b7
Rename "to_bytes" internal method to "to_jumbled_bytes"
2021-12-02 14:44:38 -07:00
Kris Nuttycombe
2ffe5963a1
Fix the byte length of Sapling and Transparent UFVK components.
2021-12-02 14:44:38 -07:00
Kris Nuttycombe
7e629db29f
Adds high-level encoding and decoding functions for unified types.
...
This renames the `FromReceivers` trait to `UnifiedEncoding` and makes
its public methods (as well as the private to_bytes method) function in
terms of network values rather than explicit HRP arguments. It also adds
high-level encoding and decoding methods that handle conversion to and
from the Bech32m-encoded transport format for all supported types, and
then delegates to these from locations that previously used lower-level
utilities.
2021-12-02 14:44:38 -07:00
Kris Nuttycombe
3b70731cc4
Adds `unified::SealedContainer::network_hrp`
2021-12-02 14:44:38 -07:00
Kris Nuttycombe
7d801cf71b
Expose unified addresses, IVKs and Fvks
2021-12-02 14:44:38 -07:00
ying tong
c8993881ae
kind::unified: Make ivk::Ivk, fvk::Fvk available outside the crate.
...
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2021-12-02 14:44:38 -07:00
therealyingtong
c4ceb8e9df
Test both Sapling and Orchard receivers in arb_shielded_* proptests.
2021-12-02 14:44:38 -07:00
therealyingtong
b4c1ca11c9
Remove P2SH variant for FVK and IVK.
2021-12-02 14:44:38 -07:00
therealyingtong
cb06bbcf05
unified::fvk::tests: Add unit tests for parsing UFVK.
2021-12-02 14:44:38 -07:00
therealyingtong
194a790335
unified::fvk: Parse unified full viewing keys.
2021-12-02 14:44:38 -07:00
therealyingtong
fc82523e31
unified::ivk::tests: Add unit tests for parsing UIVK.
2021-12-02 14:44:38 -07:00
therealyingtong
7cd12f4ee2
unified::ivk: Parse unified incoming viewing keys.
2021-12-02 14:44:38 -07:00
Kris Nuttycombe
1c32172209
Merge pull request #460 from zcash/unified-encoding-logic
...
kind::unified: Extract common unified encoding logic.
2021-12-02 12:43:27 -07:00
Kris Nuttycombe
566c973ea7
Fix comment in components/zcash_address/src/kind/unified.rs
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-12-02 11:35:54 -07:00
Kris Nuttycombe
82be04dfaf
Generalize the naming of unified containers and items.
2021-12-02 09:10:03 -07:00
Kris Nuttycombe
75591047f7
Separates raw encoding from jumbling of unified container contents.
2021-12-02 09:04:46 -07:00
therealyingtong
a6e6f8ace2
kind::unified: Make address::Address available outside the crate.
2021-11-30 09:05:24 -05:00
therealyingtong
da1c6224f8
kind::unified: Split Unified trait into FromReceivers, ToReceivers.
...
This allows us to move to_bytes() into the private::SealedContainer
trait without introducing a circular dependency. This also lets us
move the Receivers type to a public trait.
2021-11-29 14:21:43 -05:00
therealyingtong
c31db1b839
Move HRPs into from public Unified trait to SealedContainer trait.
...
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-11-29 13:49:24 -05:00
therealyingtong
b8ff3d2d48
kind::unified: Introduce private::SealedContainer and Unified traits.
...
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-11-28 18:56:24 -05:00
therealyingtong
18393eefa8
kind::unified: Introduce private::SealedReceiver trait.
...
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-11-28 18:55:37 -05:00
therealyingtong
406e62e7e5
[move-only] Move Receiver and test code into kind::unified::address.
...
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-11-28 17:09:59 -05:00
jarys
0ec7f97c97
Add `#![no_std]` support for zcash_note_encryption ( #450 )
...
Co-authored-by: str4d <thestr4d@gmail.com>
2021-11-24 13:58:52 +00:00
Jack Grigg
35e7542065
zcash_note_encryption: Move domain batch APIs into a BatchDomain trait
...
These are the only allocating APIs; this change makes it possible to
make the crate no-std compatible.
2021-11-17 12:14:26 +00:00
jarys
6e39480c58
Add `#![no_std]` support for f4jumble. ( #446 )
...
The new `f4jumble_mut` and `f4jumble_inv_mut` functions take a `&mut [u8]`, and return a new `Error` type if the slice has an invalid length.
The original `f4jumble` and `f4jumble_inv` functions are now more efficient as they only allocate once.
2021-11-03 13:46:30 +00:00
str4d
edd341faba
f4jumble: Add description to README
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-09-23 04:38:39 +12:00
str4d
501a343fc9
f4jumble: Update authors list
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-09-23 04:22:18 +12:00
Jack Grigg
e13e746e8a
Move F4Jumble implementation into f4jumble crate
2021-09-22 14:21:48 +01:00
Jack Grigg
06b7f13356
Empty f4jumble crate
2021-09-22 14:13:34 +01:00
str4d
663a394b62
Merge pull request #434 from nuttycom/feature/longer_uas
...
Update unified addresses to use CompactSize for typecode & length fields.
2021-09-16 05:47:18 +12:00
Kris Nuttycombe
3c42fcff6d
Fix upper CompactSize bound.
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-09-15 10:27:27 -06:00
Kris Nuttycombe
4b67977ec0
Use u32 for typecodes.
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-09-14 18:08:21 -06:00
Kris Nuttycombe
74d430102a
Add test vector checking for long f4jumble values.
2021-09-14 17:11:37 -06:00
Daira Hopwood
f9522ed2bc
Add a test that uses the second bytes of the index to G
2021-09-13 14:41:45 +01:00
Jack Grigg
65e1d32774
ff 0.11, group 0.11, etc.
2021-09-09 18:20:37 +01:00
str4d
eca002dae0
zcash_address: Assert that the unified encoding is exactly consumed
2021-09-02 23:24:23 +01:00
Kris Nuttycombe
ce6ac7aee6
Avoid reallocation in read_receiver.
2021-09-02 16:12:11 -06:00
Kris Nuttycombe
cd3d40aab3
Update f4jumble personalization.
...
Also, update the test vectors for both f4jumble and
unified addresses.
2021-09-01 14:46:44 -06:00
Kris Nuttycombe
b7ae3ddfe5
Modify unified address encoding to use CompactSize for typecode & address length
2021-09-01 14:46:44 -06:00
str4d
993925e049
Merge pull request #437 from nuttycom/zcash_note_encryption_doc_fixes
...
Fix a couple of broken doc links.
2021-09-01 21:43:46 +01:00
Kris Nuttycombe
5541552453
Fix a couple of broken doc links.
2021-09-01 14:01:47 -06:00
Kris Nuttycombe
427e6acbd4
Allow CompactSize deserialization to target any type that can be TryFrom<u64>
2021-09-01 13:57:51 -06:00
str4d
edcde252de
Merge pull request #428 from nuttycom/public_compact_size
...
Move the CompactSize, Vector, Array and Option encodings to a new zcash_encoding crate.
2021-09-01 20:45:28 +01:00
str4d
21a0d0760c
zcash_encoding: Adjust doc comments on public APIs
2021-09-01 20:43:59 +01:00
Kris Nuttycombe
c1bad64fbd
Apply suggestions from code review
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-09-01 11:08:52 -06:00
Kris Nuttycombe
e9c18ebaed
Document zcash_encoding functions.
2021-09-01 10:17:03 -06:00
Kris Nuttycombe
fa092da456
Fix stray clippy complaints.
2021-08-31 13:19:24 -06:00
Kris Nuttycombe
ef98c7e48c
Add zcash_encoding crate.
...
The CompactSize type, and the standardized encodings for the Vector,
Array and Option types are moved to the newly created crate.
2021-08-31 13:19:24 -06:00
Jack Grigg
f03f05f251
zcash_note_encryption: Switch to chacha20poly1305 crate
2021-08-30 15:03:39 +01:00
Jack Grigg
0d00e1eb53
proptest 1
2021-08-23 20:21:13 +01:00
str4d
9be36f3e54
Merge pull request #417 from nuttycom/incremental_merkle_tree_ser
...
Add manual serialization for bridgetree::Frontier
2021-08-17 14:57:59 +01:00
Jack Grigg
4b4dd2ea55
zcash_note_encryption: Add support for batch-parsing `ephemeral_key`
...
This is useful when the underlying curve requires an inversion to parse
an encoded point (such as for Jubjub).
2021-08-10 02:57:11 +01:00
Jack Grigg
8a615c4393
zcash_note_encryption: Add batched trial decryption APIs
2021-08-10 02:17:10 +01:00
Jack Grigg
279a8b6bb6
Use `EphemeralKeyBytes` type in place of `[u8; 32]`
2021-08-09 21:28:42 +01:00
Jack Grigg
0f15743200
Disable default benchmark harness for all workspace crates
...
This is necessary in order to provide criterion-specific arguments to
`cargo bench`, such as `--profile-time`.
2021-08-05 22:39:36 +01:00
Kris Nuttycombe
2945905d52
Implement manual serialization for incremental Merkle tree components.
...
This also adds parsing of the legacy CommitmentTree format,
to permit easy migration of persisted data.
2021-08-05 09:32:44 -06:00
str4d
c02931dc82
Tweak test comment
2021-07-30 20:35:23 +01:00
Jack Grigg
00b369b2a4
zcash_address: Include HRP inside Unified Address Padding bytes
...
Closes zcash/librustzcash#418 .
2021-07-30 15:34:36 +01:00
Jack Grigg
b875f6c34b
zcash_address: Fix clippy lint by using matches! macro
2021-07-12 21:17:25 +01:00
Jack Grigg
8527dcbc32
zcash_address: Remove outdated unified::Receiver documentation
...
Receiver ordering is now explicitly defined by Typecode, and Receiver
is now a public type.
2021-07-12 21:11:24 +01:00
Jack Grigg
478625f72d
zcash_address: Add UA test cases for truncation and invalid padding
2021-07-12 20:56:35 +01:00
Jack Grigg
77d1f0c778
zcash_address: Invert Typecode::is_shielded to Typecode::is_transparent
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-07-12 20:19:26 +01:00
Jack Grigg
060a15eaf8
zcash_address: Enable constructing a unified::Address from Vec<Receiver>
...
This enforces the same structural validity checks as at parsing time.
2021-07-12 13:39:01 +01:00
Jack Grigg
384af079a8
zcash_address: Add `unified::Address::receivers{_as_parsed}` APIs
...
These expose the receivers in sorted order, and in parsed order.
2021-07-12 13:35:06 +01:00
Jack Grigg
b175b9bec9
zcash_address: Use preference ordering for Receivers
2021-07-12 13:34:44 +01:00
Jack Grigg
7708b27202
zcash_address: Enforce UA structural validity checks
2021-07-12 12:10:23 +01:00
Jack Grigg
cd94b41d61
zcash_address: Introduce UA-specific parser error type
2021-07-12 11:45:25 +01:00
Jack Grigg
01a8dba450
zcash_address: Add a Typecode enum
2021-07-12 11:42:49 +01:00
Jack Grigg
752ee442f8
zcash_address: Add Unified Address test vectors
2021-06-18 20:06:02 +01:00
Jack Grigg
c7c79d266e
zcash_note_encryption: Add `ShieldedOutput::ephemeral_key() -> EphemeralKeyBytes`
...
This replaces the `ShieldedOutput::epk() -> &Domain::EphemeralPublicKey`
which could not be satisfied by output types that did not parse epk.
2021-06-10 18:35:19 +01:00