Add more test cases for P224 testing

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
Gabor Mezei 2023-02-27 15:59:34 +01:00
parent a835d20cde
commit 98791e7781
No known key found for this signature in database
GPG Key ID: F072ACA227ACD71D

View File

@ -90,6 +90,21 @@ class EcpP224R1Raw(bignum_common.ModOperationCommon,
input_values = [
"0", "1",
# Modulus - 1
"ffffffffffffffffffffffffffffffff000000000000000000000000",
# Maximum canonical P224 multiplication result
("ffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),
# Generate an overflow during reduction
("00000000000000000000000000010000000070000000002000001000"
"FFFFFFFFFFFF9FFFFFFFFFE00000EFFF000070000000002000001003"),
# Generate an underflow during reduction
("00000001000000000000000000000000000000000000000000000000"
"00000000000DC0000000000000000001000000010000000100000003"),
# First 8 number generated by random.getrandbits(448) - seed(2,2)
("da94e3e8ab73738fcf1822ffbc6887782b491044d5e341245c6e4337"
"15ba2bdd177219d30e7a269fd95bafc8f2a4d27bdcf4bb99f4bea973"),