/openssl/test/ |
H A D | testutil.h | 466 # define TEST_ptr(a) test_ptr(__FILE__, __LINE__, #a, a) argument 467 # define TEST_ptr_null(a) test_ptr_null(__FILE__, __LINE__, #a, a) argument 488 # define TEST_BN_eq_zero(a) test_BN_eq_zero(__FILE__, __LINE__, #a, a) argument 489 # define TEST_BN_ne_zero(a) test_BN_ne_zero(__FILE__, __LINE__, #a, a) argument 490 # define TEST_BN_lt_zero(a) test_BN_lt_zero(__FILE__, __LINE__, #a, a) argument 491 # define TEST_BN_gt_zero(a) test_BN_gt_zero(__FILE__, __LINE__, #a, a) argument 492 # define TEST_BN_le_zero(a) test_BN_le_zero(__FILE__, __LINE__, #a, a) argument 493 # define TEST_BN_ge_zero(a) test_BN_ge_zero(__FILE__, __LINE__, #a, a) argument 494 # define TEST_BN_eq_one(a) test_BN_eq_one(__FILE__, __LINE__, #a, a) argument 497 # define TEST_BN_odd(a) test_BN_odd(__FILE__, __LINE__, #a, a) argument [all …]
|
H A D | constant_time_test.c | 264 a, b, a < b) in test_binops() 266 b, a, b < a) in test_binops() 268 a, b, a >= b) in test_binops() 270 b, a, b >= a) in test_binops() 272 a, b, a == b) in test_binops() 274 b, a, b == a)) in test_binops() 290 a, b, a < b) in test_binops_8() 292 b, a, b < a) in test_binops_8() 294 a, b, a >= b) in test_binops_8() 318 a, b, a < b) in test_binops_s() [all …]
|
H A D | safe_math_test.c | 29 int a, b; member 58 const int a = test_ints[n].a, b = test_ints[n].b; in test_int_ops() local 114 || (!err && !TEST_int_eq(r, a < 0 ? -a : a))) in test_int_ops() 147 const unsigned int a = test_uints[n].a, b = test_uints[n].b; in test_uint_ops() local 182 || (!err && !TEST_uint_eq(r, a / b + (a % b != 0)))) in test_uint_ops() 211 size_t a, b; member 230 const size_t a = test_size_ts[n].a, b = test_size_ts[n].b; in test_size_t_ops() local 265 || (!err && !TEST_size_t_eq(r, a / b + (a % b != 0)))) in test_size_t_ops() 294 int a, b, c; member 317 const int a = test_muldiv_ints[n].a; in test_int_muldiv() local [all …]
|
H A D | bntests.pl | 34 my $a = bn($s{'A'}); 40 my $a = bn($s{'A'}); 45 my $a = bn($s{'A'}); 51 my $a = bn($s{'A'}); 57 my $a = bn($s{'A'}); 58 return if $square == $a->bmul($a); 81 $a = bn($s{'A'}); 84 $a->babs(); 86 $a->bdiv($b); 95 $a->bmul($b); [all …]
|
H A D | build.info | 113 DEPEND[ectest]=../libcrypto.a libtestutil.a 214 DEPEND[acvp_test]=../libcrypto.a libtestutil.a 283 DEPEND[quic_wire_test]=../libcrypto.a ../libssl.a libtestutil.a 472 DEPEND[drbgtest]=../libcrypto.a libtestutil.a 535 DEPEND[cipher_overhead_test]=../libcrypto.a ../libssl.a libtestutil.a 688 DEPEND[dsatest]=../libcrypto.a libtestutil.a 696 DEPEND[tls13encryptiontest]=../libcrypto.a ../libssl.a libtestutil.a 704 DEPEND[wpackettest]=../libcrypto.a ../libssl.a libtestutil.a 730 DEPEND[dhtest]=../libcrypto.a libtestutil.a 820 DEPEND[ssl_old_test]=../libcrypto.a ../libssl.a libtestutil.a [all …]
|
/openssl/crypto/ts/ |
H A D | ts_rsp_utils.c | 43 a->token = p7; in TS_RESP_set_tst_info() 50 return a->token; in TS_RESP_get_token() 55 return a->tst_info; in TS_RESP_get_tst_info() 128 return a->serial; in TS_TST_INFO_get_serial() 149 return a->time; in TS_TST_INFO_get_time() 214 return a->millis; in TS_ACCURACY_get_millis() 237 return a->micros; in TS_ACCURACY_get_micros() 269 return a->nonce; in TS_TST_INFO_get_nonce() 290 return a->tsa; in TS_TST_INFO_get_tsa() 300 if (!a) in TS_TST_INFO_ext_free() [all …]
|
H A D | ts_req_utils.c | 45 return a->msg_imprint; in TS_REQ_get_msg_imprint() 60 a->hash_algo = new_alg; in TS_MSG_IMPRINT_set_algo() 66 return a->hash_algo; in TS_MSG_IMPRINT_get_algo() 76 return a->hashed_msg; in TS_MSG_IMPRINT_get_msg() 97 return a->policy_id; in TS_REQ_get_policy_id() 104 if (a->nonce == nonce) in TS_REQ_set_nonce() 112 a->nonce = new_nonce; in TS_REQ_set_nonce() 118 return a->nonce; in TS_REQ_get_nonce() 134 return a->extensions; in STACK_OF() 139 if (!a) in TS_REQ_ext_free() [all …]
|
H A D | ts_rsp_print.c | 34 if (a->tst_info != NULL) in TS_RESP_print_bio() 93 if (a->failure_info != NULL) in TS_STATUS_INFO_print_bio() 107 for (; a->bit >= 0; ++a) { in ts_status_map_print() 122 if (a == NULL) in TS_TST_INFO_print_bio() 134 if (a->serial == NULL) in TS_TST_INFO_print_bio() 145 if (a->accuracy == NULL) in TS_TST_INFO_print_bio() 154 if (a->nonce == NULL) in TS_TST_INFO_print_bio() 161 if (a->tsa == NULL) in TS_TST_INFO_print_bio() 178 if (a->seconds != NULL) in ts_ACCURACY_print_bio() 183 if (a->millis != NULL) in ts_ACCURACY_print_bio() [all …]
|
/openssl/include/internal/ |
H A D | constant_time.h | 102 return 0 - (a >> (sizeof(a) * 8 - 1)); in constant_time_msb() 118 return 0 - (a >> (sizeof(a) * 8 - 1)); in constant_time_msb_s() 124 return constant_time_msb(a ^ ((a ^ b) | ((a - b) ^ b))); in constant_time_lt() 129 return constant_time_msb_s(a ^ ((a ^ b) | ((a - b) ^ b))); in constant_time_lt_s() 140 return constant_time_msb_64(a ^ ((a ^ b) | ((a - b) ^ b))); in constant_time_lt_64() 167 return constant_time_msb(~a & (a - 1)); in constant_time_is_zero() 172 return constant_time_msb_s(~a & (a - 1)); in constant_time_is_zero_s() 182 return constant_time_msb_32(~a & (a - 1)); in constant_time_is_zero_32() 187 return constant_time_msb_64(~a & (a - 1)); in constant_time_is_zero_64() 337 *a ^= xor; in constant_time_cond_swap_32() [all …]
|
H A D | safe_math.h | 33 static ossl_inline ossl_unused type safe_add_ ## type_name(type a, \ 39 if (!__builtin_add_overflow(a, b, &r)) \ 42 return a < 0 ? min : max; \ 46 static ossl_inline ossl_unused type safe_add_ ## type_name(type a, \ 52 if (!__builtin_add_overflow(a, b, &r)) \ 60 static ossl_inline ossl_unused type safe_add_ ## type_name(type a, \ 65 || (a > 0 && b <= max - a) \ 66 || (a < 0 && b >= min - a) \ 171 const type x = a < 0 ? -a : a; \ 283 return a < 0 ? -a : a; \ [all …]
|
/openssl/crypto/bn/ |
H A D | bn_word.c | 78 if (!BN_lshift(a, a, j)) in BN_div_word() 89 if ((a->top > 0) && (a->d[a->top - 1] == 0)) in BN_div_word() 117 a->neg = !(a->neg); in BN_add_word() 121 a->d[i] = l = (a->d[i] + w) & BN_MASK2; in BN_add_word() 125 if (bn_wexpand(a, a->top + 1) == NULL) in BN_add_word() 159 if ((a->top == 1) && (a->d[0] < w)) { in BN_sub_word() 160 a->d[0] = w - a->d[0]; in BN_sub_word() 170 a->d[i] = (a->d[i] - w) & BN_MASK2; in BN_sub_word() 175 if ((a->d[i] == 0) && (i == (a->top - 1))) in BN_sub_word() 191 ll = bn_mul_words(a->d, a->d, a->top, w); in BN_mul_word() [all …]
|
H A D | bn_lib.c | 205 OPENSSL_secure_clear_free(a->d, a->dmax * sizeof(a->d[0])); in bn_free_d() 207 OPENSSL_clear_free(a->d, a->dmax * sizeof(a->d[0])); in bn_free_d() 220 OPENSSL_cleanse(a, sizeof(*a)); in BN_clear_free() 279 a = OPENSSL_secure_zalloc(words * sizeof(*a)); in bn_expand_internal() 281 a = OPENSSL_zalloc(words * sizeof(*a)); in bn_expand_internal() 289 memcpy(a, b->d, sizeof(*a) * b->top); in bn_expand_internal() 404 OPENSSL_cleanse(a->d, sizeof(*a->d) * a->dmax); in BN_clear() 998 return ((a->top == 1) && (a->d[0] == w)) || ((w == 0) && (a->top == 0)); in BN_abs_is_word() 1008 return BN_abs_is_word(a, 1) && !a->neg; in BN_is_one() 1018 return (a->top > 0) && (a->d[0] & 1); in BN_is_odd() [all …]
|
H A D | bn_asm.c | 94 a++; in bn_sqr_words() 187 a++; in bn_sqr_words() 305 a++; in bn_add_words() 362 a++; in bn_add_words() 462 BN_ULLONG t = (BN_ULLONG)a[i]*a[i]; \ 470 mul_add_c2((a)[i],(a)[j],c0,c1,c2) 504 mul_add_c2((a)[i],(a)[j],c0,c1,c2) 538 mul_add_c2((a)[i],(a)[j],c0,c1,c2) 546 BN_ULONG lo = LBITS(a), hi = HBITS(a); \ 555 BN_ULONG lo = LBITS(a), hi = HBITS(a); \ [all …]
|
H A D | bn_local.h | 192 # define bn_fix_top(a) bn_check_top(a) argument 209 # define bn_fix_top(a) bn_correct_top(a) argument 434 # define BN_UMULT_HIGH(a,b) __umulh((a),(b)) argument 465 int ind = (a)->dmax - (a)->top; \ 466 BN_ULONG *ftl = &(a)->d[(a)->top-1]; \ 497 t=(BN_ULLONG)(a)*(a); \ 564 # define LBITS(a) ((a)&BN_MASK2l) argument 565 # define HBITS(a) (((a)>>BN_BITS4)&BN_MASK2l) argument 566 # define L2HBITS(a) (((a)<<BN_BITS4)&BN_MASK2) argument 568 # define LLBITS(a) ((a)&BN_MASKl) argument [all …]
|
H A D | bn_mul.c | 40 a += cl; in bn_sub_part_words() 208 c1 = bn_cmp_part_words(a, &(a[n]), tna, n - tna); in bn_mul_recursive() 213 bn_sub_part_words(t, &(a[n]), a, tna, tna - n); /* - */ in bn_mul_recursive() 220 bn_sub_part_words(t, &(a[n]), a, tna, tna - n); /* - */ in bn_mul_recursive() 230 bn_sub_part_words(t, a, &(a[n]), tna, n - tna); /* + */ in bn_mul_recursive() 238 bn_sub_part_words(t, a, &(a[n]), tna, n - tna); in bn_mul_recursive() 335 c1 = bn_cmp_part_words(a, &(a[n]), tna, n - tna); in bn_mul_part_recursive() 340 bn_sub_part_words(t, &(a[n]), a, tna, tna - n); /* - */ in bn_mul_part_recursive() 345 bn_sub_part_words(t, &(a[n]), a, tna, tna - n); /* - */ in bn_mul_part_recursive() 359 bn_sub_part_words(t, a, &(a[n]), tna, n - tna); in bn_mul_part_recursive() [all …]
|
H A D | bn_shift.c | 20 bn_check_top(a); in BN_lshift1() 22 if (r != a) { in BN_lshift1() 23 r->neg = a->neg; in BN_lshift1() 26 r->top = a->top; in BN_lshift1() 31 ap = a->d; in BN_lshift1() 51 bn_check_top(a); in BN_rshift1() 57 i = a->top; in BN_rshift1() 58 ap = a->d; in BN_rshift1() 59 if (a != r) { in BN_rshift1() 114 bn_check_top(a); in bn_lshift_fixed_top() [all …]
|
/openssl/crypto/bn/asm/ |
H A D | x86_64-gcc.c | 175 sqr(r[0], r[1], a[0]); in bn_sqr_words() 176 sqr(r[2], r[3], a[1]); in bn_sqr_words() 177 sqr(r[4], r[5], a[2]); in bn_sqr_words() 178 sqr(r[6], r[7], a[3]); in bn_sqr_words() 179 a += 4; in bn_sqr_words() 269 t1 = a[0]; in bn_sub_words() 277 t1 = a[1]; in bn_sub_words() 285 t1 = a[2]; in bn_sub_words() 293 t1 = a[3]; in bn_sub_words() 301 a += 4; in bn_sub_words() [all …]
|
/openssl/crypto/asn1/ |
H A D | a_bitstr.c | 26 if (a == NULL) in ossl_i2c_ASN1_BIT_STRING() 69 d = a->data; in ossl_i2c_ASN1_BIT_STRING() 97 if ((a == NULL) || ((*a) == NULL)) { in ossl_c2i_ASN1_BIT_STRING() 135 if ((a == NULL) || (*a != ret)) in ossl_c2i_ASN1_BIT_STRING() 159 if ((a->length < (w + 1)) || (a->data == NULL)) { in ASN1_BIT_STRING_set_bit() 162 c = OPENSSL_clear_realloc(a->data, a->length, w + 1); in ASN1_BIT_STRING_set_bit() 168 memset(c + a->length, 0, w + 1 - a->length); in ASN1_BIT_STRING_set_bit() 172 a->data[w] = ((a->data[w]) & iv) | v; in ASN1_BIT_STRING_set_bit() 173 while ((a->length > 0) && (a->data[a->length - 1] == 0)) in ASN1_BIT_STRING_set_bit() 184 if ((a == NULL) || (a->length < (w + 1)) || (a->data == NULL)) in ASN1_BIT_STRING_get_bit() [all …]
|
H A D | i2d_evp.c | 33 static int i2d_provided(const EVP_PKEY *a, int selection, in i2d_provided() argument 76 if (evp_pkey_is_provided(a)) { in i2d_KeyParams() 84 if (a->ameth != NULL && a->ameth->param_encode != NULL) in i2d_KeyParams() 85 return a->ameth->param_encode(a, pp); in i2d_KeyParams() 97 if (evp_pkey_is_provided(a)) { in i2d_PrivateKey() 106 if (a->ameth != NULL && a->ameth->old_priv_encode != NULL) { in i2d_PrivateKey() 107 return a->ameth->old_priv_encode(a, pp); in i2d_PrivateKey() 109 if (a->ameth != NULL && a->ameth->priv_encode != NULL) { in i2d_PrivateKey() 110 PKCS8_PRIV_KEY_INFO *p8 = EVP_PKEY2PKCS8(a); in i2d_PrivateKey() 125 if (evp_pkey_is_provided(a)) { in i2d_PublicKey() [all …]
|
/openssl/crypto/ec/curve448/arch_64/ |
H A D | f_impl64.c | 34 aa[i] = a[i] + a[i + 4]; 113 aa[i] = a[i] + a[i + 4]; 115 accum2 = widemul(a[0], a[3]); 117 accum1 = widemul(a[4], a[7]); 119 accum2 += widemul(a[1], a[2]); 121 accum1 += widemul(a[5], a[6]); 138 accum1 += widemul(a[6], a[6]); 140 accum2 = widemul(a[0], a[0]); 144 accum0 -= widemul(a[2], a[2]); 146 accum0 += widemul(a[4], a[4]); [all …]
|
/openssl/include/openssl/ |
H A D | ts.h | 75 TS_REQ *d2i_TS_REQ_fp(FILE *fp, TS_REQ **a); 76 int i2d_TS_REQ_fp(FILE *fp, const TS_REQ *a); 78 TS_REQ *d2i_TS_REQ_bio(BIO *fp, TS_REQ **a); 79 int i2d_TS_REQ_bio(BIO *fp, const TS_REQ *a); 124 long TS_REQ_get_version(const TS_REQ *a); 151 int TS_REQ_get_cert_req(const TS_REQ *a); 154 void TS_REQ_ext_free(TS_REQ *a); 155 int TS_REQ_get_ext_count(TS_REQ *a); 166 int TS_REQ_print_bio(BIO *bio, TS_REQ *a); 175 PKCS7 *TS_RESP_get_token(TS_RESP *a); [all …]
|
H A D | bn.h | 189 # define BN_num_bytes(a) ((BN_num_bits(a)+7)/8) argument 193 int BN_is_one(const BIGNUM *a); 197 # define BN_one(a) (BN_set_word((a),1)) argument 199 void BN_zero_ex(BIGNUM *a); 202 # define BN_zero(a) BN_zero_ex(a) argument 204 # define BN_zero(a) (BN_set_word((a),0)) argument 240 void BN_clear_free(BIGNUM *a); 305 void BN_free(BIGNUM *a); 339 void BN_clear(BIGNUM *a); 479 # define BN_GF2m_sub(r, a, b) BN_GF2m_add(r, a, b) argument [all …]
|
/openssl/crypto/rc5/ |
H A D | rc5_enc.c | 98 RC5_32_INT a, b, *s; in RC5_32_encrypt() local 102 a = d[0] + s[0]; in RC5_32_encrypt() 104 E_RC5_32(a, b, s, 2); in RC5_32_encrypt() 105 E_RC5_32(a, b, s, 4); in RC5_32_encrypt() 106 E_RC5_32(a, b, s, 6); in RC5_32_encrypt() 107 E_RC5_32(a, b, s, 8); in RC5_32_encrypt() 128 d[0] = a; in RC5_32_encrypt() 134 RC5_32_INT a, b, *s; in RC5_32_decrypt() local 138 a = d[0]; in RC5_32_decrypt() 160 D_RC5_32(a, b, s, 8); in RC5_32_decrypt() [all …]
|
H A D | rc5_local.h | 129 # define ROTATE_l32(a,n) _lrotl(a,n) argument 130 # define ROTATE_r32(a,n) _lrotr(a,n) argument 132 # define ROTATE_l32(a,n) _rotl(a,n) argument 133 # define ROTATE_r32(a,n) _rotr(a,n) argument 153 # define ROTATE_l32(a,n) (((a)<<(n&0x1f))|(((a)&0xffffffff)>>((32-n)&0x1f))) argument 156 # define ROTATE_r32(a,n) (((a)<<((32-n)&0x1f))|(((a)&0xffffffff)>>(n&0x1f))) argument 169 a^=b; \ 170 a=ROTATE_l32(a,b); \ 173 b^=a; \ 185 a=ROTATE_r32(a,b); \ [all …]
|
/openssl/crypto/x509/ |
H A D | v3_genn.c | 97 if (!a || !b || a->type != b->type) in GENERAL_NAME_cmp() 99 switch (a->type) { in GENERAL_NAME_cmp() 138 if (!a || !b) in OTHERNAME_cmp() 166 a->d.ia5 = value; in GENERAL_NAME_set0_value() 174 a->d.ip = value; in GENERAL_NAME_set0_value() 178 a->d.rid = value; in GENERAL_NAME_set0_value() 181 a->type = type; in GENERAL_NAME_set0_value() 188 switch (a->type) { in GENERAL_NAME_get0_value() 201 return a->d.ia5; in GENERAL_NAME_get0_value() 207 return a->d.ip; in GENERAL_NAME_get0_value() [all …]
|