Trait coins_bip32::prelude::DigestVerifier [−][src]
Re-exported signer traits
Verify the provided signature for the given prehashed message Digest
is authentic.
Notes
This trait is primarily intended for signature algorithms based on the Fiat-Shamir heuristic, a method for converting an interactive challenge/response-based proof-of-knowledge protocol into an offline digital signature through the use of a random oracle, i.e. a digest function.
The security of such protocols critically rests upon the inability of an attacker to solve for the output of the random oracle, as generally otherwise such signature algorithms are a system of linear equations and therefore doing so would allow the attacker to trivially forge signatures.
To prevent misuse which would potentially allow this to be possible, this
API accepts a Digest
instance, rather than a raw digest value.
Required methods
pub fn verify_digest(&self, digest: D, signature: &S) -> Result<(), Error>
[src]
Verify the signature against the given Digest
output.
Implementations on Foreign Types
impl<C, D> DigestVerifier<D, Signature<C>> for VerifyingKey<C> where
C: Curve + ProjectiveArithmetic,
D: Digest<OutputSize = <C as Curve>::FieldSize>,
GenericArray<u8, <C as Curve>::FieldSize>: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
GenericArray<u8, <C as Curve>::FieldSize>: for<'r> From<&'r <<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: PrimeField,
<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: FromDigest<C>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Copy,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Clone,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Debug,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: VerifyPrimitive<C>,
<C as ProjectiveArithmetic>::ProjectivePoint: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar as PrimeField>::Repr == GenericArray<u8, <C as Curve>::FieldSize>,
[src]
Loading content...C: Curve + ProjectiveArithmetic,
D: Digest<OutputSize = <C as Curve>::FieldSize>,
GenericArray<u8, <C as Curve>::FieldSize>: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
GenericArray<u8, <C as Curve>::FieldSize>: for<'r> From<&'r <<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: PrimeField,
<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: FromDigest<C>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Copy,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Clone,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Debug,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: VerifyPrimitive<C>,
<C as ProjectiveArithmetic>::ProjectivePoint: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar as PrimeField>::Repr == GenericArray<u8, <C as Curve>::FieldSize>,
Implementors
impl<D> DigestVerifier<D, Signature> for DerivedPubkey where
D: Digest<OutputSize = U32>,
[src]
D: Digest<OutputSize = U32>,
impl<D> DigestVerifier<D, Signature> for DerivedXPub where
D: Digest<OutputSize = U32>,
[src]
D: Digest<OutputSize = U32>,
impl<D> DigestVerifier<D, Signature> for coins_bip32::ecdsa::VerifyingKey where
D: Digest<OutputSize = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>,
[src]
D: Digest<OutputSize = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>,
impl<D> DigestVerifier<D, Signature> for XPub where
D: Digest<OutputSize = U32>,
[src]
D: Digest<OutputSize = U32>,
impl<D> DigestVerifier<D, Signature<Secp256k1>> for DerivedPubkey where
D: Digest<OutputSize = U32>,
[src]
D: Digest<OutputSize = U32>,
impl<D> DigestVerifier<D, Signature<Secp256k1>> for DerivedXPub where
D: Digest<OutputSize = U32>,
[src]
D: Digest<OutputSize = U32>,
impl<D> DigestVerifier<D, Signature<Secp256k1>> for coins_bip32::ecdsa::VerifyingKey where
D: Digest<OutputSize = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>,
[src]
D: Digest<OutputSize = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>,
impl<D> DigestVerifier<D, Signature<Secp256k1>> for XPub where
D: Digest<OutputSize = U32>,
[src]
D: Digest<OutputSize = U32>,