Document pub enum Rseed<Fs> with link to ZIP 212

This commit is contained in:
therealyingtong 2020-08-06 13:13:49 +08:00
parent 878646855c
commit 8968547981
No known key found for this signature in database
GPG Key ID: 179F32A1503D607E
1 changed files with 5 additions and 0 deletions

View File

@ -223,6 +223,11 @@ impl<E: JubjubEngine> PaymentAddress<E> {
} }
} }
/// Enum for note randomness before and after [ZIP 212](https://zips.z.cash/zip-0212).
///
/// Before ZIP 212, the note commitment trapdoor `rcm` must be a scalar value.
/// After ZIP 212, the note randomness `rseed` is a 32-byte sequence, used to derive
/// both the note commitment trapdoor `rcm` and the ephemeral private key `esk`.
#[derive(Copy, Clone, Debug)] #[derive(Copy, Clone, Debug)]
pub enum Rseed<Fs> { pub enum Rseed<Fs> {
BeforeZip212(Fs), BeforeZip212(Fs),