#[non_exhaustive]pub enum SignatureAlgorithm {
Show 37 variants
DsaSha1,
DsaSha256,
HmacSha1,
HmacSha224,
HmacSha256,
HmacSha384,
HmacSha512,
RsaSha1,
RsaSha224,
RsaSha256,
RsaSha384,
RsaSha512,
RsaPssSha1,
RsaPssSha224,
RsaPssSha256,
RsaPssSha384,
RsaPssSha512,
RsaPssSha3_224,
RsaPssSha3_256,
RsaPssSha3_384,
RsaPssSha3_512,
RsaPss(RsaPssParameters),
EcdsaSha1,
EcdsaSha224,
EcdsaSha256,
EcdsaSha384,
EcdsaSha512,
EcdsaSha3_224,
EcdsaSha3_256,
EcdsaSha3_384,
EcdsaSha3_512,
Ed25519,
Ed25519Ctx,
Ed25519Ph,
Ed448,
Ed448Ph,
PostQuantum(PqAlgorithm),
}Expand description
Signature algorithms supported for signing and verification.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DsaSha1
DSA with SHA-1. Legacy algorithm disabled for signing by default.
DsaSha256
DSA with SHA-256 as defined by XMLDSig 1.1.
HmacSha1
HMAC with SHA-1. Legacy algorithm disabled for signing by default.
HmacSha224
HMAC with SHA-224.
HmacSha256
HMAC with SHA-256.
HmacSha384
HMAC with SHA-384.
HmacSha512
HMAC with SHA-512.
RsaSha1
RSA with SHA-1. Legacy algorithm disabled for signing by default.
RsaSha224
RSA with SHA-224.
RsaSha256
RSA with SHA-256 (most common in SAML).
RsaSha384
RSA with SHA-384.
RsaSha512
RSA with SHA-512.
RsaPssSha1
RSA-PSS with SHA1, matching MGF1 and digest-sized salt.
RsaPssSha224
RSA-PSS with SHA224, matching MGF1 and digest-sized salt.
RsaPssSha256
RSA-PSS with SHA256, matching MGF1 and digest-sized salt.
RsaPssSha384
RSA-PSS with SHA384, matching MGF1 and digest-sized salt.
RsaPssSha512
RSA-PSS with SHA512, matching MGF1 and digest-sized salt.
RsaPssSha3_224
RSA-PSS with SHA3-224, matching MGF1 and digest-sized salt.
RsaPssSha3_256
RSA-PSS with SHA3-256, matching MGF1 and digest-sized salt.
RsaPssSha3_384
RSA-PSS with SHA3-384, matching MGF1 and digest-sized salt.
RsaPssSha3_512
RSA-PSS with SHA3-512, matching MGF1 and digest-sized salt.
RsaPss(RsaPssParameters)
Parameterized RSA-PSS under RFC 9231 section 2.3.9.
EcdsaSha1
ECDSA with SHA-1; the key selects the elliptic curve.
EcdsaSha224
ECDSA with SHA-224; the key selects the elliptic curve.
EcdsaSha256
ECDSA with SHA-256; the key selects the elliptic curve.
EcdsaSha384
ECDSA with SHA-384; the key selects the elliptic curve.
EcdsaSha512
ECDSA with SHA-512; the key selects the elliptic curve.
EcdsaSha3_224
ECDSA with SHA3-224; the key selects the elliptic curve.
EcdsaSha3_256
ECDSA with SHA3-256; the key selects the elliptic curve.
EcdsaSha3_384
ECDSA with SHA3-384; the key selects the elliptic curve.
EcdsaSha3_512
ECDSA with SHA3-512; the key selects the elliptic curve.
Ed25519
Pure Ed25519 (RFC 8032), without external prehash or context.
Ed25519Ctx
Ed25519 with RFC 8032 domain-separation context, without prehash.
Ed25519Ph
Ed25519ph with SHA-512 prehash and RFC 8032 domain separation.
Ed448
Pure Ed448 (RFC 8032), with an optional domain-separation context.
Ed448Ph
Ed448ph with SHAKE256 prehash and RFC 8032 domain separation.
PostQuantum(PqAlgorithm)
Experimental post-quantum method; compile capability does not grant permission.
Implementations§
Source§impl SignatureAlgorithm
impl SignatureAlgorithm
Sourcepub fn rsa_pss_parameters(self) -> Option<RsaPssParameters>
pub fn rsa_pss_parameters(self) -> Option<RsaPssParameters>
Effective PSS parameters for fixed and parameterized method identifiers.
Sourcepub fn uses_legacy_pss_hash(self) -> bool
pub fn uses_legacy_pss_hash(self) -> bool
Whether either PSS hash needs explicit historical-algorithm permission.
Sourcepub const fn ecdsa_digest(self) -> Option<DigestAlgorithm>
pub const fn ecdsa_digest(self) -> Option<DigestAlgorithm>
Digest selected by an ECDSA method, independently of its key’s curve.
Sourcepub const fn hmac_output_bits(self) -> Option<usize>
pub const fn hmac_output_bits(self) -> Option<usize>
Return the full HMAC output width for HMAC algorithms.
Sourcepub fn signing_allowed(self) -> bool
pub fn signing_allowed(self) -> bool
Whether this algorithm is allowed for signing (not just verification).
Sourcepub const fn requires_explicit_permission(self) -> bool
pub const fn requires_explicit_permission(self) -> bool
Whether this optional historical method requires explicit policy permission.