Trait signature::PrehashSignature[][src]

pub trait PrehashSignature: Signature {
    type Digest: Digest;
}
This is supported on crate feature digest-preview only.
Expand description

Marker trait for Signature types computable as 𝐒(𝐇(π’Ž)) i.e. ones which prehash a message to be signed as 𝐇(π’Ž)

Where:

  • 𝐒: signature algorithm
  • 𝐇: hash (a.k.a. digest) function
  • π’Ž: message

This approach is relatively common in signature schemes based on the Fiat-Shamir heuristic.

For signature types that implement this trait, when the derive-preview Cargo feature is enabled a custom derive for Signer is available for any types that impl DigestSigner, and likewise for deriving Verifier for types which impl DigestVerifier.

Associated Types

Preferred Digest algorithm to use when computing this signature type.

Implementors