/third_party/node/deps/openssl/openssl/crypto/bn/ |
D | bn_mont.c | 23 static int bn_from_montgomery_word(BIGNUM *ret, BIGNUM *r, BN_MONT_CTX *mont); 27 BN_MONT_CTX *mont, BN_CTX *ctx) in BN_mod_mul_montgomery() argument 29 int ret = bn_mul_mont_fixed_top(r, a, b, mont, ctx); in BN_mod_mul_montgomery() 38 BN_MONT_CTX *mont, BN_CTX *ctx) in bn_mul_mont_fixed_top() argument 42 int num = mont->N.top; in bn_mul_mont_fixed_top() 48 if (bn_mul_mont(r->d, a->d, b->d, mont->N.d, mont->n0, num)) { in bn_mul_mont_fixed_top() 75 if (!bn_from_montgomery_word(r, tmp, mont)) in bn_mul_mont_fixed_top() 78 if (!BN_from_montgomery(r, tmp, mont, ctx)) in bn_mul_mont_fixed_top() 88 static int bn_from_montgomery_word(BIGNUM *ret, BIGNUM *r, BN_MONT_CTX *mont) in bn_from_montgomery_word() argument 95 n = &(mont->N); in bn_from_montgomery_word() [all …]
|
D | build.info | 9 # OPENSSL_BN_ASM_MONT For any collection with /-mont/ file names 19 $BNASM_x86=bn-586.S co-586.S x86-mont.S x86-gf2m.S 26 x86_64-mont.s x86_64-mont5.s x86_64-gf2m.s rsaz_exp.c rsaz-x86_64.s \ 37 $BNASM_ia64=bn-ia64.s ia64-mont.s 39 $BNASM_ia64=bn_asm.c ia64-mont.s 42 $BNASM_sparcv9=asm/sparcv8plus.S sparcv9-mont.S sparcv9a-mont.S vis3-mont.S \ 43 sparct4-mont.S bn_sparc.c 50 $BNASM_alpha=bn_asm.c alpha-mont.S 53 $BNASM_mips32=bn-mips.S mips-mont.S 59 $BNASM_s390x=bn_asm.c s390x-mont.S [all …]
|
D | bn_exp2.c | 27 BN_MONT_CTX *mont = NULL; in BN_mod_exp2_mont() local 57 mont = in_mont; in BN_mod_exp2_mont() 59 if ((mont = BN_MONT_CTX_new()) == NULL) in BN_mod_exp2_mont() 61 if (!BN_MONT_CTX_set(mont, m, ctx)) in BN_mod_exp2_mont() 83 if (!BN_to_montgomery(val1[0], a_mod_m, mont, ctx)) in BN_mod_exp2_mont() 86 if (!BN_mod_mul_montgomery(d, val1[0], val1[0], mont, ctx)) in BN_mod_exp2_mont() 92 !BN_mod_mul_montgomery(val1[i], val1[i - 1], d, mont, ctx)) in BN_mod_exp2_mont() 111 if (!BN_to_montgomery(val2[0], a_mod_m, mont, ctx)) in BN_mod_exp2_mont() 114 if (!BN_mod_mul_montgomery(d, val2[0], val2[0], mont, ctx)) in BN_mod_exp2_mont() 120 !BN_mod_mul_montgomery(val2[i], val2[i - 1], d, mont, ctx)) in BN_mod_exp2_mont() [all …]
|
D | bn_exp.c | 321 BN_MONT_CTX *mont = NULL; in BN_mod_exp_mont() local 363 mont = in_mont; in BN_mod_exp_mont() 365 if ((mont = BN_MONT_CTX_new()) == NULL) in BN_mod_exp_mont() 367 if (!BN_MONT_CTX_set(mont, m, ctx)) in BN_mod_exp_mont() 377 if (!bn_to_mont_fixed_top(val[0], aa, mont, ctx)) in BN_mod_exp_mont() 382 if (!bn_mul_mont_fixed_top(d, val[0], val[0], mont, ctx)) in BN_mod_exp_mont() 387 !bn_mul_mont_fixed_top(val[i], val[i - 1], d, mont, ctx)) in BN_mod_exp_mont() 412 if (!bn_to_mont_fixed_top(r, BN_value_one(), mont, ctx)) in BN_mod_exp_mont() 417 if (!bn_mul_mont_fixed_top(r, r, r, mont, ctx)) in BN_mod_exp_mont() 447 if (!bn_mul_mont_fixed_top(r, r, r, mont, ctx)) in BN_mod_exp_mont() [all …]
|
D | bn_prime.c | 343 BN_MONT_CTX *mont = NULL; in ossl_bn_miller_rabin_is_prime() local 380 mont = BN_MONT_CTX_new(); in ossl_bn_miller_rabin_is_prime() 381 if (mont == NULL || !BN_MONT_CTX_set(mont, w, ctx)) in ossl_bn_miller_rabin_is_prime() 406 if (!BN_mod_exp_mont(z, b, m, w, ctx, mont)) in ossl_bn_miller_rabin_is_prime() 465 BN_MONT_CTX_free(mont); in ossl_bn_miller_rabin_is_prime()
|
/third_party/openssl/crypto/bn/ |
D | bn_mont.c | 23 static int bn_from_montgomery_word(BIGNUM *ret, BIGNUM *r, BN_MONT_CTX *mont); 27 BN_MONT_CTX *mont, BN_CTX *ctx) in BN_mod_mul_montgomery() argument 29 int ret = bn_mul_mont_fixed_top(r, a, b, mont, ctx); in BN_mod_mul_montgomery() 38 BN_MONT_CTX *mont, BN_CTX *ctx) in bn_mul_mont_fixed_top() argument 42 int num = mont->N.top; in bn_mul_mont_fixed_top() 48 if (bn_mul_mont(r->d, a->d, b->d, mont->N.d, mont->n0, num)) { in bn_mul_mont_fixed_top() 75 if (!bn_from_montgomery_word(r, tmp, mont)) in bn_mul_mont_fixed_top() 78 if (!BN_from_montgomery(r, tmp, mont, ctx)) in bn_mul_mont_fixed_top() 88 static int bn_from_montgomery_word(BIGNUM *ret, BIGNUM *r, BN_MONT_CTX *mont) in bn_from_montgomery_word() argument 95 n = &(mont->N); in bn_from_montgomery_word() [all …]
|
D | build.info | 9 # OPENSSL_BN_ASM_MONT For any collection with /-mont/ file names 19 $BNASM_x86=bn-586.S co-586.S x86-mont.S x86-gf2m.S 26 x86_64-mont.s x86_64-mont5.s x86_64-gf2m.s rsaz_exp.c rsaz-x86_64.s \ 37 $BNASM_ia64=bn-ia64.s ia64-mont.s 39 $BNASM_ia64=bn_asm.c ia64-mont.s 42 $BNASM_sparcv9=asm/sparcv8plus.S sparcv9-mont.S sparcv9a-mont.S vis3-mont.S \ 43 sparct4-mont.S bn_sparc.c 50 $BNASM_alpha=bn_asm.c alpha-mont.S 53 $BNASM_mips32=bn-mips.S mips-mont.S 59 $BNASM_s390x=bn_asm.c s390x-mont.S [all …]
|
D | bn_exp2.c | 27 BN_MONT_CTX *mont = NULL; in BN_mod_exp2_mont() local 57 mont = in_mont; in BN_mod_exp2_mont() 59 if ((mont = BN_MONT_CTX_new()) == NULL) in BN_mod_exp2_mont() 61 if (!BN_MONT_CTX_set(mont, m, ctx)) in BN_mod_exp2_mont() 83 if (!BN_to_montgomery(val1[0], a_mod_m, mont, ctx)) in BN_mod_exp2_mont() 86 if (!BN_mod_mul_montgomery(d, val1[0], val1[0], mont, ctx)) in BN_mod_exp2_mont() 92 !BN_mod_mul_montgomery(val1[i], val1[i - 1], d, mont, ctx)) in BN_mod_exp2_mont() 111 if (!BN_to_montgomery(val2[0], a_mod_m, mont, ctx)) in BN_mod_exp2_mont() 114 if (!BN_mod_mul_montgomery(d, val2[0], val2[0], mont, ctx)) in BN_mod_exp2_mont() 120 !BN_mod_mul_montgomery(val2[i], val2[i - 1], d, mont, ctx)) in BN_mod_exp2_mont() [all …]
|
D | bn_exp.c | 313 BN_MONT_CTX *mont = NULL; in BN_mod_exp_mont() local 355 mont = in_mont; in BN_mod_exp_mont() 357 if ((mont = BN_MONT_CTX_new()) == NULL) in BN_mod_exp_mont() 359 if (!BN_MONT_CTX_set(mont, m, ctx)) in BN_mod_exp_mont() 369 if (!bn_to_mont_fixed_top(val[0], aa, mont, ctx)) in BN_mod_exp_mont() 374 if (!bn_mul_mont_fixed_top(d, val[0], val[0], mont, ctx)) in BN_mod_exp_mont() 379 !bn_mul_mont_fixed_top(val[i], val[i - 1], d, mont, ctx)) in BN_mod_exp_mont() 404 if (!bn_to_mont_fixed_top(r, BN_value_one(), mont, ctx)) in BN_mod_exp_mont() 409 if (!bn_mul_mont_fixed_top(r, r, r, mont, ctx)) in BN_mod_exp_mont() 439 if (!bn_mul_mont_fixed_top(r, r, r, mont, ctx)) in BN_mod_exp_mont() [all …]
|
/third_party/mbedtls/library/ |
D | bignum_mod.c | 82 if (N->rep.mont.rr != NULL) { in mbedtls_mpi_mod_modulus_free() 83 mbedtls_platform_zeroize((mbedtls_mpi_uint *) N->rep.mont.rr, in mbedtls_mpi_mod_modulus_free() 85 mbedtls_free((mbedtls_mpi_uint *) N->rep.mont.rr); in mbedtls_mpi_mod_modulus_free() 86 N->rep.mont.rr = NULL; in mbedtls_mpi_mod_modulus_free() 88 N->rep.mont.mm = 0; in mbedtls_mpi_mod_modulus_free() 153 N->rep.mont.mm = mbedtls_mpi_core_montmul_init(N->p); in mbedtls_mpi_mod_modulus_setup() 154 ret = set_mont_const_square(&N->rep.mont.rr, N->p, N->limbs); in mbedtls_mpi_mod_modulus_setup() 230 N->rep.mont.rr, in mbedtls_mpi_mod_inv_mont() 252 Nmont.rep.mont.mm, Nmont.rep.mont.rr, in mbedtls_mpi_mod_inv_non_mont() 257 Nmont.rep.mont.rr, in mbedtls_mpi_mod_inv_non_mont() [all …]
|
D | bignum_mod_raw.c | 143 N->rep.mont.mm, T); in mbedtls_mpi_mod_raw_mul() 257 N->rep.mont.mm, N->rep.mont.rr, T); in mbedtls_mpi_mod_raw_to_mont_rep() 274 mbedtls_mpi_core_from_mont_rep(X, X, N->p, N->limbs, N->rep.mont.mm, T); in mbedtls_mpi_mod_raw_from_mont_rep()
|
/third_party/node/deps/openssl/openssl/crypto/ec/ |
D | ecp_mont.c | 147 BN_MONT_CTX *mont = NULL; in ossl_ec_GFp_mont_group_set_curve() local 162 mont = BN_MONT_CTX_new(); in ossl_ec_GFp_mont_group_set_curve() 163 if (mont == NULL) in ossl_ec_GFp_mont_group_set_curve() 165 if (!BN_MONT_CTX_set(mont, p, ctx)) { in ossl_ec_GFp_mont_group_set_curve() 172 if (!BN_to_montgomery(one, BN_value_one(), mont, ctx)) in ossl_ec_GFp_mont_group_set_curve() 175 group->field_data1 = mont; in ossl_ec_GFp_mont_group_set_curve() 176 mont = NULL; in ossl_ec_GFp_mont_group_set_curve() 192 BN_MONT_CTX_free(mont); in ossl_ec_GFp_mont_group_set_curve()
|
/third_party/openssl/crypto/ec/ |
D | ecp_mont.c | 147 BN_MONT_CTX *mont = NULL; in ossl_ec_GFp_mont_group_set_curve() local 162 mont = BN_MONT_CTX_new(); in ossl_ec_GFp_mont_group_set_curve() 163 if (mont == NULL) in ossl_ec_GFp_mont_group_set_curve() 165 if (!BN_MONT_CTX_set(mont, p, ctx)) { in ossl_ec_GFp_mont_group_set_curve() 172 if (!BN_to_montgomery(one, BN_value_one(), mont, ctx)) in ossl_ec_GFp_mont_group_set_curve() 175 group->field_data1 = mont; in ossl_ec_GFp_mont_group_set_curve() 176 mont = NULL; in ossl_ec_GFp_mont_group_set_curve() 192 BN_MONT_CTX_free(mont); in ossl_ec_GFp_mont_group_set_curve()
|
/third_party/openssl/doc/man3/ |
D | BN_mod_mul_montgomery.pod | 14 void BN_MONT_CTX_free(BN_MONT_CTX *mont); 16 int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *m, BN_CTX *ctx); 20 BN_MONT_CTX *mont, BN_CTX *ctx); 22 int BN_from_montgomery(BIGNUM *r, BIGNUM *a, BN_MONT_CTX *mont, 25 int BN_to_montgomery(BIGNUM *r, BIGNUM *a, BN_MONT_CTX *mont, 37 BN_MONT_CTX_set() sets up the I<mont> structure from the modulus I<m> 44 If B<mont> is NULL, nothing is done.
|
/third_party/openssl/crypto/ffc/ |
D | ffc_params_generate.c | 95 static int generate_unverifiable_g(BN_CTX *ctx, BN_MONT_CTX *mont, BIGNUM *g, in generate_unverifiable_g() argument 108 if (!BN_mod_exp_mont(g, hbn, e, p, ctx, mont)) in generate_unverifiable_g() 132 static int generate_canonical_g(BN_CTX *ctx, BN_MONT_CTX *mont, in generate_canonical_g() argument 174 || !BN_mod_exp_mont(g, tmp, e, p, ctx, mont)) in generate_canonical_g() 524 BN_MONT_CTX *mont = NULL; in ossl_ffc_params_FIPS186_4_gen_verify() local 726 if ((mont = BN_MONT_CTX_new()) == NULL) in ossl_ffc_params_FIPS186_4_gen_verify() 728 if (!BN_MONT_CTX_set(mont, p, ctx)) in ossl_ffc_params_FIPS186_4_gen_verify() 732 && !ossl_ffc_params_validate_unverifiable_g(ctx, mont, p, q, params->g, in ossl_ffc_params_FIPS186_4_gen_verify() 748 if (!generate_canonical_g(ctx, mont, md, g, tmp, p, e, in ossl_ffc_params_FIPS186_4_gen_verify() 759 if (!generate_unverifiable_g(ctx, mont, g, tmp, p, e, pm1, &hret)) in ossl_ffc_params_FIPS186_4_gen_verify() [all …]
|
/third_party/node/deps/openssl/openssl/crypto/ffc/ |
D | ffc_params_generate.c | 95 static int generate_unverifiable_g(BN_CTX *ctx, BN_MONT_CTX *mont, BIGNUM *g, in generate_unverifiable_g() argument 108 if (!BN_mod_exp_mont(g, hbn, e, p, ctx, mont)) in generate_unverifiable_g() 132 static int generate_canonical_g(BN_CTX *ctx, BN_MONT_CTX *mont, in generate_canonical_g() argument 174 || !BN_mod_exp_mont(g, tmp, e, p, ctx, mont)) in generate_canonical_g() 524 BN_MONT_CTX *mont = NULL; in ossl_ffc_params_FIPS186_4_gen_verify() local 726 if ((mont = BN_MONT_CTX_new()) == NULL) in ossl_ffc_params_FIPS186_4_gen_verify() 728 if (!BN_MONT_CTX_set(mont, p, ctx)) in ossl_ffc_params_FIPS186_4_gen_verify() 732 && !ossl_ffc_params_validate_unverifiable_g(ctx, mont, p, q, params->g, in ossl_ffc_params_FIPS186_4_gen_verify() 748 if (!generate_canonical_g(ctx, mont, md, g, tmp, p, e, in ossl_ffc_params_FIPS186_4_gen_verify() 759 if (!generate_unverifiable_g(ctx, mont, g, tmp, p, e, pm1, &hret)) in ossl_ffc_params_FIPS186_4_gen_verify() [all …]
|
/third_party/openssl/test/ |
D | exptest.c | 53 BN_MONT_CTX *mont = NULL; in test_mod_exp_zero() local 98 if (!TEST_ptr(mont = BN_MONT_CTX_new())) in test_mod_exp_zero() 103 if (!TEST_false(BN_mod_exp_mont_consttime(r, p, a, m, ctx, mont))) in test_mod_exp_zero() 105 if (!TEST_false(BN_mod_exp_mont(r, p, a, m, ctx, mont))) in test_mod_exp_zero() 109 if (!TEST_true(BN_MONT_CTX_set(mont, m, ctx))) in test_mod_exp_zero() 113 if (!TEST_true(BN_mod_exp_mont_consttime(r, p, a, m, ctx, mont))) in test_mod_exp_zero() 119 if (!TEST_true(BN_mod_exp_mont(r, p, a, m, ctx, mont))) in test_mod_exp_zero() 145 BN_MONT_CTX_free(mont); in test_mod_exp_zero()
|
D | bntest.c | 457 BN_MONT_CTX *mont = NULL; in test_modexp_mont5() local 468 || !TEST_ptr(mont = BN_MONT_CTX_new())) in test_modexp_mont5() 501 if (!(TEST_true(BN_MONT_CTX_set(mont, n, ctx)) in test_modexp_mont5() 502 && TEST_true(BN_mod_mul_montgomery(c, a, b, mont, ctx)) in test_modexp_mont5() 503 && TEST_true(BN_mod_mul_montgomery(d, b, a, mont, ctx)) in test_modexp_mont5() 513 && TEST_true(BN_MONT_CTX_set(mont, n, ctx)) in test_modexp_mont5() 514 && TEST_true(BN_mod_mul_montgomery(c, a, a, mont, ctx)) in test_modexp_mont5() 515 && TEST_true(BN_mod_mul_montgomery(d, a, b, mont, ctx)) in test_modexp_mont5() 558 && TEST_true(BN_MONT_CTX_set(mont, n, ctx)))) in test_modexp_mont5() 561 if (!TEST_true(BN_mod_mul_montgomery(c, a, a, mont, ctx)) in test_modexp_mont5() [all …]
|
/third_party/openssl/crypto/dh/ |
D | dh_key.c | 43 BN_MONT_CTX *mont = NULL; in ossl_dh_compute_key() local 78 mont = BN_MONT_CTX_set_locked(&dh->method_mont_p, in ossl_dh_compute_key() 81 if (!mont) in ossl_dh_compute_key() 87 mont)) { in ossl_dh_compute_key() 231 BN_MONT_CTX *mont = NULL; in ossl_dh_generate_public_key() local 246 mont = BN_MONT_CTX_set_locked(pmont, dh->lock, dh->params.p, ctx); in ossl_dh_generate_public_key() 247 if (mont == NULL) in ossl_dh_generate_public_key() 254 ctx, mont)) in ossl_dh_generate_public_key()
|
/third_party/node/deps/openssl/openssl/crypto/dh/ |
D | dh_key.c | 43 BN_MONT_CTX *mont = NULL; in ossl_dh_compute_key() local 78 mont = BN_MONT_CTX_set_locked(&dh->method_mont_p, in ossl_dh_compute_key() 81 if (!mont) in ossl_dh_compute_key() 87 mont)) { in ossl_dh_compute_key() 230 BN_MONT_CTX *mont = NULL; in ossl_dh_generate_public_key() local 245 mont = BN_MONT_CTX_set_locked(pmont, dh->lock, dh->params.p, ctx); in ossl_dh_generate_public_key() 246 if (mont == NULL) in ossl_dh_generate_public_key() 253 ctx, mont)) in ossl_dh_generate_public_key()
|
/third_party/openssl/ohos_lite/include/crypto/ |
D | bn.h | 74 BN_MONT_CTX *mont, BN_CTX *ctx); 75 int bn_to_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, 77 int bn_from_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
|
/third_party/openssl/providers/ |
D | fips.module.sources | 36 crypto/bn/asm/alpha-mont.pl 38 crypto/bn/asm/armv4-mont.pl 39 crypto/bn/asm/armv8-mont.pl 43 crypto/bn/asm/ia64-mont.pl 45 crypto/bn/asm/mips-mont.pl 47 crypto/bn/asm/parisc-mont.pl 48 crypto/bn/asm/ppc-mont.pl 50 crypto/bn/asm/ppc64-mont-fixed.pl 51 crypto/bn/asm/ppc64-mont.pl 56 crypto/bn/asm/s390x-mont.pl [all …]
|
/third_party/node/deps/openssl/openssl/providers/ |
D | fips.module.sources | 36 crypto/bn/asm/alpha-mont.pl 38 crypto/bn/asm/armv4-mont.pl 39 crypto/bn/asm/armv8-mont.pl 43 crypto/bn/asm/ia64-mont.pl 45 crypto/bn/asm/mips-mont.pl 47 crypto/bn/asm/parisc-mont.pl 48 crypto/bn/asm/ppc-mont.pl 50 crypto/bn/asm/ppc64-mont-fixed.pl 51 crypto/bn/asm/ppc64-mont.pl 56 crypto/bn/asm/s390x-mont.pl [all …]
|
/third_party/openssl/include/crypto/ |
D | bn.h | 75 BN_MONT_CTX *mont, BN_CTX *ctx); 76 int bn_to_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, 78 int bn_from_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
|
/third_party/node/deps/openssl/openssl/include/crypto/ |
D | bn.h | 75 BN_MONT_CTX *mont, BN_CTX *ctx); 76 int bn_to_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, 78 int bn_from_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
|