[−][src]Trait ez_pqcrypto::PostQuantumType
Used to get different algorithm types dynamically
Required methods
fn new_alice() -> Self where
Self: Sized,
Self: Sized,
Creates a new self for the initiating node
fn new_bob(public_key: &[u8]) -> Self where
Self: Sized,
Self: Sized,
Creates a new self for the receiving node
fn alice_on_receive_ciphertext(&mut self, ciphertext: &[u8])
Internally creates shared key after bob sends a response back to Alice
fn get_public_key(&self) -> &[u8]
Gets the public key
fn get_secret_key(&self) -> &[u8]
Gets the secret key (If node is Alice type)
fn get_ciphertext(&self) -> &[u8]
Gets the ciphertext
fn get_shared_secret(&self) -> &[u8]
Gets the shared secret
Provided methods
fn encrypt_data<T: AsRef<[u8]>>(&self, input: T, output: &mut BytesMut) where
Self: Sized,
Self: Sized,
Encrypts the data. Since this is meant for small data, no heavy optimization is used
fn decrypt_data<T: AsRef<[u8]>>(&self, input: T, output: &mut BytesMut) where
Self: Sized,
Self: Sized,
Decrypts the data