Lines Matching refs:bnctx
2005 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()
2046 BN_CTX *bnctx; in crypto_bignum_inverse() local
2050 bnctx = BN_CTX_new(); in crypto_bignum_inverse()
2051 if (bnctx == NULL) in crypto_bignum_inverse()
2059 (const BIGNUM *) b, bnctx); in crypto_bignum_inverse()
2060 BN_CTX_free(bnctx); in crypto_bignum_inverse()
2083 BN_CTX *bnctx; in crypto_bignum_div() local
2088 bnctx = BN_CTX_new(); in crypto_bignum_div()
2089 if (bnctx == NULL) in crypto_bignum_div()
2095 (const BIGNUM *) b, bnctx); in crypto_bignum_div()
2096 BN_CTX_free(bnctx); in crypto_bignum_div()
2108 BN_CTX *bnctx; in crypto_bignum_addmod() local
2113 bnctx = BN_CTX_new(); in crypto_bignum_addmod()
2114 if (!bnctx) in crypto_bignum_addmod()
2117 (const BIGNUM *) c, bnctx); in crypto_bignum_addmod()
2118 BN_CTX_free(bnctx); in crypto_bignum_addmod()
2131 BN_CTX *bnctx; in crypto_bignum_mulmod() local
2136 bnctx = BN_CTX_new(); in crypto_bignum_mulmod()
2137 if (bnctx == NULL) in crypto_bignum_mulmod()
2140 (const BIGNUM *) c, bnctx); in crypto_bignum_mulmod()
2141 BN_CTX_free(bnctx); in crypto_bignum_mulmod()
2152 BN_CTX *bnctx; in crypto_bignum_sqrmod() local
2157 bnctx = BN_CTX_new(); in crypto_bignum_sqrmod()
2158 if (!bnctx) in crypto_bignum_sqrmod()
2161 bnctx); in crypto_bignum_sqrmod()
2162 BN_CTX_free(bnctx); in crypto_bignum_sqrmod()
2203 BN_CTX *bnctx; in crypto_bignum_legendre() local
2211 bnctx = BN_CTX_new(); in crypto_bignum_legendre()
2212 if (bnctx == NULL) in crypto_bignum_legendre()
2222 (const BIGNUM *) p, bnctx, NULL)) in crypto_bignum_legendre()
2236 BN_CTX_free(bnctx); in crypto_bignum_legendre()
2247 BN_CTX *bnctx; member
2344 e->bnctx = BN_CTX_new(); in crypto_ec_init()
2350 if (e->group == NULL || e->bnctx == NULL || e->prime == NULL || in crypto_ec_init()
2352 !EC_GROUP_get_curve(e->group, e->prime, e->a, e->b, e->bnctx) || in crypto_ec_init()
2353 !EC_GROUP_get_order(e->group, e->order, e->bnctx)) { in crypto_ec_init()
2371 BN_CTX_free(e->bnctx); in crypto_ec_deinit()
2450 e->bnctx) == 1 ? 0 : -1; in crypto_ec_point_x()
2469 x_bn, y_bn, e->bnctx)) { in crypto_ec_point_to_bin()
2509 if (!EC_POINT_set_affine_coordinates(e->group, elem, x, y, e->bnctx)) { in crypto_ec_point_from_bin()
2528 (const EC_POINT *) b, e->bnctx) ? 0 : -1; in crypto_ec_point_add()
2539 (const EC_POINT *) p, (const BIGNUM *) b, e->bnctx) in crypto_ec_point_mul()
2548 return EC_POINT_invert(e->group, (EC_POINT *) p, e->bnctx) ? 0 : -1; in crypto_ec_point_invert()
2565 BN_mod_sqr(tmp, (const BIGNUM *) x, e->prime, e->bnctx) && in crypto_ec_point_compute_y_sqr()
2567 BN_mod_mul(tmp, tmp, (const BIGNUM *) x, e->prime, e->bnctx) && in crypto_ec_point_compute_y_sqr()
2587 e->bnctx) == 1; in crypto_ec_point_is_on_curve()
2596 (const EC_POINT *) b, e->bnctx); in crypto_ec_point_cmp()
2611 x, y, e->bnctx) != 1) in crypto_ec_point_debug_print()
2818 x, y, ecdh->ec->bnctx) != 1) { in crypto_ecdh_get_pubkey()
2918 x, y, ecdh->ec->bnctx)) { in crypto_ecdh_set_peerkey()
2926 ecdh->ec->bnctx)) { in crypto_ecdh_set_peerkey()
2933 if (!EC_POINT_is_on_curve(ecdh->ec->group, pub, ecdh->ec->bnctx)) { in crypto_ecdh_set_peerkey()