Skip to content

Commit 9243b88

Browse files
mkannwischerhanno-becker
authored andcommitted
CBMC: Minor tweak to mld_pack_pk to fix proof
Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
1 parent 346d59e commit 9243b88

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mldsa/src/packing.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ void mld_pack_pk(uint8_t pk[CRYPTO_PUBLICKEYBYTES],
2323
unsigned int i;
2424

2525
mld_memcpy(pk, rho, MLDSA_SEEDBYTES);
26-
pk += MLDSA_SEEDBYTES;
27-
2826
for (i = 0; i < MLDSA_K; ++i)
2927
__loop__(
3028
assigns(i, memory_slice(pk, CRYPTO_PUBLICKEYBYTES))
3129
invariant(i <= MLDSA_K)
3230
)
3331
{
34-
mld_polyt1_pack(pk + i * MLDSA_POLYT1_PACKEDBYTES, &t1->vec[i]);
32+
mld_polyt1_pack(pk + MLDSA_SEEDBYTES + i * MLDSA_POLYT1_PACKEDBYTES,
33+
&t1->vec[i]);
3534
}
3635
}
3736

0 commit comments

Comments
 (0)