pub enum KeyType {
Rsa(u32),
Ecdsa(EcCurve),
MlDsa(MlDsaLevel),
MlKem(MlKemLevel),
CompositeMlDsa {
ml_dsa: MlDsaLevel,
classical: ClassicalSigningAlg,
},
}Expand description
Supported key types for server-side generation.
Covers classical (RSA, ECDSA), post-quantum (ML-DSA FIPS 204, ML-KEM FIPS 203), and composite hybrid algorithms per draft-ietf-lamps-pq-composite-sigs-19.
Variants§
Rsa(u32)
RSA with specified bit length (2048, 3072, 4096).
Ecdsa(EcCurve)
ECDSA with specified named curve.
MlDsa(MlDsaLevel)
ML-DSA standalone (FIPS 204) — signing only. Used for CA signing keys and client identity certificates.
MlKem(MlKemLevel)
ML-KEM standalone (FIPS 203) — key encapsulation. Used for server-side key generation (/serverkeygen) where the client needs a KEM key pair for key establishment.
CompositeMlDsa
Composite ML-DSA + classical signing (hybrid). Provides dual-algorithm protection during PQC migration.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KeyType
impl<'de> Deserialize<'de> for KeyType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for KeyType
impl RefUnwindSafe for KeyType
impl Send for KeyType
impl Sync for KeyType
impl Unpin for KeyType
impl UnsafeUnpin for KeyType
impl UnwindSafe for KeyType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more