Path: blob/master/thirdparty/mbedtls/library/bignum_core_invasive.h
12222 views
/**1* \file bignum_core_invasive.h2*3* \brief Function declarations for invasive functions of bignum core.4*/5/**6* Copyright The Mbed TLS Contributors7* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later8*/910#ifndef MBEDTLS_BIGNUM_CORE_INVASIVE_H11#define MBEDTLS_BIGNUM_CORE_INVASIVE_H1213#include "bignum_core.h"1415#if defined(MBEDTLS_TEST_HOOKS)1617#if !defined(MBEDTLS_THREADING_C)1819extern void (*mbedtls_safe_codepath_hook)(void);20extern void (*mbedtls_unsafe_codepath_hook)(void);2122#endif /* !MBEDTLS_THREADING_C */2324/** Divide X by 2 mod N in place, assuming N is odd.25*26* \param[in,out] X The value to divide by 2 mod \p N.27* \param[in] N The modulus. Must be odd.28* \param[in] limbs The number of limbs in \p X and \p N.29*/30MBEDTLS_STATIC_TESTABLE31void mbedtls_mpi_core_div2_mod_odd(mbedtls_mpi_uint *X,32const mbedtls_mpi_uint *N,33size_t limbs);3435#endif /* MBEDTLS_TEST_HOOKS */3637#endif /* MBEDTLS_BIGNUM_CORE_INVASIVE_H */383940