27#ifndef LC_SPHINCS_SHAKE_192F_H
28#define LC_SPHINCS_SHAKE_192F_H
30#include "ext_headers.h"
54#define LC_SPHINCS_MODE 35664
55#define LC_SPHINCS_HASH_TYPE lc_shake256
57#if LC_SPHINCS_MODE == 7856
59#define LC_SPHINCS_NIST_CATEGORY 1
64#define LC_SPX_FULL_HEIGHT 63
68#define LC_SPX_FORS_HEIGHT 12
69#define LC_SPX_FORS_TREES 14
71#define LC_SPX_WOTS_W 16
77#define LC_SPX_ADDR_BYTES 32
80#if LC_SPX_WOTS_W == 256
81 #define LC_SPX_WOTS_LOGW 8
82#elif LC_SPX_WOTS_W == 16
83 #define LC_SPX_WOTS_LOGW 4
85 #error LC_SPX_WOTS_W assumed 16 or 256
88#define LC_SPX_WOTS_LEN1 (8 * LC_SPX_N / LC_SPX_WOTS_LOGW)
91#if LC_SPX_WOTS_W == 256
93 #define LC_SPX_WOTS_LEN2 1
95 #define LC_SPX_WOTS_LEN2 2
97 #error Did not precompute LC_SPX_WOTS_LEN2 for n outside {2, .., 256}
99#elif LC_SPX_WOTS_W == 16
101 #define LC_SPX_WOTS_LEN2 2
102 #elif LC_SPX_N <= 136
103 #define LC_SPX_WOTS_LEN2 3
104 #elif LC_SPX_N <= 256
105 #define LC_SPX_WOTS_LEN2 4
107 #error Did not precompute LC_SPX_WOTS_LEN2 for n outside {2, .., 256}
111#define LC_SPX_WOTS_LEN (LC_SPX_WOTS_LEN1 + LC_SPX_WOTS_LEN2)
112#define LC_SPX_WOTS_BYTES (LC_SPX_WOTS_LEN * LC_SPX_N)
113#define LC_SPX_WOTS_PK_BYTES LC_SPX_WOTS_BYTES
116#define LC_SPX_TREE_HEIGHT (LC_SPX_FULL_HEIGHT / LC_SPX_D)
118#if LC_SPX_TREE_HEIGHT * LC_SPX_D != LC_SPX_FULL_HEIGHT
119 #error LC_SPX_D should always divide LC_SPX_FULL_HEIGHT
123#define LC_SPX_FORS_MSG_BYTES ((LC_SPX_FORS_HEIGHT * LC_SPX_FORS_TREES + 7) / 8)
124#define LC_SPX_FORS_BYTES ((LC_SPX_FORS_HEIGHT + 1) * LC_SPX_FORS_TREES * LC_SPX_N)
125#define LC_SPX_FORS_PK_BYTES LC_SPX_N
128#define LC_SPX_BYTES (LC_SPX_N + LC_SPX_FORS_BYTES + LC_SPX_D * LC_SPX_WOTS_BYTES +\
129 LC_SPX_FULL_HEIGHT * LC_SPX_N)
130#define LC_SPX_PK_BYTES (2 * LC_SPX_N)
131#define LC_SPX_SK_BYTES (2 * LC_SPX_N + LC_SPX_PK_BYTES)
133#elif LC_SPHINCS_MODE == 17088
135#define LC_SPHINCS_NIST_CATEGORY 1
140#define LC_SPX_FULL_HEIGHT 66
144#define LC_SPX_FORS_HEIGHT 6
145#define LC_SPX_FORS_TREES 33
147#define LC_SPX_WOTS_W 16
153#define LC_SPX_ADDR_BYTES 32
156#if LC_SPX_WOTS_W == 256
157 #define LC_SPX_WOTS_LOGW 8
158#elif LC_SPX_WOTS_W == 16
159 #define LC_SPX_WOTS_LOGW 4
161 #error LC_SPX_WOTS_W assumed 16 or 256
164#define LC_SPX_WOTS_LEN1 (8 * LC_SPX_N / LC_SPX_WOTS_LOGW)
167#if LC_SPX_WOTS_W == 256
169 #define LC_SPX_WOTS_LEN2 1
170 #elif LC_SPX_N <= 256
171 #define LC_SPX_WOTS_LEN2 2
173 #error Did not precompute LC_SPX_WOTS_LEN2 for n outside {2, .., 256}
175#elif LC_SPX_WOTS_W == 16
177 #define LC_SPX_WOTS_LEN2 2
178 #elif LC_SPX_N <= 136
179 #define LC_SPX_WOTS_LEN2 3
180 #elif LC_SPX_N <= 256
181 #define LC_SPX_WOTS_LEN2 4
183 #error Did not precompute LC_SPX_WOTS_LEN2 for n outside {2, .., 256}
187#define LC_SPX_WOTS_LEN (LC_SPX_WOTS_LEN1 + LC_SPX_WOTS_LEN2)
188#define LC_SPX_WOTS_BYTES (LC_SPX_WOTS_LEN * LC_SPX_N)
189#define LC_SPX_WOTS_PK_BYTES LC_SPX_WOTS_BYTES
192#define LC_SPX_TREE_HEIGHT (LC_SPX_FULL_HEIGHT / LC_SPX_D)
194#if LC_SPX_TREE_HEIGHT * LC_SPX_D != LC_SPX_FULL_HEIGHT
195 #error LC_SPX_D should always divide LC_SPX_FULL_HEIGHT
199#define LC_SPX_FORS_MSG_BYTES ((LC_SPX_FORS_HEIGHT * LC_SPX_FORS_TREES + 7) / 8)
200#define LC_SPX_FORS_BYTES ((LC_SPX_FORS_HEIGHT + 1) * LC_SPX_FORS_TREES * LC_SPX_N)
201#define LC_SPX_FORS_PK_BYTES LC_SPX_N
204#define LC_SPX_BYTES (LC_SPX_N + LC_SPX_FORS_BYTES + LC_SPX_D * LC_SPX_WOTS_BYTES +\
205 LC_SPX_FULL_HEIGHT * LC_SPX_N)
206#define LC_SPX_PK_BYTES (2 * LC_SPX_N)
207#define LC_SPX_SK_BYTES (2 * LC_SPX_N + LC_SPX_PK_BYTES)
209#elif LC_SPHINCS_MODE == 16224
211#define LC_SPHINCS_NIST_CATEGORY 3
216#define LC_SPX_FULL_HEIGHT 63
220#define LC_SPX_FORS_HEIGHT 14
221#define LC_SPX_FORS_TREES 17
223#define LC_SPX_WOTS_W 16
229#define LC_SPX_ADDR_BYTES 32
232#if LC_SPX_WOTS_W == 256
233 #define LC_SPX_WOTS_LOGW 8
234#elif LC_SPX_WOTS_W == 16
235 #define LC_SPX_WOTS_LOGW 4
237 #error LC_SPX_WOTS_W assumed 16 or 256
240#define LC_SPX_WOTS_LEN1 (8 * LC_SPX_N / LC_SPX_WOTS_LOGW)
243#if LC_SPX_WOTS_W == 256
245 #define LC_SPX_WOTS_LEN2 1
246 #elif LC_SPX_N <= 256
247 #define LC_SPX_WOTS_LEN2 2
249 #error Did not precompute LC_SPX_WOTS_LEN2 for n outside {2, .., 256}
251#elif LC_SPX_WOTS_W == 16
253 #define LC_SPX_WOTS_LEN2 2
254 #elif LC_SPX_N <= 136
255 #define LC_SPX_WOTS_LEN2 3
256 #elif LC_SPX_N <= 256
257 #define LC_SPX_WOTS_LEN2 4
259 #error Did not precompute LC_SPX_WOTS_LEN2 for n outside {2, .., 256}
263#define LC_SPX_WOTS_LEN (LC_SPX_WOTS_LEN1 + LC_SPX_WOTS_LEN2)
264#define LC_SPX_WOTS_BYTES (LC_SPX_WOTS_LEN * LC_SPX_N)
265#define LC_SPX_WOTS_PK_BYTES LC_SPX_WOTS_BYTES
268#define LC_SPX_TREE_HEIGHT (LC_SPX_FULL_HEIGHT / LC_SPX_D)
270#if LC_SPX_TREE_HEIGHT * LC_SPX_D != LC_SPX_FULL_HEIGHT
271 #error LC_SPX_D should always divide LC_SPX_FULL_HEIGHT
275#define LC_SPX_FORS_MSG_BYTES ((LC_SPX_FORS_HEIGHT * LC_SPX_FORS_TREES + 7) / 8)
276#define LC_SPX_FORS_BYTES ((LC_SPX_FORS_HEIGHT + 1) * LC_SPX_FORS_TREES * LC_SPX_N)
277#define LC_SPX_FORS_PK_BYTES LC_SPX_N
280#define LC_SPX_BYTES (LC_SPX_N + LC_SPX_FORS_BYTES + LC_SPX_D * LC_SPX_WOTS_BYTES +\
281 LC_SPX_FULL_HEIGHT * LC_SPX_N)
282#define LC_SPX_PK_BYTES (2 * LC_SPX_N)
283#define LC_SPX_SK_BYTES (2 * LC_SPX_N + LC_SPX_PK_BYTES)
285#elif LC_SPHINCS_MODE == 35664
287#define LC_SPHINCS_NIST_CATEGORY 3
292#define LC_SPX_FULL_HEIGHT 66
296#define LC_SPX_FORS_HEIGHT 8
297#define LC_SPX_FORS_TREES 33
299#define LC_SPX_WOTS_W 16
305#define LC_SPX_ADDR_BYTES 32
308#if LC_SPX_WOTS_W == 256
309 #define LC_SPX_WOTS_LOGW 8
310#elif LC_SPX_WOTS_W == 16
311 #define LC_SPX_WOTS_LOGW 4
313 #error LC_SPX_WOTS_W assumed 16 or 256
316#define LC_SPX_WOTS_LEN1 (8 * LC_SPX_N / LC_SPX_WOTS_LOGW)
319#if LC_SPX_WOTS_W == 256
321 #define LC_SPX_WOTS_LEN2 1
322 #elif LC_SPX_N <= 256
323 #define LC_SPX_WOTS_LEN2 2
325 #error Did not precompute LC_SPX_WOTS_LEN2 for n outside {2, .., 256}
327#elif LC_SPX_WOTS_W == 16
329 #define LC_SPX_WOTS_LEN2 2
330 #elif LC_SPX_N <= 136
331 #define LC_SPX_WOTS_LEN2 3
332 #elif LC_SPX_N <= 256
333 #define LC_SPX_WOTS_LEN2 4
335 #error Did not precompute LC_SPX_WOTS_LEN2 for n outside {2, .., 256}
339#define LC_SPX_WOTS_LEN (LC_SPX_WOTS_LEN1 + LC_SPX_WOTS_LEN2)
340#define LC_SPX_WOTS_BYTES (LC_SPX_WOTS_LEN * LC_SPX_N)
341#define LC_SPX_WOTS_PK_BYTES LC_SPX_WOTS_BYTES
344#define LC_SPX_TREE_HEIGHT (LC_SPX_FULL_HEIGHT / LC_SPX_D)
346#if LC_SPX_TREE_HEIGHT * LC_SPX_D != LC_SPX_FULL_HEIGHT
347 #error LC_SPX_D should always divide LC_SPX_FULL_HEIGHT
351#define LC_SPX_FORS_MSG_BYTES ((LC_SPX_FORS_HEIGHT * LC_SPX_FORS_TREES + 7) / 8)
352#define LC_SPX_FORS_BYTES ((LC_SPX_FORS_HEIGHT + 1) * LC_SPX_FORS_TREES * LC_SPX_N)
353#define LC_SPX_FORS_PK_BYTES LC_SPX_N
356#define LC_SPX_BYTES (LC_SPX_N + LC_SPX_FORS_BYTES + LC_SPX_D * LC_SPX_WOTS_BYTES +\
357 LC_SPX_FULL_HEIGHT * LC_SPX_N)
358#define LC_SPX_PK_BYTES (2 * LC_SPX_N)
359#define LC_SPX_SK_BYTES (2 * LC_SPX_N + LC_SPX_PK_BYTES)
361#elif LC_SPHINCS_MODE == 29792
363#define LC_SPHINCS_NIST_CATEGORY 5
369#define LC_SPX_FULL_HEIGHT 64
373#define LC_SPX_FORS_HEIGHT 14
374#define LC_SPX_FORS_TREES 22
376#define LC_SPX_WOTS_W 16
382#define LC_SPX_ADDR_BYTES 32
385#if LC_SPX_WOTS_W == 256
386 #define LC_SPX_WOTS_LOGW 8
387#elif LC_SPX_WOTS_W == 16
388 #define LC_SPX_WOTS_LOGW 4
390 #error LC_SPX_WOTS_W assumed 16 or 256
393#define LC_SPX_WOTS_LEN1 (8 * LC_SPX_N / LC_SPX_WOTS_LOGW)
396#if LC_SPX_WOTS_W == 256
398 #define LC_SPX_WOTS_LEN2 1
399 #elif LC_SPX_N <= 256
400 #define LC_SPX_WOTS_LEN2 2
402 #error Did not precompute LC_SPX_WOTS_LEN2 for n outside {2, .., 256}
404#elif LC_SPX_WOTS_W == 16
406 #define LC_SPX_WOTS_LEN2 2
407 #elif LC_SPX_N <= 136
408 #define LC_SPX_WOTS_LEN2 3
409 #elif LC_SPX_N <= 256
410 #define LC_SPX_WOTS_LEN2 4
412 #error Did not precompute LC_SPX_WOTS_LEN2 for n outside {2, .., 256}
416#define LC_SPX_WOTS_LEN (LC_SPX_WOTS_LEN1 + LC_SPX_WOTS_LEN2)
417#define LC_SPX_WOTS_BYTES (LC_SPX_WOTS_LEN * LC_SPX_N)
418#define LC_SPX_WOTS_PK_BYTES LC_SPX_WOTS_BYTES
421#define LC_SPX_TREE_HEIGHT (LC_SPX_FULL_HEIGHT / LC_SPX_D)
423#if LC_SPX_TREE_HEIGHT * LC_SPX_D != LC_SPX_FULL_HEIGHT
424 #error LC_SPX_D should always divide LC_SPX_FULL_HEIGHT
428#define LC_SPX_FORS_MSG_BYTES ((LC_SPX_FORS_HEIGHT * LC_SPX_FORS_TREES + 7) / 8)
429#define LC_SPX_FORS_BYTES \
430 ((LC_SPX_FORS_HEIGHT + 1) * LC_SPX_FORS_TREES * LC_SPX_N)
431#define LC_SPX_FORS_PK_BYTES LC_SPX_N
434#define LC_SPX_BYTES (LC_SPX_N + LC_SPX_FORS_BYTES + LC_SPX_D * LC_SPX_WOTS_BYTES +\
435 LC_SPX_FULL_HEIGHT * LC_SPX_N)
436#define LC_SPX_PK_BYTES (2 * LC_SPX_N)
437#define LC_SPX_SK_BYTES (2 * LC_SPX_N + LC_SPX_PK_BYTES)
439#elif LC_SPHINCS_MODE == 49856
441#define LC_SPHINCS_NIST_CATEGORY 5
446#define LC_SPX_FULL_HEIGHT 68
450#define LC_SPX_FORS_HEIGHT 9
451#define LC_SPX_FORS_TREES 35
453#define LC_SPX_WOTS_W 16
459#define LC_SPX_ADDR_BYTES 32
462#if LC_SPX_WOTS_W == 256
463 #define LC_SPX_WOTS_LOGW 8
464#elif LC_SPX_WOTS_W == 16
465 #define LC_SPX_WOTS_LOGW 4
467 #error LC_SPX_WOTS_W assumed 16 or 256
470#define LC_SPX_WOTS_LEN1 (8 * LC_SPX_N / LC_SPX_WOTS_LOGW)
473#if LC_SPX_WOTS_W == 256
475 #define LC_SPX_WOTS_LEN2 1
476 #elif LC_SPX_N <= 256
477 #define LC_SPX_WOTS_LEN2 2
479 #error Did not precompute LC_SPX_WOTS_LEN2 for n outside {2, .., 256}
481#elif LC_SPX_WOTS_W == 16
483 #define LC_SPX_WOTS_LEN2 2
484 #elif LC_SPX_N <= 136
485 #define LC_SPX_WOTS_LEN2 3
486 #elif LC_SPX_N <= 256
487 #define LC_SPX_WOTS_LEN2 4
489 #error Did not precompute LC_SPX_WOTS_LEN2 for n outside {2, .., 256}
493#define LC_SPX_WOTS_LEN (LC_SPX_WOTS_LEN1 + LC_SPX_WOTS_LEN2)
494#define LC_SPX_WOTS_BYTES (LC_SPX_WOTS_LEN * LC_SPX_N)
495#define LC_SPX_WOTS_PK_BYTES LC_SPX_WOTS_BYTES
498#define LC_SPX_TREE_HEIGHT (LC_SPX_FULL_HEIGHT / LC_SPX_D)
500#if LC_SPX_TREE_HEIGHT * LC_SPX_D != LC_SPX_FULL_HEIGHT
501 #error LC_SPX_D should always divide LC_SPX_FULL_HEIGHT
505#define LC_SPX_FORS_MSG_BYTES ((LC_SPX_FORS_HEIGHT * LC_SPX_FORS_TREES + 7) / 8)
506#define LC_SPX_FORS_BYTES ((LC_SPX_FORS_HEIGHT + 1) * LC_SPX_FORS_TREES * LC_SPX_N)
507#define LC_SPX_FORS_PK_BYTES LC_SPX_N
510#define LC_SPX_BYTES (LC_SPX_N + LC_SPX_FORS_BYTES + LC_SPX_D * LC_SPX_WOTS_BYTES +\
511 LC_SPX_FULL_HEIGHT * LC_SPX_N)
512#define LC_SPX_PK_BYTES (2 * LC_SPX_N)
513#define LC_SPX_SK_BYTES (2 * LC_SPX_N + LC_SPX_PK_BYTES)
516#error "Undefined Sphincs Plus security strength"
519#define LC_SPX_SEEDBYTES (3 * LC_SPX_N)
529 uint8_t
pk[2 * LC_SPX_N];
536 uint8_t
pk[2 * LC_SPX_N];
545 uint8_t
sight[LC_SPX_D * LC_SPX_WOTS_BYTES + LC_SPX_FULL_HEIGHT * \
549#ifndef LC_SPHINCS_CTX_ON_STACK
561 uint8_t
shake_state[LC_SHA3_STATE_SIZE_ALIGN(LC_SHA3_256_CTX_SIZE)];
605#define LC_SPHINCS_CTX_SIZE \
606 sizeof(struct lc_sphincs_ctx)
608#define LC_SPHINCS_SET_CTX(name) \
609 (name)->sphincs_hash_ctx.hash = NULL; \
610 (name)->sphincs_prehash_type = NULL; \
611 (name)->slh_dsa_internal = 0; \
612 (name)->userctxlen = 0; \
613 (name)->userctx = NULL
623#ifndef LC_SPHINCS_CTX_ON_STACK
624#define LC_SPHINCS_CTX_ON_STACK(name) \
625 _Pragma("GCC diagnostic push") _Pragma( \
626 "GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \
628 name##_ctx_buf, LC_SPHINCS_CTX_SIZE, \
629 LC_HASH_COMMON_ALIGNMENT); \
630 struct lc_sphincs_ctx *name = \
631 (struct lc_sphincs_ctx *)name##_ctx_buf; \
632 LC_SPHINCS_SET_CTX(name); \
633 _Pragma("GCC diagnostic pop")
705 struct lc_rng_ctx *rng_ctx);
728 const uint8_t *seed,
size_t seedlen);
745 struct lc_rng_ctx *rng_ctx);
766 const uint8_t *m,
size_t mlen,
768 struct lc_rng_ctx *rng_ctx);
834 struct lc_rng_ctx *rng_ctx);
867 const uint8_t *m,
size_t mlen,
941#ifndef LC_SPHINCS_INTERNAL
942#undef LC_SPHINCS_NIST_CATEGORY
943#undef LC_SPHINCS_HASH_TYPE
944#undef LC_SPHINCS_MODE
946#undef LC_SPX_FULL_HEIGHT
948#undef LC_SPX_FORS_HEIGHT
949#undef LC_SPX_FORS_TREES
951#undef LC_SPX_ADDR_BYTES
952#undef LC_SPX_WOTS_LOGW
953#undef LC_SPX_WOTS_LEN1
954#undef LC_SPX_WOTS_LEN2
955#undef LC_SPX_WOTS_LEN
956#undef LC_SPX_WOTS_BYTES
957#undef LC_SPX_WOTS_PK_BYTES
958#undef LC_SPX_TREE_HEIGHT
959#undef LC_SPX_FORS_MSG_BYTES
960#undef LC_SPX_FORS_BYTES
961#undef LC_SPX_FORS_PK_BYTES
963#undef LC_SPX_PK_BYTES
964#undef LC_SPX_SK_BYTES
void lc_hash_zero(struct lc_hash_ctx *hash_ctx)
Zeroize Hash context allocated with either LC_HASH_CTX_ON_STACK or lc_hmac_alloc.
int lc_hash(const struct lc_hash *hash, const uint8_t *in, size_t inlen, uint8_t *digest)
Calculate message digest - one-shot.
int lc_sphincs_shake_192f_ctx_alloc(struct lc_sphincs_ctx **ctx)
Allocate Sphincs stream context on heap.
int lc_sphincs_shake_192f_sign_ctx(struct lc_sphincs_shake_192f_sig *sig, struct lc_sphincs_ctx *ctx, const uint8_t *m, size_t mlen, const struct lc_sphincs_shake_192f_sk *sk, struct lc_rng_ctx *rng_ctx)
Computes signature with Sphincs context in one shot.
int lc_sphincs_shake_192f_keypair(struct lc_sphincs_shake_192f_pk *pk, struct lc_sphincs_shake_192f_sk *sk, struct lc_rng_ctx *rng_ctx)
Generates Sphincs public and private key.
static LC_PURE unsigned int lc_sphincs_shake_192f_sk_size(void)
Return the size of the Sphincs secret key.
uint8_t sigfors[LC_SPX_FORS_BYTES]
static LC_PURE unsigned int lc_sphincs_shake_192f_sig_size(void)
Return the size of the Sphincs signature.
int lc_sphincs_shake_192f_sign(struct lc_sphincs_shake_192f_sig *sig, const uint8_t *m, size_t mlen, const struct lc_sphincs_shake_192f_sk *sk, struct lc_rng_ctx *rng_ctx)
Computes SLH-DSA signature in one shot.
int lc_sphincs_shake_192f_verify(const struct lc_sphincs_shake_192f_sig *sig, const uint8_t *m, size_t mlen, const struct lc_sphincs_shake_192f_pk *pk)
Verifies SLH-DSA signature in one shot.
static LC_PURE unsigned int lc_sphincs_shake_192f_pk_size(void)
Return the size of the Sphincs public key.
int lc_sphincs_shake_192f_verify_init(struct lc_sphincs_ctx *ctx, const struct lc_sphincs_shake_192f_pk *pk)
Initializes a signature verification operation.
int lc_sphincs_shake_192f_verify_final(const struct lc_sphincs_shake_192f_sig *sig, struct lc_sphincs_ctx *ctx, const struct lc_sphincs_shake_192f_pk *pk)
Verifies signature.
uint8_t sight[LC_SPX_D *LC_SPX_WOTS_BYTES+LC_SPX_FULL_HEIGHT *LC_SPX_N]
int lc_sphincs_shake_192f_sign_init(struct lc_sphincs_ctx *ctx, const struct lc_sphincs_shake_192f_sk *sk)
Initializes a signature operation.
int lc_sphincs_shake_192f_keypair_from_seed(struct lc_sphincs_shake_192f_pk *pk, struct lc_sphincs_shake_192f_sk *sk, const uint8_t *seed, size_t seedlen)
Generates Sphincs public and private key from a given seed.
int lc_sphincs_shake_192f_sign_final(struct lc_sphincs_shake_192f_sig *sig, struct lc_sphincs_ctx *ctx, const struct lc_sphincs_shake_192f_sk *sk, struct lc_rng_ctx *rng_ctx)
Computes signature.
int lc_sphincs_shake_192f_verify_update(struct lc_sphincs_ctx *ctx, const uint8_t *m, size_t mlen)
Add more data to an already initialized signature state.
static void lc_sphincs_shake_192f_ctx_zero(struct lc_sphincs_ctx *ctx)
Zeroize Sphincs context allocated with LC_SPHINCS_CTX_ON_STACK or lc_sphincs_ctx_alloc.
void lc_sphincs_shake_192f_ctx_zero_free(struct lc_sphincs_ctx *ctx)
Zeroize and free Sphincs stream context.
uint8_t sk_seed[LC_SPX_N]
int lc_sphincs_shake_192f_verify_ctx(const struct lc_sphincs_shake_192f_sig *sig, struct lc_sphincs_ctx *ctx, const uint8_t *m, size_t mlen, const struct lc_sphincs_shake_192f_pk *pk)
Verifies signature with Sphincs context in one shot.
int lc_sphincs_shake_192f_sign_update(struct lc_sphincs_ctx *ctx, const uint8_t *m, size_t mlen)
Add more data to an already initialized signature state.
unsigned int slh_dsa_internal
When set to true, only the SLH-DSA.Sign_internal or SLH-DSA.Verify_internal are performed (see FIPS 2...
size_t userctxlen
length of the user context (allowed range between 0 and 255 bytes)
uint8_t shake_state[LC_SHA3_STATE_SIZE_ALIGN(LC_SHA3_256_CTX_SIZE)]
State memory of the hash context used internally to the library - it should not be touched by the use...
const uint8_t * userctx
buffer with a caller-specified context string
const struct lc_hash * sphincs_prehash_type
When using HashSLH-DSA, set the hash reference used for the hash operation. Allowed values are lc_sha...
struct lc_hash_ctx sphincs_hash_ctx
Hash context used internally to the library - it should not be touched by the user.