mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-06 15:06:05 +00:00
Generate operands in Mongomery representation for the test function
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
parent
2840884c35
commit
77b877d5a7
2 changed files with 4 additions and 16 deletions
|
|
@ -41,14 +41,14 @@ class BignumModMul(bignum_common.ModOperationCommon,
|
|||
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]
|
||||
return [self.format_result(self.to_montgomery(self.int_a)),
|
||||
self.format_result(self.to_montgomery(self.int_b)),
|
||||
bignum_common.quote_str(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)]
|
||||
return [self.format_result(self.to_montgomery(result))]
|
||||
|
||||
# END MERGE SLOT 2
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue