Botan 3.6.1
Crypto and TLS for C&
|
#include <kyber_keys.h>
Public Member Functions | |
const KyberHashedPublicKey & | H_public_key_bits_raw () const |
KyberCompressedCiphertext | indcpa_encrypt (const KyberMessage &m, const KyberEncryptionRandomness &r, const KyberPolyMat &At) const |
void | indcpa_encrypt (StrongSpan< KyberCompressedCiphertext > out_ct, StrongSpan< const KyberMessage > m, StrongSpan< const KyberEncryptionRandomness > r, const KyberPolyMat &At) const |
Kyber_PublicKeyInternal ()=delete | |
Kyber_PublicKeyInternal (KyberConstants mode, KyberPolyVecNTT polynomials, KyberSeedRho seed) | |
Kyber_PublicKeyInternal (KyberConstants mode, KyberSerializedPublicKey public_key) | |
const KyberConstants & | mode () const |
const KyberSerializedPublicKey & | public_key_bits_raw () const |
const KyberSeedRho & | rho () const |
const KyberPolyVecNTT & | t () const |
Definition at line 29 of file kyber_keys.h.
Botan::Kyber_PublicKeyInternal::Kyber_PublicKeyInternal | ( | KyberConstants | mode, |
KyberSerializedPublicKey | public_key ) |
Definition at line 30 of file kyber_keys.cpp.
Botan::Kyber_PublicKeyInternal::Kyber_PublicKeyInternal | ( | KyberConstants | mode, |
KyberPolyVecNTT | polynomials, | ||
KyberSeedRho | seed ) |
Definition at line 38 of file kyber_keys.cpp.
|
delete |
|
inline |
Definition at line 55 of file kyber_keys.h.
|
inline |
Definition at line 39 of file kyber_keys.h.
References Botan::KyberConstants::ciphertext_bytes(), and indcpa_encrypt().
void Botan::Kyber_PublicKeyInternal::indcpa_encrypt | ( | StrongSpan< KyberCompressedCiphertext > | out_ct, |
StrongSpan< const KyberMessage > | m, | ||
StrongSpan< const KyberEncryptionRandomness > | r, | ||
const KyberPolyMat & | At ) const |
NIST FIPS 203, Algorithm 14 (K-PKE.Encrypt)
In contrast to FIPS 203, the matrix At
is not sampled for every invocation, instead it is precomputed and passed in as a parameter. Similarly, the t^T is already decoded and available as a member variable. This allows to reuse these structures for multiple encryptions.
The sampling loops spelled out in FIPS 203 are hidden in the sample_* functions.
Definition at line 55 of file kyber_keys.cpp.
References Botan::Kyber_Algos::compress_ciphertext(), Botan::Kyber_Algos::polynomial_from_message(), Botan::Kyber_Algos::PolynomialSampler< SeedT >::sample_polynomial_cbd_eta2(), Botan::Kyber_Algos::PolynomialSampler< SeedT >::sample_polynomial_vector_cbd_eta1(), and Botan::Kyber_Algos::PolynomialSampler< SeedT >::sample_polynomial_vector_cbd_eta2().
Referenced by indcpa_encrypt().
|
inline |
Definition at line 51 of file kyber_keys.h.
|
inline |
Definition at line 53 of file kyber_keys.h.
|
inline |
Definition at line 49 of file kyber_keys.h.
|
inline |
Definition at line 47 of file kyber_keys.h.