mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 11:35:44 +01:00
Fix an incorrect comment about fix_negative
We're subtracting multiples of 2^bits, not 2^(bits+32). Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
c3ccae7faf
commit
2c8cfcf59f
@ -1048,13 +1048,13 @@ static inline void sub32( uint32_t *dst, uint32_t src, signed char *carry )
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* If the result is negative, we get it in the form
|
* If the result is negative, we get it in the form
|
||||||
* c * 2^(bits + 32) + N, with c negative and N positive shorter than 'bits'
|
* c * 2^bits + N, with c negative and N positive shorter than 'bits'
|
||||||
*/
|
*/
|
||||||
static inline int fix_negative( mbedtls_mpi *N, signed char c, mbedtls_mpi *C, size_t bits )
|
static inline int fix_negative( mbedtls_mpi *N, signed char c, mbedtls_mpi *C, size_t bits )
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* C = - c * 2^(bits + 32) */
|
/* C = - c * 2^bits */
|
||||||
#if !defined(MBEDTLS_HAVE_INT64)
|
#if !defined(MBEDTLS_HAVE_INT64)
|
||||||
((void) bits);
|
((void) bits);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user