12#include <botan/internal/kyber_keys.h>
14#include <botan/internal/kyber_symmetric_primitives.h>
15#include <botan/internal/stl_util.h>
20 m_mode(std::move(mode)),
22 m_rho(std::move(
rho)),
23 m_public_key_bits_raw(
concat(m_t.to_bytes(), m_rho)),
24 m_H_public_key_bits_raw(m_mode.symmetric_primitives().H(m_public_key_bits_raw)) {}
39 auto u = at.pointwise_acc_montgomery(rv);
59 const auto& v = ct.
v();
67 return w.to_message();
KyberMessage indcpa_decrypt(Ciphertext ct) const
Ciphertext indcpa_encrypt(StrongSpan< const KyberMessage > m, StrongSpan< const KyberEncryptionRandomness > r) const
Kyber_PublicKeyInternal()=delete
static PolynomialMatrix generate(StrongSpan< const KyberSeedRho > seed, const bool transposed, const KyberConstants &mode)
static PolynomialVector getnoise_eta1(KyberSigmaOrEncryptionRandomness seed, uint8_t nonce, const KyberConstants &mode)
static Polynomial pointwise_acc_montgomery(const PolynomialVector &a, const PolynomialVector &b)
static PolynomialVector getnoise_eta2(StrongSpan< const KyberEncryptionRandomness > seed, uint8_t nonce, const KyberConstants &mode)
static Polynomial getnoise_eta2(StrongSpan< const KyberEncryptionRandomness > seed, uint8_t nonce, const KyberConstants &mode)
static Polynomial from_message(StrongSpan< const KyberMessage > msg)
constexpr auto concat(Rs &&... ranges)