From ebe5cce3bb60418936e29c8fbca1c764d9527956 Mon Sep 17 00:00:00 2001 From: Deirdre Connolly Date: Sat, 28 Mar 2020 15:47:04 -0400 Subject: [PATCH] Better doc comment for sapling::TranmissionKey --- zebra-chain/src/keys/sapling.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/zebra-chain/src/keys/sapling.rs b/zebra-chain/src/keys/sapling.rs index f4816bbe..ac521b41 100644 --- a/zebra-chain/src/keys/sapling.rs +++ b/zebra-chain/src/keys/sapling.rs @@ -159,11 +159,18 @@ impl fmt::Debug for Diversifier { } } -/// Derived from an _IncomingViewingKey_ and a _Diversifier_ +/// A (diversified) _TransmissionKey_ /// -/// Derived by multiplying the diversifier (converted to an affine -/// point on the Jubjub curve) by the incoming view key: -/// pkd = gd * ivk +/// In Sapling, secrets need to be transmitted to a recipient of funds +/// in order for them to be later spent. To transmit these secrets +/// securely to a recipient without requiring an out-of-band +/// communication channel, the diversied transmission key is used to +/// encrypt them. +/// +/// Derived by multiplying a JubJub point [derived][ps] from a +/// _Diversifier_ by the _IncomingViewingKey_ scalar. +/// +/// [ps]: https://zips.z.cash/protocol/protocol.pdf#concretediversifyhash pub type TransmissionKey = redjubjub::PublicKeyBytes; /// Full Viewing Keys