Home
last modified time | relevance | path

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

12

/freebsd-14.2/crypto/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.c236 BIGNUM *p1, *q1, *lcm, *p1q1, *gcd; in ossl_rsa_sp800_56b_derive_params_from_pq() local
243 gcd = BN_CTX_get(ctx); in ossl_rsa_sp800_56b_derive_params_from_pq()
244 if (gcd == NULL) in ossl_rsa_sp800_56b_derive_params_from_pq()
251 BN_set_flags(gcd, BN_FLG_CONSTTIME); in ossl_rsa_sp800_56b_derive_params_from_pq()
254 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()
332 BN_clear(gcd); in ossl_rsa_sp800_56b_derive_params_from_pq()
H A Drsa_local.h169 BIGNUM *lcm, BIGNUM *gcd, BIGNUM *p1, BIGNUM *q1,
/freebsd-14.2/sys/sys/
H A Dtime.h222 const int64_t gcd = __common_powers_of_two(factor, divisor); in __stime64_scale64_ceil() local
224 return (__stime64_scale32_ceil(x, factor / gcd, divisor / gcd)); in __stime64_scale64_ceil()
230 const int64_t gcd = __common_powers_of_two(factor, divisor); in __stime64_scale64_floor() local
232 return (__stime64_scale32_floor(x, factor / gcd, divisor / gcd)); in __stime64_scale64_floor()
238 const uint64_t gcd = __common_powers_of_two(factor, divisor); in __utime64_scale64_ceil() local
240 return (__utime64_scale32_ceil(x, factor / gcd, divisor / gcd)); in __utime64_scale64_ceil()
246 const uint64_t gcd = __common_powers_of_two(factor, divisor); in __utime64_scale64_floor() local
248 return (__utime64_scale32_floor(x, factor / gcd, divisor / gcd)); in __utime64_scale64_floor()
/freebsd-14.2/contrib/llvm-project/compiler-rt/lib/xray/
H A Dxray_utils.h57 constexpr size_t gcd(size_t a, size_t b) { in gcd() function
58 return (b == 0) ? a : gcd(b, a % b); in gcd()
61 constexpr size_t lcm(size_t a, size_t b) { return a * b / gcd(a, b); } in lcm()
/freebsd-14.2/contrib/bc/tests/bc/
H A Dlib2.txt97 gcd(285, 35)
98 gcd(1, 6)
99 gcd(5, 1)
100 gcd(8, 12)
101 gcd(40, 4096)
/freebsd-14.2/crypto/openssl/providers/implementations/kdfs/
H A Dkrb5kdf.c268 unsigned int tmp, gcd, remainder, lcm, carry; in n_fold() local
277 gcd = blocksize; in n_fold()
281 tmp = gcd % remainder; in n_fold()
282 gcd = remainder; in n_fold()
286 lcm = blocksize * constant_len / gcd; in n_fold()
/freebsd-14.2/contrib/llvm-project/libcxx/modules/std/
H A Dnumeric.inc49 // [numeric.ops.gcd], greatest common divisor
50 using std::gcd;
/freebsd-14.2/sys/kgssapi/krb5/
H A Dkcrypto.c87 gcd(size_t a, size_t b) in gcd() function
92 return gcd(b, a % b); in gcd()
98 return ((a * b) / gcd(a, b)); in lcm()
/freebsd-14.2/contrib/llvm-project/libcxx/include/__numeric/
H A Dgcd_lcm.h59 _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI common_type_t<_Tp, _Up> gcd(_Tp __m, _Up __n) {
78 _Rp __val1 = __ct_abs<_Rp, _Tp>()(__m) / std::gcd(__m, __n);
/freebsd-14.2/contrib/libfido2/openbsd-compat/
H A Dgetopt_long.c89 static int gcd(int, int);
110 gcd(int a, int b) in gcd() function
141 ncycle = gcd(nnonopts, nopts); in permute_args()
/freebsd-14.2/contrib/file/src/
H A Dgetopt_long.c93 static int gcd(int, int);
115 gcd(a, b) in gcd() function
153 ncycle = gcd(nnonopts, nopts);
/freebsd-14.2/contrib/llvm-project/lldb/source/Host/common/
H A DGetOptInc.cpp44 static int gcd(int, int);
56 static int gcd(int a, int b) { in gcd() function
87 ncycle = gcd(nnonopts, nopts); in permute_args()
/freebsd-14.2/crypto/openssh/openbsd-compat/
H A Dgetopt_long.c112 static int gcd(int, int);
133 gcd(int a, int b) in gcd() function
164 ncycle = gcd(nnonopts, nopts); in permute_args()
/freebsd-14.2/sys/compat/linuxkpi/common/include/linux/
H A Dgcd.h34 gcd(unsigned long a, unsigned long b) in gcd() function
/freebsd-14.2/lib/libc/stdlib/
H A Dgetopt_long.c101 static int gcd(int, int);
132 gcd(int a, int b) in gcd() function
163 ncycle = gcd(nnonopts, nopts); in permute_args()
/freebsd-14.2/contrib/tcpdump/missing/
H A Dgetopt_long.c91 static int gcd(int, int);
121 gcd(int a, int b) in gcd() function
152 ncycle = gcd(nnonopts, nopts); in permute_args()
/freebsd-14.2/contrib/bc/tests/bc/scripts/
H A Dlen.bc18 else g = gcd(r[0], r[1]);
/freebsd-14.2/contrib/llvm-project/llvm/lib/MCA/
H A DSupport.cpp30 unsigned GCD = std::gcd(Denominator, RHS.Denominator); in operator +=()
/freebsd-14.2/crypto/openssl/test/testutil/
H A Ddriver.c84 static int gcd(int a, int b) in gcd() function
361 while (jstep == 0 || gcd(all_tests[i].num, jstep) != 1); in run_tests()
/freebsd-14.2/sys/compat/linuxkpi/common/src/
H A Dlinux_compat.c2038 uint64_t gcd; in linux_timer_init() local
2056 gcd = lkpi_gcd_64(lkpi_nsec2hz_rem, lkpi_nsec2hz_div); in linux_timer_init()
2057 lkpi_nsec2hz_rem /= gcd; in linux_timer_init()
2058 lkpi_nsec2hz_div /= gcd; in linux_timer_init()
2061 gcd = lkpi_gcd_64(lkpi_usec2hz_rem, lkpi_usec2hz_div); in linux_timer_init()
2062 lkpi_usec2hz_rem /= gcd; in linux_timer_init()
2063 lkpi_usec2hz_div /= gcd; in linux_timer_init()
2066 gcd = lkpi_gcd_64(lkpi_msec2hz_rem, lkpi_msec2hz_div); in linux_timer_init()
2067 lkpi_msec2hz_rem /= gcd; in linux_timer_init()
2068 lkpi_msec2hz_div /= gcd; in linux_timer_init()
/freebsd-14.2/sbin/geom/misc/
H A Dsubr.c68 gcd(unsigned int a, unsigned int b) in gcd() function
87 return ((a * b) / gcd(a, b)); in g_lcm()
/freebsd-14.2/crypto/openssl/test/
H A Dbntest.c1767 BIGNUM *a = NULL, *b = NULL, *gcd = NULL, *ret = NULL; in file_gcd() local
1772 || !TEST_ptr(gcd = getBN(s, "GCD")) in file_gcd()
1777 || !equalBN("gcd(A,B)", gcd, ret)) in file_gcd()
1784 BN_free(gcd); in file_gcd()
2586 BIGNUM *a = NULL, *b = NULL, *gcd = NULL; in test_gcd_prime() local
2591 || !TEST_ptr(gcd = BN_new())) in test_gcd_prime()
2599 || !TEST_true(BN_gcd(gcd, a, b, ctx)) in test_gcd_prime()
2600 || !TEST_true(BN_is_one(gcd))) in test_gcd_prime()
2608 BN_free(gcd); in test_gcd_prime()
/freebsd-14.2/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/
H A DUtils.cpp1088 std::gcd(OrigTy.getNumElements(), TargetTy.getNumElements()); in getLCMType()
1146 int GCD = std::gcd(OrigTy.getNumElements(), TargetTy.getNumElements()); in getGCDType()
1155 unsigned GCD = std::gcd(OrigSize, TargetSize); in getGCDType()
1173 unsigned GCD = std::gcd(OrigSize, TargetSize); in getGCDType()
/freebsd-14.2/contrib/bc/manuals/
H A Dalgorithms.md346 This is implemented in the function `gcd(a,b)`.
359 The algorithm uses the formula `a*b/gcd(a,b)`.
361 It has a complexity of `O(n^4)` because of `gcd()`.

12