Improve docs

This commit is contained in:
Deirdre Connolly 2020-07-26 13:34:58 -04:00 committed by Deirdre Connolly
parent caef323f9b
commit 83c41869e1
3 changed files with 12 additions and 2 deletions

View File

@ -1,4 +1,4 @@
//! Note encryption types.
//! Notes, note and value commitments, note encryption, and nullifier types.
mod memo;

View File

@ -1,4 +1,4 @@
//! Sprout notes
//! Sapling notes
#![allow(clippy::unit_arg)]
#![allow(dead_code)]

View File

@ -16,6 +16,16 @@ use crate::{
// exported.
type Scalar = jubjub::Fr;
/// "...an algebraic hash function with collision resistance (for
/// fixed input length) derived from assumed hardness of the Discrete
/// Logarithm Problem on the Jubjub curve."
///
/// PedersenHash is used in the definitions of Pedersen commitments (§
/// 5.4.7.2Windowed Pedersen commitments), and of the Pedersen hash
/// for the Sapling incremental Merkle tree (§
/// 5.4.1.3 MerkleCRH^Sapling Hash Function).
///
/// https://zips.z.cash/protocol/protocol.pdf#concretepedersenhash
#[allow(non_snake_case)]
pub fn pedersen_hash_to_point(domain: [u8; 8], M: &BitVec<Lsb0, u8>) -> jubjub::ExtendedPoint {
// Expects i to be 0-indexed