pub trait Variant:
Clone
+ Send
+ Sync
+ Hash
+ Eq
+ Debug
+ 'static {
type Public: Point + FixedSize + Debug + Hash + Copy + AsRef<Self::Public>;
type Signature: Point + FixedSize + Debug + Hash + Copy + AsRef<Self::Signature>;
const PROOF_OF_POSSESSION: DST;
const MESSAGE: DST;
// Required methods
fn verify(
public: &Self::Public,
hm: &Self::Signature,
signature: &Self::Signature,
) -> Result<(), Error>;
fn batch_verify<R: CryptoRngCore>(
rng: &mut R,
publics: &[Self::Public],
hms: &[Self::Signature],
signatures: &[Self::Signature],
) -> Result<(), Error>;
fn pairing(public: &Self::Public, signature: &Self::Signature) -> GT;
}
Expand description
A specific instance of a signature scheme.
Required Associated Constants§
Sourceconst PROOF_OF_POSSESSION: DST
const PROOF_OF_POSSESSION: DST
The domain separator tag (DST) for a proof of possession.
Required Associated Types§
Required Methods§
Sourcefn verify(
public: &Self::Public,
hm: &Self::Signature,
signature: &Self::Signature,
) -> Result<(), Error>
fn verify( public: &Self::Public, hm: &Self::Signature, signature: &Self::Signature, ) -> Result<(), Error>
Verify the signature from the provided public key and pre-hashed message.
Sourcefn batch_verify<R: CryptoRngCore>(
rng: &mut R,
publics: &[Self::Public],
hms: &[Self::Signature],
signatures: &[Self::Signature],
) -> Result<(), Error>
fn batch_verify<R: CryptoRngCore>( rng: &mut R, publics: &[Self::Public], hms: &[Self::Signature], signatures: &[Self::Signature], ) -> Result<(), Error>
Verify a batch of signatures from the provided public keys and pre-hashed messages.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.