pub struct EncapsulationKey<P>where
P: KemParams,{
ek_pke: EncryptionKey<P>,
h: B32,
}Expand description
An EncapsulationKey provides the ability to encapsulate a shared key so that it can only be
decapsulated by the holder of the corresponding decapsulation key.
Fields§
§ek_pke: EncryptionKey<P>§h: B32Implementations§
Source§impl<P> EncapsulationKey<P>where
P: KemParams,
impl<P> EncapsulationKey<P>where
P: KemParams,
fn new(ek_pke: EncryptionKey<P>) -> Self
fn encapsulate_deterministic_inner( &self, m: &B32, ) -> (Array<u8, <P as PkeParams>::CiphertextSize>, B32)
Trait Implementations§
Source§impl<P> Clone for EncapsulationKey<P>
impl<P> Clone for EncapsulationKey<P>
Source§fn clone(&self) -> EncapsulationKey<P>
fn clone(&self) -> EncapsulationKey<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 EncapsulationKey<P>
impl<P> Debug for EncapsulationKey<P>
Source§impl<P> Encapsulate<Array<u8, <P as PkeParams>::CiphertextSize>, Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for EncapsulationKey<P>where
P: KemParams,
impl<P> Encapsulate<Array<u8, <P as PkeParams>::CiphertextSize>, Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for EncapsulationKey<P>where
P: KemParams,
Source§fn encapsulate(
&self,
rng: &mut impl CryptoRngCore,
) -> Result<(Array<u8, <P as PkeParams>::CiphertextSize>, B32), Self::Error>
fn encapsulate( &self, rng: &mut impl CryptoRngCore, ) -> Result<(Array<u8, <P as PkeParams>::CiphertextSize>, B32), Self::Error>
Encapsulates a fresh shared secret
Source§impl<P> EncapsulateDeterministic<Array<u8, <P as PkeParams>::CiphertextSize>, Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for EncapsulationKey<P>where
P: KemParams,
impl<P> EncapsulateDeterministic<Array<u8, <P as PkeParams>::CiphertextSize>, Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for EncapsulationKey<P>where
P: KemParams,
Source§impl<P> EncodedSizeUser for EncapsulationKey<P>where
P: KemParams,
impl<P> EncodedSizeUser for EncapsulationKey<P>where
P: KemParams,
Source§type EncodedSize = <P as PkeParams>::EncryptionKeySize
type EncodedSize = <P as PkeParams>::EncryptionKeySize
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 EncapsulationKey<P>
impl<P> PartialEq for EncapsulationKey<P>
impl<P> StructuralPartialEq for EncapsulationKey<P>where
P: KemParams,
Auto Trait Implementations§
impl<P> Freeze for EncapsulationKey<P>
impl<P> RefUnwindSafe for EncapsulationKey<P>
impl<P> Send for EncapsulationKey<P>
impl<P> Sync for EncapsulationKey<P>
impl<P> Unpin for EncapsulationKey<P>
impl<P> UnwindSafe for EncapsulationKey<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