rustls::crypto::aws_lc_rs::kx

Struct KxGroup

Source
struct KxGroup {
    name: NamedGroup,
    agreement_algorithm: &'static Algorithm,
    fips_allowed: bool,
    pub_key_validator: fn(_: &[u8]) -> bool,
}
Expand description

A key-exchange group supported by ring.

Fields§

§name: NamedGroup

The IANA “TLS Supported Groups” name of the group

§agreement_algorithm: &'static Algorithm

The corresponding ring agreement::Algorithm

§fips_allowed: bool

Whether the algorithm is allowed by FIPS

SupportedKxGroup::fips() is true if and only if the algorithm is allowed, and the implementation is FIPS-validated.

§pub_key_validator: fn(_: &[u8]) -> bool

aws-lc-rs 1.9 and later accepts more formats of public keys than just uncompressed.

That is not compatible with TLS:

  • TLS1.3 outlaws other encodings,
  • TLS1.2 negotiates other encodings (we only offer uncompressed), and defaults to uncompressed if negotiation is not done.

This function should return true if the basic shape of its argument is consistent with an uncompressed point encoding. It does not need to verify that the point is on the curve (if the curve requires that for security); aws-lc-rs/ring must do that.

Trait Implementations§

Source§

impl Debug for KxGroup

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl SupportedKxGroup for KxGroup

Source§

fn start(&self) -> Result<Box<dyn ActiveKeyExchange>, Error>

Start a key exchange. Read more
Source§

fn ffdhe_group(&self) -> Option<FfdheGroup<'static>>

FFDHE group the SupportedKxGroup operates in. Read more
Source§

fn name(&self) -> NamedGroup

Named group the SupportedKxGroup operates in. Read more
Source§

fn fips(&self) -> bool

Return true if this is backed by a FIPS-approved implementation.
Source§

fn start_and_complete( &self, peer_pub_key: &[u8], ) -> Result<CompletedKeyExchange, Error>

Start and complete a key exchange, in one operation. Read more
Source§

fn usable_for_version(&self, _version: ProtocolVersion) -> bool

Return true if this should be offered/selected with the given version. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.