Lines Matching refs:bnctx
1382 BN_CTX *bnctx; in crypto_bignum_mod() local
1384 bnctx = BN_CTX_new(); in crypto_bignum_mod()
1385 if (bnctx == NULL) in crypto_bignum_mod()
1388 bnctx); in crypto_bignum_mod()
1389 BN_CTX_free(bnctx); in crypto_bignum_mod()
1401 BN_CTX *bnctx; in crypto_bignum_exptmod() local
1406 bnctx = BN_CTX_new(); in crypto_bignum_exptmod()
1407 if (bnctx == NULL) in crypto_bignum_exptmod()
1411 bnctx, NULL); in crypto_bignum_exptmod()
1412 BN_CTX_free(bnctx); in crypto_bignum_exptmod()
1423 BN_CTX *bnctx; in crypto_bignum_inverse() local
1427 bnctx = BN_CTX_new(); in crypto_bignum_inverse()
1428 if (bnctx == NULL) in crypto_bignum_inverse()
1436 (const BIGNUM *) b, bnctx); in crypto_bignum_inverse()
1437 BN_CTX_free(bnctx); in crypto_bignum_inverse()
1460 BN_CTX *bnctx; in crypto_bignum_div() local
1465 bnctx = BN_CTX_new(); in crypto_bignum_div()
1466 if (bnctx == NULL) in crypto_bignum_div()
1472 (const BIGNUM *) b, bnctx); in crypto_bignum_div()
1473 BN_CTX_free(bnctx); in crypto_bignum_div()
1485 BN_CTX *bnctx; in crypto_bignum_addmod() local
1490 bnctx = BN_CTX_new(); in crypto_bignum_addmod()
1491 if (!bnctx) in crypto_bignum_addmod()
1494 (const BIGNUM *) c, bnctx); in crypto_bignum_addmod()
1495 BN_CTX_free(bnctx); in crypto_bignum_addmod()
1508 BN_CTX *bnctx; in crypto_bignum_mulmod() local
1513 bnctx = BN_CTX_new(); in crypto_bignum_mulmod()
1514 if (bnctx == NULL) in crypto_bignum_mulmod()
1517 (const BIGNUM *) c, bnctx); in crypto_bignum_mulmod()
1518 BN_CTX_free(bnctx); in crypto_bignum_mulmod()
1529 BN_CTX *bnctx; in crypto_bignum_sqrmod() local
1534 bnctx = BN_CTX_new(); in crypto_bignum_sqrmod()
1535 if (!bnctx) in crypto_bignum_sqrmod()
1538 bnctx); in crypto_bignum_sqrmod()
1539 BN_CTX_free(bnctx); in crypto_bignum_sqrmod()
1582 BN_CTX *bnctx; in crypto_bignum_legendre() local
1590 bnctx = BN_CTX_new(); in crypto_bignum_legendre()
1591 if (bnctx == NULL) in crypto_bignum_legendre()
1601 (const BIGNUM *) p, bnctx, NULL)) in crypto_bignum_legendre()
1615 BN_CTX_free(bnctx); in crypto_bignum_legendre()
1625 BN_CTX *bnctx; member
1683 e->bnctx = BN_CTX_new(); in crypto_ec_init()
1689 if (e->group == NULL || e->bnctx == NULL || e->prime == NULL || in crypto_ec_init()
1691 !EC_GROUP_get_curve_GFp(e->group, e->prime, e->a, e->b, e->bnctx) || in crypto_ec_init()
1692 !EC_GROUP_get_order(e->group, e->order, e->bnctx)) { in crypto_ec_init()
1710 BN_CTX_free(e->bnctx); in crypto_ec_deinit()
1782 e->bnctx) == 1 ? 0 : -1; in crypto_ec_point_x()
1801 x_bn, y_bn, e->bnctx)) { in crypto_ec_point_to_bin()
1840 e->bnctx)) { in crypto_ec_point_from_bin()
1859 (const EC_POINT *) b, e->bnctx) ? 0 : -1; in crypto_ec_point_add()
1870 (const EC_POINT *) p, (const BIGNUM *) b, e->bnctx) in crypto_ec_point_mul()
1879 return EC_POINT_invert(e->group, (EC_POINT *) p, e->bnctx) ? 0 : -1; in crypto_ec_point_invert()
1891 e->bnctx) || in crypto_ec_point_solve_y_coord()
1892 !EC_POINT_is_on_curve(e->group, (EC_POINT *) p, e->bnctx)) in crypto_ec_point_solve_y_coord()
1912 BN_mod_sqr(tmp, (const BIGNUM *) x, e->prime, e->bnctx) && in crypto_ec_point_compute_y_sqr()
1913 BN_mod_mul(tmp, tmp, (const BIGNUM *) x, e->prime, e->bnctx) && in crypto_ec_point_compute_y_sqr()
1914 BN_mod_mul(tmp2, e->a, (const BIGNUM *) x, e->prime, e->bnctx) && in crypto_ec_point_compute_y_sqr()
1939 e->bnctx) == 1; in crypto_ec_point_is_on_curve()
1948 (const EC_POINT *) b, e->bnctx); in crypto_ec_point_cmp()
2044 x, y, ecdh->ec->bnctx) != 1) { in crypto_ecdh_get_pubkey()
2098 ecdh->ec->bnctx)) { in crypto_ecdh_set_peerkey()
2106 ecdh->ec->bnctx)) { in crypto_ecdh_set_peerkey()
2113 if (!EC_POINT_is_on_curve(ecdh->ec->group, pub, ecdh->ec->bnctx)) { in crypto_ecdh_set_peerkey()