* and contributed to the OpenSSL project.
*/
+#include <string.h>
+
#include <openssl/err.h>
#include "ec_lcl.h"
if ((pre_comp = new_pre_comp = ec_pre_comp_new(group)) == NULL)
return 0;
-CRYPTO_push_info("ec_wNAF_precompute_mult");
-
generator = EC_GROUP_get0_generator(group);
if (generator == NULL)
{
}
bits = BN_num_bits(order);
+ /* The following parameters mean we precompute (approximately)
+ * one point per bit.
+ *
+ * TBD: The combination 8, 4 is perfect for 160 bits; for other
+ * bit lengths, other parameter combinations might provide better
+ * efficiency.
+ */
blocksize = 8;
w = 4;
if (EC_window_bits_for_scalar_size(bits) > w)
ret = 1;
err:
- CRYPTO_pop_info();
-
BN_CTX_end(ctx);
if (new_ctx != NULL)
BN_CTX_free(new_ctx);