/openssl/crypto/err/ |
H A D | err_mark.c | 23 if (es->bottom == es->top) in ERR_set_mark() 25 es->err_marks[es->top]++; in ERR_set_mark() 40 es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1; in ERR_pop_to_mark() 43 if (es->bottom == es->top) in ERR_pop_to_mark() 45 es->err_marks[es->top]--; in ERR_pop_to_mark() 52 int top; in ERR_clear_last_mark() local 58 top = es->top; in ERR_clear_last_mark() 59 while (es->bottom != top in ERR_clear_last_mark() 61 top = top > 0 ? top - 1 : ERR_NUM_ERRORS - 1; in ERR_clear_last_mark() 64 if (es->bottom == top) in ERR_clear_last_mark() [all …]
|
H A D | err_blocks.c | 26 err_clear(es, es->top, 0); in ERR_new() 37 err_set_debug(es, es->top, file, line, func); in ERR_set_debug() 60 i = es->top; in ERR_vset_error() 113 err_clear_data(es, es->top, 0); in ERR_vset_error() 114 err_set_error(es, es->top, lib, reason); in ERR_vset_error() 116 err_set_data(es, es->top, buf, buf_size, flags); in ERR_vset_error()
|
H A D | err.c | 347 es->top = es->bottom = 0; in ERR_clear_error() 462 while (es->bottom != es->top) { in get_error_values() 464 err_clear(es, es->top, 0); in get_error_values() 465 es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1; in get_error_values() 478 if (es->bottom == es->top) in get_error_values() 483 i = es->top; in get_error_values() 789 err_clear_data(es, es->top, deallocate); in err_set_error_data_int() 833 i = es->top; in ERR_add_error_vdata() 884 int top; in err_clear_last_constant_time() local 890 top = es->top; in err_clear_last_constant_time() [all …]
|
H A D | err_local.h | 15 es->top = (es->top + 1) % ERR_NUM_ERRORS; in err_get_slot() 16 if (es->top == es->bottom) in err_get_slot()
|
/openssl/crypto/bn/ |
H A D | bn_exp.c | 504 if (top > b->top) in MOD_EXP_CTIME_COPY_TO_PREBUF() 571 b->top = top; in MOD_EXP_CTIME_COPY_FROM_PREBUF() 616 top = m->top; in BN_mod_exp_mont_consttime() 736 tmp.top = am.top = 0; in BN_mod_exp_mont_consttime() 748 tmp.top = top; in BN_mod_exp_mont_consttime() 824 for (i = am.top; i < top; i++) in BN_mod_exp_mont_consttime() 826 for (i = tmp.top; i < top; i++) in BN_mod_exp_mont_consttime() 892 tmp.top = top; in BN_mod_exp_mont_consttime() 933 for (i = am.top; i < top; i++) in BN_mod_exp_mont_consttime() 935 for (i = tmp.top; i < top; i++) in BN_mod_exp_mont_consttime() [all …]
|
H A D | bn_shift.c | 26 r->top = a->top; in BN_lshift1() 40 r->top += c; in BN_lshift1() 57 i = a->top; in BN_rshift1() 65 r->top = i; in BN_rshift1() 69 r->top -= (t == 1); in BN_rshift1() 75 if (!r->top) in BN_rshift1() 120 if (a->top != 0) { in bn_lshift_fixed_top() 144 r->top = a->top + nw + 1; in bn_lshift_fixed_top() 175 int i, top, nw; in bn_rshift_fixed_top() local 197 top = a->top - nw; in bn_rshift_fixed_top() [all …]
|
H A D | bn_word.c | 44 for (i = a->top - 1; i >= 0; i--) { in BN_mod_word() 72 if (a->top == 0) in BN_div_word() 81 for (i = a->top - 1; i >= 0; i--) { in BN_div_word() 89 if ((a->top > 0) && (a->d[a->top - 1] == 0)) in BN_div_word() 90 a->top--; in BN_div_word() 92 if (!a->top) in BN_div_word() 124 if (w && i == a->top) { in BN_add_word() 127 a->top++; in BN_add_word() 176 a->top--; in BN_sub_word() 187 if (a->top) { in BN_mul_word() [all …]
|
H A D | bn_lib.c | 353 a->top = b->top; in BN_copy() 383 a->top = b->top; in BN_swap() 406 a->top = 0; in BN_clear() 705 i = a->top - b->top; in BN_ucmp() 751 if (a->top > b->top) in BN_cmp() 753 if (a->top < b->top) in BN_cmp() 918 t = (a->top ^ b->top) & condition; in BN_consttime_swap() 919 a->top ^= t; in BN_consttime_swap() 920 b->top ^= t; in BN_consttime_swap() 992 a->top = 0; in BN_zero_ex() [all …]
|
H A D | bn_rand.c | 36 if (bits < 0 || (bits == 1 && top > 0)) in bnrand() 74 if (top >= 0) { in bnrand() 75 if (top) { in bnrand() 102 int BN_rand_ex(BIGNUM *rnd, int bits, int top, int bottom, in BN_rand_ex() argument 108 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom) in BN_rand() argument 110 return bnrand(NORMAL, rnd, bits, top, bottom, 0, NULL); in BN_rand() 113 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom) in BN_bntest_rand() argument 115 return bnrand(TESTING, rnd, bits, top, bottom, 0, NULL); in BN_bntest_rand() 126 int BN_priv_rand(BIGNUM *rnd, int bits, int top, int bottom) in BN_priv_rand() argument 128 return bnrand(PRIVATE, rnd, bits, top, bottom, 0, NULL); in BN_priv_rand() [all …]
|
H A D | bn_mont.c | 42 int num = mont->N.top; in bn_mul_mont_fixed_top() 45 if (num > 1 && a->top == num && b->top == num) { in bn_mul_mont_fixed_top() 50 r->top = num; in bn_mul_mont_fixed_top() 57 if ((a->top + b->top) > 2 * num) in bn_mul_mont_fixed_top() 96 nl = n->top; in bn_from_montgomery_word() 98 ret->top = 0; in bn_from_montgomery_word() 116 r->top = max; in bn_from_montgomery_word() 135 ret->top = nl; in bn_from_montgomery_word() 308 tmod.top = 0; in BN_MONT_CTX_set() 400 for (i = mont->RR.top, ret = mont->N.top; i < ret; i++) in BN_MONT_CTX_set() [all …]
|
H A D | bn_gf2m.c | 260 if (a->top < b->top) { in BN_GF2m_add() 278 r->top = at->top; in BN_GF2m_add() 316 r->top = a->top; in BN_GF2m_mod_arr() 428 zlen = a->top + b->top + 4; in BN_GF2m_mod_mul_arr() 431 s->top = zlen; in BN_GF2m_mod_mul_arr() 512 s->top = 2 * a->top; in BN_GF2m_mod_sqr_arr() 626 int top = p->top; in BN_GF2m_mod_inv_vartime() local 632 for (i = u->top; i < top; i++) in BN_GF2m_mod_inv_vartime() 634 u->top = top; in BN_GF2m_mod_inv_vartime() 641 b->top = top; in BN_GF2m_mod_inv_vartime() [all …]
|
H A D | bn_add.c | 85 if (a->top < b->top) { in BN_uadd() 92 max = a->top; in BN_uadd() 93 min = b->top; in BN_uadd() 99 r->top = max; in BN_uadd() 117 r->top += carry; in BN_uadd() 134 max = a->top; in BN_usub() 135 min = b->top; in BN_usub() 165 r->top = max; in BN_usub()
|
H A D | bn_gcd.c | 458 } else if (D->top == 1) { in int_bn_mod_inverse() 553 int i, j, top, rlen, glen, m, bit = 1, delta = 1, cond = 0, shifts = 0, ret = 0; in BN_gcd() local 598 top = 1 + ((r->top >= g->top) ? r->top : g->top); in BN_gcd() 599 if (bn_wexpand(r, top) == NULL in BN_gcd() 600 || bn_wexpand(g, top) == NULL in BN_gcd() 601 || bn_wexpand(temp, top) == NULL) in BN_gcd() 605 BN_consttime_swap((~r->d[0]) & 1, r, g, top); in BN_gcd() 616 & (~((g->top - 1) >> (sizeof(g->top) * 8 - 1))); in BN_gcd() 620 BN_consttime_swap(cond, r, g, top); in BN_gcd() 628 & (~((g->top - 1) >> (sizeof(g->top) * 8 - 1))), in BN_gcd() [all …]
|
H A D | bn_intern.c | 54 if (scalar->d == NULL || scalar->top == 0) { in bn_compute_wNAF() 143 return a->top; in bn_get_top() 155 for (i = a->top; i < a->dmax; i++) in bn_set_all_zero() 161 if (in->top > size) in bn_copy_words() 166 memcpy(out, in->d, sizeof(*out) * in->top); in bn_copy_words() 182 a->dmax = a->top = size; in bn_set_static_words() 196 a->top = num_words; in bn_set_words()
|
H A D | bn_div.c | 64 dv->top = 1; 144 int top = num->top; in bn_left_align() local 145 int rshift = BN_num_bits_word(d[top - 1]), lshift, i; in bn_left_align() 152 for (i = 0, m = 0; i < top; i++) { in bn_left_align() 224 if (divisor->d[divisor->top - 1] == 0) { in BN_div() 273 assert(divisor->top > 0 && divisor->d[divisor->top - 1] != 0); in bn_div_fixed_top() 303 div_n = sdiv->top; in bn_div_fixed_top() 304 num_n = snum->top; in bn_div_fixed_top() 311 snum->top = num_n = div_n + 1; in bn_div_fixed_top() 331 res->top = loop; in bn_div_fixed_top() [all …]
|
H A D | bn_nist.c | 280 for (i = 0; i < top; i++) in nist_cp_bn() 332 int top = a->top, i; in BN_nist_mod_192() local 450 r->top = BN_NIST_192_TOP; in BN_nist_mod_192() 473 int top = a->top, i; in BN_nist_mod_224() local 633 r->top = BN_NIST_224_TOP; in BN_nist_mod_224() 654 int i, top = a->top; in BN_nist_mod_256() local 875 r->top = BN_NIST_256_TOP; in BN_nist_mod_256() 900 int i, top = a->top; in BN_nist_mod_384() local 1156 r->top = BN_NIST_384_TOP; in BN_nist_mod_384() 1169 int top = a->top, i; in BN_nist_mod_521() local [all …]
|
H A D | bn_conv.c | 25 buf = OPENSSL_malloc(a->top * BN_BYTES * 2 + 2); in BN_bn2hex() 33 for (i = a->top - 1; i >= 0; i--) { in BN_bn2hex() 188 ret->top = h; in BN_hex2bn() 194 if (ret->top != 0) in BN_hex2bn() 264 if (ret->top != 0) in BN_dec2bn() 288 if (*a == '-' && (*bn)->top != 0) in BN_asc2bn()
|
H A D | bn_mod.c | 51 size_t i, ai, bi, mtop = m->top; in bn_mod_add_fixed_top() 71 mask = (BN_ULONG)0 - ((i - a->top) >> (8 * sizeof(i) - 1)); in bn_mod_add_fixed_top() 75 mask = (BN_ULONG)0 - ((i - b->top) >> (8 * sizeof(i) - 1)); in bn_mod_add_fixed_top() 89 r->top = mtop; in bn_mod_add_fixed_top() 135 size_t i, ai, bi, mtop = m->top; in bn_mod_sub_fixed_top() 147 mask = (BN_ULONG)0 - ((i - a->top) >> (8 * sizeof(i) - 1)); in bn_mod_sub_fixed_top() 150 mask = (BN_ULONG)0 - ((i - b->top) >> (8 * sizeof(i) - 1)); in bn_mod_sub_fixed_top() 175 r->top = mtop; in bn_mod_sub_fixed_top()
|
H A D | bn_mul.c | 510 int top, al, bl; in bn_mul_fixed_top() local 524 al = a->top; in bn_mul_fixed_top() 525 bl = b->top; in bn_mul_fixed_top() 531 top = al + bl; in bn_mul_fixed_top() 549 rr->top = 8; in bn_mul_fixed_top() 557 rr->top = 16; in bn_mul_fixed_top() 597 rr->top = top; in bn_mul_fixed_top() 602 if (bn_wexpand(rr, top) == NULL) in bn_mul_fixed_top() 604 rr->top = top; in bn_mul_fixed_top()
|
H A D | bn_local.h | 165 if (_bnum1->top < _bnum1->dmax) { \ 173 memset(_not_const + _bnum1->top, _tmp_char, \ 174 sizeof(*_not_const) * (_bnum1->dmax - _bnum1->top)); \ 184 int _top = _bnum2->top; \ 199 (words) >= (_bnum2)->top); \ 231 int top; /* Index of last used d +1. */ member 465 int ind = (a)->dmax - (a)->top; \ 466 BN_ULONG *ftl = &(a)->d[(a)->top-1]; \
|
H A D | bn_blind.c | 181 if (n->dmax >= r->top) { in BN_BLINDING_invert_ex() 182 size_t i, rtop = r->top, ntop = n->top; in BN_BLINDING_invert_ex() 191 n->top = (int)(rtop & ~mask) | (ntop & mask); in BN_BLINDING_invert_ex()
|
H A D | bn_sqr.c | 35 al = a->top; in bn_sqr_fixed_top() 37 r->top = 0; in bn_sqr_fixed_top() 95 rr->top = max; in bn_sqr_fixed_top()
|
/openssl/doc/man3/ |
H A D | BN_rand.pod | 14 int BN_rand_ex(BIGNUM *rnd, int bits, int top, int bottom, 16 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom); 18 int BN_priv_rand_ex(BIGNUM *rnd, int bits, int top, int bottom, 20 int BN_priv_rand(BIGNUM *rnd, int bits, int top, int bottom); 34 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom); 45 accommodate the requirements specified by the I<top> and I<bottom> 47 The I<top> parameters specifies 50 If it is B<BN_RAND_TOP_ONE>, the top bit must be one. 56 If I<bits> is 1 then I<top> cannot also be B<BN_RAND_TOP_TWO>.
|
/openssl/crypto/ |
H A D | sparse_array.c | 53 ossl_uintmax_t top; member 164 if (n <= sa->top) { in ossl_sa_get() 199 if (sa->top < posn) in ossl_sa_set() 200 sa->top = posn; in ossl_sa_set()
|
/openssl/crypto/encode_decode/ |
H A D | encoder_lib.c | 402 int top = 0; in encoder_process() local 409 top = 1; in encoder_process() 418 if (!top) in encoder_process() 453 if (top) { in encoder_process() 625 if (top) in encoder_process()
|