Botan 3.6.1
Crypto and TLS for C&
|
#include <kyber_round3_impl.h>
Public Member Functions | |
KyberInternalKeypair | decode_keypair (std::span< const uint8_t > buffer, KyberConstants mode) const override |
secure_vector< uint8_t > | encode_keypair (KyberInternalKeypair private_key) const override |
Definition at line 56 of file kyber_round3_impl.h.
|
overridevirtual |
Key decoding as specified in Crystals Kyber (Version 3.01), Algorithms 4 (CPAPKE.KeyGen()), and 7 (CCAKEM.KeyGen())
Public Key: pk := (encode(t) || rho) Secret Key: sk' := encode(s)
Expanded Secret Key: sk := (sk' || pk || H(pk) || z)
Implements Botan::Kyber_Keypair_Codec.
Definition at line 74 of file kyber_round3_impl.cpp.
References BOTAN_ARG_CHECK, BOTAN_ASSERT, BOTAN_ASSERT_NOMSG, Botan::BufferSlicer::copy(), Botan::Kyber_Algos::decode_polynomial_vector(), Botan::BufferSlicer::empty(), Botan::KyberConstants::polynomial_vector_bytes(), Botan::KyberConstants::public_key_bytes(), Botan::KyberConstants::PUBLIC_KEY_HASH_BYTES, Botan::CT::scoped_poison(), Botan::KyberConstants::SEED_BYTES, Botan::BufferSlicer::take(), and Botan::CT::unpoison_all().
|
overridevirtual |
Implements Botan::Kyber_Keypair_Codec.
Definition at line 109 of file kyber_round3_impl.cpp.
References BOTAN_ASSERT_NONNULL, Botan::concat(), Botan::Kyber_Algos::encode_polynomial_vector(), Botan::CT::scoped_poison(), and Botan::CT::unpoison().