[−][src]Struct rust_sike::pke::PKE
Public-key cryptosystem (ref Algorithm 1, Section 1.3.9)
Fields
isogenies: CurveIsogenies<K>
Instance of the SIKE problem for this PKE
Methods
impl<K: FiniteField + Clone + Debug> PKE<K>
[src]
pub fn setup(params: PublicParameters<K>) -> Self
[src]
Initialise cryptosystem with parameters params
pub fn gen(&self) -> (SecretKey, PublicKey<K>)
[src]
Generate a keypair
pub fn enc(&self, pk: &PublicKey<K>, m: Message) -> Ciphertext
[src]
Encrypt a message
Panics
The function will panic if the message length is incorrect, of if the public key is incorrect
pub fn dec(&self, sk: &SecretKey, c: Ciphertext) -> Message
[src]
pub fn hash_function_f(&self, j: K) -> Vec<u8>
[src]
Computes the F function
pub fn xor(input1: &[u8], input2: &[u8]) -> Vec<u8>
[src]
Computes the bitwise XOR between two sequences
Auto Trait Implementations
impl<K> Send for PKE<K> where
K: Send,
K: Send,
impl<K> Sync for PKE<K> where
K: Sync,
K: Sync,
impl<K> Unpin for PKE<K> where
K: Unpin,
K: Unpin,
impl<K> UnwindSafe for PKE<K> where
K: UnwindSafe,
K: UnwindSafe,
impl<K> RefUnwindSafe for PKE<K> where
K: RefUnwindSafe,
K: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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<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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,