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
.
Preferred Digest
algorithm to use when computing this signature type.
impl<C> PrehashSignature for Signature<C> where
C: DigestPrimitive,
<<<C as Curve>::UInt as ArrayEncoding>::ByteSize as Add<<<C as Curve>::UInt as ArrayEncoding>::ByteSize>>::Output: ArrayLength<u8>,
impl<C> PrehashSignature for Signature<C> where
C: PrimeCurve + DigestPrimitive,
<<<<C as Curve>::UInt as ArrayEncoding>::ByteSize as Add<<<C as Curve>::UInt as ArrayEncoding>::ByteSize>>::Output as Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>>::Output: ArrayLength<u8>,
<<<C as Curve>::UInt as ArrayEncoding>::ByteSize as Add<<<C as Curve>::UInt as ArrayEncoding>::ByteSize>>::Output: Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>,
<<<C as Curve>::UInt as ArrayEncoding>::ByteSize as Add<<<C as Curve>::UInt as ArrayEncoding>::ByteSize>>::Output: ArrayLength<u8>,