Lines Matching refs:mont
649 BN_MONT_CTX *mont = NULL; in BN_primality_test() local
672 mont = BN_MONT_CTX_new_consttime(w, ctx); in BN_primality_test()
674 mont == NULL || in BN_primality_test()
675 !bn_one_to_montgomery(one_mont, mont, ctx) || in BN_primality_test()
720 !BN_mod_exp_mont_consttime(z, b, m, w, ctx, mont)) { in BN_primality_test()
741 if (!BN_to_montgomery(z, z, mont, ctx)) { in BN_primality_test()
751 if (!BN_mod_mul_montgomery(z, z, z, mont, ctx)) { in BN_primality_test()
790 BN_MONT_CTX_free(mont); in BN_primality_test()
825 BN_MONT_CTX *mont = NULL; in BN_enhanced_miller_rabin_primality_test() local
861 mont = BN_MONT_CTX_new_for_modulus(w, ctx); in BN_enhanced_miller_rabin_primality_test()
862 if (mont == NULL) { in BN_enhanced_miller_rabin_primality_test()
885 if (!BN_mod_exp_mont(z, b, m, w, ctx, mont)) { in BN_enhanced_miller_rabin_primality_test()
944 BN_MONT_CTX_free(mont); in BN_enhanced_miller_rabin_primality_test()