Home
last modified time | relevance | path

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

/dragonfly/crypto/libressl/crypto/bn/
H A Dbn_mont.c142 if (bn_mul_mont(r->d, a->d, b->d, mont->N.d, mont->n0, num)) { in BN_mod_mul_montgomery()
181 return BN_mod_mul_montgomery(r, a, &mont->RR, mont, ctx); in BN_to_montgomery()
192 n = &(mont->N); in BN_from_montgomery_word()
216 n0 = mont->n0[0]; in BN_from_montgomery_word()
356 if (mont == NULL) in BN_MONT_CTX_free()
363 free(mont); in BN_MONT_CTX_free()
381 mont->N.neg = 0; in BN_MONT_CTX_set()
468 mont->ri = BN_num_bits(&mont->N); in BN_MONT_CTX_set()
480 if (!BN_div_ct(&(mont->Ni), NULL, Ri, &mont->N, ctx)) in BN_MONT_CTX_set()
487 if (!BN_set_bit(&(mont->RR), mont->ri*2)) in BN_MONT_CTX_set()
[all …]
H A Dbn_exp2.c131 BN_MONT_CTX *mont = NULL; in BN_mod_exp2_mont() local
163 mont = in_mont; in BN_mod_exp2_mont()
165 if ((mont = BN_MONT_CTX_new()) == NULL) in BN_mod_exp2_mont()
167 if (!BN_MONT_CTX_set(mont, m, ctx)) in BN_mod_exp2_mont()
199 d, mont, ctx)) in BN_mod_exp2_mont()
229 d, mont, ctx)) in BN_mod_exp2_mont()
283 mont, ctx)) in BN_mod_exp2_mont()
292 mont, ctx)) in BN_mod_exp2_mont()
298 if (!BN_from_montgomery(rr, r,mont, ctx)) in BN_mod_exp2_mont()
303 if ((in_mont == NULL) && (mont != NULL)) in BN_mod_exp2_mont()
[all …]
H A Dbn_exp.c398 BN_MONT_CTX *mont = NULL; in BN_mod_exp_mont_internal() local
436 mont = in_mont; in BN_mod_exp_mont_internal()
466 d, mont, ctx)) in BN_mod_exp_mont_internal()
534 BN_MONT_CTX_free(mont); in BN_mod_exp_mont_internal()
689 mont = in_mont; in BN_mod_exp_mont_consttime()
759 BN_ULONG *np = mont->N.d, *n0 = mont->n0; in BN_mod_exp_mont_consttime()
855 mont, ctx)) in BN_mod_exp_mont_consttime()
879 mont, ctx)) in BN_mod_exp_mont_consttime()
902 BN_MONT_CTX_free(mont); in BN_mod_exp_mont_consttime()
975 mont = in_mont; in BN_mod_exp_mont_word()
[all …]
H A Dbn_prime.c133 const BIGNUM *a1_odd, int k, BN_CTX *ctx, BN_MONT_CTX *mont);
268 BN_MONT_CTX *mont = NULL; in BN_is_prime_fasttest_ex() local
346 mont = BN_MONT_CTX_new(); in BN_is_prime_fasttest_ex()
347 if (mont == NULL) in BN_is_prime_fasttest_ex()
349 if (!BN_MONT_CTX_set(mont, A, ctx)) in BN_is_prime_fasttest_ex()
359 j = witness(check, A, A1, A1_odd, k, ctx, mont); in BN_is_prime_fasttest_ex()
377 BN_MONT_CTX_free(mont); in BN_is_prime_fasttest_ex()
384 int k, BN_CTX *ctx, BN_MONT_CTX *mont) in witness() argument
386 if (!BN_mod_exp_mont_ct(w, w, a1_odd, a, ctx, mont)) in witness()
H A Dbn_lib.c153 BN_set_params(int mult, int high, int low, int mont) in BN_set_params() argument
173 if (mont >= 0) { in BN_set_params()
174 if (mont > (int)(sizeof(int) * 8) - 1) in BN_set_params()
175 mont = sizeof(int) * 8 - 1; in BN_set_params()
176 bn_limit_bits_mont = mont; in BN_set_params()
177 bn_limit_num_mont = 1 << mont; in BN_set_params()
/dragonfly/crypto/libressl/crypto/dh/
H A Ddh_key.c108 BN_MONT_CTX *mont = NULL; in generate_key() local
131 mont = BN_MONT_CTX_set_locked(&dh->method_mont_p, in generate_key()
133 if (!mont) in generate_key()
154 mont)) in generate_key()
177 BN_MONT_CTX *mont = NULL; in compute_key() local
200 mont = BN_MONT_CTX_set_locked(&dh->method_mont_p, in compute_key()
205 if (!mont) in compute_key()
215 mont)) { in compute_key()
/dragonfly/crypto/libressl/crypto/ec/
H A Decp_mont.c194 BN_MONT_CTX *mont = NULL; in ec_GFp_mont_group_set_curve() local
207 mont = BN_MONT_CTX_new(); in ec_GFp_mont_group_set_curve()
208 if (mont == NULL) in ec_GFp_mont_group_set_curve()
210 if (!BN_MONT_CTX_set(mont, p, ctx)) { in ec_GFp_mont_group_set_curve()
217 if (!BN_to_montgomery(one, BN_value_one(), mont, ctx)) in ec_GFp_mont_group_set_curve()
220 group->field_data1 = mont; in ec_GFp_mont_group_set_curve()
221 mont = NULL; in ec_GFp_mont_group_set_curve()
235 BN_MONT_CTX_free(mont); in ec_GFp_mont_group_set_curve()
/dragonfly/crypto/libressl/crypto/dsa/
H A Ddsa_gen.c109 BN_MONT_CTX *mont = NULL; in dsa_builtin_paramgen() local
145 if ((mont=BN_MONT_CTX_new()) == NULL) in dsa_builtin_paramgen()
314 if (!BN_MONT_CTX_set(mont, p, ctx)) in dsa_builtin_paramgen()
319 if (!BN_mod_exp_mont_ct(g, test, r0, p, ctx, mont)) in dsa_builtin_paramgen()
355 BN_MONT_CTX_free(mont); in dsa_builtin_paramgen()
H A Ddsa_ossl.c317 BN_MONT_CTX *mont = NULL; in dsa_do_verify() local
379 mont = BN_MONT_CTX_set_locked(&dsa->method_mont_p, in dsa_do_verify()
381 if (!mont) in dsa_do_verify()
387 &u2, dsa->p, ctx, mont)) in dsa_do_verify()
391 dsa->p, ctx, mont)) in dsa_do_verify()
/dragonfly/crypto/libressl/include/openssl/
H A Dbn.h510 BN_MONT_CTX *mont, BN_CTX *ctx);
511 int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
514 BN_MONT_CTX *mont, BN_CTX *ctx);
515 void BN_MONT_CTX_free(BN_MONT_CTX *mont);
516 int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
546 void BN_set_params(int mul, int high, int low, int mont);
/dragonfly/crypto/libressl/
H A DREADME.DELETED80 crypto/bn/mont-elf-armv4.S
81 crypto/bn/mont-macosx-x86_64.S
82 crypto/bn/mont-masm-x86_64.S
/dragonfly/lib/librecrypto/
H A DMakefile75 ASM_X86_64_BN= modexp512-elf-x86_64.S mont-elf-x86_64.S \