2 * Copyright (C) 2014 Andreas Steffen
3 * HSR Hochschule fuer Technik Rapperswil
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 * @defgroup bliss_param_set bliss_param_set
21 #ifndef BLISS_PARAM_SET_H_
22 #define BLISS_PARAM_SET_H_
24 typedef enum bliss_param_set_id_t bliss_param_set_id_t
;
25 typedef struct bliss_param_set_t bliss_param_set_t
;
27 #include "bliss_fft_params.h"
32 * BLISS signature parameter set ID list
34 enum bliss_param_set_id_t
{
41 extern enum_name_t
*bliss_param_set_id_names
;
46 struct bliss_param_set_t
{
49 * BLISS parameter set ID
51 bliss_param_set_id_t id
;
54 * BLISS parameter set OID
59 * Security strength in bits
74 * Inverse of (q + 2) mod 2q
79 * Ring dimension equal to the number of polynomial coefficients
91 bliss_fft_params_t
*fft_params
;
94 * Number of [-1, +1] secret key coefficients
99 * Number of [-2, +2] secret key coefficients
104 * Number of secret key terms that go into Nk(S) norm
109 * Maximum Nk(S) tolerable NK(S) norm
114 * k_sigma = ceiling[ sqrt(2*ln 2) * sigma ]
119 * Number of bits in k_sigma
121 uint16_t k_sigma_bits
;
124 * Coefficients for Bernoulli sampling with exponential biases
129 * Number of columns in Bernoulli coefficient table
134 * Number of rows in Bernoulli coefficient table
139 * Number of bits in z1
144 * Number of z2 bits to be dropped after rounding
149 * Modulus p = floor(2q / 2^d) applied after bit dropping
154 * M = sigma^2 / alpha_rejection^2
170 * Get BLISS signature parameter set by BLISS parameter set ID
172 * @param id BLISS parameter set ID
173 * @return BLISS parameter set
175 bliss_param_set_t
* bliss_param_set_get_by_id(bliss_param_set_id_t id
);
178 * Get BLISS signature parameter set by BLISS parameter set OID
180 * @param oid BLISS parameter set OID
181 * @return BLISS parameter set
183 bliss_param_set_t
* bliss_param_set_get_by_oid(int oid
);
185 #endif /** BLISS_PARAM_SET_H_ @}*/