-/* $OpenBSD: bn_gcd.c,v 1.26 2023/04/03 21:43:43 tb Exp $ */
+/* $OpenBSD: bn_gcd.c,v 1.27 2023/04/09 18:38:59 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
BIGNUM *a, *b, *t;
int ret = 0;
-
BN_CTX_start(ctx);
if ((a = BN_CTX_get(ctx)) == NULL)
goto err;
BN_init(&local_A);
BN_init(&local_B);
-
BN_CTX_start(ctx);
if ((A = BN_CTX_get(ctx)) == NULL)
goto err;
BIGNUM *ret = NULL;
int sign;
-
BN_init(&local_A);
BN_init(&local_B);
if (ct)
return BN_mod_inverse_no_branch(in, a, n, ctx);
-
BN_CTX_start(ctx);
if ((A = BN_CTX_get(ctx)) == NULL)
goto err;
goto err;
}
-
/* Same for A and Y. Afterwards, (2) still holds. */
shift = 0;
while (!BN_is_bit_set(A, shift)) /* note that 0 < A */
goto err;
}
-
/* We still have (1) and (2).
* Both A and B are odd.
* The following computations ensure that