mbedtls: Moved mbedtls_mpi_mul_int to port layer

This commit is contained in:
Laukik Hase
2021-12-27 18:43:07 +05:30
parent 76658d5066
commit 76b9beff3c

View File

@ -457,7 +457,18 @@ cleanup:
return ret;
}
int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_uint b )
{
mbedtls_mpi _B;
mbedtls_mpi_uint p[1];
_B.s = 1;
_B.n = 1;
_B.p = p;
p[0] = b;
return( mbedtls_mpi_mul_mpi( X, A, &_B ) );
}
/* Deal with the case when X & Y are too long for the hardware unit, by splitting one operand
into two halves.