Home
last modified time | relevance | path

Searched refs:gcd (Results 1 – 7 of 7) sorted by relevance

/openssl/crypto/rsa/
H A Drsa_sp800_56b_check.c139 BIGNUM *p1 = NULL, *gcd = NULL; in ossl_rsa_check_prime_factor() local
149 gcd = BN_CTX_get(ctx); in ossl_rsa_check_prime_factor()
150 if (gcd != NULL) { in ossl_rsa_check_prime_factor()
162 && BN_is_one(gcd); in ossl_rsa_check_prime_factor()
190 gcd = BN_CTX_get(ctx); in ossl_rsa_check_private_exponent()
191 if (gcd != NULL) { in ossl_rsa_check_private_exponent()
216 BN_clear(gcd); in ossl_rsa_check_private_exponent()
286 BIGNUM *gcd = NULL; local
318 gcd = BN_new();
327 || !BN_is_one(gcd)) {
[all …]
H A Drsa_sp800_56b_gen.c241 BIGNUM *p1, *q1, *lcm, *p1q1, *gcd; in ossl_rsa_sp800_56b_derive_params_from_pq() local
247 gcd = BN_CTX_get(ctx); in ossl_rsa_sp800_56b_derive_params_from_pq()
248 if (gcd == NULL) in ossl_rsa_sp800_56b_derive_params_from_pq()
255 BN_set_flags(gcd, BN_FLG_CONSTTIME); in ossl_rsa_sp800_56b_derive_params_from_pq()
258 if (ossl_rsa_get_lcm(ctx, rsa->p, rsa->q, lcm, gcd, p1, q1, p1q1) != 1) in ossl_rsa_sp800_56b_derive_params_from_pq()
341 BN_clear(gcd); in ossl_rsa_sp800_56b_derive_params_from_pq()
H A Drsa_local.h173 BIGNUM *lcm, BIGNUM *gcd, BIGNUM *p1, BIGNUM *q1,
/openssl/providers/implementations/kdfs/
H A Dkrb5kdf.c289 unsigned int tmp, gcd, remainder, lcm, carry; in n_fold() local
298 gcd = blocksize; in n_fold()
302 tmp = gcd % remainder; in n_fold()
303 gcd = remainder; in n_fold()
307 lcm = blocksize * constant_len / gcd; in n_fold()
/openssl/test/testutil/
H A Ddriver.c84 static int gcd(int a, int b) in gcd() function
368 while (jstep == 0 || gcd(all_tests[i].num, jstep) != 1); in run_tests()
/openssl/test/
H A Dbntest.c1786 BIGNUM *a = NULL, *b = NULL, *gcd = NULL, *ret = NULL; in file_gcd() local
1791 || !TEST_ptr(gcd = getBN(s, "GCD")) in file_gcd()
1796 || !equalBN("gcd(A,B)", gcd, ret)) in file_gcd()
1803 BN_free(gcd); in file_gcd()
2823 BIGNUM *a = NULL, *b = NULL, *gcd = NULL; in test_gcd_prime() local
2828 || !TEST_ptr(gcd = BN_new())) in test_gcd_prime()
2836 || !TEST_true(BN_gcd(gcd, a, b, ctx)) in test_gcd_prime()
2837 || !TEST_true(BN_is_one(gcd)) in test_gcd_prime()
2846 BN_free(gcd); in test_gcd_prime()
/openssl/test/recipes/10-test_bn_data/
H A Dbngcd.txt10 # These test vectors satisfy gcd(A, B) = GCD.
17 # gcd(1,0) = 1
22 # gcd(1,1) = 1
27 # gcd(0,a) = a
32 # gcd(-a,0) = |a|
38 # gcd(2**i - 1, 2**(i/2) - 1) = 2**(i/2) - 1
39 # gcd(2**i - 1, 2**(i/2) + 1) = 2**(i/2) + 1

Completed in 94 milliseconds