Lines Matching refs:n2
340 int n2, int dna, int dnb, BN_ULONG *t) { in bn_mul_recursive() argument
342 assert(n2 != 0 && (n2 & (n2 - 1)) == 0); in bn_mul_recursive()
349 if (n2 == 8 && dna == 0 && dnb == 0) { in bn_mul_recursive()
355 if (n2 < BN_MUL_RECURSIVE_SIZE_NORMAL) { in bn_mul_recursive()
356 bn_mul_normal(r, a, n2 + dna, b, n2 + dnb); in bn_mul_recursive()
358 OPENSSL_memset(&r[2 * n2 + dna + dnb], 0, in bn_mul_recursive()
374 int n = n2 / 2, tna = n + dna, tnb = n + dnb; in bn_mul_recursive()
379 BN_ULONG neg = bn_abs_sub_part_words(t, a, &a[n], tna, n - tna, &t[n2]); in bn_mul_recursive()
380 neg ^= bn_abs_sub_part_words(&t[n], &b[n], b, tnb, tnb - n, &t[n2]); in bn_mul_recursive()
387 bn_mul_comba4(&t[n2], t, &t[n]); in bn_mul_recursive()
390 bn_mul_comba4(&r[n2], &a[n], &b[n]); in bn_mul_recursive()
392 bn_mul_comba8(&t[n2], t, &t[n]); in bn_mul_recursive()
395 bn_mul_comba8(&r[n2], &a[n], &b[n]); in bn_mul_recursive()
397 BN_ULONG *p = &t[n2 * 2]; in bn_mul_recursive()
398 bn_mul_recursive(&t[n2], t, &t[n], n, 0, 0, p); in bn_mul_recursive()
400 bn_mul_recursive(&r[n2], &a[n], &b[n], n, dna, dnb, p); in bn_mul_recursive()
404 BN_ULONG c = bn_add_words(t, r, &r[n2], n2); in bn_mul_recursive()
409 BN_ULONG c_neg = c - bn_sub_words(&t[n2 * 2], t, &t[n2], n2); in bn_mul_recursive()
410 BN_ULONG c_pos = c + bn_add_words(&t[n2], t, &t[n2], n2); in bn_mul_recursive()
411 bn_select_words(&t[n2], neg, &t[n2 * 2], &t[n2], n2); in bn_mul_recursive()
418 c += bn_add_words(&r[n], &r[n], &t[n2], n2); in bn_mul_recursive()
421 for (int i = n + n2; i < n2 + n2; i++) { in bn_mul_recursive()
449 int n2 = n * 2; in bn_mul_part_recursive() local
452 OPENSSL_memset(r + n2 + tna + tnb, 0, n2 - tna - tnb); in bn_mul_part_recursive()
468 BN_ULONG neg = bn_abs_sub_part_words(t, a, &a[n], tna, n - tna, &t[n2]); in bn_mul_part_recursive()
469 neg ^= bn_abs_sub_part_words(&t[n], &b[n], b, tnb, tnb - n, &t[n2]); in bn_mul_part_recursive()
476 bn_mul_comba8(&t[n2], t, &t[n]); in bn_mul_part_recursive()
479 bn_mul_normal(&r[n2], &a[n], tna, &b[n], tnb); in bn_mul_part_recursive()
481 OPENSSL_memset(&r[n2 + tna + tnb], 0, sizeof(BN_ULONG) * (n2 - tna - tnb)); in bn_mul_part_recursive()
483 BN_ULONG *p = &t[n2 * 2]; in bn_mul_part_recursive()
484 bn_mul_recursive(&t[n2], t, &t[n], n, 0, 0, p); in bn_mul_part_recursive()
487 OPENSSL_memset(&r[n2], 0, sizeof(BN_ULONG) * n2); in bn_mul_part_recursive()
490 bn_mul_normal(&r[n2], &a[n], tna, &b[n], tnb); in bn_mul_part_recursive()
499 bn_mul_part_recursive(&r[n2], &a[n], &b[n], i, tna - i, tnb - i, p); in bn_mul_part_recursive()
506 bn_mul_recursive(&r[n2], &a[n], &b[n], i, tna - i, tnb - i, p); in bn_mul_part_recursive()
518 BN_ULONG c = bn_add_words(t, r, &r[n2], n2); in bn_mul_part_recursive()
523 BN_ULONG c_neg = c - bn_sub_words(&t[n2 * 2], t, &t[n2], n2); in bn_mul_part_recursive()
524 BN_ULONG c_pos = c + bn_add_words(&t[n2], t, &t[n2], n2); in bn_mul_part_recursive()
525 bn_select_words(&t[n2], neg, &t[n2 * 2], &t[n2], n2); in bn_mul_part_recursive()
532 c += bn_add_words(&r[n], &r[n], &t[n2], n2); in bn_mul_part_recursive()
535 for (int i = n + n2; i < n2 + n2; i++) { in bn_mul_part_recursive()
715 static void bn_sqr_recursive(BN_ULONG *r, const BN_ULONG *a, size_t n2, in bn_sqr_recursive() argument
718 assert(n2 != 0 && (n2 & (n2 - 1)) == 0); in bn_sqr_recursive()
720 if (n2 == 4) { in bn_sqr_recursive()
724 if (n2 == 8) { in bn_sqr_recursive()
728 if (n2 < BN_SQR_RECURSIVE_SIZE_NORMAL) { in bn_sqr_recursive()
729 bn_sqr_normal(r, a, n2, t); in bn_sqr_recursive()
738 size_t n = n2 / 2; in bn_sqr_recursive()
739 BN_ULONG *t_recursive = &t[n2 * 2]; in bn_sqr_recursive()
744 bn_sqr_recursive(&t[n2], t, n, t_recursive); in bn_sqr_recursive()
750 bn_sqr_recursive(&r[n2], &a[n], n, t_recursive); in bn_sqr_recursive()
753 BN_ULONG c = bn_add_words(t, r, &r[n2], n2); in bn_sqr_recursive()
755 c -= bn_sub_words(&t[n2], t, &t[n2], n2); in bn_sqr_recursive()
759 c += bn_add_words(&r[n], &r[n], &t[n2], n2); in bn_sqr_recursive()
762 for (size_t i = n + n2; i < n2 + n2; i++) { in bn_sqr_recursive()