Add test cases for P521 fast reduction testing

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
Gabor Mezei 2023-03-28 15:06:51 +02:00
parent 64a229f6ac
commit a9a68728b3
No known key found for this signature in database
GPG Key ID: F072ACA227ACD71D

View File

@ -351,7 +351,15 @@ class EcpP521R1Raw(bignum_common.ModOperationCommon,
input_values = [
"0", "1",
# Corner case: maximum canonical P521 multiplication result
# Modulus - 1
("01ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
"fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"),
# Modulus + 1
("020000000000000000000000000000000000000000000000000000000000000000"
"000000000000000000000000000000000000000000000000000000000000000000"),
# Maximum canonical P521 multiplication result
("0003ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
"fffff800"