Enum scicrypt_traits::security::BitsOfSecurity
source · [−]pub enum BitsOfSecurity {
AES80,
AES112,
AES128,
AES192,
AES256,
Custom {
pk_bits: u32,
},
ToyParameters,
}
Expand description
The number of bits of security as compared to the AES cryptosystem. Check https://www.keylength.com/en/4/ for recommendations.
Variants
AES80
Security that is equivalent to the security of the 2TDEA cryptosystem. This choice of parameters is not secure and is only used for legacy.
AES112
This level of security is expected to be safe until 2030.
AES128
Security that is equivalent to that of 128 bits in the AES cryptosystem. This level of security is expected to be safe until 2030 & beyond.
AES192
Security that is equivalent to that of 192 bits in the AES cryptosystem. This level of security is expected to be safe until 2030 & beyond.
AES256
Security that is equivalent to that of 256 bits in the AES cryptosystem. This level of security is expected to be safe until 2030 & beyond.
Custom
Fields
pk_bits: u32
The number of bits in a public key (factoring) modulus.
Security that is equivalent to a number of bits pk_bits
in accordance to the size of a
public key modulus. Note that any number lower than 1024 is considered extremely insecure.
ToyParameters
Completely insecure parameters that are only useful for testing due to their speed.
Implementations
sourceimpl BitsOfSecurity
impl BitsOfSecurity
sourcepub fn to_public_key_bit_length(&self) -> u32
pub fn to_public_key_bit_length(&self) -> u32
Returns the required modulus size for a given symmetric security level in the asymmetric setting.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BitsOfSecurity
impl Send for BitsOfSecurity
impl Sync for BitsOfSecurity
impl Unpin for BitsOfSecurity
impl UnwindSafe for BitsOfSecurity
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedAs for T
impl<T> CheckedAs for T
sourcefn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
sourcefn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
sourceimpl<T> OverflowingAs for T
impl<T> OverflowingAs for T
sourcefn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
sourcefn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
sourceimpl<T> SaturatingAs for T
impl<T> SaturatingAs for T
sourcefn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
sourcefn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
sourcefn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
sourcefn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> WrappingAs for T
impl<T> WrappingAs for T
sourcefn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
sourcefn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.