1 #include "tommath_private.h"
3 /* LibTomMath, multiple-precision integer library -- Tom St Denis */
4 /* SPDX-License-Identifier: Unlicense */
6 /* d = a + b (mod c) */
7 mp_err
mp_addmod(const mp_int
*a
, const mp_int
*b
, const mp_int
*c
, mp_int
*d
)
10 if ((err
= mp_add(a
, b
, d
)) != MP_OKAY
) {
13 return mp_mod(d
, c
, d
);