1 #ifndef PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_PARAMS_H
2 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_PARAMS_H
3 
4 /* Hash output length in bytes. */
5 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_N 24
6 /* Height of the hypertree. */
7 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_FULL_HEIGHT 63
8 /* Number of subtree layer. */
9 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_D 7
10 /* FORS tree dimensions. */
11 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_FORS_HEIGHT 14
12 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_FORS_TREES 17
13 /* Winternitz parameter, */
14 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_WOTS_W 16
15 
16 /* The hash function is defined by linking a different hash.c file, as opposed
17    to setting a #define constant. */
18 
19 /* For clarity */
20 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_ADDR_BYTES 32
21 
22 /* WOTS parameters. */
23 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_WOTS_LOGW 4
24 
25 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_WOTS_LEN1 (8 * PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_N / PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_WOTS_LOGW)
26 
27 /* PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_WOTS_LEN2 is floor(log(len_1 * (w - 1)) / log(w)) + 1; we precompute */
28 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_WOTS_LEN2 3
29 
30 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_WOTS_LEN (PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_WOTS_LEN1 + PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_WOTS_LEN2)
31 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_WOTS_BYTES (PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_WOTS_LEN * PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_N)
32 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_WOTS_PK_BYTES PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_WOTS_BYTES
33 
34 /* Subtree size. */
35 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_TREE_HEIGHT (PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_FULL_HEIGHT / PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_D)
36 
37 /* FORS parameters. */
38 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_FORS_MSG_BYTES ((PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_FORS_HEIGHT * PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_FORS_TREES + 7) / 8)
39 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_FORS_BYTES ((PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_FORS_HEIGHT + 1) * PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_FORS_TREES * PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_N)
40 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_FORS_PK_BYTES PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_N
41 
42 /* Resulting SPX sizes. */
43 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_BYTES (PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_N + PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_FORS_BYTES + PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_D * PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_WOTS_BYTES +\
44         PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_FULL_HEIGHT * PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_N)
45 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_PK_BYTES (2 * PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_N)
46 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_SK_BYTES (2 * PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_N + PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_PK_BYTES)
47 
48 /* Optionally, signing can be made non-deterministic using optrand.
49    This can help counter side-channel attacks that would benefit from
50    getting a large number of traces when the signer uses the same nodes. */
51 #define PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_OPTRAND_BYTES 32
52 
53 #endif
54