pub struct DecapsulationKey<P>where
P: KemParams,{
dk_pke: DecryptionKey<P>,
ek: EncapsulationKey<P>,
z: B32,
}Expand description
A DecapsulationKey provides the ability to generate a new key pair, and decapsulate an
encapsulated shared key.
Fields§
§dk_pke: DecryptionKey<P>§ek: EncapsulationKey<P>§z: B32Implementations§
Source§impl<P> DecapsulationKey<P>where
P: KemParams,
impl<P> DecapsulationKey<P>where
P: KemParams,
Sourcepub fn encapsulation_key(&self) -> &EncapsulationKey<P>
pub fn encapsulation_key(&self) -> &EncapsulationKey<P>
Get the EncapsulationKey which corresponds to this DecapsulationKey.
pub(crate) fn generate(rng: &mut impl CryptoRngCore) -> Self
pub(crate) fn generate_deterministic(d: &B32, z: &B32) -> Self
Trait Implementations§
Source§impl<P> Clone for DecapsulationKey<P>
impl<P> Clone for DecapsulationKey<P>
Source§fn clone(&self) -> DecapsulationKey<P>
fn clone(&self) -> DecapsulationKey<P>
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<P> Debug for DecapsulationKey<P>
impl<P> Debug for DecapsulationKey<P>
Source§impl<P> Decapsulate<Array<u8, <P as PkeParams>::CiphertextSize>, Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for DecapsulationKey<P>where
P: KemParams,
impl<P> Decapsulate<Array<u8, <P as PkeParams>::CiphertextSize>, Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for DecapsulationKey<P>where
P: KemParams,
Source§impl<P> EncodedSizeUser for DecapsulationKey<P>where
P: KemParams,
impl<P> EncodedSizeUser for DecapsulationKey<P>where
P: KemParams,
Source§type EncodedSize = <P as KemParams>::DecapsulationKeySize
type EncodedSize = <P as KemParams>::DecapsulationKeySize
The size of an encoded object
Source§fn from_bytes(enc: &Encoded<Self>) -> Self
fn from_bytes(enc: &Encoded<Self>) -> Self
Parse an object from its encoded form
Source§impl<P> PartialEq for DecapsulationKey<P>
impl<P> PartialEq for DecapsulationKey<P>
impl<P> StructuralPartialEq for DecapsulationKey<P>where
P: KemParams,
Auto Trait Implementations§
impl<P> Freeze for DecapsulationKey<P>
impl<P> RefUnwindSafe for DecapsulationKey<P>
impl<P> Send for DecapsulationKey<P>
impl<P> Sync for DecapsulationKey<P>
impl<P> Unpin for DecapsulationKey<P>
impl<P> UnwindSafe for DecapsulationKey<P>
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