Enum mls_rs_crypto_traits::Curve
source · #[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 curve_bitmask(&self) -> Option<u8>
Trait Implementations§
source§impl PartialEq for Curve
impl PartialEq for Curve
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