Home
last modified time | relevance | path

Searched refs:mont (Results 1 – 23 of 23) sorted by relevance

/openssl/crypto/bn/
H A Dbuild.info42 $BNASM_sparcv9=asm/sparcv8plus.S sparcv9-mont.S sparcv9a-mont.S vis3-mont.S \
129 GENERATE[x86-mont.S]=asm/x86-mont.pl
138 GENERATE[vis3-mont.S]=asm/vis3-mont.pl
147 GENERATE[mips-mont.S]=asm/mips-mont.pl
150 GENERATE[s390x-mont.S]=asm/s390x-mont.pl
163 GENERATE[ia64-mont.s]=asm/ia64-mont.pl
169 GENERATE[ppc-mont.s]=asm/ppc-mont.pl
170 GENERATE[ppc64-mont.s]=asm/ppc64-mont.pl
173 GENERATE[alpha-mont.S]=asm/alpha-mont.pl
175 GENERATE[armv4-mont.S]=asm/armv4-mont.pl
[all …]
H A Dbn_mont.c48 if (bn_mul_mont(r->d, a->d, b->d, mont->N.d, mont->n0, num)) { in bn_mul_mont_fixed_top()
95 n = &(mont->N); in bn_from_montgomery_word()
118 n0 = mont->n0[0]; in bn_from_montgomery_word()
225 return bn_mul_mont_fixed_top(r, a, &(mont->RR), mont, ctx); in bn_to_mont_fixed_top()
252 if (mont == NULL) in BN_MONT_CTX_free()
277 mont->N.neg = 0; in BN_MONT_CTX_set()
372 mont->ri = BN_num_bits(&mont->N); in BN_MONT_CTX_set()
386 if (!BN_div(&(mont->Ni), NULL, Ri, &mont->N, ctx)) in BN_MONT_CTX_set()
393 if (!BN_set_bit(&(mont->RR), mont->ri * 2)) in BN_MONT_CTX_set()
395 if (!BN_mod(&(mont->RR), &(mont->RR), &(mont->N), ctx)) in BN_MONT_CTX_set()
[all …]
H A Dbn_exp2.c27 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()
111 if (!BN_to_montgomery(val2[0], a_mod_m, mont, ctx)) in BN_mod_exp2_mont()
134 if (!BN_to_montgomery(r, BN_value_one(), mont, ctx)) in BN_mod_exp2_mont()
138 if (!BN_mod_mul_montgomery(r, r, r, mont, ctx)) in BN_mod_exp2_mont()
192 if (!BN_from_montgomery(rr, r, mont, ctx)) in BN_mod_exp2_mont()
[all …]
H A Dbn_exp.c321 BN_MONT_CTX *mont = NULL; in BN_mod_exp_mont() local
363 mont = in_mont; in BN_mod_exp_mont()
483 BN_MONT_CTX_free(mont); in BN_mod_exp_mont()
615 BN_MONT_CTX *mont = NULL; in BN_mod_exp_mont_consttime() local
665 mont = in_mont; in BN_mod_exp_mont_consttime()
702 RSAZ_512_mod_exp(rr->d, a->d, p->d, m->d, mont->n0[0], mont->RR.d); in BN_mod_exp_mont_consttime()
843 BN_ULONG *np = mont->N.d, *n0 = mont->n0; in BN_mod_exp_mont_consttime()
1154 BN_MONT_CTX_free(mont); in BN_mod_exp_mont_consttime()
1166 BN_MONT_CTX *mont = NULL; in BN_mod_exp_mont_word() local
1230 mont = in_mont; in BN_mod_exp_mont_word()
[all …]
H A Dbn_prime.c352 BN_MONT_CTX *mont = NULL; in ossl_bn_miller_rabin_is_prime() local
389 mont = BN_MONT_CTX_new(); in ossl_bn_miller_rabin_is_prime()
390 if (mont == NULL || !BN_MONT_CTX_set(mont, w, ctx)) in ossl_bn_miller_rabin_is_prime()
415 if (!BN_mod_exp_mont(z, b, m, w, ctx, mont)) in ossl_bn_miller_rabin_is_prime()
474 BN_MONT_CTX_free(mont); in ossl_bn_miller_rabin_is_prime()
H A Dbn_lib.c39 void BN_set_params(int mult, int high, int low, int mont) in BN_set_params() argument
59 if (mont >= 0) { in BN_set_params()
60 if (mont > (int)(sizeof(int) * 8) - 1) in BN_set_params()
61 mont = sizeof(int) * 8 - 1; in BN_set_params()
62 bn_limit_bits_mont = mont; in BN_set_params()
63 bn_limit_num_mont = 1 << mont; in BN_set_params()
1077 int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, in BN_to_montgomery() argument
1080 return BN_mod_mul_montgomery(r, a, &(mont->RR), mont, ctx); in BN_to_montgomery()
/openssl/crypto/ec/
H A Decp_mont.c147 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()
H A Decp_nistz256.c1451 BN_MONT_CTX *mont = NULL, *ordmont = NULL; in ecp_nistz256group_full_init() local
1483 mont = BN_MONT_CTX_new(); in ecp_nistz256group_full_init()
1484 if (mont == NULL) in ecp_nistz256group_full_init()
1487 if (!ossl_bn_mont_ctx_set(mont, p, 256, params + 6 * param_len, param_len, in ecp_nistz256group_full_init()
1496 if (!BN_to_montgomery(one, BN_value_one(), mont, ctx)){ in ecp_nistz256group_full_init()
1500 group->field_data1 = mont; in ecp_nistz256group_full_init()
1501 mont = NULL; in ecp_nistz256group_full_init()
1560 BN_MONT_CTX_free(mont); in ecp_nistz256group_full_init()
/openssl/doc/man3/
H A DBN_mod_mul_montgomery.pod14 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.
H A DDSA_meth_new.pod61 BN_MONT_CTX *mont));
65 BN_CTX *ctx, BN_MONT_CTX *mont);
72 BN_MONT_CTX *mont));
/openssl/crypto/bn/asm/
H A Dppc64-mont-fixed.pl466 my $mont = $class->SUPER::new($n);
468 return $mont;
566 my $mont;
568 $mont = new Mont::GPR(6);
569 $mont->mul_mont_fixed();
570 $code .= $mont->get_code();
572 $mont = new Mont::GPR_300(6);
573 $mont->mul_mont_fixed();
574 $code .= $mont->get_code();
/openssl/crypto/ffc/
H A Dffc_params_generate.c108 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()
527 BN_MONT_CTX *mont = NULL; in ossl_ffc_params_FIPS186_4_gen_verify() local
729 if ((mont = BN_MONT_CTX_new()) == NULL) in ossl_ffc_params_FIPS186_4_gen_verify()
731 if (!BN_MONT_CTX_set(mont, p, ctx)) in ossl_ffc_params_FIPS186_4_gen_verify()
802 BN_MONT_CTX_free(mont); in ossl_ffc_params_FIPS186_4_gen_verify()
818 BN_MONT_CTX *mont = NULL; in ossl_ffc_params_FIPS186_2_gen_verify() local
985 if ((mont = BN_MONT_CTX_new()) == NULL) in ossl_ffc_params_FIPS186_2_gen_verify()
987 if (!BN_MONT_CTX_set(mont, p, ctx)) in ossl_ffc_params_FIPS186_2_gen_verify()
[all …]
H A Dffc_params_validate.c23 int ossl_ffc_params_validate_unverifiable_g(BN_CTX *ctx, BN_MONT_CTX *mont, in ossl_ffc_params_validate_unverifiable_g() argument
43 if (!BN_mod_exp_mont(tmp, g, q, p, ctx, mont)) in ossl_ffc_params_validate_unverifiable_g()
/openssl/test/
H A Dexptest.c53 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()
H A Dbntest.c476 BN_MONT_CTX *mont = NULL; in test_modexp_mont5() local
487 || !TEST_ptr(mont = BN_MONT_CTX_new())) in test_modexp_mont5()
520 if (!(TEST_true(BN_MONT_CTX_set(mont, n, ctx)) in test_modexp_mont5()
593 && TEST_true(BN_MONT_CTX_set(mont, n, ctx)) in test_modexp_mont5()
613 && TEST_true(BN_MONT_CTX_set(mont, n, ctx)) in test_modexp_mont5()
638 && TEST_true(BN_MONT_CTX_set(mont, n, ctx)) in test_modexp_mont5()
722 BN_MONT_CTX_free(mont); in test_modexp_mont5()
1630 BN_MONT_CTX *mont = BN_MONT_CTX_new(); in file_modmul() local
1647 BN_MONT_CTX_free(mont); in file_modmul()
2476 BN_MONT_CTX *mont = NULL; in test_badmod() local
[all …]
H A Dec_internal_test.c488 static int check_bn_mont_ctx(BN_MONT_CTX *mont, BIGNUM *mod, BN_CTX *ctx) in check_bn_mont_ctx() argument
495 if (!TEST_ptr(mont)) in check_bn_mont_ctx()
501 if (!TEST_true(ossl_bn_mont_ctx_eq(regenerated, mont))) in check_bn_mont_ctx()
/openssl/crypto/dh/
H A Ddh_key.c43 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()
234 BN_MONT_CTX *mont = NULL; in ossl_dh_generate_public_key() local
249 mont = BN_MONT_CTX_set_locked(pmont, dh->lock, dh->params.p, ctx); in ossl_dh_generate_public_key()
250 if (mont == NULL) in ossl_dh_generate_public_key()
257 ctx, mont)) in ossl_dh_generate_public_key()
/openssl/include/crypto/
H A Dbn.h75 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,
/openssl/providers/
H A Dfips.module.sources44 crypto/bn/asm/alpha-mont.pl
46 crypto/bn/asm/armv4-mont.pl
47 crypto/bn/asm/armv8-mont.pl
51 crypto/bn/asm/ia64-mont.pl
53 crypto/bn/asm/mips-mont.pl
56 crypto/bn/asm/ppc-mont.pl
59 crypto/bn/asm/ppc64-mont.pl
66 crypto/bn/asm/s390x-mont.pl
74 crypto/bn/asm/via-mont.pl
75 crypto/bn/asm/vis3-mont.pl
[all …]
H A Dfips-sources.checksums44 155eff9d747eed808398cfa2af4b276dfc1f9aac8a0f9d801b314ab3f2bf5b56 crypto/bn/asm/alpha-mont.pl
46 77ba642efd4608f9d6e60b796ba0f876c13f9d78a8302234756ad5dae35f3316 crypto/bn/asm/armv4-mont.pl
47 3465446d414c2be999d4f103f027658644802d9a31e4afa31b365aea3290c8a0 crypto/bn/asm/armv8-mont.pl
51 b88190d748056e6a64988bf1a3d19efc4c292e3d338a65f4505cf769a2041077 crypto/bn/asm/ia64-mont.pl
53 fee42cabeeb87cdf0fa0a6ff3698b2fe98a8a47d10a756052df572097161a8b9 crypto/bn/asm/mips-mont.pl
56 25c96e545b4981d45557eb14ea5c83aa2d6375ae0df806cb6e6ded2f59ddfed3 crypto/bn/asm/ppc-mont.pl
59 fe9278a2504fb40257637a4718081775c29c4eb81f87a8528e5c85f8d0c6281a crypto/bn/asm/ppc64-mont.pl
66 2700337ef133d6688047a1a8e1c671db06016aae777679923ce2b301896762cf crypto/bn/asm/s390x-mont.pl
74 d404375a21d33396824a3da212d6646d4f3150dd141ee4b4a250aefae3482efb crypto/bn/asm/via-mont.pl
75 d632edf9b9bab7d2cd2d616512a98d15cf4b3ebba7a8e7b83650d654ceb52ecb crypto/bn/asm/vis3-mont.pl
[all …]
/openssl/crypto/dsa/
H A Ddsa_ossl.c360 BN_MONT_CTX *mont = NULL; in dsa_do_verify() local
428 mont = BN_MONT_CTX_set_locked(&dsa->method_mont_p, in dsa_do_verify()
430 if (!mont) in dsa_do_verify()
436 dsa->params.p, ctx, mont)) in dsa_do_verify()
440 dsa->params.p, ctx, mont)) in dsa_do_verify()
/openssl/include/openssl/
H A Dbn.h410 BN_MONT_CTX *mont, BN_CTX *ctx);
411 int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
413 int BN_from_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
415 void BN_MONT_CTX_free(BN_MONT_CTX *mont);
416 int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
452 void BN_set_params(int mul, int high, int low, int mont);
/openssl/include/internal/
H A Dffc.h189 int ossl_ffc_params_validate_unverifiable_g(BN_CTX *ctx, BN_MONT_CTX *mont,

Completed in 70 milliseconds