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

#include <dilithium_polynomials.h>

Public Member Functions

void add_polyvec (const PolynomialVector &v)
 
void cadd_q ()
 
void invntt_tomont ()
 
void ntt ()
 
PolynomialVectoroperator+= (const PolynomialVector &other)
 
PolynomialVectoroperator-= (const PolynomialVector &other)
 
 PolynomialVector ()=default
 
 PolynomialVector (size_t size)
 
bool polyvec_chknorm (size_t bound)
 
std::tuple< PolynomialVector, PolynomialVectorpolyvec_decompose (const DilithiumModeConstants &mode)
 
secure_vector< uint8_t > polyvec_pack_eta (const DilithiumModeConstants &mode) const
 
secure_vector< uint8_t > polyvec_pack_t0 () const
 
std::vector< uint8_t > polyvec_pack_t1 () const
 
std::vector< uint8_t > polyvec_pack_w1 (const DilithiumModeConstants &mode)
 
void polyvec_pointwise_poly_montgomery (PolynomialVector &r, const Polynomial &a)
 
void polyvec_shiftl ()
 
void polyvec_use_hint (PolynomialVector &w, const PolynomialVector &h, const DilithiumModeConstants &mode)
 
void polyvecl_uniform_gamma1 (const secure_vector< uint8_t > &seed, uint16_t nonce, const DilithiumModeConstants &mode)
 
void reduce ()
 

Static Public Member Functions

static void fill_polyvec_uniform_eta (PolynomialVector &v, const secure_vector< uint8_t > &seed, uint16_t nonce, const DilithiumModeConstants &mode)
 
static void fill_polyvecs_power2round (PolynomialVector &v1, PolynomialVector &v0, const PolynomialVector &v)
 
static size_t generate_hint_polyvec (PolynomialVector &h, const PolynomialVector &v0, const PolynomialVector &v1, const DilithiumModeConstants &mode)
 
static PolynomialVector generate_polyvec_matrix_pointwise_montgomery (const std::vector< PolynomialVector > &mat, const PolynomialVector &v, const DilithiumModeConstants &mode)
 
static Polynomial poly_uniform (const std::vector< uint8_t > &seed, uint16_t nonce, const DilithiumModeConstants &mode)
 
static void polyvec_pointwise_acc_montgomery (Polynomial &w, const PolynomialVector &u, const PolynomialVector &v)
 
static PolynomialVector polyvec_unpack_z (const uint8_t *packed_z, const DilithiumModeConstants &mode)
 
static PolynomialVector unpack_eta (std::span< const uint8_t > buffer, size_t size, const DilithiumModeConstants &mode)
 
static bool unpack_sig (std::array< uint8_t, DilithiumModeConstants::SEEDBYTES > &c, PolynomialVector &z, PolynomialVector &h, const std::vector< uint8_t > &sig, const DilithiumModeConstants &mode)
 
static PolynomialVector unpack_t0 (std::span< const uint8_t > buffer, const DilithiumModeConstants &mode)
 
static PolynomialVector unpack_t1 (std::span< const uint8_t > packed_t1, const DilithiumModeConstants &mode)
 

Public Attributes

std::vector< Polynomialm_vec
 

Detailed Description

Definition at line 952 of file dilithium_polynomials.h.

Constructor & Destructor Documentation

◆ PolynomialVector() [1/2]

Botan::Dilithium::PolynomialVector::PolynomialVector ( )
default

◆ PolynomialVector() [2/2]

Botan::Dilithium::PolynomialVector::PolynomialVector ( size_t size)
inlineexplicit

Definition at line 976 of file dilithium_polynomials.h.

976: m_vec(size) {}

Member Function Documentation

◆ add_polyvec()

void Botan::Dilithium::PolynomialVector::add_polyvec ( const PolynomialVector & v)
inline

Definition at line 1219 of file dilithium_polynomials.h.

1219 {
1220 BOTAN_ASSERT((m_vec.size() == v.m_vec.size()), "possible buffer overflow! Wrong PolynomialVector sizes.");
1221 for(size_t i = 0; i < m_vec.size(); ++i) {
1222 m_vec[i] += v.m_vec[i];
1223 }
1224 }
#define BOTAN_ASSERT(expr, assertion_made)
Definition assert.h:50

References BOTAN_ASSERT, and m_vec.

◆ cadd_q()

void Botan::Dilithium::PolynomialVector::cadd_q ( )
inline

Definition at line 1232 of file dilithium_polynomials.h.

1232 {
1233 for(auto& i : m_vec) {
1234 i.cadd_q();
1235 }
1236 }

References m_vec.

◆ fill_polyvec_uniform_eta()

static void Botan::Dilithium::PolynomialVector::fill_polyvec_uniform_eta ( PolynomialVector & v,
const secure_vector< uint8_t > & seed,
uint16_t nonce,
const DilithiumModeConstants & mode )
inlinestatic

Definition at line 1016 of file dilithium_polynomials.h.

1019 {
1020 for(size_t i = 0; i < v.m_vec.size(); ++i) {
1021 Polynomial::fill_poly_uniform_eta(v.m_vec[i], seed, nonce++, mode);
1022 }
1023 }
static void fill_poly_uniform_eta(Polynomial &a, const secure_vector< uint8_t > &seed, uint16_t nonce, const DilithiumModeConstants &mode)

References Botan::Dilithium::Polynomial::fill_poly_uniform_eta(), and m_vec.

Referenced by Botan::Dilithium_PrivateKey::Dilithium_PrivateKey().

◆ fill_polyvecs_power2round()

static void Botan::Dilithium::PolynomialVector::fill_polyvecs_power2round ( PolynomialVector & v1,
PolynomialVector & v0,
const PolynomialVector & v )
inlinestatic

Definition at line 1065 of file dilithium_polynomials.h.

1065 {
1066 BOTAN_ASSERT((v1.m_vec.size() == v0.m_vec.size()) && (v1.m_vec.size() == v.m_vec.size()),
1067 "possible buffer overflow! Wrong PolynomialVector sizes.");
1068 for(size_t i = 0; i < v1.m_vec.size(); ++i) {
1069 Polynomial::fill_polys_power2round(v1.m_vec[i], v0.m_vec[i], v.m_vec[i]);
1070 }
1071 }
static void fill_polys_power2round(Polynomial &a1, Polynomial &a0, const Polynomial &a)

References BOTAN_ASSERT, Botan::Dilithium::Polynomial::fill_polys_power2round(), and m_vec.

◆ generate_hint_polyvec()

static size_t Botan::Dilithium::PolynomialVector::generate_hint_polyvec ( PolynomialVector & h,
const PolynomialVector & v0,
const PolynomialVector & v1,
const DilithiumModeConstants & mode )
inlinestatic

Definition at line 1135 of file dilithium_polynomials.h.

1138 {
1139 size_t s = 0;
1140
1141 for(size_t i = 0; i < h.m_vec.size(); ++i) {
1142 s += Polynomial::generate_hint_polynomial(h.m_vec[i], v0.m_vec[i], v1.m_vec[i], mode);
1143 }
1144
1145 return s;
1146 }
static size_t generate_hint_polynomial(Polynomial &h, const Polynomial &a0, const Polynomial &a1, const DilithiumModeConstants &mode)

References Botan::Dilithium::Polynomial::generate_hint_polynomial(), and m_vec.

◆ generate_polyvec_matrix_pointwise_montgomery()

static PolynomialVector Botan::Dilithium::PolynomialVector::generate_polyvec_matrix_pointwise_montgomery ( const std::vector< PolynomialVector > & mat,
const PolynomialVector & v,
const DilithiumModeConstants & mode )
inlinestatic

Definition at line 1388 of file dilithium_polynomials.h.

1390 {
1391 PolynomialVector t(mode.k());
1392 for(size_t i = 0; i < mode.k(); ++i) {
1394 }
1395 return t;
1396 }
static void polyvec_pointwise_acc_montgomery(Polynomial &w, const PolynomialVector &u, const PolynomialVector &v)

References Botan::DilithiumModeConstants::k(), m_vec, and polyvec_pointwise_acc_montgomery().

◆ invntt_tomont()

void Botan::Dilithium::PolynomialVector::invntt_tomont ( )
inline

Definition at line 1204 of file dilithium_polynomials.h.

1204 {
1205 for(auto& i : m_vec) {
1206 i.poly_invntt_tomont();
1207 }
1208 }

References m_vec.

◆ ntt()

void Botan::Dilithium::PolynomialVector::ntt ( )
inline

Definition at line 1154 of file dilithium_polynomials.h.

1154 {
1155 for(auto& i : m_vec) {
1156 i.ntt();
1157 }
1158 }

References m_vec.

◆ operator+=()

PolynomialVector & Botan::Dilithium::PolynomialVector::operator+= ( const PolynomialVector & other)
inline

Definition at line 960 of file dilithium_polynomials.h.

960 {
961 BOTAN_ASSERT_NOMSG(m_vec.size() != other.m_vec.size());
962 for(size_t i = 0; i < m_vec.size(); ++i) {
963 this->m_vec[i] += other.m_vec[i];
964 }
965 return *this;
966 }
#define BOTAN_ASSERT_NOMSG(expr)
Definition assert.h:59

References BOTAN_ASSERT_NOMSG, and m_vec.

◆ operator-=()

PolynomialVector & Botan::Dilithium::PolynomialVector::operator-= ( const PolynomialVector & other)
inline

Definition at line 968 of file dilithium_polynomials.h.

968 {
969 BOTAN_ASSERT_NOMSG(m_vec.size() == other.m_vec.size());
970 for(size_t i = 0; i < this->m_vec.size(); ++i) {
971 this->m_vec[i] -= other.m_vec[i];
972 }
973 return *this;
974 }

References BOTAN_ASSERT_NOMSG, and m_vec.

◆ poly_uniform()

static Polynomial Botan::Dilithium::PolynomialVector::poly_uniform ( const std::vector< uint8_t > & seed,
uint16_t nonce,
const DilithiumModeConstants & mode )
inlinestatic

Definition at line 990 of file dilithium_polynomials.h.

992 {
993 Polynomial sample_poly;
994 size_t buflen = mode.poly_uniform_nblocks() * mode.stream128_blockbytes();
995
996 std::vector<uint8_t> buf(buflen + 2);
997
998 auto xof = mode.XOF_128(seed, nonce);
999 xof->output(std::span(buf).first(buflen));
1000
1001 size_t ctr = Polynomial::rej_uniform(sample_poly, 0, DilithiumModeConstants::N, buf.data(), buflen);
1002 size_t off;
1003 while(ctr < DilithiumModeConstants::N) {
1004 off = buflen % 3;
1005 for(size_t i = 0; i < off; ++i) {
1006 buf[i] = buf[buflen - off + i];
1007 }
1008
1009 xof->output(std::span(buf).subspan(off, mode.stream128_blockbytes()));
1010 buflen = mode.stream128_blockbytes() + off;
1011 ctr += Polynomial::rej_uniform(sample_poly, ctr, DilithiumModeConstants::N - ctr, buf.data(), buflen);
1012 }
1013 return sample_poly;
1014 }
static size_t rej_uniform(Polynomial &p, size_t position, size_t len, const uint8_t *buf, size_t buflen)

References Botan::DilithiumModeConstants::N, Botan::DilithiumModeConstants::poly_uniform_nblocks(), Botan::Dilithium::Polynomial::rej_uniform(), Botan::DilithiumModeConstants::stream128_blockbytes(), and Botan::DilithiumModeConstants::XOF_128().

Referenced by Botan::Dilithium::PolynomialMatrix::generate_matrix().

◆ polyvec_chknorm()

bool Botan::Dilithium::PolynomialVector::polyvec_chknorm ( size_t bound)
inline

Definition at line 1264 of file dilithium_polynomials.h.

1264 {
1265 for(auto& i : m_vec) {
1266 if(Polynomial::poly_chknorm(i, bound)) {
1267 return true;
1268 }
1269 }
1270 return false;
1271 }
static bool poly_chknorm(const Polynomial &a, size_t B)

References m_vec, and Botan::Dilithium::Polynomial::poly_chknorm().

◆ polyvec_decompose()

std::tuple< PolynomialVector, PolynomialVector > Botan::Dilithium::PolynomialVector::polyvec_decompose ( const DilithiumModeConstants & mode)
inline

Definition at line 1175 of file dilithium_polynomials.h.

1175 {
1176 PolynomialVector v1(mode.k());
1177 PolynomialVector v0(mode.k());
1178
1179 for(size_t i = 0; i < m_vec.size(); ++i) {
1180 m_vec[i].poly_decompose(v1.m_vec[i], v0.m_vec[i], mode);
1181 }
1182 return std::make_tuple(v1, v0);
1183 }

References Botan::DilithiumModeConstants::k(), and m_vec.

◆ polyvec_pack_eta()

secure_vector< uint8_t > Botan::Dilithium::PolynomialVector::polyvec_pack_eta ( const DilithiumModeConstants & mode) const
inline

Definition at line 1302 of file dilithium_polynomials.h.

1302 {
1303 secure_vector<uint8_t> packed_eta(mode.polyeta_packedbytes() * m_vec.size());
1304 for(size_t i = 0; i < m_vec.size(); ++i) {
1305 m_vec[i].polyeta_pack(packed_eta.data() + mode.polyeta_packedbytes() * i, mode);
1306 }
1307 return packed_eta;
1308 }
std::vector< T, secure_allocator< T > > secure_vector
Definition secmem.h:61

References m_vec, and Botan::DilithiumModeConstants::polyeta_packedbytes().

◆ polyvec_pack_t0()

secure_vector< uint8_t > Botan::Dilithium::PolynomialVector::polyvec_pack_t0 ( ) const
inline

Definition at line 1323 of file dilithium_polynomials.h.

1323 {
1325 for(size_t i = 0; i < m_vec.size(); ++i) {
1326 m_vec[i].polyt0_pack(packed_t0.data() + i * DilithiumModeConstants::POLYT0_PACKEDBYTES);
1327 }
1328 return packed_t0;
1329 }

References m_vec, and Botan::DilithiumModeConstants::POLYT0_PACKEDBYTES.

◆ polyvec_pack_t1()

std::vector< uint8_t > Botan::Dilithium::PolynomialVector::polyvec_pack_t1 ( ) const
inline

Definition at line 1343 of file dilithium_polynomials.h.

1343 {
1344 std::vector<uint8_t> packed_t1(m_vec.size() * DilithiumModeConstants::POLYT1_PACKEDBYTES);
1345 for(size_t i = 0; i < m_vec.size(); ++i) {
1346 m_vec[i].polyt1_pack(packed_t1.data() + i * DilithiumModeConstants::POLYT1_PACKEDBYTES);
1347 }
1348 return packed_t1;
1349 }

References m_vec, and Botan::DilithiumModeConstants::POLYT1_PACKEDBYTES.

◆ polyvec_pack_w1()

std::vector< uint8_t > Botan::Dilithium::PolynomialVector::polyvec_pack_w1 ( const DilithiumModeConstants & mode)
inline

Definition at line 1363 of file dilithium_polynomials.h.

1363 {
1364 std::vector<uint8_t> packed_w1(mode.polyw1_packedbytes() * m_vec.size());
1365 for(size_t i = 0; i < m_vec.size(); ++i) {
1366 m_vec[i].polyw1_pack(packed_w1.data() + i * mode.polyw1_packedbytes(), mode);
1367 }
1368 return packed_w1;
1369 }

References m_vec, and Botan::DilithiumModeConstants::polyw1_packedbytes().

◆ polyvec_pointwise_acc_montgomery()

static void Botan::Dilithium::PolynomialVector::polyvec_pointwise_acc_montgomery ( Polynomial & w,
const PolynomialVector & u,
const PolynomialVector & v )
inlinestatic

Definition at line 1036 of file dilithium_polynomials.h.

1038 {
1039 BOTAN_ASSERT_NOMSG(u.m_vec.size() == v.m_vec.size());
1040 BOTAN_ASSERT_NOMSG(!u.m_vec.empty() && !v.m_vec.empty());
1041
1042 u.m_vec[0].poly_pointwise_montgomery(w, v.m_vec[0]);
1043
1044 for(size_t i = 1; i < v.m_vec.size(); ++i) {
1045 Polynomial t;
1046 u.m_vec[i].poly_pointwise_montgomery(t, v.m_vec[i]);
1047 w += t;
1048 }
1049 }

References BOTAN_ASSERT_NOMSG, and m_vec.

Referenced by generate_polyvec_matrix_pointwise_montgomery().

◆ polyvec_pointwise_poly_montgomery()

void Botan::Dilithium::PolynomialVector::polyvec_pointwise_poly_montgomery ( PolynomialVector & r,
const Polynomial & a )
inline

Definition at line 1247 of file dilithium_polynomials.h.

1247 {
1248 for(size_t i = 0; i < m_vec.size(); ++i) {
1249 m_vec[i].poly_pointwise_montgomery(r.m_vec[i], a);
1250 }
1251 }

References m_vec.

◆ polyvec_shiftl()

void Botan::Dilithium::PolynomialVector::polyvec_shiftl ( )
inline

Definition at line 1279 of file dilithium_polynomials.h.

1279 {
1280 for(auto& i : m_vec) {
1281 i.poly_shiftl();
1282 }
1283 }

References m_vec.

◆ polyvec_unpack_z()

static PolynomialVector Botan::Dilithium::PolynomialVector::polyvec_unpack_z ( const uint8_t * packed_z,
const DilithiumModeConstants & mode )
inlinestatic

Definition at line 1371 of file dilithium_polynomials.h.

1371 {
1372 PolynomialVector z(mode.l());
1373 for(size_t i = 0; i < z.m_vec.size(); ++i) {
1374 Polynomial::polyz_unpack(z.m_vec[i], packed_z + i * mode.polyz_packedbytes(), mode);
1375 }
1376 return z;
1377 }
static void polyz_unpack(Polynomial &r, const uint8_t *a, const DilithiumModeConstants &mode)

References Botan::DilithiumModeConstants::l(), m_vec, Botan::DilithiumModeConstants::polyz_packedbytes(), and Botan::Dilithium::Polynomial::polyz_unpack().

◆ polyvec_use_hint()

void Botan::Dilithium::PolynomialVector::polyvec_use_hint ( PolynomialVector & w,
const PolynomialVector & h,
const DilithiumModeConstants & mode )
inline

Definition at line 1296 of file dilithium_polynomials.h.

1296 {
1297 for(size_t i = 0; i < w.m_vec.size(); ++i) {
1298 Polynomial::poly_use_hint(w.m_vec[i], m_vec[i], h.m_vec[i], mode);
1299 }
1300 }
static void poly_use_hint(Polynomial &b, const Polynomial &a, const Polynomial &h, const DilithiumModeConstants &mode)

References m_vec, and Botan::Dilithium::Polynomial::poly_use_hint().

◆ polyvecl_uniform_gamma1()

void Botan::Dilithium::PolynomialVector::polyvecl_uniform_gamma1 ( const secure_vector< uint8_t > & seed,
uint16_t nonce,
const DilithiumModeConstants & mode )
inline

Definition at line 1238 of file dilithium_polynomials.h.

1240 {
1241 BOTAN_ASSERT_NOMSG(m_vec.size() <= std::numeric_limits<uint16_t>::max());
1242 for(uint16_t i = 0; i < static_cast<uint16_t>(this->m_vec.size()); ++i) {
1243 m_vec[i].poly_uniform_gamma1(seed, mode.l() * nonce + i, mode);
1244 }
1245 }

References BOTAN_ASSERT_NOMSG, Botan::DilithiumModeConstants::l(), and m_vec.

◆ reduce()

void Botan::Dilithium::PolynomialVector::reduce ( )
inline

Definition at line 1191 of file dilithium_polynomials.h.

1191 {
1192 for(auto& i : m_vec) {
1193 i.poly_reduce();
1194 }
1195 }

References m_vec.

◆ unpack_eta()

static PolynomialVector Botan::Dilithium::PolynomialVector::unpack_eta ( std::span< const uint8_t > buffer,
size_t size,
const DilithiumModeConstants & mode )
inlinestatic

Definition at line 1310 of file dilithium_polynomials.h.

1312 {
1313 BOTAN_ARG_CHECK(buffer.size() == mode.polyeta_packedbytes() * size, "Invalid buffer size");
1314
1315 PolynomialVector pv(size);
1316 for(size_t i = 0; i < pv.m_vec.size(); ++i) {
1317 pv.m_vec[i] = Polynomial::polyeta_unpack(
1318 buffer.subspan(i * mode.polyeta_packedbytes(), mode.polyeta_packedbytes()), mode);
1319 }
1320 return pv;
1321 }
#define BOTAN_ARG_CHECK(expr, msg)
Definition assert.h:29
static Polynomial polyeta_unpack(std::span< const uint8_t > a, const DilithiumModeConstants &mode)

References BOTAN_ARG_CHECK, m_vec, Botan::DilithiumModeConstants::polyeta_packedbytes(), and Botan::Dilithium::Polynomial::polyeta_unpack().

◆ unpack_sig()

static bool Botan::Dilithium::PolynomialVector::unpack_sig ( std::array< uint8_t, DilithiumModeConstants::SEEDBYTES > & c,
PolynomialVector & z,
PolynomialVector & h,
const std::vector< uint8_t > & sig,
const DilithiumModeConstants & mode )
inlinestatic

Definition at line 1073 of file dilithium_polynomials.h.

1077 {
1078 //const auto& mode = m_pub_key.m_public->mode();
1079 BOTAN_ASSERT(sig.size() == mode.crypto_bytes(), "invalid signature size");
1080 size_t position = 0;
1081
1082 std::copy(sig.begin(), sig.begin() + c.size(), c.begin());
1083
1085
1086 for(size_t i = 0; i < mode.l(); ++i) {
1087 Polynomial::polyz_unpack(z.m_vec[i], sig.data() + position + i * mode.polyz_packedbytes(), mode);
1088 }
1089 position += mode.l() * mode.polyz_packedbytes();
1090
1091 /* Decode h */
1092 size_t k = 0;
1093 for(size_t i = 0; i < mode.k(); ++i) {
1094 for(size_t j = 0; j < DilithiumModeConstants::N; ++j) {
1095 h.m_vec[i].m_coeffs[j] = 0;
1096 }
1097
1098 if(sig[position + mode.omega() + i] < k || sig[position + mode.omega() + i] > mode.omega()) {
1099 return true;
1100 }
1101
1102 for(size_t j = k; j < sig[position + mode.omega() + i]; ++j) {
1103 /* Coefficients are ordered for strong unforgeability */
1104 if(j > k && sig[position + j] <= sig[position + j - 1]) {
1105 return true;
1106 }
1107 h.m_vec[i].m_coeffs[sig[position + j]] = 1;
1108 }
1109
1110 k = sig[position + mode.omega() + i];
1111 }
1112
1113 /* Extra indices are zero for strong unforgeability */
1114 for(size_t j = k; j < mode.omega(); ++j) {
1115 if(sig[position + j]) {
1116 return true;
1117 }
1118 }
1119
1120 return false;
1121 }

References BOTAN_ASSERT, Botan::DilithiumModeConstants::crypto_bytes(), Botan::DilithiumModeConstants::k(), Botan::DilithiumModeConstants::l(), m_vec, Botan::DilithiumModeConstants::N, Botan::DilithiumModeConstants::omega(), Botan::DilithiumModeConstants::polyz_packedbytes(), Botan::Dilithium::Polynomial::polyz_unpack(), and Botan::DilithiumModeConstants::SEEDBYTES.

◆ unpack_t0()

static PolynomialVector Botan::Dilithium::PolynomialVector::unpack_t0 ( std::span< const uint8_t > buffer,
const DilithiumModeConstants & mode )
inlinestatic

Definition at line 1331 of file dilithium_polynomials.h.

1331 {
1332 BOTAN_ARG_CHECK(static_cast<int32_t>(buffer.size()) == DilithiumModeConstants::POLYT0_PACKEDBYTES * mode.k(),
1333 "Invalid buffer size");
1334
1335 PolynomialVector t0(mode.k());
1336 for(size_t i = 0; i < t0.m_vec.size(); ++i) {
1339 }
1340 return t0;
1341 }
static Polynomial polyt0_unpack(std::span< const uint8_t > a)

References BOTAN_ARG_CHECK, Botan::DilithiumModeConstants::k(), m_vec, Botan::DilithiumModeConstants::POLYT0_PACKEDBYTES, and Botan::Dilithium::Polynomial::polyt0_unpack().

◆ unpack_t1()

static PolynomialVector Botan::Dilithium::PolynomialVector::unpack_t1 ( std::span< const uint8_t > packed_t1,
const DilithiumModeConstants & mode )
inlinestatic

Definition at line 1351 of file dilithium_polynomials.h.

1351 {
1353 static_cast<int32_t>(packed_t1.size()) == DilithiumModeConstants::POLYT1_PACKEDBYTES * mode.k(),
1354 "Invalid buffer size");
1355
1356 PolynomialVector t1(mode.k());
1357 for(size_t i = 0; i < t1.m_vec.size(); ++i) {
1358 Polynomial::polyt1_unpack(t1.m_vec[i], packed_t1.data() + i * DilithiumModeConstants::POLYT1_PACKEDBYTES);
1359 }
1360 return t1;
1361 }
static void polyt1_unpack(Polynomial &r, const uint8_t *a)

References BOTAN_ARG_CHECK, Botan::DilithiumModeConstants::k(), m_vec, Botan::DilithiumModeConstants::POLYT1_PACKEDBYTES, and Botan::Dilithium::Polynomial::polyt1_unpack().

Member Data Documentation

◆ m_vec


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