[test] Add Project Wycheproof RSA-PSS signature verification tests

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2026-09-04 21:48:48 +01:00
parent 20613766c9
commit d89765d5f0
14 changed files with 53684 additions and 184 deletions
+172 -85
View File
@@ -152,16 +152,15 @@ class ExchangeAlgorithm(Algorithm):
"""Label for use in comments"""
return self.name
class PubkeyAlgorithm(Algorithm):
"""An iPXE public-key algorithm"""
ECDSA = "ECDSA"
RSA_ES_PKCS1 = "RSAES-PKCS1-v1_5"
RSA_SSA_PKCS1 = "RSASSA-PKCS1-v1_5"
class EncryptionAlgorithm(Algorithm):
"""An iPXE public-key encryption algorithm"""
RSA = "RSAES-PKCS1-v1_5"
@property
def basename(self):
"""Base algorithm name"""
return super().basename.split("_")[0]
class SignatureAlgorithm(Algorithm):
"""An iPXE public-key signature algorithm"""
ECDSA = "ECDSA"
RSA = "RSASSA-PKCS1-v1_5"
RSA_PSS = "RSASSA-PSS"
##############################################################################
#
@@ -171,7 +170,7 @@ class PubkeyAlgorithm(Algorithm):
class HexBytes(bytes):
"""A hex-encoded byte string"""
def __new__(cls, value):
def __new__(cls, value=b''):
if isinstance(value, str):
value = base64.b16decode(value, casefold=True)
return super().__new__(cls, value)
@@ -941,19 +940,43 @@ class GcmCipherTestFile(AeadCipherTestFile):
##############################################################################
#
# RSA PKCS#1 tests
# RSA tests
#
@attrclass
class RsaPkcs1TestGroup(TestGroup):
"""An RSA PKCS#1 test group"""
class RsaTestGroup(TestGroup):
"""An RSA test group"""
keySize = scalar_field(int)
@property
def private_key(self):
"""Private key"""
return None
@property
def public_key(self):
"""Public key"""
return None
def definition(self):
"""Generate source code for test group definition"""
algorithm = self.test_file.algorithm.symbol
private_key = self.private_key or HexBytes()
public_key = self.public_key or HexBytes()
code = (
"/* Key pair for following tests */\n" +
"PUBKEY_TEST ( %s, &%s,\n" % (self.test_name, algorithm) +
private_key.source("\tPRIVATE") + ",\n" +
public_key.source("\tPUBLIC") + " );\n" +
"\n" +
super().definition()
)
return code
@attrclass
class RsaPkcs1TestFile(TestFile):
"""An RSA PKCS#1 test file"""
algorithm = scalar_field(PubkeyAlgorithm)
testGroups = list_field(RsaPkcs1TestGroup)
class RsaTestFile(TestFile):
"""An RSA test file"""
testGroups = list_field(RsaTestGroup)
@property
def keysizes(self):
@@ -963,7 +986,7 @@ class RsaPkcs1TestFile(TestFile):
@property
def basename(self):
"""Base name for test cases"""
return "rsa_pkcs1_%s" % "_".join("%d" % x for x in self.keysizes)
return "_".join("%d" % x for x in self.keysizes)
@property
def label(self):
@@ -972,12 +995,12 @@ class RsaPkcs1TestFile(TestFile):
##############################################################################
#
# RSA PKCS#1 decryption tests
# RSA decryption tests
#
@attrclass
class RsaPkcs1DecryptTestCase(TestCase):
"""An RSA PKCS#1 decryption test case"""
class RsaDecryptTestCase(TestCase):
"""An RSA decryption test case"""
msg = scalar_field(HexBytes, metadata={"stable": True})
ct = scalar_field(HexBytes, metadata={"stable": True})
@@ -1002,38 +1025,40 @@ class RsaPkcs1DecryptTestCase(TestCase):
return code
@attrclass
class RsaPkcs1DecryptTestGroup(RsaPkcs1TestGroup):
"""An RSA PKCS#1 decryption test group"""
class RsaDecryptTestGroup(RsaTestGroup):
"""An RSA decryption test group"""
privateKey = map_field(str) # ignored
privateKeyPkcs8 = scalar_field(HexBytes, metadata={"stable": True})
privateKeyPem = scalar_field(str) # ignored
privateKeyJwk = map_field(str) # ignored
tests = list_field(RsaPkcs1DecryptTestCase)
tests = list_field(RsaDecryptTestCase)
def definition(self):
"""Generate source code for test group definition"""
algorithm = self.test_file.algorithm.symbol
code = (
"/* Private key for following tests */\n" +
"PUBKEY_TEST ( %s, &%s,\n" % (self.test_name, algorithm) +
self.privateKeyPkcs8.source("\tPRIVATE") + ",\n" +
"\tPUBLIC() );\n" +
"\n" +
super().definition()
)
return code
@property
def private_key(self):
"""Private key"""
return self.privateKeyPkcs8
@attrclass
class RsaPkcs1DecryptTestFile(RsaPkcs1TestFile):
"""An RSA PKCS#1 decryption test file"""
SCHEMA: ClassVar = "rsaes_pkcs1_decrypt_schema_v1.json"
testGroups = list_field(RsaPkcs1DecryptTestGroup)
class RsaDecryptTestFile(RsaTestFile):
"""An RSA decryption test file"""
algorithm = scalar_field(EncryptionAlgorithm)
testGroups = list_field(RsaDecryptTestGroup)
@property
def basename(self):
"""Base name for test cases"""
return "%s_decrypt" % super().basename
@attrclass
class RsaPkcs1DecryptTestFile(RsaDecryptTestFile):
"""An RSA PKCS#1 decryption test file"""
SCHEMA: ClassVar = "rsaes_pkcs1_decrypt_schema_v1.json"
@property
def basename(self):
"""Base name for test cases"""
return "rsa_pkcs1_%s" % super().basename
@property
def label(self):
"""Label for use in comments"""
@@ -1041,12 +1066,12 @@ class RsaPkcs1DecryptTestFile(RsaPkcs1TestFile):
##############################################################################
#
# RSA PKCS#1 signing tests
# RSA signing tests
#
@attrclass
class RsaPkcs1SignTestCase(TestCase):
"""An RSA PKCS#1 signing test case"""
class RsaSignTestCase(TestCase):
"""An RSA signing test case"""
msg = scalar_field(HexBytes, metadata={"stable": True})
sig = scalar_field(HexBytes, metadata={"stable": True})
@@ -1070,8 +1095,8 @@ class RsaPkcs1SignTestCase(TestCase):
return code
@attrclass
class RsaPkcs1SignTestGroup(RsaPkcs1TestGroup):
"""An RSA PKCS#1 signing test group"""
class RsaSignTestGroup(RsaTestGroup):
"""An RSA signing test group"""
privateKey = map_field(str) # ignored
keyAsn = scalar_field(str) # ignored
keyDer = scalar_field(HexBytes, metadata={"stable": True})
@@ -1081,32 +1106,39 @@ class RsaPkcs1SignTestGroup(RsaPkcs1TestGroup):
privateKeyPem = scalar_field(str) # ignored
privateKeyPkcs8 = scalar_field(HexBytes, metadata={"stable": True})
sha = scalar_field(DigestAlgorithm)
tests = list_field(RsaPkcs1SignTestCase)
tests = list_field(RsaSignTestCase)
def definition(self):
"""Generate source code for test group definition"""
algorithm = self.test_file.algorithm.symbol
code = (
"/* Key pair for following tests */\n" +
"PUBKEY_TEST ( %s, &%s,\n" % (self.test_name, algorithm) +
self.privateKeyPkcs8.source("\tPRIVATE") + ",\n" +
self.keyDer.source("\tPUBLIC") + " );\n" +
"\n" +
super().definition()
)
return code
@property
def private_key(self):
"""Private key"""
return self.privateKeyPkcs8
@property
def public_key(self):
"""Public key"""
return self.keyDer
@attrclass
class RsaPkcs1SignTestFile(RsaPkcs1TestFile):
"""An RSA PKCS#1 signing test file"""
SCHEMA: ClassVar = "rsassa_pkcs1_generate_schema_v1.json"
testGroups = list_field(RsaPkcs1SignTestGroup)
class RsaSignTestFile(RsaTestFile):
"""An RSA signing test file"""
algorithm = scalar_field(SignatureAlgorithm)
testGroups = list_field(RsaSignTestGroup)
@property
def basename(self):
"""Base name for test cases"""
return "%s_sign" % super().basename
@attrclass
class RsaPkcs1SignTestFile(RsaSignTestFile):
"""An RSA PKCS#1 signing test file"""
SCHEMA: ClassVar = "rsassa_pkcs1_generate_schema_v1.json"
@property
def basename(self):
"""Base name for test cases"""
return "rsa_pkcs1_%s" % super().basename
@property
def label(self):
"""Label for use in comments"""
@@ -1114,12 +1146,12 @@ class RsaPkcs1SignTestFile(RsaPkcs1TestFile):
##############################################################################
#
# RSA PKCS#1 verification tests
# RSA verification tests
#
@attrclass
class RsaPkcs1VerifyTestCase(TestCase):
"""An RSA PKCS#1 verification test case"""
class RsaVerifyTestCase(TestCase):
"""An RSA verification test case"""
msg = scalar_field(HexBytes, metadata={"stable": True})
sig = scalar_field(HexBytes, metadata={"stable": True})
@@ -1152,35 +1184,28 @@ class RsaPkcs1VerifyTestCase(TestCase):
return code
@attrclass
class RsaPkcs1VerifyTestGroup(RsaPkcs1TestGroup):
"""An RSA PKCS#1 verification test group"""
class RsaVerifyTestGroup(RsaTestGroup):
"""An RSA verification test group"""
publicKey = map_field(str) # ignored
publicKeyAsn = scalar_field(str) # ignored
publicKeyDer = scalar_field(HexBytes, metadata={"stable": True})
publicKeyPem = scalar_field(str) # ignored
publicKeyJwk = map_field(str, factory=dict) # ignored
keyDer = scalar_field(HexBytes, default=None)
keyJwk = map_field(str, factory=dict) # ignored
sha = scalar_field(DigestAlgorithm)
tests = list_field(RsaPkcs1VerifyTestCase)
tests = list_field(RsaVerifyTestCase)
def definition(self):
"""Generate source code for test group definition"""
algorithm = self.test_file.algorithm.symbol
code = (
"/* Key pair for following tests */\n" +
"PUBKEY_TEST ( %s, &%s,\n" % (self.test_name, algorithm) +
"\tPRIVATE(),\n" +
self.publicKeyDer.source("\tPUBLIC") + " );\n" +
"\n" +
super().definition()
)
return code
@property
def public_key(self):
"""Public key"""
return self.publicKeyDer
@attrclass
class RsaPkcs1VerifyTestFile(RsaPkcs1TestFile):
"""An RSA PKCS#1 verification test file"""
SCHEMA: ClassVar = "rsassa_pkcs1_verify_schema_v1.json"
testGroups = list_field(RsaPkcs1VerifyTestGroup)
class RsaVerifyTestFile(RsaTestFile):
"""An RSA verification test file"""
algorithm = scalar_field(SignatureAlgorithm)
testGroups = list_field(RsaVerifyTestGroup)
@property
def digests(self):
@@ -1193,6 +1218,16 @@ class RsaPkcs1VerifyTestFile(RsaPkcs1TestFile):
digests = "_".join(x.basename for x in self.digests)
return "%s_%s_verify" % (super().basename, digests)
@attrclass
class RsaPkcs1VerifyTestFile(RsaVerifyTestFile):
"""An RSA PKCS#1 verification test file"""
SCHEMA: ClassVar = "rsassa_pkcs1_verify_schema_v1.json"
@property
def basename(self):
"""Base name for test cases"""
return "rsa_pkcs1_%s" % super().basename
@property
def label(self):
"""Label for use in comments"""
@@ -1207,6 +1242,31 @@ class RsaPkcs1VerifyTestFile(RsaPkcs1TestFile):
)
return code
@attrclass
class RsaPssVerifyTestGroup(RsaVerifyTestGroup):
"""An RSA-PSS verification test group"""
mgf = scalar_field(str)
mgfSha = scalar_field(DigestAlgorithm)
sLen = scalar_field(int)
@attrclass
class RsaPssVerifyTestFile(RsaVerifyTestFile):
"""An RSA-PSS verification test file"""
SCHEMA: ClassVar = "rsassa_pss_verify_schema_v1.json"
testGroups = list_field(RsaPssVerifyTestGroup)
@property
def basename(self):
"""Base name for test cases"""
digests = "_".join(x.basename for x in self.digests)
return "rsa_pss_%s" % super().basename
@property
def label(self):
"""Label for use in comments"""
digests = " / ".join(x.label for x in self.digests)
return "RSA-PSS %s verification (%s)" % (digests, super().label)
##############################################################################
#
# ECDSA verification tests
@@ -1270,7 +1330,7 @@ class EcdsaTestGroup(TestGroup):
class EcdsaTestFile(TestFile):
"""An ECDSA test file"""
SCHEMA: ClassVar = "ecdsa_verify_schema_v1.json"
algorithm = scalar_field(PubkeyAlgorithm)
algorithm = scalar_field(SignatureAlgorithm)
testGroups = list_field(EcdsaTestGroup)
@property
@@ -1435,6 +1495,33 @@ def main():
RsaPkcs1VerifyTestFile.read(
srcdir / "rsa_signature_8192_sha512_test.json"
),
RsaPssVerifyTestFile.read(
srcdir / "rsa_pss_2048_sha1_mgf1_20_test.json"
),
RsaPssVerifyTestFile.read(
srcdir / "rsa_pss_2048_sha256_mgf1_32_test.json"
),
RsaPssVerifyTestFile.read(
srcdir / "rsa_pss_2048_sha384_mgf1_48_test.json"
),
RsaPssVerifyTestFile.read(
srcdir / "rsa_pss_2048_sha512_224_mgf1_28_test.json"
),
RsaPssVerifyTestFile.read(
srcdir / "rsa_pss_2048_sha512_256_mgf1_32_test.json"
),
RsaPssVerifyTestFile.read(
srcdir / "rsa_pss_3072_sha256_mgf1_32_test.json"
),
RsaPssVerifyTestFile.read(
srcdir / "rsa_pss_4096_sha256_mgf1_32_test.json"
),
RsaPssVerifyTestFile.read(
srcdir / "rsa_pss_4096_sha384_mgf1_48_test.json"
),
RsaPssVerifyTestFile.read(
srcdir / "rsa_pss_4096_sha512_mgf1_64_test.json"
),
XdhTestFile.read(
srcdir / "x25519_test.json",
privsize=32, pubsize=32, sharedsize=32,
@@ -6,7 +6,7 @@
#include "../wycheproof_test.h"
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_74640d14, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -1326,7 +1326,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_a7821ab4,
0x90, 0xca, 0xaa, 0x54, 0xa2, 0xf2, 0x6b, 0x14, 0x9c,
0xf9, 0xe7, 0x7d ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_8d438ea4, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -1500,7 +1500,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_adc31c43,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_b25105a1, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -1672,7 +1672,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_1d659e41,
0x13, 0xe4, 0xc3, 0x14, 0x8c, 0x73, 0x00, 0x79, 0x92,
0x44, 0xc5, 0x66, 0xbd ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_b90eff7e, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -1833,7 +1833,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_33bed753,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_75cbd122, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -2004,7 +2004,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_53aff7b5,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_15f23650, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbf, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -2176,7 +2176,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_ab5d1f13,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_60c291d9, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -2352,7 +2352,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_085299b8,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_dc34e74e, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbe, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -2513,7 +2513,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_34c53973,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_e94aec24, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -2689,7 +2689,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_b783e395,
0xb5, 0x8b, 0x5d, 0xa3, 0xcd, 0x3a, 0x8f, 0x79, 0xd1,
0xf8, 0xb2, 0x9e, 0x30 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_2eddda62, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbe, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -2875,7 +2875,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_80a91b4b,
0x8e, 0x66, 0x01, 0x09, 0x2f, 0xf6, 0x1c, 0xaf, 0x02,
0x98, 0x17, 0x5a, 0x39 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_fd32243b, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbe, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -3054,7 +3054,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_62a041f7,
0x05, 0x21, 0x76, 0x24, 0xfe, 0xa4, 0x44, 0x66, 0x6e,
0xf3, 0x0c, 0x7b, 0x84 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_2e38226c, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbe, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -3237,7 +3237,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_db4cead7,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_51be45d6, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -3419,7 +3419,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_c56de28b,
0xf4, 0x63, 0x09, 0x40, 0x14, 0xce, 0xdc, 0xc1, 0x22,
0x79, 0x16, 0x8c, 0xcb ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_e4ce4350, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -3604,7 +3604,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_7004e529,
0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_f261271e, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -3772,7 +3772,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_61e212fb,
0x85, 0xae, 0x00, 0xe1, 0x6b, 0x18, 0x28, 0x48, 0x46,
0x75, 0xf8, 0x70, 0xe1 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_b81d3909, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -3936,7 +3936,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_478d3b73,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_122e852b, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbf, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -4096,7 +4096,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_3198ce94,
0x25, 0xe8, 0xa5, 0x17, 0x45, 0x80, 0x18, 0x4b, 0xb2,
0x23, 0xfb, 0xb9, 0x19 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_9f782ac4, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -4274,7 +4274,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_8ebe72d2,
0x3a, 0xd8, 0x80, 0xd1, 0xe7, 0x32, 0xb5, 0xeb, 0xce,
0x58, 0x17, 0xde, 0xbe ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_bd191dfa, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -4439,7 +4439,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_85da8e5d,
0x17, 0x42, 0xdc, 0xb4, 0xd5, 0xf2, 0x3e, 0xb7, 0xd8,
0x9a, 0xb2, 0x85, 0x70 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_01b5b543, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -4616,7 +4616,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_f8ed071a,
0x59, 0xf2, 0x22, 0x50, 0x1c, 0x4c, 0x86, 0x40, 0xb4,
0x32, 0x79, 0xbb, 0x03 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_3eb8d492, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbe, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -4795,7 +4795,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_ae71ff65,
0x36, 0xdd, 0x0c, 0x11, 0x78, 0x8a, 0xfa, 0x83, 0x05,
0x98, 0xd8, 0xa0, 0x6b ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_e9832613, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xba, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -4975,7 +4975,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_feb8b8ab,
0xbd, 0x3f, 0x02, 0x7b, 0x64, 0x69, 0x20, 0x96, 0x3e,
0xeb, 0x06, 0x7c, 0x33 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_c3ec6f8c, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbe, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -5161,7 +5161,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_eea6d3a1,
0xb3, 0x22, 0x3f, 0x25, 0x32, 0xf1, 0x75, 0x30, 0x57,
0x0e, 0x6e, 0x69, 0x3e ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_f840f50f, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -5343,7 +5343,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_194f1f6f,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_da2a2323, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbe, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -5529,7 +5529,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_8e8ab95e,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_36f28653, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -5693,7 +5693,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_85032c0c,
0xe3, 0x88, 0xdb, 0x73, 0x3d, 0xa5, 0xcd, 0x65, 0x6f,
0x93, 0xb0, 0xeb, 0x58 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_eeb81536, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -5870,7 +5870,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_8b60a7c1,
0xb7, 0x03, 0x45, 0xb6, 0xc4, 0xc6, 0xbf, 0xdf, 0x7a,
0xad, 0xc5, 0xd3, 0x50 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_34ea3ec4, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbe, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -6049,7 +6049,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_b6a2cdeb,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_3d7d495f, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -6221,7 +6221,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_7f28287a,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_abd092dc, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -6393,7 +6393,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_90b96967,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_bd6b6a96, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -6563,7 +6563,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_19a67427,
0x6e, 0xb9, 0x13, 0x67, 0x7c, 0x49, 0x4b, 0xab, 0x01,
0x04, 0x2b, 0x98, 0x2c ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_a2a27722, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -6738,7 +6738,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_4b59a6c8,
0x4b, 0x13, 0xa1, 0xc8, 0x6e, 0x6f, 0x68, 0x7b, 0xd3,
0x7e, 0x5f, 0xd2, 0x2c ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_2048_decrypt_573310b4, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x04, 0xbd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -6,7 +6,7 @@
#include "../wycheproof_test.h"
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_a3ed43b3, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -1874,7 +1874,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_6c5b8111,
0xf5, 0x3a, 0x87, 0x7c, 0x26, 0x5d, 0xa8, 0x24, 0x93,
0xa9, 0x08, 0x69, 0xe3, 0x76 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_d476d931, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -2145,7 +2145,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_44c19125,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x02 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_a81d1adf, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -2409,7 +2409,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_7e24f21b,
0xae, 0xf3, 0xa2, 0xf4, 0xd9, 0x18, 0x07, 0x28, 0xfc,
0x3c, 0xb1, 0xc7, 0x6b, 0xf8, 0x31 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_c1fcaafe, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -2648,7 +2648,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_b1bcd981,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_5ad5da62, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -2893,7 +2893,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_03f819ba,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_3b0e5b7b, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xff, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -3159,7 +3159,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_4c0bd157,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_5fd9e272, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -3419,7 +3419,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_ad5f2e25,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_4d98f45c, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -3686,7 +3686,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_c26d75c3,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_9296f5f5, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -3944,7 +3944,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_ed9ea236,
0xca, 0xc1, 0x7b, 0xa7, 0x1e, 0x88, 0xf1, 0x88, 0xe5,
0x95, 0x21, 0x76, 0xf4, 0x04, 0x71 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_658fae24, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -4197,7 +4197,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_0b1ea231,
0x71, 0x93, 0xdc, 0xe4, 0x2a, 0xe5, 0x6e, 0x76, 0x09,
0x47, 0xe6, 0x42, 0x54, 0xc7, 0xb4 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_e5d16e92, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfe, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -4463,7 +4463,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_f6ab7bd6,
0xac, 0x93, 0x61, 0x03, 0x33, 0x68, 0x31, 0x00, 0xbf,
0xa4, 0x90, 0x8b, 0x78, 0x44, 0xa2 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_74fe48d7, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -4697,7 +4697,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_4eaf2794,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_bee2b915, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfe, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -4967,7 +4967,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_ef36e64d,
0xd2, 0x2e, 0x01, 0x18, 0x70, 0x0f, 0x8f, 0x64, 0xdf,
0x83, 0x30, 0x73, 0x8f, 0xf1, 0xf7 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_7c58e4fe, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfe, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -5232,7 +5232,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_de217782,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_f62023c7, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfe, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -5504,7 +5504,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_cd5c1540,
0x0d, 0x74, 0xd9, 0x15, 0xf7, 0x7b, 0x86, 0x88, 0x62,
0xc7, 0x9e, 0xb0, 0x24, 0x4c, 0x61 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_b3fd3a78, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xff, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -5776,7 +5776,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_9328728a,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_c71facf6, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -6035,7 +6035,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_076e9b05,
0x8f, 0x1b, 0xef, 0xcb, 0x0b, 0xdd, 0xfc, 0x93, 0xbb,
0x55, 0xc8, 0x9d, 0xff, 0x71, 0xa9 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_df35af48, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -6301,7 +6301,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_b66e38e5,
0xcf, 0xa1, 0x66, 0x91, 0xe9, 0x08, 0x65, 0x38, 0x5d,
0xbd, 0x5c, 0x03, 0xc8, 0x3a, 0xb3 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_bab3f134, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfe, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -6561,7 +6561,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_75a76f34,
0x57, 0xee, 0x1e, 0x7f, 0xc5, 0x33, 0xe2, 0x81, 0xd6,
0xc6, 0x09, 0xe7, 0xae, 0x8e, 0xb2 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_1c078d1e, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -6818,7 +6818,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_7de100a9,
0x0c, 0xa5, 0xeb, 0xbe, 0xde, 0x5d, 0xe5, 0x1b, 0xdd,
0x5e, 0x81, 0x5c, 0xd4, 0x55, 0x59 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_2c10e77b, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -7077,7 +7077,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_9813c70d,
0x52, 0xa7, 0x21, 0x31, 0x37, 0x7b, 0x33, 0x89, 0x29,
0x71, 0x03, 0xf1, 0x57, 0x61, 0x63 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_0278fffa, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfe, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -7333,7 +7333,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_ec92a1d9,
0x13, 0x9f, 0x13, 0x81, 0x1c, 0x90, 0xf6, 0xea, 0xf2,
0x88, 0xb8, 0x69, 0x40, 0x57, 0x4f ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_8447258b, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -7585,7 +7585,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_0054981b,
0xdc, 0x41, 0x83, 0x54, 0x48, 0x14, 0x27, 0x05, 0x94,
0x4a, 0x2a, 0xd2, 0xa0, 0x63, 0x85 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_fbad1861, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -7858,7 +7858,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_3211c1ac,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_6c7ea403, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfe, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -8122,7 +8122,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_6cc86f84,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_7ac680b5, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -8360,7 +8360,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_0151f0bb,
0x56, 0x04, 0xaf, 0xaa, 0x61, 0xb8, 0x1d, 0xaa, 0xea,
0x6a, 0x16, 0xe2, 0x3a, 0x31, 0x66 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_2317618f, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -8617,7 +8617,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_373aa90b,
0xf1, 0x45, 0xaf, 0x0b, 0x32, 0x82, 0x01, 0x11, 0xe9,
0x89, 0xdd, 0xd2, 0xf7, 0x0d, 0xec ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_4937f588, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xff, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -8885,7 +8885,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_a48336aa,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_604197a2, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfe, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -9132,7 +9132,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_4bb9d59a,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_f01c0b12, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -9405,7 +9405,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_cebf9fa8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_df4d1e67, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfd, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -9641,7 +9641,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_164a3130,
0xd3, 0x8e, 0x17, 0x67, 0xc6, 0xef, 0x68, 0x2d, 0x9d,
0x40, 0xf6, 0xac, 0x9e, 0xbb, 0xb8 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_54a713f6, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xfc, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -9913,7 +9913,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_2025e7f4,
0xd9, 0x6e, 0x7a, 0x71, 0x11, 0x3e, 0xc0, 0x89, 0x6b,
0x92, 0x61, 0xcd, 0x6c, 0xd2, 0xbe ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_3072_decrypt_02b127f1, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x06, 0xff, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -6,7 +6,7 @@
#include "../wycheproof_test.h"
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_13cc7075, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x43, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -2424,7 +2424,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_a60b1fae,
0xb7, 0x2a, 0x69, 0x5b, 0x74, 0x28, 0x11, 0x59, 0x64,
0x7a, 0x62, 0xa3, 0xc1, 0x9a, 0xcd, 0xda ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_8f806c9a, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x44, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -2759,7 +2759,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_8b22b2db,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_f9d3de88, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x41, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -3111,7 +3111,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_b0cc673b,
0xbd, 0x41, 0x38, 0xb3, 0xbe, 0xd7, 0x00, 0x0f, 0xde,
0x26, 0x48, 0xcd, 0x06, 0xe4, 0xf5, 0xd0, 0xcf ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_b8d9a1a7, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x41, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -3440,7 +3440,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_5885d9c7,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_f6d5d1cf, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x42, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -3790,7 +3790,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_01f137ca,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_77d3daf7, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x41, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -4114,7 +4114,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_1e39a6aa,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_2276c2e7, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x42, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -4465,7 +4465,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_fb22a2d2,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_d9251d8d, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x43, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -4821,7 +4821,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_de3c9601,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_3ea3a54d, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x42, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -5139,7 +5139,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_a36a92a5,
0x0d, 0x68, 0xa1, 0x59, 0x78, 0x2b, 0xaf, 0xee, 0xea,
0x93, 0xb5, 0x8e, 0x53, 0x6b, 0x8f, 0x4b, 0x19 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_23d948d6, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x40, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -5488,7 +5488,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_0ead10bb,
0x5f, 0x77, 0xcd, 0x82, 0x05, 0xd2, 0x69, 0x94, 0xba,
0xc2, 0x10, 0x42, 0x0f, 0xd7, 0xdb, 0xa2, 0x13 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_ddf49794, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x43, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -5838,7 +5838,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_3ef60d7f,
0x34, 0x49, 0x8f, 0x7f, 0xad, 0x67, 0x05, 0x1d, 0x65,
0x0a, 0xa7, 0xa8, 0xad, 0x8d, 0x66, 0x13, 0xda ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_a2426747, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x43, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -6182,7 +6182,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_df26a907,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_24b0aae3, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x42, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -6513,7 +6513,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_fe399315,
0xb7, 0xd8, 0xda, 0x8e, 0x49, 0xd8, 0x85, 0xd1, 0x32,
0xf4, 0x0e, 0x94, 0xbb, 0x34, 0x3f, 0xb7, 0xcb ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_1b936662, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x41, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -6848,7 +6848,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_5616855d,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_ee01f509, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x43, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -7206,7 +7206,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_dc91dfa3,
0x6e, 0xf1, 0x6f, 0x94, 0x64, 0xff, 0xe5, 0x99, 0x2d,
0x1c, 0xa3, 0xb2, 0x4d, 0xea, 0x69, 0xa3, 0x45 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_cef4f96e, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x43, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -7541,7 +7541,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_1d063930,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_66c48aec, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x42, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -7891,7 +7891,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_dd3e9b90,
0x0a, 0x21, 0xb3, 0x67, 0x50, 0x7a, 0xfb, 0x0e, 0x2f,
0xa2, 0xbd, 0x29, 0x89, 0x23, 0x04, 0x15, 0x05 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_2bb223d7, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x41, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -8207,7 +8207,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_b2dc7be6,
0xfb, 0x14, 0xa0, 0x2c, 0x69, 0xbd, 0x38, 0x34, 0x67,
0xd1, 0x34, 0x98, 0x32, 0xba, 0x0b, 0x17, 0xbe ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_1c980643, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x42, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -8519,7 +8519,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_c28df109,
0xa7, 0x84, 0x97, 0xdf, 0x52, 0x0b, 0x1b, 0x78, 0x77,
0x9c, 0x32, 0xc3, 0x65, 0xab, 0x5e, 0xd3, 0x21 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_426f938a, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x41, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -8878,7 +8878,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_0ef87425,
0xe3, 0xac, 0xc5, 0x85, 0x14, 0x5c, 0xd5, 0x18, 0xa5,
0xb1, 0x9a, 0x39, 0xd3, 0x1a, 0xad, 0x7d, 0xe5 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_d2a9f819, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x42, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -9223,7 +9223,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_f692ba5e,
0x83, 0x17, 0x92, 0x94, 0xd8, 0x1e, 0x83, 0x28, 0xea,
0x48, 0x5b, 0x66, 0x70, 0x65, 0x9b, 0xa6, 0xfe ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_6d2fc880, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x43, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -9560,7 +9560,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_380a24fc,
0xc9, 0xc2, 0xb6, 0xb4, 0xe2, 0x33, 0xa6, 0xc4, 0x0e,
0xb0, 0x9d, 0x48, 0xb1, 0x79, 0xf5, 0x98, 0x2d ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_2a5e286b, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x43, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -9914,7 +9914,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_c913f84f,
0xe6, 0x7b, 0x2a, 0xab, 0xfc, 0x53, 0x45, 0x84, 0xe1,
0xaf, 0xc3, 0xc4, 0x0a, 0xf9, 0x5c, 0x21, 0xde ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_24ccb446, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x42, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -10244,7 +10244,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_1876293c,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_b7cbc865, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x41, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -10603,7 +10603,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_c77e40b6,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_a3d0540f, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x43, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -10927,7 +10927,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_c5684d18,
0x06, 0xf0, 0xcc, 0x29, 0xe5, 0xbd, 0xfe, 0x24, 0x59,
0x31, 0x2a, 0x9e, 0x5a, 0xc7, 0x1e, 0xb7, 0x40 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_e329a866, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x42, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -11276,7 +11276,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_0604e360,
0x71, 0xf2, 0x12, 0x0e, 0x51, 0xca, 0xfd, 0x41, 0xec,
0x68, 0x74, 0x64, 0x8c, 0x04, 0xf8, 0x9a, 0x50 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_07c5b689, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x43, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -11626,7 +11626,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_1248c5b9,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_cb4a43c6, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x44, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -11976,7 +11976,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_299898ba,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_25a2c600, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x43, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -12326,7 +12326,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_1e2f0527,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_d5ab5f41, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x43, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -12635,7 +12635,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_0bfdf153,
0xac, 0x4f, 0xc6, 0x8f, 0xcc, 0x9c, 0x1e, 0x7e, 0xb5,
0x6b, 0xdf, 0x40, 0x90, 0x85, 0xfc, 0x96, 0x02 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_f00a3556, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x42, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
@@ -12966,7 +12966,7 @@ PUBKEY_ENCRYPTION_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_89dd834c,
0x5a, 0x06, 0x72, 0x12, 0x0f, 0xb9, 0xa4, 0xe4, 0x18,
0x84, 0x13, 0x71, 0x93, 0x2d, 0x28, 0xaf, 0x32 ) );
/* Private key for following tests */
/* Key pair for following tests */
PUBKEY_TEST ( wycheproof_rsa_pkcs1_4096_decrypt_f0c9b3f3, &rsa_algorithm,
PRIVATE ( 0x30, 0x82, 0x09, 0x41, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06,
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+9
View File
@@ -96,4 +96,13 @@ REQUIRE_OBJECT ( wycheproof_rsa_pkcs1_4096_sign );
REQUIRE_OBJECT ( wycheproof_rsa_pkcs1_8192_sha256_verify );
REQUIRE_OBJECT ( wycheproof_rsa_pkcs1_8192_sha384_verify );
REQUIRE_OBJECT ( wycheproof_rsa_pkcs1_8192_sha512_verify );
REQUIRE_OBJECT ( wycheproof_rsa_pss_2048_sha1_verify );
REQUIRE_OBJECT ( wycheproof_rsa_pss_2048_sha256_verify );
REQUIRE_OBJECT ( wycheproof_rsa_pss_2048_sha384_verify );
REQUIRE_OBJECT ( wycheproof_rsa_pss_2048_sha512_224_verify );
REQUIRE_OBJECT ( wycheproof_rsa_pss_2048_sha512_256_verify );
REQUIRE_OBJECT ( wycheproof_rsa_pss_3072_sha256_verify );
REQUIRE_OBJECT ( wycheproof_rsa_pss_4096_sha256_verify );
REQUIRE_OBJECT ( wycheproof_rsa_pss_4096_sha384_verify );
REQUIRE_OBJECT ( wycheproof_rsa_pss_4096_sha512_verify );
REQUIRE_OBJECT ( wycheproof_x25519 );