1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-06-12 08:21:54 +03:00

Add generated tests for mod_raw_mul

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
Gabor Mezei
2022-12-07 16:04:15 +01:00
parent 979d34ca7d
commit 80a334ada3
2 changed files with 126 additions and 0 deletions

View File

@ -50,6 +50,25 @@ class BignumModRawSub(bignum_common.ModOperationCommon,
result = (self.int_a - self.int_b) % self.int_n
return [self.format_result(result)]
class BignumModRawMul(bignum_common.ModOperationCommon,
BignumModRawTarget):
"""Test cases for bignum mpi_mod_raw_mul()."""
symbol = "*"
test_function = "mpi_mod_raw_mul"
test_name = "mbedtls_mpi_mod_raw_mul"
input_style = "arch_split"
arity = 2
def arguments(self) -> List[str]:
return [bignum_common.quote_str(n) for n in [self.arg_a,
self.arg_b,
self.arg_n]
] + self.result()
def result(self) -> List[str]:
result = (self.int_a * self.int_b) % self.int_n
return [self.format_result(result)]
# END MERGE SLOT 2
# BEGIN MERGE SLOT 3