#[non_exhaustive]#[repr(u8)]pub enum Curve {
P256 = 0,
P384 = 1,
P521 = 2,
X25519 = 3,
Ed25519 = 4,
X448 = 5,
Ed448 = 6,
}Expand description
Elliptic curve types
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
P256 = 0
NIST Curve-P256
P384 = 1
NIST Curve-P384
P521 = 2
NIST Curve-P521
X25519 = 3
Elliptic-curve Diffie-Hellman key exchange Curve25519
Ed25519 = 4
Edwards-curve Digital Signature Algorithm Curve25519
X448 = 5
Elliptic-curve Diffie-Hellman key exchange Curve448
Ed448 = 6
Edwards-curve Digital Signature Algorithm Curve448
Implementations§
Source§impl Curve
impl Curve
Sourcepub fn secret_key_size(&self) -> usize
pub fn secret_key_size(&self) -> usize
Returns the amount of bytes of a secret key using this curve
pub fn public_key_size(&self) -> usize
pub fn from_ciphersuite( cipher_suite: CipherSuite, for_sig: bool, ) -> Option<Self>
pub fn hpke_sampling_method(&self) -> SamplingMethod
Trait Implementations§
impl Copy for Curve
impl Eq for Curve
impl StructuralPartialEq for Curve
Auto Trait Implementations§
impl Freeze for Curve
impl RefUnwindSafe for Curve
impl Send for Curve
impl Sync for Curve
impl Unpin for Curve
impl UnwindSafe for Curve
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,
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