Skip to content

Commit c9509d5

Browse files
committed
lowram: Per-row t0/t1 computation in keygen
Replace mld_compute_t0_t1_tr_from_sk_components with the per-row mld_compute_t0k_t1k. Both keygen and pk_from_sk now process one row at a time, packing t1[k] into pk and t0[k] into sk immediately, which eliminates the full polyveck allocations for t0 and t1. To express this cleanly, refactor mld_polyvecl_pointwise_acc_montgomery to take (mat, k, v) instead of (u, v) and move it into polyvec_lazy with eager and lazy variants. Add per-row pack helpers mld_pack_sk_t0 / mld_pack_pk_t1, and split mld_pack_sk_rho_key_tr_s2_t0 to drop the t0 packing. Drop now-dead mld_polyveck_add, mld_polyveck_pack_t0, mld_polyveck_power2round and mld_pack_pk along with their CBMC proofs. Update the affected CBMC proofs. Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
1 parent fec57f2 commit c9509d5

36 files changed

Lines changed: 541 additions & 818 deletions

File tree

integration/opentitan/reduce_alloc.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ diff --git a/sw/device/lib/crypto/include/mldsa.h b/sw/device/lib/crypto/include
1010
- kOtcryptoMldsa44WorkBufferKeypairWords = 32992 / sizeof(uint32_t),
1111
- kOtcryptoMldsa44WorkBufferSignWords = 32448 / sizeof(uint32_t),
1212
- kOtcryptoMldsa44WorkBufferVerifyWords = 22464 / sizeof(uint32_t),
13-
+ kOtcryptoMldsa44WorkBufferKeypairWords = 14624 / sizeof(uint32_t),
13+
+ kOtcryptoMldsa44WorkBufferKeypairWords = 12576 / sizeof(uint32_t),
1414
+ kOtcryptoMldsa44WorkBufferSignWords = 18208 / sizeof(uint32_t),
1515
+ kOtcryptoMldsa44WorkBufferVerifyWords = 20416 / sizeof(uint32_t),
1616

1717
- kOtcryptoMldsa65WorkBufferKeypairWords = 46304 / sizeof(uint32_t),
1818
- kOtcryptoMldsa65WorkBufferSignWords = 44768 / sizeof(uint32_t),
1919
- kOtcryptoMldsa65WorkBufferVerifyWords = 30720 / sizeof(uint32_t),
20-
+ kOtcryptoMldsa65WorkBufferKeypairWords = 20768 / sizeof(uint32_t),
20+
+ kOtcryptoMldsa65WorkBufferKeypairWords = 15648 / sizeof(uint32_t),
2121
+ kOtcryptoMldsa65WorkBufferSignWords = 23360 / sizeof(uint32_t),
2222
+ kOtcryptoMldsa65WorkBufferVerifyWords = 27648 / sizeof(uint32_t),
2323

2424
- kOtcryptoMldsa87WorkBufferKeypairWords = 62688 / sizeof(uint32_t),
2525
- kOtcryptoMldsa87WorkBufferSignWords = 59104 / sizeof(uint32_t),
2626
- kOtcryptoMldsa87WorkBufferVerifyWords = 41216 / sizeof(uint32_t),
27-
+ kOtcryptoMldsa87WorkBufferKeypairWords = 26912 / sizeof(uint32_t),
27+
+ kOtcryptoMldsa87WorkBufferKeypairWords = 19744 / sizeof(uint32_t),
2828
+ kOtcryptoMldsa87WorkBufferSignWords = 29504 / sizeof(uint32_t),
2929
+ kOtcryptoMldsa87WorkBufferVerifyWords = 36096 / sizeof(uint32_t),
3030
};

mldsa/mldsa_native.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,13 @@
257257
#undef mld_memset
258258
/* mldsa/src/packing.h */
259259
#undef MLD_PACKING_H
260-
#undef mld_pack_pk
260+
#undef mld_pack_pk_t1
261261
#undef mld_pack_sig_c
262262
#undef mld_pack_sig_h_poly
263263
#undef mld_pack_sig_z
264-
#undef mld_pack_sk_rho_key_tr_s2_t0
264+
#undef mld_pack_sk_rho_key_tr_s2
265265
#undef mld_pack_sk_s1
266+
#undef mld_pack_sk_t0
266267
#undef mld_unpack_pk
267268
#undef mld_unpack_sig
268269
#undef mld_unpack_sk
@@ -313,17 +314,14 @@
313314
/* mldsa/src/polyvec.h */
314315
#undef MLD_POLYVEC_H
315316
#undef mld_polyveck
316-
#undef mld_polyveck_add
317317
#undef mld_polyveck_caddq
318318
#undef mld_polyveck_chknorm
319319
#undef mld_polyveck_decompose
320320
#undef mld_polyveck_invntt_tomont
321321
#undef mld_polyveck_ntt
322322
#undef mld_polyveck_pack_eta
323-
#undef mld_polyveck_pack_t0
324323
#undef mld_polyveck_pack_w1
325324
#undef mld_polyveck_pointwise_poly_montgomery
326-
#undef mld_polyveck_power2round
327325
#undef mld_polyveck_reduce
328326
#undef mld_polyveck_shiftl
329327
#undef mld_polyveck_sub
@@ -334,7 +332,6 @@
334332
#undef mld_polyvecl_chknorm
335333
#undef mld_polyvecl_ntt
336334
#undef mld_polyvecl_pack_eta
337-
#undef mld_polyvecl_pointwise_acc_montgomery
338335
#undef mld_polyvecl_uniform_gamma1
339336
#undef mld_polyvecl_unpack_eta
340337
#undef mld_polyvecl_unpack_z
@@ -352,6 +349,9 @@
352349
#undef mld_polyvec_matrix_pointwise_montgomery
353350
#undef mld_polyvec_matrix_pointwise_montgomery_eager
354351
#undef mld_polyvec_matrix_pointwise_montgomery_lazy
352+
#undef mld_polyvecl_pointwise_acc_montgomery
353+
#undef mld_polyvecl_pointwise_acc_montgomery_eager
354+
#undef mld_polyvecl_pointwise_acc_montgomery_lazy
355355
#undef mld_sk_s1hat
356356
#undef mld_sk_s1hat_eager
357357
#undef mld_sk_s1hat_get_poly

mldsa/mldsa_native.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -912,35 +912,35 @@ int MLD_API_NAMESPACE(pk_from_sk)(
912912
*/
913913
/* check-magic: off */
914914
#if defined(MLD_API_LEGACY_CONFIG) || !defined(MLD_CONFIG_REDUCE_RAM)
915-
#define MLD_TOTAL_ALLOC_44_KEYPAIR_NO_PCT 33024
915+
#define MLD_TOTAL_ALLOC_44_KEYPAIR_NO_PCT 26880
916916
#define MLD_TOTAL_ALLOC_44_KEYPAIR_PCT 52544
917-
#define MLD_TOTAL_ALLOC_44_PK_FROM_SK 41152
917+
#define MLD_TOTAL_ALLOC_44_PK_FROM_SK 27232
918918
#define MLD_TOTAL_ALLOC_44_SIGN 48800
919919
#define MLD_TOTAL_ALLOC_44_VERIFY 38816
920-
#define MLD_TOTAL_ALLOC_65_KEYPAIR_NO_PCT 54528
920+
#define MLD_TOTAL_ALLOC_65_KEYPAIR_NO_PCT 44288
921921
#define MLD_TOTAL_ALLOC_65_KEYPAIR_PCT 79712
922-
#define MLD_TOTAL_ALLOC_65_PK_FROM_SK 65728
922+
#define MLD_TOTAL_ALLOC_65_PK_FROM_SK 44640
923923
#define MLD_TOTAL_ALLOC_65_SIGN 74432
924924
#define MLD_TOTAL_ALLOC_65_VERIFY 62432
925-
#define MLD_TOTAL_ALLOC_87_KEYPAIR_NO_PCT 89344
925+
#define MLD_TOTAL_ALLOC_87_KEYPAIR_NO_PCT 75008
926926
#define MLD_TOTAL_ALLOC_87_KEYPAIR_PCT 122624
927-
#define MLD_TOTAL_ALLOC_87_PK_FROM_SK 104640
927+
#define MLD_TOTAL_ALLOC_87_PK_FROM_SK 75360
928928
#define MLD_TOTAL_ALLOC_87_SIGN 115392
929929
#define MLD_TOTAL_ALLOC_87_VERIFY 99552
930930
#else /* MLD_API_LEGACY_CONFIG || !MLD_CONFIG_REDUCE_RAM */
931-
#define MLD_TOTAL_ALLOC_44_KEYPAIR_NO_PCT 14624
931+
#define MLD_TOTAL_ALLOC_44_KEYPAIR_NO_PCT 12576
932932
#define MLD_TOTAL_ALLOC_44_KEYPAIR_PCT 24160
933-
#define MLD_TOTAL_ALLOC_44_PK_FROM_SK 26848
933+
#define MLD_TOTAL_ALLOC_44_PK_FROM_SK 12928
934934
#define MLD_TOTAL_ALLOC_44_SIGN 18208
935935
#define MLD_TOTAL_ALLOC_44_VERIFY 20416
936-
#define MLD_TOTAL_ALLOC_65_KEYPAIR_NO_PCT 20768
936+
#define MLD_TOTAL_ALLOC_65_KEYPAIR_NO_PCT 15648
937937
#define MLD_TOTAL_ALLOC_65_KEYPAIR_PCT 32928
938-
#define MLD_TOTAL_ALLOC_65_PK_FROM_SK 37088
938+
#define MLD_TOTAL_ALLOC_65_PK_FROM_SK 16000
939939
#define MLD_TOTAL_ALLOC_65_SIGN 23360
940940
#define MLD_TOTAL_ALLOC_65_VERIFY 27648
941-
#define MLD_TOTAL_ALLOC_87_KEYPAIR_NO_PCT 26912
941+
#define MLD_TOTAL_ALLOC_87_KEYPAIR_NO_PCT 19744
942942
#define MLD_TOTAL_ALLOC_87_KEYPAIR_PCT 43328
943-
#define MLD_TOTAL_ALLOC_87_PK_FROM_SK 49376
943+
#define MLD_TOTAL_ALLOC_87_PK_FROM_SK 20096
944944
#define MLD_TOTAL_ALLOC_87_SIGN 29504
945945
#define MLD_TOTAL_ALLOC_87_VERIFY 36096
946946
#endif /* !(MLD_API_LEGACY_CONFIG || !MLD_CONFIG_REDUCE_RAM) */

mldsa/mldsa_native_asm.S

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,13 @@
261261
#undef mld_memset
262262
/* mldsa/src/packing.h */
263263
#undef MLD_PACKING_H
264-
#undef mld_pack_pk
264+
#undef mld_pack_pk_t1
265265
#undef mld_pack_sig_c
266266
#undef mld_pack_sig_h_poly
267267
#undef mld_pack_sig_z
268-
#undef mld_pack_sk_rho_key_tr_s2_t0
268+
#undef mld_pack_sk_rho_key_tr_s2
269269
#undef mld_pack_sk_s1
270+
#undef mld_pack_sk_t0
270271
#undef mld_unpack_pk
271272
#undef mld_unpack_sig
272273
#undef mld_unpack_sk
@@ -317,17 +318,14 @@
317318
/* mldsa/src/polyvec.h */
318319
#undef MLD_POLYVEC_H
319320
#undef mld_polyveck
320-
#undef mld_polyveck_add
321321
#undef mld_polyveck_caddq
322322
#undef mld_polyveck_chknorm
323323
#undef mld_polyveck_decompose
324324
#undef mld_polyveck_invntt_tomont
325325
#undef mld_polyveck_ntt
326326
#undef mld_polyveck_pack_eta
327-
#undef mld_polyveck_pack_t0
328327
#undef mld_polyveck_pack_w1
329328
#undef mld_polyveck_pointwise_poly_montgomery
330-
#undef mld_polyveck_power2round
331329
#undef mld_polyveck_reduce
332330
#undef mld_polyveck_shiftl
333331
#undef mld_polyveck_sub
@@ -338,7 +336,6 @@
338336
#undef mld_polyvecl_chknorm
339337
#undef mld_polyvecl_ntt
340338
#undef mld_polyvecl_pack_eta
341-
#undef mld_polyvecl_pointwise_acc_montgomery
342339
#undef mld_polyvecl_uniform_gamma1
343340
#undef mld_polyvecl_unpack_eta
344341
#undef mld_polyvecl_unpack_z
@@ -356,6 +353,9 @@
356353
#undef mld_polyvec_matrix_pointwise_montgomery
357354
#undef mld_polyvec_matrix_pointwise_montgomery_eager
358355
#undef mld_polyvec_matrix_pointwise_montgomery_lazy
356+
#undef mld_polyvecl_pointwise_acc_montgomery
357+
#undef mld_polyvecl_pointwise_acc_montgomery_eager
358+
#undef mld_polyvecl_pointwise_acc_montgomery_lazy
359359
#undef mld_sk_s1hat
360360
#undef mld_sk_s1hat_eager
361361
#undef mld_sk_s1hat_get_poly

mldsa/src/packing.c

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,6 @@
1616
#define mld_unpack_hints MLD_ADD_PARAM_SET(mld_unpack_hints)
1717
/* End of parameter set namespacing */
1818

19-
MLD_INTERNAL_API
20-
void mld_pack_pk(uint8_t pk[MLDSA_CRYPTO_PUBLICKEYBYTES],
21-
const uint8_t rho[MLDSA_SEEDBYTES], const mld_polyveck *t1)
22-
{
23-
unsigned int i;
24-
25-
mld_memcpy(pk, rho, MLDSA_SEEDBYTES);
26-
for (i = 0; i < MLDSA_K; ++i)
27-
__loop__(
28-
assigns(i, memory_slice(pk, MLDSA_CRYPTO_PUBLICKEYBYTES))
29-
invariant(i <= MLDSA_K)
30-
decreases(MLDSA_K - i)
31-
)
32-
{
33-
mld_polyt1_pack(pk + MLDSA_SEEDBYTES + i * MLDSA_POLYT1_PACKEDBYTES,
34-
&t1->vec[i]);
35-
}
36-
}
37-
3819
MLD_INTERNAL_API
3920
void mld_unpack_pk(uint8_t rho[MLDSA_SEEDBYTES], mld_polyveck *t1,
4021
const uint8_t pk[MLDSA_CRYPTO_PUBLICKEYBYTES])
@@ -58,12 +39,11 @@ void mld_pack_sk_s1(uint8_t sk[MLDSA_CRYPTO_SECRETKEYBYTES],
5839
}
5940

6041
MLD_INTERNAL_API
61-
void mld_pack_sk_rho_key_tr_s2_t0(uint8_t sk[MLDSA_CRYPTO_SECRETKEYBYTES],
62-
const uint8_t rho[MLDSA_SEEDBYTES],
63-
const uint8_t tr[MLDSA_TRBYTES],
64-
const uint8_t key[MLDSA_SEEDBYTES],
65-
const mld_polyveck *t0,
66-
const mld_polyveck *s2)
42+
void mld_pack_sk_rho_key_tr_s2(uint8_t sk[MLDSA_CRYPTO_SECRETKEYBYTES],
43+
const uint8_t rho[MLDSA_SEEDBYTES],
44+
const uint8_t tr[MLDSA_TRBYTES],
45+
const uint8_t key[MLDSA_SEEDBYTES],
46+
const mld_polyveck *s2)
6747
{
6848
mld_memcpy(sk, rho, MLDSA_SEEDBYTES);
6949
sk += MLDSA_SEEDBYTES;
@@ -78,9 +58,26 @@ void mld_pack_sk_rho_key_tr_s2_t0(uint8_t sk[MLDSA_CRYPTO_SECRETKEYBYTES],
7858
sk += MLDSA_L * MLDSA_POLYETA_PACKEDBYTES;
7959

8060
mld_polyveck_pack_eta(sk, s2);
81-
sk += MLDSA_K * MLDSA_POLYETA_PACKEDBYTES;
8261

83-
mld_polyveck_pack_t0(sk, t0);
62+
/* t0 packed per row by the caller via mld_pack_sk_t0 */
63+
}
64+
65+
MLD_INTERNAL_API
66+
void mld_pack_sk_t0(uint8_t sk[MLDSA_CRYPTO_SECRETKEYBYTES], unsigned int k,
67+
const mld_poly *t0k)
68+
{
69+
mld_polyt0_pack(sk + 2 * MLDSA_SEEDBYTES + MLDSA_TRBYTES +
70+
MLDSA_L * MLDSA_POLYETA_PACKEDBYTES +
71+
MLDSA_K * MLDSA_POLYETA_PACKEDBYTES +
72+
k * MLDSA_POLYT0_PACKEDBYTES,
73+
t0k);
74+
}
75+
76+
MLD_INTERNAL_API
77+
void mld_pack_pk_t1(uint8_t pk[MLDSA_CRYPTO_PUBLICKEYBYTES], unsigned int k,
78+
const mld_poly *t1k)
79+
{
80+
mld_polyt1_pack(pk + MLDSA_SEEDBYTES + k * MLDSA_POLYT1_PACKEDBYTES, t1k);
8481
}
8582

8683
MLD_INTERNAL_API

mldsa/src/packing.h

Lines changed: 54 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,6 @@
88
#include "polyvec.h"
99
#include "polyvec_lazy.h"
1010

11-
#define mld_pack_pk MLD_NAMESPACE_KL(pack_pk)
12-
/*************************************************
13-
* Name: mld_pack_pk
14-
*
15-
* Description: Bit-pack public key pk = (rho, t1).
16-
*
17-
* Arguments: - uint8_t pk[]: output byte array
18-
* - const uint8_t rho[]: byte array containing rho
19-
* - const mld_polyveck *t1: pointer to vector t1
20-
**************************************************/
21-
MLD_INTERNAL_API
22-
void mld_pack_pk(uint8_t pk[MLDSA_CRYPTO_PUBLICKEYBYTES],
23-
const uint8_t rho[MLDSA_SEEDBYTES], const mld_polyveck *t1)
24-
__contract__(
25-
requires(memory_no_alias(pk, MLDSA_CRYPTO_PUBLICKEYBYTES))
26-
requires(memory_no_alias(rho, MLDSA_SEEDBYTES))
27-
requires(memory_no_alias(t1, sizeof(mld_polyveck)))
28-
requires(forall(k0, 0, MLDSA_K,
29-
array_bound(t1->vec[k0].coeffs, 0, MLDSA_N, 0, 1 << 10)))
30-
assigns(memory_slice(pk, MLDSA_CRYPTO_PUBLICKEYBYTES))
31-
);
32-
3311

3412
#define mld_pack_sk_s1 MLD_NAMESPACE_KL(pack_sk_s1)
3513
/*************************************************
@@ -51,41 +29,82 @@ __contract__(
5129
assigns(memory_slice(sk, MLDSA_CRYPTO_SECRETKEYBYTES))
5230
);
5331

54-
#define mld_pack_sk_rho_key_tr_s2_t0 MLD_NAMESPACE_KL(pack_sk_rho_key_tr_s2_t0)
32+
#define mld_pack_sk_rho_key_tr_s2 MLD_NAMESPACE_KL(pack_sk_rho_key_tr_s2)
5533
/*************************************************
56-
* Name: mld_pack_sk_rho_key_tr_s2_t0
34+
* Name: mld_pack_sk_rho_key_tr_s2
5735
*
58-
* Description: Bit-pack rho, key, tr, s2, t0 into the secret key.
36+
* Description: Bit-pack rho, key, tr, s2 into the secret key.
5937
* s1 must already be packed via mld_pack_sk_s1.
38+
* t0 is packed per row by the caller (see
39+
* mld_pack_sk_t0).
6040
*
6141
* Arguments: - uint8_t sk[]: output byte array
6242
* - const uint8_t rho[]: byte array containing rho
6343
* - const uint8_t tr[]: byte array containing tr
6444
* - const uint8_t key[]: byte array containing key
65-
* - const mld_polyveck *t0: pointer to vector t0
6645
* - const mld_polyveck *s2: pointer to vector s2
6746
**************************************************/
6847
MLD_INTERNAL_API
69-
void mld_pack_sk_rho_key_tr_s2_t0(uint8_t sk[MLDSA_CRYPTO_SECRETKEYBYTES],
70-
const uint8_t rho[MLDSA_SEEDBYTES],
71-
const uint8_t tr[MLDSA_TRBYTES],
72-
const uint8_t key[MLDSA_SEEDBYTES],
73-
const mld_polyveck *t0,
74-
const mld_polyveck *s2)
48+
void mld_pack_sk_rho_key_tr_s2(uint8_t sk[MLDSA_CRYPTO_SECRETKEYBYTES],
49+
const uint8_t rho[MLDSA_SEEDBYTES],
50+
const uint8_t tr[MLDSA_TRBYTES],
51+
const uint8_t key[MLDSA_SEEDBYTES],
52+
const mld_polyveck *s2)
7553
__contract__(
7654
requires(memory_no_alias(sk, MLDSA_CRYPTO_SECRETKEYBYTES))
7755
requires(memory_no_alias(rho, MLDSA_SEEDBYTES))
7856
requires(memory_no_alias(tr, MLDSA_TRBYTES))
7957
requires(memory_no_alias(key, MLDSA_SEEDBYTES))
80-
requires(memory_no_alias(t0, sizeof(mld_polyveck)))
8158
requires(memory_no_alias(s2, sizeof(mld_polyveck)))
82-
requires(forall(k0, 0, MLDSA_K,
83-
array_bound(t0->vec[k0].coeffs, 0, MLDSA_N, -(1<<(MLDSA_D-1)) + 1, (1<<(MLDSA_D-1)) + 1)))
8459
requires(forall(k2, 0, MLDSA_K,
8560
array_abs_bound(s2->vec[k2].coeffs, 0, MLDSA_N, MLDSA_ETA + 1)))
8661
assigns(memory_slice(sk, MLDSA_CRYPTO_SECRETKEYBYTES))
8762
);
8863

64+
#define mld_pack_sk_t0 MLD_NAMESPACE_KL(pack_sk_t0)
65+
/*************************************************
66+
* Name: mld_pack_sk_t0
67+
*
68+
* Description: Bit-pack a single t0 polynomial t0[k] at the
69+
* corresponding offset in the secret key.
70+
*
71+
* Arguments: - uint8_t sk[]: output byte array (full secret key)
72+
* - unsigned int k: row index, must be < MLDSA_K
73+
* - const mld_poly *t0k: pointer to t0[k]
74+
**************************************************/
75+
MLD_INTERNAL_API
76+
void mld_pack_sk_t0(uint8_t sk[MLDSA_CRYPTO_SECRETKEYBYTES], unsigned int k,
77+
const mld_poly *t0k)
78+
__contract__(
79+
requires(memory_no_alias(sk, MLDSA_CRYPTO_SECRETKEYBYTES))
80+
requires(memory_no_alias(t0k, sizeof(mld_poly)))
81+
requires(k < MLDSA_K)
82+
requires(array_bound(t0k->coeffs, 0, MLDSA_N, -(1<<(MLDSA_D-1)) + 1, (1<<(MLDSA_D-1)) + 1))
83+
assigns(memory_slice(sk, MLDSA_CRYPTO_SECRETKEYBYTES))
84+
);
85+
86+
#define mld_pack_pk_t1 MLD_NAMESPACE_KL(pack_pk_t1)
87+
/*************************************************
88+
* Name: mld_pack_pk_t1
89+
*
90+
* Description: Bit-pack a single t1 polynomial t1[k] at the
91+
* corresponding offset in the public key.
92+
*
93+
* Arguments: - uint8_t pk[]: output byte array (full public key)
94+
* - unsigned int k: row index, must be < MLDSA_K
95+
* - const mld_poly *t1k: pointer to t1[k]
96+
**************************************************/
97+
MLD_INTERNAL_API
98+
void mld_pack_pk_t1(uint8_t pk[MLDSA_CRYPTO_PUBLICKEYBYTES], unsigned int k,
99+
const mld_poly *t1k)
100+
__contract__(
101+
requires(memory_no_alias(pk, MLDSA_CRYPTO_PUBLICKEYBYTES))
102+
requires(memory_no_alias(t1k, sizeof(mld_poly)))
103+
requires(k < MLDSA_K)
104+
requires(array_bound(t1k->coeffs, 0, MLDSA_N, 0, 1 << 10))
105+
assigns(memory_slice(pk, MLDSA_CRYPTO_PUBLICKEYBYTES))
106+
);
107+
89108

90109
#define mld_pack_sig_c MLD_NAMESPACE_KL(pack_sig_c)
91110
/*************************************************

0 commit comments

Comments
 (0)