Diff
Not logged in

Differences From Artifact [e2b815178f]:

To Artifact [852ed45a0c]:


1
2
3
4
5
6
7
8
9
10
11
12

13
14
15
16
17
18
19
20
1
2
3
4
5
6
7
8
9
10
11

12

13
14
15
16
17
18
19











-
+
-







#include "tommath_private.h"
#ifdef BN_MP_GCD_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
 *
 * LibTomMath is a library that provides multiple-precision
 * integer arithmetic as well as number theoretic functionality.
 *
 * The library was designed directly after the MPI library by
 * Michael Fromberger but has been written from scratch with
 * additional optimizations in place.
 *
 * The library is free for all purposes without any express
 * SPDX-License-Identifier: Unlicense
 * guarantee it works.
 */

/* Greatest Common Divisor using the binary method */
int mp_gcd(const mp_int *a, const mp_int *b, mp_int *c)
{
   mp_int  u, v;
   int     k, u_lsb, v_lsb, res;