Function rfc6979::generate_k
source ยท pub fn generate_k<D, I>(
x: &I,
n: &I,
h: &ByteArray<I>,
data: &[u8],
) -> Zeroizing<I>where
D: Digest + BlockSizeUser + FixedOutput<OutputSize = I::ByteSize> + FixedOutputReset,
I: ArrayEncoding + Integer + Zeroize,
Expand description
Deterministically generate ephemeral scalar k
.
Accepts the following parameters and inputs:
x
: secret keyn
: field modulush
: hash/digest of input message: must be reduced modulon
in advancedata
: additional associated data, e.g. CSRNG output used as added entropy