Skip to content

Commit e842c8f

Browse files
authored
Merge pull request #1120 from pq-code-package/namespace-zetas
Namespacing: zetas -> mlk_zetas
2 parents ec75433 + 77d53e2 commit e842c8f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

mlkem/src/poly.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ void mlk_poly_mulcache_compute(mlk_poly_mulcache *x, const mlk_poly *a)
266266
invariant(i <= MLKEM_N / 4)
267267
invariant(array_abs_bound(x->coeffs, 0, 2 * i, MLKEM_Q)))
268268
{
269-
x->coeffs[2 * i + 0] = mlk_fqmul(a->coeffs[4 * i + 1], zetas[64 + i]);
270-
x->coeffs[2 * i + 1] = mlk_fqmul(a->coeffs[4 * i + 3], -zetas[64 + i]);
269+
x->coeffs[2 * i + 0] = mlk_fqmul(a->coeffs[4 * i + 1], mlk_zetas[64 + i]);
270+
x->coeffs[2 * i + 1] = mlk_fqmul(a->coeffs[4 * i + 3], -mlk_zetas[64 + i]);
271271
}
272272

273273
/*
@@ -378,7 +378,7 @@ __contract__(
378378
invariant(array_abs_bound(r, 0, start, layer * MLKEM_Q + MLKEM_Q))
379379
invariant(array_abs_bound(r, start, MLKEM_N, layer * MLKEM_Q)))
380380
{
381-
int16_t zeta = zetas[k++];
381+
int16_t zeta = mlk_zetas[k++];
382382
mlk_ntt_butterfly_block(r, zeta, start, len, layer * MLKEM_Q);
383383
}
384384
}
@@ -449,7 +449,7 @@ __contract__(
449449
invariant(2 * len * k + start == 2 * MLKEM_N - 2 * len))
450450
{
451451
unsigned j;
452-
int16_t zeta = zetas[k--];
452+
int16_t zeta = mlk_zetas[k--];
453453
for (j = start; j < start + len; j++)
454454
__loop__(
455455
invariant(start <= j && j <= start + len)

mlkem/src/zetas.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Table of zeta values used in the reference NTT and inverse NTT.
1616
* See autogen for details.
1717
*/
18-
static MLK_ALIGN const int16_t zetas[128] = {
18+
static MLK_ALIGN const int16_t mlk_zetas[128] = {
1919
-1044, -758, -359, -1517, 1493, 1422, 287, 202, -171, 622, 1577,
2020
182, 962, -1202, -1474, 1468, 573, -1325, 264, 383, -829, 1458,
2121
-1602, -130, -681, 1017, 732, 608, -1542, 411, -205, -1571, 1223,

scripts/autogen

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ def gen_c_zeta_file(dry_run=False):
519519
yield " * Table of zeta values used in the reference NTT and inverse NTT."
520520
yield " * See autogen for details."
521521
yield " */"
522-
yield "static MLK_ALIGN const int16_t zetas[128] = {"
522+
yield "static MLK_ALIGN const int16_t mlk_zetas[128] = {"
523523
yield from map(lambda t: str(t) + ",", gen_c_zetas())
524524
yield "};"
525525
yield ""

0 commit comments

Comments
 (0)