1 #include "tommath_private.h"
2 #ifdef BN_MP_REDUCE_2K_SETUP_C
3 /* LibTomMath, multiple-precision integer library -- Tom St Denis */
4 /* SPDX-License-Identifier: Unlicense */
6 /* determines the setup value */
7 mp_err
mp_reduce_2k_setup(const mp_int
*a
, mp_digit
*d
)
13 if ((err
= mp_init(&tmp
)) != MP_OKAY
) {
18 if ((err
= mp_2expt(&tmp
, p
)) != MP_OKAY
) {
23 if ((err
= s_mp_sub(&tmp
, a
, &tmp
)) != MP_OKAY
) {