Home
last modified time | relevance | path

Searched refs:bnctx (Results 1 – 14 of 14) sorted by relevance

/freebsd/contrib/libfido2/src/
H A Des384.c114 BN_CTX *bnctx = NULL; in es384_pk_to_EVP_PKEY() local
123 if ((bnctx = BN_CTX_new()) == NULL) in es384_pk_to_EVP_PKEY()
126 BN_CTX_start(bnctx); in es384_pk_to_EVP_PKEY()
128 if ((x = BN_CTX_get(bnctx)) == NULL || in es384_pk_to_EVP_PKEY()
129 (y = BN_CTX_get(bnctx)) == NULL) in es384_pk_to_EVP_PKEY()
145 EC_POINT_set_affine_coordinates_GFp(g, q, x, y, bnctx) == 0 || in es384_pk_to_EVP_PKEY()
161 if (bnctx != NULL) { in es384_pk_to_EVP_PKEY()
162 BN_CTX_end(bnctx); in es384_pk_to_EVP_PKEY()
163 BN_CTX_free(bnctx); in es384_pk_to_EVP_PKEY()
182 BN_CTX *bnctx = NULL; in es384_pk_from_EC_KEY() local
[all …]
H A Des256.c271 BN_CTX *bnctx = NULL; in es256_pk_to_EVP_PKEY() local
280 if ((bnctx = BN_CTX_new()) == NULL) in es256_pk_to_EVP_PKEY()
283 BN_CTX_start(bnctx); in es256_pk_to_EVP_PKEY()
285 if ((x = BN_CTX_get(bnctx)) == NULL || in es256_pk_to_EVP_PKEY()
286 (y = BN_CTX_get(bnctx)) == NULL) in es256_pk_to_EVP_PKEY()
302 EC_POINT_set_affine_coordinates_GFp(g, q, x, y, bnctx) == 0 || in es256_pk_to_EVP_PKEY()
318 if (bnctx != NULL) { in es256_pk_to_EVP_PKEY()
319 BN_CTX_end(bnctx); in es256_pk_to_EVP_PKEY()
320 BN_CTX_free(bnctx); in es256_pk_to_EVP_PKEY()
339 BN_CTX *bnctx = NULL; in es256_pk_from_EC_KEY() local
[all …]
/freebsd/crypto/openssl/providers/fips/
H A Dself_test_kats.c202 BN_CTX *bnctx = NULL; in self_test_kdf() local
220 bnctx = BN_CTX_new_ex(libctx); in self_test_kdf()
221 if (bnctx == NULL) in self_test_kdf()
223 if (!add_params(bld, t->params, bnctx)) in self_test_kdf()
243 BN_CTX_free(bnctx); in self_test_kdf()
373 BN_CTX *bnctx = NULL; in self_test_ka() local
377 bnctx = BN_CTX_new_ex(libctx); in self_test_ka()
378 if (bnctx == NULL) in self_test_ka()
385 if (!add_params(bld, t->key_group, bnctx) in self_test_ka()
386 || !add_params(bld, t->key_host_data, bnctx)) in self_test_ka()
[all …]
/freebsd/crypto/openssl/providers/implementations/kem/
H A Drsa_kem.c213 BN_CTX *bnctx; in rsasve_gen_rand_bytes() local
216 bnctx = BN_CTX_secure_new_ex(ossl_rsa_get0_libctx(rsa_pub)); in rsasve_gen_rand_bytes()
217 if (bnctx == NULL) in rsasve_gen_rand_bytes()
226 BN_CTX_start(bnctx); in rsasve_gen_rand_bytes()
227 nminus3 = BN_CTX_get(bnctx); in rsasve_gen_rand_bytes()
228 z = BN_CTX_get(bnctx); in rsasve_gen_rand_bytes()
232 && BN_priv_rand_range_ex(z, nminus3, 0, bnctx) in rsasve_gen_rand_bytes()
235 BN_CTX_end(bnctx); in rsasve_gen_rand_bytes()
236 BN_CTX_free(bnctx); in rsasve_gen_rand_bytes()
/freebsd/crypto/openssl/providers/implementations/keymgmt/
H A Dec_kmgmt.c121 BN_CTX *bnctx = NULL; in key_to_params() local
136 bnctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(eckey)); in key_to_params()
137 if (bnctx == NULL) in key_to_params()
154 pub_key, bnctx)) == 0 in key_to_params()
162 x = BN_CTX_get(bnctx); in key_to_params()
167 y = BN_CTX_get(bnctx); in key_to_params()
172 if (!EC_POINT_get_affine_coordinates(ecg, pub_point, x, y, bnctx)) in key_to_params()
234 BN_CTX_free(bnctx); in key_to_params()
456 BN_CTX *bnctx = NULL; in ec_export() local
486 bnctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(ec)); in ec_export()
[all …]
/freebsd/contrib/wpa/src/crypto/
H A Dcrypto_openssl.c2005 BN_CTX *bnctx; in crypto_bignum_mod() local
2007 bnctx = BN_CTX_new(); in crypto_bignum_mod()
2008 if (bnctx == NULL) in crypto_bignum_mod()
2011 bnctx); in crypto_bignum_mod()
2012 BN_CTX_free(bnctx); in crypto_bignum_mod()
2024 BN_CTX *bnctx; in crypto_bignum_exptmod() local
2029 bnctx = BN_CTX_new(); in crypto_bignum_exptmod()
2030 if (bnctx == NULL) in crypto_bignum_exptmod()
2034 bnctx, NULL); in crypto_bignum_exptmod()
2035 BN_CTX_free(bnctx); in crypto_bignum_exptmod()
[all …]
/freebsd/crypto/openssl/crypto/ec/
H A Dec_ameth.c486 BN_CTX *bnctx = NULL; in ec_pkey_export_to() local
501 bnctx = BN_CTX_new_ex(libctx); in ec_pkey_export_to()
502 if (bnctx == NULL) in ec_pkey_export_to()
504 BN_CTX_start(bnctx); in ec_pkey_export_to()
507 if (!ossl_ec_group_todata(ecg, tmpl, NULL, libctx, propq, bnctx, &gen_buf)) in ec_pkey_export_to()
520 &pub_key_buf, bnctx)) == 0 in ec_pkey_export_to()
604 BN_CTX_end(bnctx); in ec_pkey_export_to()
605 BN_CTX_free(bnctx); in ec_pkey_export_to()
H A Dec_backend.c157 OSSL_PARAM params[], BN_CTX *bnctx, in ec_group_explicit_todata() argument
188 BIGNUM *p = BN_CTX_get(bnctx); in ec_group_explicit_todata()
189 BIGNUM *a = BN_CTX_get(bnctx); in ec_group_explicit_todata()
190 BIGNUM *b = BN_CTX_get(bnctx); in ec_group_explicit_todata()
197 if (!EC_GROUP_get_curve(group, p, a, b, bnctx)) { in ec_group_explicit_todata()
244 genbuf_len = EC_POINT_point2buf(group, genpt, genform, genbuf, bnctx); in ec_group_explicit_todata()
291 BN_CTX *bnctx, unsigned char **genbuf) in ossl_ec_group_todata() argument
334 if (!ec_group_explicit_todata(group, tmpl, params, bnctx, genbuf)) in ossl_ec_group_todata()
H A Dec_lib.c1552 BN_CTX *bnctx = NULL; in EC_GROUP_new_from_params() local
1584 bnctx = BN_CTX_new_ex(libctx); in EC_GROUP_new_from_params()
1585 if (bnctx == NULL) { in EC_GROUP_new_from_params()
1589 BN_CTX_start(bnctx); in EC_GROUP_new_from_params()
1591 p = BN_CTX_get(bnctx); in EC_GROUP_new_from_params()
1592 a = BN_CTX_get(bnctx); in EC_GROUP_new_from_params()
1593 b = BN_CTX_get(bnctx); in EC_GROUP_new_from_params()
1594 order = BN_CTX_get(bnctx); in EC_GROUP_new_from_params()
1646 group = EC_GROUP_new_curve_GFp(p, a, b, bnctx); in EC_GROUP_new_from_params()
1692 if (!EC_POINT_oct2point(group, point, buf, ptmp->data_size, bnctx)) { in EC_GROUP_new_from_params()
[all …]
/freebsd/crypto/openssl/test/
H A Dendecode_test.c57 static BN_CTX *bnctx = NULL; variable
1103 return TEST_ptr(a = BN_CTX_get(bnctx)) in do_create_ec_explicit_prime_params()
1104 && TEST_ptr(b = BN_CTX_get(bnctx)) in do_create_ec_explicit_prime_params()
1105 && TEST_ptr(prime = BN_CTX_get(bnctx)) in do_create_ec_explicit_prime_params()
1106 && TEST_ptr(order = BN_CTX_get(bnctx)) in do_create_ec_explicit_prime_params()
1192 return TEST_ptr(a = BN_CTX_get(bnctx)) in do_create_ec_explicit_trinomial_params()
1193 && TEST_ptr(b = BN_CTX_get(bnctx)) in do_create_ec_explicit_trinomial_params()
1194 && TEST_ptr(poly = BN_CTX_get(bnctx)) in do_create_ec_explicit_trinomial_params()
1195 && TEST_ptr(order = BN_CTX_get(bnctx)) in do_create_ec_explicit_trinomial_params()
1196 && TEST_ptr(cofactor = BN_CTX_get(bnctx)) in do_create_ec_explicit_trinomial_params()
[all …]
H A Dectest.c2300 BN_CTX *bnctx) in ec_point_hex2point_test_helper() argument
2314 if (!TEST_ptr(hex = EC_POINT_point2hex(group, P, form, bnctx)) in ec_point_hex2point_test_helper()
2315 || !TEST_ptr(Q = EC_POINT_hex2point(group, hex, NULL, bnctx)) in ec_point_hex2point_test_helper()
2316 || !TEST_int_eq(0, EC_POINT_cmp(group, Q, P, bnctx))) in ec_point_hex2point_test_helper()
2348 BN_CTX * bnctx = NULL; in ec_point_hex2point_test() local
2352 if (!TEST_ptr(bnctx = BN_CTX_new()) in ec_point_hex2point_test()
2360 bnctx)) in ec_point_hex2point_test()
2363 bnctx)) in ec_point_hex2point_test()
2366 bnctx)) in ec_point_hex2point_test()
2369 bnctx)) in ec_point_hex2point_test()
[all …]
/freebsd/crypto/openssl/include/crypto/
H A Dec.h74 BN_CTX *bnctx, unsigned char **genbuf);
/freebsd/crypto/heimdal/lib/hx509/
H A Dcrypto.c491 BN_CTX *bnctx = NULL; in ecdsa_available() local
507 bnctx = BN_CTX_new(); in ecdsa_available()
512 if (EC_GROUP_get_order(group, order, bnctx) != 1) in ecdsa_available()
518 if (bnctx) in ecdsa_available()
519 BN_CTX_free(bnctx); in ecdsa_available()
/freebsd/crypto/openssl/crypto/evp/
H A Dctrl_params_translate.c1642 BN_CTX *bnctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(eckey)); in get_payload_public_key() local
1646 if (bnctx == NULL) in get_payload_public_key()
1650 &buf, bnctx); in get_payload_public_key()
1652 BN_CTX_free(bnctx); in get_payload_public_key()