Lines Matching refs:wNAF
26 * This file implements the wNAF-based interleaving multi-exponentiation method
32 * For multiplication with precomputation, we use wNAF splitting, formerly at:
39 size_t blocksize; /* block size for wNAF splitting */
390 * Table could be optimised for the wNAF-based implementation,
417 size_t blocksize = 0, numblocks = 0; /* for wNAF splitting */
424 signed char **wNAF = NULL; /* individual wNAFs */
484 * determine maximum number of blocks that wNAF splitting may
485 * yield (NB: maximum wNAF length is bit length plus one)
516 wNAF = OPENSSL_malloc((totalnum + 1) * sizeof(wNAF[0]));
519 /* Ensure wNAF is initialised in case we end up going to err */
520 if (wNAF != NULL)
521 wNAF[0] = NULL; /* preliminary pivot */
523 if (wsize == NULL || wNAF_len == NULL || wNAF == NULL || val_sub == NULL) {
539 wNAF[i + 1] = NULL; /* make sure we always have a pivot */
540 wNAF[i] =
543 if (wNAF[i] == NULL)
557 /* we have already generated a wNAF for 'scalar' */
577 * One of the other wNAFs is at least as long as the wNAF
578 * belonging to the generator, so wNAF splitting will not buy
583 totalnum = num + 1; /* don't use wNAF splitting */
584 wNAF[num] = tmp_wNAF;
585 wNAF[num + 1] = NULL;
593 * don't include tmp_wNAF directly into wNAF array - use wNAF
613 /* split wNAF in 'numblocks' parts */
633 wNAF[i + 1] = NULL;
634 wNAF[i] = OPENSSL_malloc(wNAF_len[i]);
635 if (wNAF[i] == NULL) {
640 memcpy(wNAF[i], pp, wNAF_len[i]);
730 int digit = wNAF[i][k];
792 if (wNAF != NULL) {
795 for (w = wNAF; *w != NULL; w++)
798 OPENSSL_free(wNAF);
813 * for use with wNAF splitting as implemented in ossl_ec_wNAF_mul().
888 * to use for wNAF