+ /* Best bandwidth and speed, no X9.98 compatibility */
+ NTRU_ENCRYPT_PARAM_SET_ID param_set_optimum[] = {
+ NTRU_EES401EP2, NTRU_EES439EP1, NTRU_EES593EP1, NTRU_EES743EP1
+ };
+
+ /* X9.98/IEEE 1363.1 parameter set for best speed */
+ NTRU_ENCRYPT_PARAM_SET_ID param_set_x9_98_speed[] = {
+ NTRU_EES659EP1, NTRU_EES761EP1, NTRU_EES1087EP1, NTRU_EES1499EP1
+ };
+
+ /* X9.98/IEEE 1363.1 parameter set for best bandwidth (smallest size) */
+ NTRU_ENCRYPT_PARAM_SET_ID param_set_x9_98_bandwidth[] = {
+ NTRU_EES401EP1, NTRU_EES449EP1, NTRU_EES677EP1, NTRU_EES1087EP1
+ };
+
+ /* X9.98/IEEE 1363.1 parameter set balancing speed and bandwidth */
+ NTRU_ENCRYPT_PARAM_SET_ID param_set_x9_98_balance[] = {
+ NTRU_EES541EP1, NTRU_EES613EP1, NTRU_EES887EP1, NTRU_EES1171EP1
+ };
+
+ param_set_selection = lib->settings->get_str(lib->settings,
+ "libstrongswan.plugins.ntru.param__set_selection", "optimum");
+
+ if (streq(param_set_selection, "x9_98_speed"))
+ {
+ param_set = param_set_x9_98_speed;
+ }
+ else if (streq(param_set_selection, "x9_98_bandwidth"))
+ {
+ param_set = param_set_x9_98_bandwidth;
+ }
+ else if (streq(param_set_selection, "x9_98_balance"))
+ {
+ param_set = param_set_x9_98_balance;
+ }
+ else
+ {
+ param_set = param_set_optimum;
+ }
+