pub struct LibQCbKemProvider { /* private fields */ }Expand description
lib-Q Classical McEliece KEM provider implementation
This provider implements KEM operations for Classical McEliece, including key generation, encapsulation, and decapsulation with proper security validation and algorithm routing.
Implementations§
Source§impl LibQCbKemProvider
impl LibQCbKemProvider
Sourcepub fn new() -> Result<LibQCbKemProvider, Error>
pub fn new() -> Result<LibQCbKemProvider, Error>
Sourcepub fn security_validator(&self) -> &SecurityValidator
pub fn security_validator(&self) -> &SecurityValidator
Get the security validator
Sourcepub fn security_validator_mut(&mut self) -> &mut SecurityValidator
pub fn security_validator_mut(&mut self) -> &mut SecurityValidator
Get mutable access to the security validator
This method is provided for testing scenarios where entropy validation needs to be disabled for deterministic testing. Use with caution in production.
Trait Implementations§
Source§impl Clone for LibQCbKemProvider
impl Clone for LibQCbKemProvider
Source§fn clone(&self) -> LibQCbKemProvider
fn clone(&self) -> LibQCbKemProvider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CryptoProvider for LibQCbKemProvider
Available on crate feature alloc only.
impl CryptoProvider for LibQCbKemProvider
Available on crate feature
alloc only.fn kem(&self) -> Option<&dyn KemOperations>
fn signature(&self) -> Option<&dyn SignatureOperations>
fn hash(&self) -> Option<&dyn HashOperations>
fn aead(&self) -> Option<&dyn AeadOperations>
Source§impl Debug for LibQCbKemProvider
Available on crate feature alloc only.
impl Debug for LibQCbKemProvider
Available on crate feature
alloc only.Source§impl KemOperations for LibQCbKemProvider
Available on crate feature alloc only.
impl KemOperations for LibQCbKemProvider
Available on crate feature
alloc only.fn generate_keypair( &self, algorithm: Algorithm, randomness: Option<&[u8]>, ) -> Result<KemKeypair, Error>
fn encapsulate( &self, algorithm: Algorithm, public_key: &KemPublicKey, randomness: Option<&[u8]>, ) -> Result<(Vec<u8>, Vec<u8>), Error>
fn decapsulate( &self, algorithm: Algorithm, secret_key: &KemSecretKey, ciphertext: &[u8], ) -> Result<Vec<u8>, Error>
fn derive_public_key( &self, _algorithm: Algorithm, _secret_key: &KemSecretKey, ) -> Result<KemPublicKey, Error>
Auto Trait Implementations§
impl Freeze for LibQCbKemProvider
impl RefUnwindSafe for LibQCbKemProvider
impl Send for LibQCbKemProvider
impl Sync for LibQCbKemProvider
impl Unpin for LibQCbKemProvider
impl UnsafeUnpin for LibQCbKemProvider
impl UnwindSafe for LibQCbKemProvider
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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