pub struct DecapsulationKey { /* private fields */ }Expand description
X-Wing decapsulation key or private key.
Implementations§
Trait Implementations§
Source§impl Clone for DecapsulationKey
impl Clone for DecapsulationKey
Source§fn clone(&self) -> DecapsulationKey
fn clone(&self) -> DecapsulationKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecapsulationKey
impl Debug for DecapsulationKey
Source§impl Decapsulate for DecapsulationKey
impl Decapsulate for DecapsulationKey
Source§fn decapsulate(&self, ct: &Ciphertext) -> SharedKey
fn decapsulate(&self, ct: &Ciphertext) -> SharedKey
Decapsulates the given
Ciphertext a.k.a. “encapsulated key”.Source§fn decapsulate_slice(
&self,
ct: &[u8],
) -> Result<Array<u8, <Self::Kem as Kem>::SharedKeySize>, TryFromSliceError>
fn decapsulate_slice( &self, ct: &[u8], ) -> Result<Array<u8, <Self::Kem as Kem>::SharedKeySize>, TryFromSliceError>
Decapsulate the given byte slice containing a
Ciphertext a.k.a. “encapsulated key”. Read moreSource§impl Decapsulator for DecapsulationKey
impl Decapsulator for DecapsulationKey
Source§fn encapsulation_key(&self) -> &EncapsulationKey
fn encapsulation_key(&self) -> &EncapsulationKey
Encapsulation key which can encrypt ciphertexts this decapsulator can decrypt.
Source§impl Drop for DecapsulationKey
impl Drop for DecapsulationKey
Source§impl Generate for DecapsulationKey
impl Generate for DecapsulationKey
Source§fn try_generate_from_rng<R>(rng: &mut R) -> Result<Self, <R as TryRng>::Error>where
R: TryCryptoRng + ?Sized,
fn try_generate_from_rng<R>(rng: &mut R) -> Result<Self, <R as TryRng>::Error>where
R: TryCryptoRng + ?Sized,
Generate random key using the provided
TryCryptoRng. Read moreSource§fn generate_from_rng<R>(rng: &mut R) -> Self
fn generate_from_rng<R>(rng: &mut R) -> Self
Generate random key using the provided
CryptoRng.Source§impl KeyExport for DecapsulationKey
impl KeyExport for DecapsulationKey
Source§impl KeyInit for DecapsulationKey
impl KeyInit for DecapsulationKey
Source§fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>
fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>
Create new value from variable size key. Read more
Source§impl KeySizeUser for DecapsulationKey
impl KeySizeUser for DecapsulationKey
impl ZeroizeOnDrop for DecapsulationKey
Available on crate feature
zeroize only.Auto Trait Implementations§
impl Freeze for DecapsulationKey
impl RefUnwindSafe for DecapsulationKey
impl Send for DecapsulationKey
impl Sync for DecapsulationKey
impl Unpin for DecapsulationKey
impl UnwindSafe for DecapsulationKey
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<D> TryDecapsulate for Dwhere
D: Decapsulate + Decapsulator,
impl<D> TryDecapsulate for Dwhere
D: Decapsulate + Decapsulator,
Source§type Error = Infallible
type Error = Infallible
Decapsulation error
Source§fn try_decapsulate(
&self,
ct: &Array<u8, <<D as Decapsulator>::Kem as Kem>::CiphertextSize>,
) -> Result<Array<u8, <<D as Decapsulator>::Kem as Kem>::SharedKeySize>, Infallible>
fn try_decapsulate( &self, ct: &Array<u8, <<D as Decapsulator>::Kem as Kem>::CiphertextSize>, ) -> Result<Array<u8, <<D as Decapsulator>::Kem as Kem>::SharedKeySize>, Infallible>
Decapsulates the given
Ciphertext a.k.a. “encapsulated key”.Source§fn try_decapsulate_slice(
&self,
ct: &[u8],
) -> Result<Array<u8, <Self::Kem as Kem>::SharedKeySize>, Self::Error>
fn try_decapsulate_slice( &self, ct: &[u8], ) -> Result<Array<u8, <Self::Kem as Kem>::SharedKeySize>, Self::Error>
Decapsulate the given byte slice containing a
Ciphertext a.k.a. “encapsulated key”. Read more