pub enum CipherSuite {
Standard,
Fips,
}Expand description
The set of cryptographic algorithms a super::KeyStore is allowed to use, determined by the
environment it operates in.
It is set once when the store is constructed (see super::KeyStore::set_cipher_suite) and
read through super::KeyStoreContext by operations that must pick a compliant algorithm, such
as the KDF for a new account.
Variants§
Standard
The default suite, using the modern recommended algorithms (e.g. Argon2id).
Fips
The FIPS-compliant suite required in government (FedRAMP) environments, restricted to FIPS-approved algorithms (e.g. PBKDF2).
Implementations§
Source§impl CipherSuite
impl CipherSuite
Sourcepub fn from_gov_mode(gov_mode: bool) -> Self
pub fn from_gov_mode(gov_mode: bool) -> Self
Returns the CipherSuite for the current environment, given whether the client is in
Gov Mode (FedRAMP).
Sourcepub fn default_kdf_for_new_account(self) -> Kdf
pub fn default_kdf_for_new_account(self) -> Kdf
Returns the KDF a new account should use under this suite.
CipherSuite::Fips uses the FIPS-approved PBKDF2; CipherSuite::Standard uses the
modern Argon2id default.
Sourcepub fn is_kdf_compliant(self, kdf: &Kdf) -> bool
pub fn is_kdf_compliant(self, kdf: &Kdf) -> bool
Returns whether the given KDF is allowed under this suite.
Under CipherSuite::Fips only PBKDF2 is FIPS-approved; under CipherSuite::Standard
every supported KDF is allowed.
Trait Implementations§
Source§impl Clone for CipherSuite
impl Clone for CipherSuite
Source§fn clone(&self) -> CipherSuite
fn clone(&self) -> CipherSuite
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CipherSuite
impl Debug for CipherSuite
Source§impl Default for CipherSuite
impl Default for CipherSuite
Source§fn default() -> CipherSuite
fn default() -> CipherSuite
Source§impl PartialEq for CipherSuite
impl PartialEq for CipherSuite
impl Copy for CipherSuite
impl Eq for CipherSuite
impl StructuralPartialEq for CipherSuite
Auto Trait Implementations§
impl Freeze for CipherSuite
impl RefUnwindSafe for CipherSuite
impl Send for CipherSuite
impl Sync for CipherSuite
impl Unpin for CipherSuite
impl UnsafeUnpin for CipherSuite
impl UnwindSafe for CipherSuite
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more