Add corner case to mod_p521 tests

Signed-off-by: Janos Follath <janos.follath@arm.com>
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
Janos Follath 2023-02-07 15:27:44 +00:00 committed by Gabor Mezei
parent 13c3aa13af
commit 755ff0e685
No known key found for this signature in database
GPG Key ID: FEE76C0CF8C6267D

View File

@ -91,6 +91,13 @@ class EcpP521R1Raw(bignum_common.ModOperationCommon,
input_values = [
"0", "1",
# Corner case: maximum canonical P521 multiplication result
("0003ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
"fffff800"
"0000000000000000000000000000000000000000000000000000000000000000"
"0000000000000000000000000000000000000000000000000000000000000004"),
# Test case for overflow during addition
("0001efffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"