Function winternitz::derive_pubkey
source · pub fn derive_pubkey(
privkey: &[u8],
pubkey: &mut [u8]
) -> Result<(), InvalidLengthError>
Expand description
Generate a public key from private entropy privkey
.
Arguments
privkey
is private entropy that must have length ofPRIVKEY_SIZE
pubkey
is a mutable slice of sizePUBKEY_SIZE
, which we will clobber with the public key
Returns
This function returns the generated public key Ok(())
on success, or an
Error(InvalidLengthError)
if privkey
is of incorrect length.