bignum_mod_raw_invasive.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  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. #ifndef MBEDTLS_BIGNUM_MOD_RAW_INVASIVE_H
  12. #define MBEDTLS_BIGNUM_MOD_RAW_INVASIVE_H
  13. #include "common.h"
  14. #include "mbedtls/bignum.h"
  15. #include "bignum_mod.h"
  16. #if defined(MBEDTLS_TEST_HOOKS)
  17. /** Convert the result of a quasi-reduction to its canonical representative.
  18. *
  19. * \param[in,out] X The address of the MPI to be converted. Must have the
  20. * same number of limbs as \p N. The input value must
  21. * be in range 0 <= X < 2N.
  22. * \param[in] N The address of the modulus.
  23. */
  24. MBEDTLS_STATIC_TESTABLE
  25. void mbedtls_mpi_mod_raw_fix_quasi_reduction(mbedtls_mpi_uint *X,
  26. const mbedtls_mpi_mod_modulus *N);
  27. #endif /* MBEDTLS_TEST_HOOKS */
  28. #endif /* MBEDTLS_BIGNUM_MOD_RAW_INVASIVE_H */