From 312472ffbecd8b5cb6285915307aeaa0458fa2d1 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 17 Dec 2021 14:57:17 +0000 Subject: [PATCH] zcash_note_encryption: Crate documentation Extracted from: https://github.com/zcash/librustzcash/commit/d511a788c4b886b5c722a0893c47f0f856a6b6cd --- Cargo.toml | 2 +- src/lib.rs | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 51a69c6..0aeb273 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zcash_note_encryption" -description = "TBD" +description = "Note encryption for Zcash transactions" version = "0.0.0" authors = [ "Jack Grigg ", diff --git a/src/lib.rs b/src/lib.rs index 0c3a01e..9587033 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,16 @@ -//! Implementation of in-band secret distribution abstractions -//! for Zcash transactions. The implementations here provide -//! functionality that is shared between the Sapling and Orchard -//! protocols. +//! 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. +//! +//! [in-band secret distribution scheme]: https://zips.z.cash/protocol/protocol.pdf#saplingandorchardinband +//! [`zcash_primitives`]: https://crates.io/crates/zcash_primitives +//! [`orchard`]: https://crates.io/crates/orchard #![no_std] #![cfg_attr(docsrs, feature(doc_cfg))]