Crate zcash_note_encryption[][src]

Expand description

Note encryption for Zcash transactions.

This crate implements the in-band secret distribution scheme for the Sapling and Orchard protocols. It provides reusable methods that implement common note encryption and trial decryption logic, and enforce protocol-agnostic verification requirements.

Protocol-specific logic is handled via the Domain trait. Implementations of this trait are provided in the zcash_primitives (for Sapling) and orchard crates; users with their own existing types can similarly implement the trait themselves.

Modules

batchalloc

APIs for batch trial decryption.

Structs

Newtype representing the byte encoding of an EphemeralPublicKey.

A struct containing context required for encrypting Sapling and Orchard notes.

Newtype representing the byte encoding of a note plaintext.

Newtype representing the byte encoding of a outgoing plaintext.

A symmetric key that can be used to recover a single Sapling or Orchard output.

Constants

The size of a compact note.

The size of an encrypted note plaintext.

The size of an encrypted outgoing plaintext.

Traits

Trait that encapsulates protocol-specific batch trial decryption logic.

Trait that encapsulates protocol-specific note encryption types and logic.

Trait that provides access to the components of an encrypted transaction output.

Functions

Trial decryption of the compact note plaintext by the recipient for light clients.

Trial decryption of the full note plaintext by the recipient.

Recovery of the full note plaintext by the sender.

Recovery of the full note plaintext by the sender.