Botan 3.5.0
Crypto and TLS for C&
Botan::Kyber_PrivateKeyInternal Class Reference

#include <kyber_keys.h>

Public Member Functions

KyberMessage indcpa_decrypt (Ciphertext ct) const
 
 Kyber_PrivateKeyInternal ()=delete
 
 Kyber_PrivateKeyInternal (KyberConstants mode, PolynomialVector s, KyberImplicitRejectionValue z)
 
const KyberConstantsmode () const
 
PolynomialVectors ()
 
const PolynomialVectors () const
 
const KyberImplicitRejectionValuez () const
 

Detailed Description

Definition at line 50 of file kyber_keys.h.

Constructor & Destructor Documentation

◆ Kyber_PrivateKeyInternal() [1/2]

Botan::Kyber_PrivateKeyInternal::Kyber_PrivateKeyInternal ( KyberConstants mode,
PolynomialVector s,
KyberImplicitRejectionValue z )
inline

Definition at line 52 of file kyber_keys.h.

52 :
53 m_mode(std::move(mode)), m_s(std::move(s)), m_z(std::move(z)) {}
const KyberConstants & mode() const
Definition kyber_keys.h:63
PolynomialVector & s()
Definition kyber_keys.h:57
const KyberImplicitRejectionValue & z() const
Definition kyber_keys.h:61

◆ Kyber_PrivateKeyInternal() [2/2]

Botan::Kyber_PrivateKeyInternal::Kyber_PrivateKeyInternal ( )
delete

Member Function Documentation

◆ indcpa_decrypt()

KyberMessage Botan::Kyber_PrivateKeyInternal::indcpa_decrypt ( Ciphertext ct) const

NIST FIPS 203 IPD, Algorithm 14 (K-PKE.Decrypt)

Definition at line 57 of file kyber_keys.cpp.

57 {
58 auto& u = ct.b();
59 const auto& v = ct.v();
60
61 u.ntt();
63 w.invntt_tomont();
64
65 w -= v;
66 w.reduce();
67 return w.to_message();
68}
static Polynomial pointwise_acc_montgomery(const PolynomialVector &a, const PolynomialVector &b)

References Botan::Ciphertext::b(), Botan::Polynomial::ntt(), Botan::PolynomialVector::pointwise_acc_montgomery(), and Botan::Ciphertext::v().

◆ mode()

const KyberConstants & Botan::Kyber_PrivateKeyInternal::mode ( ) const
inline

Definition at line 63 of file kyber_keys.h.

63{ return m_mode; }

◆ s() [1/2]

PolynomialVector & Botan::Kyber_PrivateKeyInternal::s ( )
inline

Definition at line 57 of file kyber_keys.h.

57{ return m_s; }

◆ s() [2/2]

const PolynomialVector & Botan::Kyber_PrivateKeyInternal::s ( ) const
inline

Definition at line 59 of file kyber_keys.h.

59{ return m_s; }

◆ z()

const KyberImplicitRejectionValue & Botan::Kyber_PrivateKeyInternal::z ( ) const
inline

Definition at line 61 of file kyber_keys.h.

61{ return m_z; }

The documentation for this class was generated from the following files: