mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-10 06:44:28 +00:00
bignum_mod_raw.py: Added BignumModRawModNegate.
This patch adds autogenerated inputs for the `mpi_mod_raw_neg()` test in the bignum_mod_raw suite. Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
parent
6118a3e5aa
commit
78665eba8f
@ -109,7 +109,18 @@ class BignumModRawConvertFromMont(bignum_common.ModOperationCommon,
|
||||
result = (self.int_a * self.r_inv) % self.int_n
|
||||
return [self.format_result(result)]
|
||||
|
||||
class BignumModRawModNegate(bignum_common.ModOperationCommon,
|
||||
BignumModRawTarget):
|
||||
""" Test cases for mpi_mod_raw_neg(). """
|
||||
test_function = "mpi_mod_raw_neg"
|
||||
test_name = "Modular negation: "
|
||||
symbol = "(-A)"
|
||||
input_style = "arch_split"
|
||||
arity = 1
|
||||
|
||||
def result(self) -> List[str]:
|
||||
result = (self.int_n - self.int_a) % self.int_n
|
||||
return [self.format_result(result)]
|
||||
# END MERGE SLOT 7
|
||||
|
||||
# BEGIN MERGE SLOT 8
|
||||
|
Loading…
x
Reference in New Issue
Block a user