pub trait SignatureScheme {
type PublicKey;
type SecretKey;
type Signature;
// Required methods
fn keygen() -> (Self::PublicKey, Self::SecretKey);
fn sign(sk: &Self::SecretKey, message: &[u8]) -> Self::Signature;
fn verify(
pk: &Self::PublicKey,
message: &[u8],
sig: &Self::Signature,
) -> bool;
}Expand description
Trait for digital signature schemes that produce fixed-shape keys and signatures (no per-call hash parameter).
Note: this trait is currently informational. Most signature schemes in this crate (ECDSA, EdDSA, RSA-PSS, RSA-PKCS1) take a hash function as a generic or runtime parameter and therefore do not implement this trait directly – they expose their own curve/key types and sign/verify functions. The trait is kept as the canonical “shape” of the simplest signature scheme for future extensions and for documentation purposes.
Required Associated Types§
Required Methods§
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.