mbedtls: Moved mbedtls_mpi_mul_int to port layer

This commit is contained in:
Laukik Hase
2022-01-25 10:51:27 +05:30
parent 285790e5aa
commit 8bf7882e84
+11
View File
@@ -554,7 +554,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.