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

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

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"