#[non_exhaustive]pub enum KeyAlgorithm {
Rsa2048,
Rsa4096,
EcdsaP256,
EcdsaP384,
Ed25519,
MlDsa44,
MlDsa65,
MlDsa87,
Aes128,
Aes256,
}Expand description
Key algorithm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Rsa2048
RSA 2048-bit key.
Rsa4096
RSA 4096-bit key.
EcdsaP256
ECDSA with P-256 curve (secp256r1).
EcdsaP384
ECDSA with P-384 curve (secp384r1).
Ed25519
Ed25519 (EdDSA).
MlDsa44
ML-DSA-44, module-lattice signature at NIST security category 2 (FIPS 204).
MlDsa65
ML-DSA-65, module-lattice signature at NIST security category 3 (FIPS 204).
MlDsa87
ML-DSA-87, module-lattice signature at NIST security category 5 (FIPS 204).
Aes128
AES 128-bit symmetric key.
Aes256
AES 256-bit symmetric key.
Implementations§
Source§impl KeyAlgorithm
impl KeyAlgorithm
Sourcepub fn default_sign_algorithm(self) -> Option<SignAlgorithm>
pub fn default_sign_algorithm(self) -> Option<SignAlgorithm>
The signature algorithm to use with this key unless told otherwise.
None for symmetric keys, which sign nothing.
A key algorithm does not always determine a signature algorithm: RSA keys work with both PKCS#1 v1.5 and PSS, and this picks v1.5 for interoperability. Everywhere else the pairing is forced, either by the curve’s matching digest strength (RFC 5480) or by the scheme naming its own digest (Ed25519, ML-DSA).
Trait Implementations§
Source§impl Clone for KeyAlgorithm
impl Clone for KeyAlgorithm
Source§fn clone(&self) -> KeyAlgorithm
fn clone(&self) -> KeyAlgorithm
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more