[][src]Enum yaca::KeyLengthDh

pub enum KeyLengthDh {
    Rfc1024_160,
    Rfc2048_224,
    Rfc2048_256,
    Generator2Bits(u16),
    Generator5Bits(u16),
}

Enumeration of various YACA DH parameters including RFC 5114

  • It's meant to be passed or returned with KeyLength::Dh in appropriate functions when dealing with Diffie-Hellman.

Variants

Rfc1024_160

RFC 5114 DH parameters 1024_160

Rfc2048_224

RFC 5114 DH parameters 2048_224

Rfc2048_256

RFC 5114 DH parameters 2048_256

Generator2Bits(u16)

Generator equal 2 for DH parameters

  • Needs specifying safe prime length in bits.
  • Prime length needs to be >= 256 and divisble by 8.
  • Prime length is recommended to be 2048 bits or higher.
Generator5Bits(u16)

Generator equal 5 for DH parameters

  • Needs specifying safe prime length in bits.
  • Prime length needs to be >= 256 and divisble by 8.
  • Prime length is recommended to be 2048 bits or higher.

Trait Implementations

impl Debug for KeyLengthDh[src]

impl PartialEq<KeyLengthDh> for KeyLengthDh[src]

impl StructuralPartialEq for KeyLengthDh[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.