All notable changes to this library will be documented in this file.
The format is based on Keep a Changelog, and this library adheres to Rust's notion of Semantic Versioning.
- Breaking change: removed the constants
COMPACT_NOTE_SIZE
,NOTE_PLAINTEXT_SIZE
, andENC_CIPHERTEXT_SIZE
as they are now implementation spesific (located inorchard
andsapling-crypto
crates). - Generalized the note plaintext size to support variable sizes by adding the
abstract types
NotePlaintextBytes
,NoteCiphertextBytes
,CompactNotePlaintextBytes
, andCompactNoteCiphertextBytes
to theDomain
trait. - Removed the separate
NotePlaintextBytes
type definition (as it is now an associated type). - Added new
parse_note_plaintext_bytes
,parse_note_ciphertext_bytes
, andparse_compact_note_plaintext_bytes
methods to theDomain
trait. - Updated the
note_plaintext_bytes
method of theDomain
trait to return theNotePlaintextBytes
associated type. - Updated the
encrypt_note_plaintext
method ofNoteEncryption
to return theNoteCiphertextBytes
associated type of theDomain
instead of the explicit array. - Updated the
enc_ciphertext
method of theShieldedOutput
trait to return anOption
of a reference instead of a copy. - Added a new
note_bytes
module with helper trait and struct to deal with note bytes data with abstracted underlying array size.
- The
esk
andephemeral_key
arguments have been removed fromDomain::parse_note_plaintext_without_memo_ovk
. It is therefore no longer necessary (or possible) to ensure thatephemeral_key
is derived fromesk
and the diversifier within the note plaintext. We have analyzed the safety of this change in the context of callers withinzcash_note_encryption
andorchard
. See zcash/librustzcash#848 and the associated issue zcash/librustzcash#802 for additional detail.
- The
recipient
parameter has been removed fromDomain::note_plaintext_bytes
. - The
recipient
parameter has been removed fromNoteEncryption::new
. Since theDomain::Note
type is now expected to contain information about the recipient of the note, there is no longer any need to pass this information in via the encryption context.
zcash_note_encryption::Domain
:Domain::PreparedEphemeralPublicKey
associated type.Domain::prepare_epk
method, which produces the above type.
- MSRV is now 1.56.1.
zcash_note_encryption::Domain
now requiresepk
to be converted toDomain::PreparedEphemeralPublicKey
before being passed toDomain::ka_agree_dec
.- Changes to batch decryption APIs:
- The return types of
batch::try_note_decryption
andbatch::try_compact_note_decryption
have changed. Now, instead of returning entries corresponding to the cartesian product of the IVKs used for decryption with the outputs being decrypted, this now returns a vector of decryption results of the same length and in the same order as theoutputs
argument to the function. Each successful result includes the index of the entry inivks
used to decrypt the value.
- The return types of
Initial release.