1 /**
2  * \file bignum_mod_raw_invasive.h
3  *
4  * \brief Function declarations for invasive functions of Low-level
5  *        modular bignum.
6  */
7 /**
8  *  Copyright The Mbed TLS Contributors
9  *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
10  */
11 
12 #ifndef MBEDTLS_BIGNUM_MOD_RAW_INVASIVE_H
13 #define MBEDTLS_BIGNUM_MOD_RAW_INVASIVE_H
14 
15 #include "common.h"
16 #include "mbedtls/bignum.h"
17 #include "bignum_mod.h"
18 
19 #if defined(MBEDTLS_TEST_HOOKS)
20 
21 /** Convert the result of a quasi-reduction to its canonical representative.
22  *
23  * \param[in,out] X     The address of the MPI to be converted. Must have the
24  *                      same number of limbs as \p N. The input value must
25  *                      be in range 0 <= X < 2N.
26  * \param[in]     N     The address of the modulus.
27  */
28 MBEDTLS_STATIC_TESTABLE
29 void mbedtls_mpi_mod_raw_fix_quasi_reduction(mbedtls_mpi_uint *X,
30                                              const mbedtls_mpi_mod_modulus *N);
31 
32 #endif /* MBEDTLS_TEST_HOOKS */
33 
34 #endif /* MBEDTLS_BIGNUM_MOD_RAW_INVASIVE_H */
35