• Home
  • Raw
  • Download

Lines Matching refs:top

652   j = m->top; /* borrow j */  in BN_mod_exp_mont()
662 r->top = j; in BN_mod_exp_mont()
740 static int copy_to_prebuf(const BIGNUM *b, int top, unsigned char *buf, int idx, in copy_to_prebuf() argument
746 if (top > b->top) { in copy_to_prebuf()
747 top = b->top; /* this works because 'buf' is explicitly zeroed */ in copy_to_prebuf()
750 for (i = 0, j = idx; i < top; i++, j += width) { in copy_to_prebuf()
757 static int copy_from_prebuf(BIGNUM *b, int top, unsigned char *buf, int idx, in copy_from_prebuf() argument
763 if (!bn_wexpand(b, top)) { in copy_from_prebuf()
768 for (i = 0; i < top; i++, table += width) { in copy_from_prebuf()
789 for (i = 0; i < top; i++, table += width) { in copy_from_prebuf()
802 b->top = top; in copy_from_prebuf()
855 int top; in BN_mod_exp_mont_consttime() local
870 top = m->top; in BN_mod_exp_mont_consttime()
904 if ((16 == a->top) && (16 == p->top) && (BN_num_bits(m) == 1024) && in BN_mod_exp_mont_consttime()
910 rr->top = 16; in BN_mod_exp_mont_consttime()
924 powerbufLen += top * sizeof(mont->N.d[0]); in BN_mod_exp_mont_consttime()
934 (top * numPowers + ((2 * top) > numPowers ? (2 * top) : numPowers)); in BN_mod_exp_mont_consttime()
957 tmp.d = (BN_ULONG *)(powerbuf + sizeof(m->d[0]) * top * numPowers); in BN_mod_exp_mont_consttime()
958 am.d = tmp.d + top; in BN_mod_exp_mont_consttime()
959 tmp.top = am.top = 0; in BN_mod_exp_mont_consttime()
960 tmp.dmax = am.dmax = top; in BN_mod_exp_mont_consttime()
966 if (m->d[top - 1] & (((BN_ULONG)1) << (BN_BITS2 - 1))) { in BN_mod_exp_mont_consttime()
969 for (i = 1; i < top; i++) { in BN_mod_exp_mont_consttime()
972 tmp.top = top; in BN_mod_exp_mont_consttime()
991 if (window == 5 && top > 1) { in BN_mod_exp_mont_consttime()
997 for (i = am.top; i < top; i++) { in BN_mod_exp_mont_consttime()
1000 for (i = tmp.top; i < top; i++) { in BN_mod_exp_mont_consttime()
1005 for (np = am.d + top, i = 0; i < top; i++) { in BN_mod_exp_mont_consttime()
1009 bn_scatter5(tmp.d, top, powerbuf, 0); in BN_mod_exp_mont_consttime()
1010 bn_scatter5(am.d, am.top, powerbuf, 1); in BN_mod_exp_mont_consttime()
1011 bn_mul_mont(tmp.d, am.d, am.d, np, n0, top); in BN_mod_exp_mont_consttime()
1012 bn_scatter5(tmp.d, top, powerbuf, 2); in BN_mod_exp_mont_consttime()
1016 bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top); in BN_mod_exp_mont_consttime()
1017 bn_scatter5(tmp.d, top, powerbuf, i); in BN_mod_exp_mont_consttime()
1021 bn_mul_mont_gather5(tmp.d, am.d, powerbuf, np, n0, top, i - 1); in BN_mod_exp_mont_consttime()
1022 bn_scatter5(tmp.d, top, powerbuf, i); in BN_mod_exp_mont_consttime()
1024 bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top); in BN_mod_exp_mont_consttime()
1025 bn_scatter5(tmp.d, top, powerbuf, j); in BN_mod_exp_mont_consttime()
1029 bn_mul_mont_gather5(tmp.d, am.d, powerbuf, np, n0, top, i - 1); in BN_mod_exp_mont_consttime()
1030 bn_scatter5(tmp.d, top, powerbuf, i); in BN_mod_exp_mont_consttime()
1031 bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top); in BN_mod_exp_mont_consttime()
1032 bn_scatter5(tmp.d, top, powerbuf, 2 * i); in BN_mod_exp_mont_consttime()
1035 bn_mul_mont_gather5(tmp.d, am.d, powerbuf, np, n0, top, i - 1); in BN_mod_exp_mont_consttime()
1036 bn_scatter5(tmp.d, top, powerbuf, i); in BN_mod_exp_mont_consttime()
1043 bn_gather5(tmp.d, top, powerbuf, wvalue); in BN_mod_exp_mont_consttime()
1052 if (top & 7) { in BN_mod_exp_mont_consttime()
1058 bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top); in BN_mod_exp_mont_consttime()
1059 bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top); in BN_mod_exp_mont_consttime()
1060 bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top); in BN_mod_exp_mont_consttime()
1061 bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top); in BN_mod_exp_mont_consttime()
1062 bn_mul_mont(tmp.d, tmp.d, tmp.d, np, n0, top); in BN_mod_exp_mont_consttime()
1063 bn_mul_mont_gather5(tmp.d, tmp.d, powerbuf, np, n0, top, wvalue); in BN_mod_exp_mont_consttime()
1067 int max_bits = p->top * BN_BITS2; in BN_mod_exp_mont_consttime()
1079 wvalue = p_bytes[p->top * BN_BYTES - 1]; in BN_mod_exp_mont_consttime()
1083 bn_power5(tmp.d, tmp.d, powerbuf, np, n0, top, wvalue); in BN_mod_exp_mont_consttime()
1093 bn_power5(tmp.d, tmp.d, powerbuf, np, n0, top, val); in BN_mod_exp_mont_consttime()
1097 ret = bn_from_montgomery(tmp.d, tmp.d, NULL, np, n0, top); in BN_mod_exp_mont_consttime()
1098 tmp.top = top; in BN_mod_exp_mont_consttime()
1109 if (!copy_to_prebuf(&tmp, top, powerbuf, 0, window) || in BN_mod_exp_mont_consttime()
1110 !copy_to_prebuf(&am, top, powerbuf, 1, window)) { in BN_mod_exp_mont_consttime()
1121 !copy_to_prebuf(&tmp, top, powerbuf, 2, window)) { in BN_mod_exp_mont_consttime()
1127 !copy_to_prebuf(&tmp, top, powerbuf, i, window)) { in BN_mod_exp_mont_consttime()
1137 if (!copy_from_prebuf(&tmp, top, powerbuf, wvalue, window)) { in BN_mod_exp_mont_consttime()
1156 if (!copy_from_prebuf(&am, top, powerbuf, wvalue, window)) { in BN_mod_exp_mont_consttime()