pub fn raw_sign_byupdate<CtxDigest, F>(
esk: &ExpandedSecretKey,
msg_update: F,
verifying_key: &VerifyingKey,
) -> Result<Signature, SignatureError>
Available on crate feature
hazmat
only.Expand description
Compute an ordinary Ed25519 signature, with the message contents provided incrementally by updating a digest instance.
The msg_update
closure provides the message content, updating a hasher argument. It will be
called twice. This closure MUST leave its hasher in the same state (i.e., must hash the same
values) after both calls. Otherwise it will produce an invalid signature.
CtxDigest
is the digest used to calculate the pseudorandomness needed for signing. According
to the Ed25519 spec, CtxDigest = Sha512
.
§⚠️ Cryptographically Unsafe
Do NOT use this function unless you absolutely must. Using the wrong values in
ExpandedSecretKey
can leak your signing key. See
here for more details on this attack.