Struct schnorr_fun::nonce::Deterministic[][src]

pub struct Deterministic<H> { /* fields omitted */ }
Expand description

A deterministic nonce generator.

You should prefer Synthetic since it is more robust.

Example

use secp256kfun::{
    nonce::AddTag,
    nonce::{Deterministic, NonceGen},
};
use sha2::Sha256;
let nonce_gen = Deterministic::<Sha256>::default()
    .add_tag("BIP0340"); // To create [BIP-340] signatures.

Trait Implementations

Tells the invocant to return a new version of itself modified with the tag. This is to ensure that a NonceGen does not produce the same outputs for two different tags even if they have the same public inputs. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

The type of hash that begin_derivation will return.

Takes a secret Scalar and outputs a hash. Before turining this hash into the nonce, you must add a secret input and all the public inputs from the scheme into the hash. So for a signature scheme for example you would add your secret key, the message and the public key. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Returns a new instance of the invocant that will be marked with M. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.