[−][src]Struct rust_sike::kem::KEM
Key-encapsulation mechanism (ref Algorithm 2, Section 1.3.10)
Methods
impl<K: FiniteField + Clone + Debug> KEM<K>
[src]
pub fn setup(params: PublicParameters<K>) -> Self
[src]
Initialise the KEM
pub fn keygen(&self) -> Result<(Vec<u8>, SecretKey, PublicKey<K>), String>
[src]
Generate a secret and a keypair
pub fn encaps(&self, pk: &PublicKey<K>) -> Result<(Ciphertext, Vec<u8>), String>
[src]
Encapsulate the shared secret using the PKE encryption
pub fn decaps(
&self,
s: &[u8],
sk: &SecretKey,
pk: &PublicKey<K>,
c: Ciphertext
) -> Result<Vec<u8>, String>
[src]
&self,
s: &[u8],
sk: &SecretKey,
pk: &PublicKey<K>,
c: Ciphertext
) -> Result<Vec<u8>, String>
Decapsulate the shared secret using the PKE decryption
Auto Trait Implementations
impl<K> RefUnwindSafe for KEM<K> where
K: RefUnwindSafe,
K: RefUnwindSafe,
impl<K> Send for KEM<K> where
K: Send,
K: Send,
impl<K> Sync for KEM<K> where
K: Sync,
K: Sync,
impl<K> Unpin for KEM<K> where
K: Unpin,
K: Unpin,
impl<K> UnwindSafe for KEM<K> where
K: UnwindSafe,
K: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Az for T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CheckedAs for T
[src]
fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
[src]
T: CheckedCast<Dst>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> OverflowingAs for T
[src]
fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
[src]
T: OverflowingCast<Dst>,
impl<T> SaturatingAs for T
[src]
fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
[src]
T: SaturatingCast<Dst>,
impl<T> StaticAs for T
[src]
fn static_as<Dst>(self) -> Option<Dst> where
T: StaticCast<Dst>,
[src]
T: StaticCast<Dst>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> WrappingAs for T
[src]
fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
[src]
T: WrappingCast<Dst>,