Home
last modified time | relevance | path

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

/openssl/crypto/bn/
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()
254 if (mont == NULL) in BN_MONT_CTX_free()
279 mont->N.neg = 0; in BN_MONT_CTX_set()
374 mont->ri = BN_num_bits(&mont->N); in BN_MONT_CTX_set()
388 if (!BN_div(&(mont->Ni), NULL, Ri, &mont->N, ctx)) in BN_MONT_CTX_set()
395 if (!BN_set_bit(&(mont->RR), mont->ri * 2)) in BN_MONT_CTX_set()
397 if (!BN_mod(&(mont->RR), &(mont->RR), &(mont->N), ctx)) in BN_MONT_CTX_set()
[all …]
H A Dbuild.info42 $BNASM_sparcv9=asm/sparcv8plus.S sparcv9-mont.S sparcv9a-mont.S vis3-mont.S \
134 GENERATE[x86-mont.S]=asm/x86-mont.pl
143 GENERATE[vis3-mont.S]=asm/vis3-mont.pl
152 GENERATE[mips-mont.S]=asm/mips-mont.pl
155 GENERATE[s390x-mont.S]=asm/s390x-mont.pl
168 GENERATE[ia64-mont.s]=asm/ia64-mont.pl
174 GENERATE[ppc-mont.s]=asm/ppc-mont.pl
175 GENERATE[ppc64-mont.s]=asm/ppc64-mont.pl
178 GENERATE[alpha-mont.S]=asm/alpha-mont.pl
180 GENERATE[armv4-mont.S]=asm/armv4-mont.pl
[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.c304 BN_MONT_CTX *mont = NULL; in BN_mod_exp_mont() local
344 mont = in_mont; in BN_mod_exp_mont()
464 BN_MONT_CTX_free(mont); in BN_mod_exp_mont()
596 BN_MONT_CTX *mont = NULL; in BN_mod_exp_mont_consttime() local
641 mont = in_mont; in BN_mod_exp_mont_consttime()
678 RSAZ_512_mod_exp(rr->d, a->d, p->d, m->d, mont->n0[0], mont->RR.d); in BN_mod_exp_mont_consttime()
816 BN_ULONG *np = mont->N.d, *n0 = mont->n0; in BN_mod_exp_mont_consttime()
1126 BN_MONT_CTX_free(mont); in BN_mod_exp_mont_consttime()
1138 BN_MONT_CTX *mont = NULL; in BN_mod_exp_mont_word() local
1202 mont = in_mont; in BN_mod_exp_mont_word()
[all …]
H A Dbn_prime.c342 BN_MONT_CTX *mont = NULL; in ossl_bn_miller_rabin_is_prime() local
379 mont = BN_MONT_CTX_new(); in ossl_bn_miller_rabin_is_prime()
380 if (mont == NULL || !BN_MONT_CTX_set(mont, w, ctx)) in ossl_bn_miller_rabin_is_prime()
405 if (!BN_mod_exp_mont(z, b, m, w, ctx, mont)) in ossl_bn_miller_rabin_is_prime()
464 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()
1026 int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, in BN_to_montgomery() argument
1029 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()
/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()
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()
799 BN_MONT_CTX_free(mont); in ossl_ffc_params_FIPS186_4_gen_verify()
815 BN_MONT_CTX *mont = NULL; in ossl_ffc_params_FIPS186_2_gen_verify() local
978 if ((mont = BN_MONT_CTX_new()) == NULL) in ossl_ffc_params_FIPS186_2_gen_verify()
980 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/crypto/dh/
H A Ddh_key.c43 BN_MONT_CTX *mont = NULL; in ossl_dh_compute_key() local
72 mont = BN_MONT_CTX_set_locked(&dh->method_mont_p, in ossl_dh_compute_key()
75 if (!mont) in ossl_dh_compute_key()
81 mont)) { in ossl_dh_compute_key()
225 BN_MONT_CTX *mont = NULL; in ossl_dh_generate_public_key() local
240 mont = BN_MONT_CTX_set_locked(pmont, dh->lock, dh->params.p, ctx); in ossl_dh_generate_public_key()
241 if (mont == NULL) in ossl_dh_generate_public_key()
248 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/test/
H A Dbntest.c475 BN_MONT_CTX *mont = NULL; in test_modexp_mont5() local
486 || !TEST_ptr(mont = BN_MONT_CTX_new())) in test_modexp_mont5()
519 if (!(TEST_true(BN_MONT_CTX_set(mont, n, ctx)) in test_modexp_mont5()
592 && TEST_true(BN_MONT_CTX_set(mont, n, ctx)) in test_modexp_mont5()
612 && TEST_true(BN_MONT_CTX_set(mont, n, ctx)) in test_modexp_mont5()
637 && TEST_true(BN_MONT_CTX_set(mont, n, ctx)) in test_modexp_mont5()
721 BN_MONT_CTX_free(mont); in test_modexp_mont5()
1621 BN_MONT_CTX *mont = BN_MONT_CTX_new(); in file_modmul() local
1638 BN_MONT_CTX_free(mont); in file_modmul()
2399 BN_MONT_CTX *mont = NULL; in test_badmod() local
[all …]
/openssl/providers/
H A Dfips.module.sources32 crypto/bn/asm/alpha-mont.pl
34 crypto/bn/asm/armv4-mont.pl
35 crypto/bn/asm/armv8-mont.pl
39 crypto/bn/asm/ia64-mont.pl
41 crypto/bn/asm/mips-mont.pl
44 crypto/bn/asm/ppc-mont.pl
47 crypto/bn/asm/ppc64-mont.pl
52 crypto/bn/asm/s390x-mont.pl
60 crypto/bn/asm/via-mont.pl
61 crypto/bn/asm/vis3-mont.pl
[all …]
H A Dfips-sources.checksums32 819c9fd2b0cae9aab81c3cbd1815c2e22949d75f132f649b5883812d0bbaa39a crypto/bn/asm/alpha-mont.pl
34 8c1c53a725b8a4f92b8a353bfeeb393be94198df41c912e3270f9e654417b250 crypto/bn/asm/armv4-mont.pl
35 8d6192337fedb0012764229d600634f8357c3b74fd38bcbfe8b86ddc6ca96ea2 crypto/bn/asm/armv8-mont.pl
39 199b9b100f194a2a128c14f2a71be5a04d50d069666d90ca5b69baee1318ccb7 crypto/bn/asm/ia64-mont.pl
41 687c5d6606fdfd0e242005972d15db74a9cbac2b8a9a54a56fcb1e99d3880ff3 crypto/bn/asm/mips-mont.pl
44 9973523b361db963eea4938a7a8a3adc692e1a4e1aec4fa1f1e57dc93da37921 crypto/bn/asm/ppc-mont.pl
47 a25be64867ab837d93855af232e2bfa71b85b2c6f00e35e620fdc5618187fb6f crypto/bn/asm/ppc64-mont.pl
52 590388d69d7ac3a0e9af4014792f4f0fdb9552719e8fb48ebc7e5dfca2a491d4 crypto/bn/asm/s390x-mont.pl
60 d404375a21d33396824a3da212d6646d4f3150dd141ee4b4a250aefae3482efb crypto/bn/asm/via-mont.pl
61 d24f3e97239c8eed5efc721521b025b7256c15e67a54ea6b5c4cf8f7cd0f89ea crypto/bn/asm/vis3-mont.pl
[all …]
/openssl/crypto/dsa/
H A Ddsa_ossl.c323 BN_MONT_CTX *mont = NULL; in dsa_do_verify() local
391 mont = BN_MONT_CTX_set_locked(&dsa->method_mont_p, in dsa_do_verify()
393 if (!mont) in dsa_do_verify()
399 dsa->params.p, ctx, mont)) in dsa_do_verify()
403 dsa->params.p, ctx, mont)) in dsa_do_verify()
/openssl/include/openssl/
H A Dbn.h409 BN_MONT_CTX *mont, BN_CTX *ctx);
410 int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
412 int BN_from_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
414 void BN_MONT_CTX_free(BN_MONT_CTX *mont);
415 int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
451 void BN_set_params(int mul, int high, int low, int mont);
/openssl/include/internal/
H A Dffc.h183 int ossl_ffc_params_validate_unverifiable_g(BN_CTX *ctx, BN_MONT_CTX *mont,

Completed in 53 milliseconds