pub trait RandomizedDigestSigner<D, S>where
    D: Digest,{
    // Required method
    fn try_sign_digest_with_rng(
        &self,
        rng: &mut impl CryptoRngCore,
        digest: D
    ) -> Result<S, Error>;

    // Provided method
    fn sign_digest_with_rng(&self, rng: &mut impl CryptoRngCore, digest: D) -> S { ... }
}
Expand description

Combination of DigestSigner and RandomizedSigner with support for computing a signature over a digest which requires entropy from an RNG.

Required Methods§

fn try_sign_digest_with_rng( &self, rng: &mut impl CryptoRngCore, digest: D ) -> Result<S, Error>

Attempt to sign the given prehashed message Digest, returning a digital signature on success, or an error if something went wrong.

Provided Methods§

fn sign_digest_with_rng(&self, rng: &mut impl CryptoRngCore, digest: D) -> S

Sign the given prehashed message Digest, returning a signature.

Panics in the event of a signing error.

Implementations on Foreign Types§

source§

impl<D> RandomizedDigestSigner<D, Signature> for SigningKeywhere D: Digest<OutputSize = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>> + FixedOutput,

source§

fn try_sign_digest_with_rng( &self, rng: &mut impl CryptoRngCore, digest: D ) -> Result<Signature, Error>

§

impl<C, D> RandomizedDigestSigner<D, Signature<C>> for SigningKey<C>where C: PrimeCurve + CurveArithmetic + DigestPrimitive, D: Digest<OutputSize = <C as Curve>::FieldBytesSize> + FixedOutput, <C as CurveArithmetic>::Scalar: Invert<Output = CtOption<<C as CurveArithmetic>::Scalar>> + SignPrimitive<C>, <<C as Curve>::FieldBytesSize as Add<<C as Curve>::FieldBytesSize>>::Output: ArrayLength<u8>,

§

fn try_sign_digest_with_rng( &self, rng: &mut impl CryptoRngCore, msg_digest: D ) -> Result<Signature<C>, Error>

§

impl<C, D> RandomizedDigestSigner<D, Signature<C>> for SigningKey<C>where C: PrimeCurve + CurveArithmetic + DigestPrimitive, D: Digest<OutputSize = <C as Curve>::FieldBytesSize> + FixedOutput, <C as CurveArithmetic>::Scalar: Invert<Output = CtOption<<C as CurveArithmetic>::Scalar>> + SignPrimitive<C>, <<C as Curve>::FieldBytesSize as Add<<C as Curve>::FieldBytesSize>>::Output: ArrayLength<u8> + Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>, <<<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>,

§

fn try_sign_digest_with_rng( &self, rng: &mut impl CryptoRngCore, msg_digest: D ) -> Result<Signature<C>, Error>

Implementors§