/// Verify a threshold ECDSA signature
///
/// This not only verifies the basic signature equation but also that
/// it was generated with a particular presignature transcript.
///
/// It also verifies that s is normalized to be in [0,n/2) following
/// the malleability prevention approach of BTC/ETH.
///
/// This function returns Ok(true) if the signature seems completely
/// valid, Ok(false) if something was wrong the the signature itself
/// (wrong rho, `s` too large, or the ECDSA equation fails to verify),
/// or some Err if the signature or parameters are otherwise invalid,
/// for instance because one of the values is on the wrong curve.
Verify a threshold ECDSA signature
This not only verifies the basic signature equation but also that
it was generated with a particular presignature transcript.

It also verifies that s is normalized to be in [0,n/2) following
the malleability prevention approach of BTC/ETH.

This function returns Ok(true) if the signature seems completely
valid, Ok(false) if something was wrong the the signature itself
(wrong rho, `s` too large, or the ECDSA equation fails to verify),
or some Err if the signature or parameters are otherwise invalid,
for instance because one of the values is on the wrong curve.
Verify a threshold ECDSA signature This not only verifies the basic signature equation but also that it was generated with a particular presignature transcript . It also verifies that s is normalized to be in [ 0 n / 2 ) following the malleability prevention approach of BTC / ETH . This function returns Ok ( true ) if the signature seems completely valid Ok ( false ) if something was wrong the the signature itself ( wrong rho ` s ` too large or the ECDSA equation fails to verify ) or some Err if the signature or parameters are otherwise invalid for instance because one of the values is on the wrong curve .
pub fn verify(
        &self,
        derivation_path: &DerivationPath,
        hashed_message: &[u8],
        randomness: Randomness,
        presig_transcript: &IDkgTranscriptInternal,
        key_transcript: &IDkgTranscriptInternal,
        curve_type: EccCurveType,
    ) -> ThresholdEcdsaResult<bool> {
        let (rho, key_tweak, _) =
            derive_rho(curve_type, &randomness, derivation_path, presig_transcript)?;
        if self.r != rho {
            return Ok(false);
        }
        // We require s normalization for all curves
        if self.s.is_high() {
            return Ok(false);
        }
        let master_public_key = key_transcript.constant_term();
        let tweak_g = EccCurve::new(curve_type)
            .generator_g()?
            .scalar_mul(&key_tweak)?;
        let public_key = tweak_g.add_points(&master_public_key)?;
        ecdsa::verify_signature(&public_key, hashed_message, &self.r, &self.s)
    }
pub fn verify ( & self , derivation_path : & DerivationPath , hashed_message : & [ u8 ] , randomness : Randomness , presig_transcript : & IDkgTranscriptInternal , key_transcript : & IDkgTranscriptInternal , curve_type : EccCurveType , ) -> ThresholdEcdsaResult < bool > { let ( rho , key_tweak , _ ) = derive_rho ( curve_type , & randomness , derivation_path , presig_transcript ) ? ; if self . r != rho { return Ok ( false ) ; } // We require s normalization for all curves if self . s . is_high ( ) { return Ok ( false ) ; } let master_public_key = key_transcript . constant_term ( ) ; let tweak_g = EccCurve :: new ( curve_type ) . generator_g ( ) ? . scalar_mul ( & key_tweak ) ? ; let public_key = tweak_g . add_points ( & master_public_key ) ? ; ecdsa :: verify_signature ( & public_key , hashed_message , & self . r , & self . s ) }
Verify a threshold ECDSA signature
This not only verifies the basic signature equation but also that
it was generated with a particular presignature transcript.
Verify a threshold ECDSA signature This not only verifies the basic signature equation but also that it was generated with a particular presignature transcript .
&self
derivation_path
&DerivationPath
hashed_message
&[u8]
randomness
Randomness
presig_transcript
&IDkgTranscriptInternal
key_transcript
&IDkgTranscriptInternal
curve_type
EccCurveType