pub trait PrehashSignature {
    type Digest: Digest;
}
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 crate 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.

Required Associated Types§

type Digest: Digest

Preferred Digest algorithm to use when computing this signature type.

Implementations on Foreign Types§

source§

impl PrehashSignature for Signature

Β§

impl<C> PrehashSignature for Signature<C>where C: PrimeCurve + DigestPrimitive, <<<C as Curve>::FieldBytesSize as Add<<C as Curve>::FieldBytesSize>>::Output as Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>>::Output: ArrayLength<u8>, <<C as Curve>::FieldBytesSize as Add<<C as Curve>::FieldBytesSize>>::Output: Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>> + ArrayLength<u8>,

Β§

impl<C> PrehashSignature for Signature<C>where C: DigestPrimitive, <<C as Curve>::FieldBytesSize as Add<<C as Curve>::FieldBytesSize>>::Output: ArrayLength<u8>,

Implementors§