Home
last modified time | relevance | path

Searched refs:top (Results 1 – 25 of 77) sorted by relevance

1234

/openssl/crypto/err/
H A Derr_mark.c25 es->err_marks[es->top]++; in ERR_set_mark()
38 es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1; in ERR_pop()
53 es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1; in ERR_pop_to_mark()
65 int count = 0, top; in ERR_count_to_mark() local
71 top = es->top; in ERR_count_to_mark()
75 top = top > 0 ? top - 1 : ERR_NUM_ERRORS - 1; in ERR_count_to_mark()
84 int top; in ERR_clear_last_mark() local
90 top = es->top; in ERR_clear_last_mark()
93 top = top > 0 ? top - 1 : ERR_NUM_ERRORS - 1; in ERR_clear_last_mark()
96 if (es->bottom == top) in ERR_clear_last_mark()
[all …]
H A Derr_save.c49 int top; in OSSL_ERR_STATE_save_to_mark() local
60 es->top = es->bottom = 0; in OSSL_ERR_STATE_save_to_mark()
65 for (count = 0, top = thread_es->top; in OSSL_ERR_STATE_save_to_mark()
66 thread_es->bottom != top in OSSL_ERR_STATE_save_to_mark()
69 top = top > 0 ? top - 1 : ERR_NUM_ERRORS - 1; in OSSL_ERR_STATE_save_to_mark()
99 thread_es->top = top; in OSSL_ERR_STATE_save_to_mark()
101 es->top = i - 1; in OSSL_ERR_STATE_save_to_mark()
105 es->top = es->bottom = 0; in OSSL_ERR_STATE_save_to_mark()
126 size_t top; in OSSL_ERR_STATE_restore() local
133 top = thread_es->top; in OSSL_ERR_STATE_restore()
[all …]
H A Derr_blocks.c26 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 Derr.c346 es->top = es->bottom = 0; in ERR_clear_error()
461 while (es->bottom != es->top) { in get_error_values()
463 err_clear(es, es->top, 0); in get_error_values()
464 es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1; in get_error_values()
477 if (es->bottom == es->top) in get_error_values()
482 i = es->top; in get_error_values()
787 err_clear_data(es, es->top, deallocate); in err_set_error_data_int()
831 i = es->top; in ERR_add_error_vdata()
883 int top; in err_clear_last_constant_time() local
889 top = es->top; in err_clear_last_constant_time()
[all …]
H A Derr_local.h16 es->top = (es->top + 1) % ERR_NUM_ERRORS; in err_get_slot()
17 if (es->top == es->bottom) in err_get_slot()
/openssl/crypto/bn/
H A Dbn_exp.c523 if (top > b->top) in MOD_EXP_CTIME_COPY_TO_PREBUF()
590 b->top = top; in MOD_EXP_CTIME_COPY_FROM_PREBUF()
635 top = m->top; in BN_mod_exp_mont_consttime()
760 tmp.top = am.top = 0; in BN_mod_exp_mont_consttime()
772 tmp.top = top; in BN_mod_exp_mont_consttime()
851 for (i = am.top; i < top; i++) in BN_mod_exp_mont_consttime()
853 for (i = tmp.top; i < top; i++) in BN_mod_exp_mont_consttime()
919 tmp.top = top; in BN_mod_exp_mont_consttime()
960 for (i = am.top; i < top; i++) in BN_mod_exp_mont_consttime()
962 for (i = tmp.top; i < top; i++) in BN_mod_exp_mont_consttime()
[all …]
H A Dbn_shift.c26 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()
178 int i, top, nw; in bn_rshift_fixed_top() local
197 top = a->top - nw; in bn_rshift_fixed_top()
[all …]
H A Dbn_word.c44 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 Dbn_lib.c350 a->top = b->top; in BN_copy()
380 a->top = b->top; in BN_swap()
403 a->top = 0; in BN_clear()
716 && a->top == b->top) { in BN_ucmp()
731 i = a->top - b->top; in BN_ucmp()
776 if (a->top > b->top) in BN_cmp()
778 if (a->top < b->top) in BN_cmp()
953 t = (a->top ^ b->top) & condition; in BN_consttime_swap()
954 a->top ^= t; in BN_consttime_swap()
1027 a->top = 0; in BN_zero_ex()
[all …]
H A Dbn_rand.c36 if (bits < 0 || (bits == 1 && top > 0)) in bnrand()
72 if (top >= 0) { in bnrand()
73 if (top) { in bnrand()
100 int BN_rand_ex(BIGNUM *rnd, int bits, int top, int bottom, in BN_rand_ex() argument
106 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom) in BN_rand() argument
108 return bnrand(NORMAL, rnd, bits, top, bottom, 0, NULL); in BN_rand()
111 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom) in BN_bntest_rand() argument
113 return bnrand(TESTING, rnd, bits, top, bottom, 0, NULL); in BN_bntest_rand()
124 int BN_priv_rand(BIGNUM *rnd, int bits, int top, int bottom) in BN_priv_rand() argument
126 return bnrand(PRIVATE, rnd, bits, top, bottom, 0, NULL); in BN_priv_rand()
[all …]
H A Dbn_mont.c42 int num = mont->N.top; in bn_mul_mont_fixed_top()
45 if (num > 1 && num <= BN_SOFT_LIMIT && 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()
306 tmod.top = 0; in BN_MONT_CTX_set()
398 for (i = mont->RR.top, ret = mont->N.top; i < ret; i++) in BN_MONT_CTX_set()
[all …]
H A Dbn_gf2m.c261 if (a->top < b->top) { in BN_GF2m_add()
279 r->top = at->top; in BN_GF2m_add()
317 r->top = a->top; in BN_GF2m_mod_arr()
429 zlen = a->top + b->top + 4; in BN_GF2m_mod_mul_arr()
432 s->top = zlen; in BN_GF2m_mod_mul_arr()
511 s->top = 2 * a->top; in BN_GF2m_mod_sqr_arr()
623 int top = p->top; in BN_GF2m_mod_inv_vartime() local
629 for (i = u->top; i < top; i++) in BN_GF2m_mod_inv_vartime()
631 u->top = top; in BN_GF2m_mod_inv_vartime()
638 b->top = top; in BN_GF2m_mod_inv_vartime()
[all …]
H A Dbn_add.c85 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 Dbn_gcd.c459 } else if (D->top == 1) { in int_bn_mod_inverse()
585 int i, j, top, rlen, glen, m, delta = 1, cond = 0, pow2_shifts, ret = 0; in BN_gcd() local
641 top = 1 + ((r->top >= g->top) ? r->top : g->top); in BN_gcd()
642 if (bn_wexpand(r, top) == NULL in BN_gcd()
643 || bn_wexpand(g, top) == NULL in BN_gcd()
644 || bn_wexpand(temp, top) == NULL) in BN_gcd()
648 BN_consttime_swap((~r->d[0]) & 1, r, g, top); in BN_gcd()
659 & (~((unsigned int)(g->top - 1) >> (sizeof(g->top) * 8 - 1))); in BN_gcd()
663 BN_consttime_swap(cond, r, g, top); in BN_gcd()
671 & (~((unsigned int)(g->top - 1) >> (sizeof(g->top) * 8 - 1))), in BN_gcd()
[all …]
H A Dbn_intern.c52 if (scalar->d == NULL || scalar->top == 0) { in bn_compute_wNAF()
139 return a->top; in bn_get_top()
151 for (i = a->top; i < a->dmax; i++) in bn_set_all_zero()
157 if (in->top > size) in bn_copy_words()
162 memcpy(out, in->d, sizeof(*out) * in->top); in bn_copy_words()
178 a->dmax = a->top = size; in bn_set_static_words()
192 a->top = num_words; in bn_set_words()
H A Dbn_div.c64 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 Dbn_nist.c280 for (i = 0; i < top; i++) in nist_cp_bn()
354 int top = a->top, i; in BN_nist_mod_192() local
467 r->top = BN_NIST_192_TOP; in BN_nist_mod_192()
490 int top = a->top, i; in BN_nist_mod_224() local
641 r->top = BN_NIST_224_TOP; in BN_nist_mod_224()
662 int i, top = a->top; in BN_nist_mod_256() local
874 r->top = BN_NIST_256_TOP; in BN_nist_mod_256()
899 int i, top = a->top; in BN_nist_mod_384() local
1146 r->top = BN_NIST_384_TOP; in BN_nist_mod_384()
1159 int top = a->top, i; in BN_nist_mod_521() local
[all …]
H A Dbn_conv.c23 buf = OPENSSL_malloc(a->top * BN_BYTES * 2 + 2); in BN_bn2hex()
29 for (i = a->top - 1; i >= 0; i--) { in BN_bn2hex()
181 ret->top = h; in BN_hex2bn()
187 if (ret->top != 0) in BN_hex2bn()
257 if (ret->top != 0) in BN_dec2bn()
281 if (*a == '-' && (*bn)->top != 0) in BN_asc2bn()
H A Dbn_mod.c57 size_t i, ai, bi, mtop = m->top; in bn_mod_add_fixed_top()
75 mask = (BN_ULONG)0 - ((i - a->top) >> (8 * sizeof(i) - 1)); in bn_mod_add_fixed_top()
79 mask = (BN_ULONG)0 - ((i - b->top) >> (8 * sizeof(i) - 1)); in bn_mod_add_fixed_top()
93 r->top = mtop; in bn_mod_add_fixed_top()
139 size_t i, ai, bi, mtop = m->top; in bn_mod_sub_fixed_top()
151 mask = (BN_ULONG)0 - ((i - a->top) >> (8 * sizeof(i) - 1)); in bn_mod_sub_fixed_top()
154 mask = (BN_ULONG)0 - ((i - b->top) >> (8 * sizeof(i) - 1)); in bn_mod_sub_fixed_top()
179 r->top = mtop; in bn_mod_sub_fixed_top()
H A Dbn_mul.c510 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 Dbn_local.h185 if (_bnum1->top < _bnum1->dmax) { \
193 memset(_not_const + _bnum1->top, _tmp_char, \
194 sizeof(*_not_const) * (_bnum1->dmax - _bnum1->top)); \
204 int _top = _bnum2->top; \
219 (words) >= (_bnum2)->top); \
251 int top; /* Index of last used d +1. */ member
467 int ind = (a)->dmax - (a)->top; \
468 BN_ULONG *ftl = &(a)->d[(a)->top-1]; \
H A Dbn_blind.c179 if (n->dmax >= r->top) { in BN_BLINDING_invert_ex()
180 size_t i, rtop = r->top, ntop = n->top; in BN_BLINDING_invert_ex()
189 n->top = (int)(rtop & ~mask) | (ntop & mask); in BN_BLINDING_invert_ex()
H A Dbn_sqr.c35 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 DBN_rand.pod14 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 Dsparse_array.c53 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()

Completed in 50 milliseconds

1234