@@ -332,11 +332,11 @@ void poly_uniform(poly *a, const uint8_t seed[MLDSA_SEEDBYTES + 2])
332
332
unsigned int ctr ;
333
333
unsigned int buflen = POLY_UNIFORM_NBLOCKS * STREAM128_BLOCKBYTES ;
334
334
MLD_ALIGN uint8_t buf [POLY_UNIFORM_NBLOCKS * STREAM128_BLOCKBYTES ];
335
- mld_xof_ctx state ;
335
+ mld_xof128_ctx state ;
336
336
337
- mld_xof_init (& state );
338
- mld_xof_absorb (& state , seed , MLDSA_SEEDBYTES + 2 );
339
- mld_xof_squeezeblocks (buf , POLY_UNIFORM_NBLOCKS , & state );
337
+ mld_xof128_init (& state );
338
+ mld_xof128_absorb (& state , seed , MLDSA_SEEDBYTES + 2 );
339
+ mld_xof128_squeezeblocks (buf , POLY_UNIFORM_NBLOCKS , & state );
340
340
341
341
ctr = rej_uniform (a -> coeffs , MLDSA_N , 0 , buf , buflen );
342
342
buflen = STREAM128_BLOCKBYTES ;
@@ -347,7 +347,7 @@ void poly_uniform(poly *a, const uint8_t seed[MLDSA_SEEDBYTES + 2])
347
347
invariant ((& state )-> pos <= SHAKE128_RATE )
348
348
invariant (array_bound (a -> coeffs , 0 , ctr , 0 , MLDSA_Q )))
349
349
{
350
- mld_xof_squeezeblocks (buf , 1 , & state );
350
+ mld_xof128_squeezeblocks (buf , 1 , & state );
351
351
ctr = rej_uniform (a -> coeffs , MLDSA_N , ctr , buf , buflen );
352
352
}
353
353
}
@@ -361,20 +361,20 @@ void poly_uniform_4x(poly *vec,
361
361
362
362
/* Tracks the number of coefficients we have already sampled */
363
363
unsigned ctr [4 ];
364
- mld_xof_x4_ctx state ;
364
+ mld_xof128_x4_ctx state ;
365
365
unsigned buflen ;
366
366
367
367
368
- mld_xof_x4_init (& state );
369
- mld_xof_x4_absorb (& state , seed , MLDSA_SEEDBYTES + 2 );
368
+ mld_xof128_x4_init (& state );
369
+ mld_xof128_x4_absorb (& state , seed , MLDSA_SEEDBYTES + 2 );
370
370
371
371
/*
372
372
* Initially, squeeze heuristic number of POLY_UNIFORM_NBLOCKS.
373
373
* This should generate the matrix entries with high probability.
374
374
*/
375
375
376
376
377
- mld_xof_x4_squeezeblocks (buf , POLY_UNIFORM_NBLOCKS , & state );
377
+ mld_xof128_x4_squeezeblocks (buf , POLY_UNIFORM_NBLOCKS , & state );
378
378
buflen = POLY_UNIFORM_NBLOCKS * STREAM128_BLOCKBYTES ;
379
379
ctr [0 ] = rej_uniform (vec [0 ].coeffs , MLDSA_N , 0 , buf [0 ], buflen );
380
380
ctr [1 ] = rej_uniform (vec [1 ].coeffs , MLDSA_N , 0 , buf [1 ], buflen );
@@ -390,13 +390,13 @@ void poly_uniform_4x(poly *vec,
390
390
while (ctr [0 ] < MLDSA_N || ctr [1 ] < MLDSA_N || ctr [2 ] < MLDSA_N ||
391
391
ctr [3 ] < MLDSA_N )
392
392
{
393
- mld_xof_x4_squeezeblocks (buf , 1 , & state );
393
+ mld_xof128_x4_squeezeblocks (buf , 1 , & state );
394
394
ctr [0 ] = rej_uniform (vec [0 ].coeffs , MLDSA_N , ctr [0 ], buf [0 ], buflen );
395
395
ctr [1 ] = rej_uniform (vec [1 ].coeffs , MLDSA_N , ctr [1 ], buf [1 ], buflen );
396
396
ctr [2 ] = rej_uniform (vec [2 ].coeffs , MLDSA_N , ctr [2 ], buf [2 ], buflen );
397
397
ctr [3 ] = rej_uniform (vec [3 ].coeffs , MLDSA_N , ctr [3 ], buf [3 ], buflen );
398
398
}
399
- mld_xof_x4_release (& state );
399
+ mld_xof128_x4_release (& state );
400
400
}
401
401
402
402
/*************************************************
0 commit comments