[][src]Struct rust_sike::pke::PKE

pub struct PKE<K> {
    pub isogenies: CurveIsogenies<K>,
    // some fields omitted
}

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]

Decrypts a message

Panics

The function will panic if the public key is incorrect

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

impl<K> Sync for PKE<K> where
    K: Sync

impl<K> Unpin for PKE<K> where
    K: Unpin

impl<K> UnwindSafe for PKE<K> where
    K: UnwindSafe

impl<K> RefUnwindSafe for PKE<K> where
    K: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,