Botan 3.5.0
Crypto and TLS for C&
Botan::Dilithium::PolynomialMatrix Class Reference

#include <dilithium_polynomials.h>

Public Member Functions

const std::vector< PolynomialVector > & get_matrix () const
 
 PolynomialMatrix ()=delete
 

Static Public Member Functions

static PolynomialMatrix generate_matrix (const std::vector< uint8_t > &rho, const DilithiumModeConstants &mode)
 

Detailed Description

Definition at line 1399 of file dilithium_polynomials.h.

Constructor & Destructor Documentation

◆ PolynomialMatrix()

Botan::Dilithium::PolynomialMatrix::PolynomialMatrix ( )
delete

Member Function Documentation

◆ generate_matrix()

static PolynomialMatrix Botan::Dilithium::PolynomialMatrix::generate_matrix ( const std::vector< uint8_t > & rho,
const DilithiumModeConstants & mode )
inlinestatic

Definition at line 1421 of file dilithium_polynomials.h.

1421 {
1422 BOTAN_ASSERT(rho.size() >= DilithiumModeConstants::SEEDBYTES, "wrong byte length for rho/seed");
1423
1424 PolynomialMatrix matrix(mode);
1425 for(uint16_t i = 0; i < mode.k(); ++i) {
1426 for(uint16_t j = 0; j < mode.l(); ++j) {
1427 matrix.m_mat[i].m_vec[j] = PolynomialVector::poly_uniform(rho, (i << 8) + j, mode);
1428 }
1429 }
1430 return matrix;
1431 }
#define BOTAN_ASSERT(expr, assertion_made)
Definition assert.h:50
static Polynomial poly_uniform(const std::vector< uint8_t > &seed, uint16_t nonce, const DilithiumModeConstants &mode)
constexpr T rho(T x)
Definition rotate.h:51

References BOTAN_ASSERT, Botan::DilithiumModeConstants::k(), Botan::DilithiumModeConstants::l(), Botan::Dilithium::PolynomialVector::poly_uniform(), Botan::rho(), and Botan::DilithiumModeConstants::SEEDBYTES.

◆ get_matrix()

const std::vector< PolynomialVector > & Botan::Dilithium::PolynomialMatrix::get_matrix ( ) const
inline

Definition at line 1433 of file dilithium_polynomials.h.

1433{ return m_mat; }

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