12#ifndef BOTAN_KYBER_INTERNAL_KEYS_H_
13#define BOTAN_KYBER_INTERNAL_KEYS_H_
15#include <botan/internal/ct_utils.h>
16#include <botan/internal/kyber_algos.h>
17#include <botan/internal/kyber_constants.h>
18#include <botan/internal/kyber_types.h>
70 m_mode(std::move(
mode)), m_s(std::move(
s)), m_seed(std::move(
seed)) {}
size_t ciphertext_bytes() const
byte length of an encoded ciphertext
virtual secure_vector< uint8_t > encode_keypair(KyberInternalKeypair keypair) const =0
virtual KyberInternalKeypair decode_keypair(std::span< const uint8_t > private_key, KyberConstants mode) const =0
virtual ~Kyber_Keypair_Codec()=default
KyberMessage indcpa_decrypt(StrongSpan< const KyberCompressedCiphertext > ct) const
const KyberConstants & mode() const
void _const_time_poison() const
const KyberPrivateKeySeed & seed() const
Kyber_PrivateKeyInternal(KyberConstants mode, KyberPolyVecNTT s, KyberPrivateKeySeed seed)
const KyberPolyVecNTT & s() const
Kyber_PrivateKeyInternal()=delete
const KyberImplicitRejectionValue & z() const
void _const_time_unpoison() const
const KyberHashedPublicKey & H_public_key_bits_raw() const
const KyberPolyVecNTT & t() const
KyberCompressedCiphertext indcpa_encrypt(const KyberMessage &m, const KyberEncryptionRandomness &r, const KyberPolyMat &At) const
const KyberSeedRho & rho() const
void indcpa_encrypt(StrongSpan< KyberCompressedCiphertext > out_ct, StrongSpan< const KyberMessage > m, StrongSpan< const KyberEncryptionRandomness > r, const KyberPolyMat &At) const
const KyberConstants & mode() const
const KyberSerializedPublicKey & public_key_bits_raw() const
Kyber_PublicKeyInternal()=delete
constexpr void unpoison_all(Ts &&... ts)
constexpr void poison_all(Ts &&... ts)
std::pair< std::shared_ptr< Kyber_PublicKeyInternal >, std::shared_ptr< Kyber_PrivateKeyInternal > > KyberInternalKeypair
std::vector< T, secure_allocator< T > > secure_vector
KyberImplicitRejectionValue z
std::optional< KyberSeedRandomness > d