[−][src]Function saber::firesaber::decapsulate
pub fn decapsulate(ct: &Ciphertext, sk: &SecretKey) -> SharedSecret
Decapsulate a received ciphertext
This function uses a [SecretKey]
reference and decapsulate, sk: &SecretKey) the [Ciphertext]
referenced by ct
. A [SharedSecret]
will be returned.
In Saber, decryption failures are dealt with, so this function will always succeed.
Example
use saber::saber::decapsulate; // Assume `secret_key` holds your secret key and you just received `ciphertext` decapsulate(&ciphertext, &secret_key);