mundane::public::rsa

Trait RsaKeyBits

Source
pub trait RsaKeyBits:
    Sized
    + Copy
    + Clone
    + Default
    + Display
    + Debug
    + Sealed {
    const BITS: usize;
}
Expand description

The bit length of an RSA key.

The RsaPrivKey and RsaPubKey types take a B: RsaKeyBits type parameter indicating the key’s length in bits.

We only support bit lengths of 2048 or greater, as smaller bit lengths are considered insecure. If 2048 is considered insecure at some point in the future, then we will remove support for it, which will be a breaking change.

Required Associated Constants§

Source

const BITS: usize

The number of bits.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl RsaKeyBits for B2048

Source§

const BITS: usize = 2_048usize

Source§

impl RsaKeyBits for B3072

Source§

const BITS: usize = 3_072usize

Source§

impl RsaKeyBits for B4096

Source§

const BITS: usize = 4_096usize

Source§

impl RsaKeyBits for B6144

Source§

const BITS: usize = 6_144usize

Source§

impl RsaKeyBits for B8192

Source§

const BITS: usize = 8_192usize