Function winternitz::sign
source · Expand description
Sign a message msg
with privkey
, returning the signature.
Arguments
privkey
is private entropy that must have length ofPRIVKEY_SIZE
msg
is the message to be signed. It may have any length.sig
is a mutable slice of sizeSIG_SIZE
, which we will clobber with the signature
Danger
Calling this function more than once with the same privkey
can reveal the value of
privkey
!
Returns
This function returns the signature Ok(())
on success, or an Err
if privkey
or sig
is of
an incorrect length.