summaryrefslogtreecommitdiffstats
path: root/security/nss/gtests
diff options
context:
space:
mode:
Diffstat (limited to 'security/nss/gtests')
-rw-r--r--security/nss/gtests/common/testvectors_base/test-structs.h8
-rw-r--r--security/nss/gtests/common/wycheproof/source_vectors/eddsa_test.json2262
-rw-r--r--security/nss/gtests/freebl_gtest/ed25519_unittest.cc148
-rw-r--r--security/nss/gtests/freebl_gtest/freebl_gtest.gyp1
-rw-r--r--security/nss/gtests/pk11_gtest/manifest.mn2
-rw-r--r--security/nss/gtests/pk11_gtest/pk11_eddsa_unittest.cc177
-rw-r--r--security/nss/gtests/pk11_gtest/pk11_eddsa_vectors.h164
-rw-r--r--security/nss/gtests/pk11_gtest/pk11_gtest.gyp2
-rw-r--r--security/nss/gtests/pk11_gtest/pk11_import_unittest.cc1
-rw-r--r--security/nss/gtests/pk11_gtest/pk11_keygen.cc7
-rw-r--r--security/nss/gtests/pk11_gtest/pk11_pbe_unittest.cc69
-rw-r--r--security/nss/gtests/pk11_gtest/pk11_signature_test.cc25
-rw-r--r--security/nss/gtests/pk11_gtest/pk11_signature_test.h24
13 files changed, 2876 insertions, 14 deletions
diff --git a/security/nss/gtests/common/testvectors_base/test-structs.h b/security/nss/gtests/common/testvectors_base/test-structs.h
index 1ed227da50..ca8c39b7bd 100644
--- a/security/nss/gtests/common/testvectors_base/test-structs.h
+++ b/security/nss/gtests/common/testvectors_base/test-structs.h
@@ -69,6 +69,14 @@ typedef struct EcdsaTestVectorStr {
typedef EcdsaTestVector DsaTestVector;
+typedef struct EddsaTestVectorStr {
+ uint32_t id;
+ std::vector<uint8_t> sig;
+ std::vector<uint8_t> public_key;
+ std::vector<uint8_t> msg;
+ bool valid;
+} EddsaTestVector;
+
typedef struct EcdhTestVectorStr {
uint64_t id;
std::vector<uint8_t> private_key;
diff --git a/security/nss/gtests/common/wycheproof/source_vectors/eddsa_test.json b/security/nss/gtests/common/wycheproof/source_vectors/eddsa_test.json
new file mode 100644
index 0000000000..e2a1ae4f28
--- /dev/null
+++ b/security/nss/gtests/common/wycheproof/source_vectors/eddsa_test.json
@@ -0,0 +1,2262 @@
+{
+ "algorithm" : "EDDSA",
+ "generatorVersion" : "0.8rc16",
+ "numberOfTests" : 145,
+ "header" : [
+ "Test vectors of type EddsaVerify are intended for testing",
+ "the verification of Eddsa signatures."
+ ],
+ "notes" : {
+ "SignatureMalleability" : "EdDSA signatures are non-malleable, if implemented accordingly. Failing to check the range of S allows to modify signatures. See RFC 8032, Section 5.2.7 and Section 8.4."
+ },
+ "schema" : "eddsa_verify_schema.json",
+ "testGroups" : [
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "rdS7gQN4W6-axTQljoqvZfXxrbXvXz3xm7gKuYnE1ks",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "fU0Of2FTpptiQrUiq77mhf2kQg-INLEIw72uNp71Sfo"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "7d4d0e7f6153a69b6242b522abbee685fda4420f8834b108c3bdae369ef549fa",
+ "sk" : "add4bb8103785baf9ac534258e8aaf65f5f1adb5ef5f3df19bb80ab989c4d64b",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321007d4d0e7f6153a69b6242b522abbee685fda4420f8834b108c3bdae369ef549fa",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAfU0Of2FTpptiQrUiq77mhf2kQg+INLEIw72uNp71Sfo=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 1,
+ "comment" : "",
+ "msg" : "",
+ "sig" : "d4fbdb52bfa726b44d1786a8c0d171c3e62ca83c9e5bbe63de0bb2483f8fd6cc1429ab72cafc41ab56af02ff8fcc43b99bfe4c7ae940f60f38ebaa9d311c4007",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 2,
+ "comment" : "",
+ "msg" : "78",
+ "sig" : "d80737358ede548acb173ef7e0399f83392fe8125b2ce877de7975d8b726ef5b1e76632280ee38afad12125ea44b961bf92f1178c9fa819d020869975bcbe109",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 3,
+ "comment" : "",
+ "msg" : "54657374",
+ "sig" : "7c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab07a9155711ecfaf7f99f277bad0c6ae7e39d4eef676573336a5c51eb6f946b30d",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 4,
+ "comment" : "",
+ "msg" : "48656c6c6f",
+ "sig" : "1c1ad976cbaae3b31dee07971cf92c928ce2091a85f5899f5e11ecec90fc9f8e93df18c5037ec9b29c07195ad284e63d548cd0a6fe358cc775bd6c1608d2c905",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 5,
+ "comment" : "",
+ "msg" : "313233343030",
+ "sig" : "657c1492402ab5ce03e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c281c2bf0cf5b3a289976458a1be6277a5055545253b45b07dcc1abd96c8b989c00f301",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 6,
+ "comment" : "",
+ "msg" : "000000000000000000000000",
+ "sig" : "d46543bfb892f84ec124dcdfc847034c19363bf3fc2fa89b1267833a14856e52e60736918783f950b6f1dd8d40dc343247cd43ce054c2d68ef974f7ed0f3c60f",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 7,
+ "comment" : "",
+ "msg" : "6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161",
+ "sig" : "879350045543bc14ed2c08939b68c30d22251d83e018cacbaf0c9d7a48db577e80bdf76ce99e5926762bc13b7b3483260a5ef63d07e34b58eb9c14621ac92f00",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 8,
+ "comment" : "",
+ "msg" : "202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f60",
+ "sig" : "7bdc3f9919a05f1d5db4a3ada896094f6871c1f37afc75db82ec3147d84d6f237b7e5ecc26b59cfea0c7eaf1052dc427b0f724615be9c3d3e01356c65b9b5109",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 9,
+ "comment" : "",
+ "msg" : "ffffffffffffffffffffffffffffffff",
+ "sig" : "5dbd7360e55aa38e855d6ad48c34bd35b7871628508906861a7c4776765ed7d1e13d910faabd689ec8618b78295c8ab8f0e19c8b4b43eb8685778499e943ae04",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 10,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 11,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 12,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "0000000000000000000000000000000000000000000000000000000000000000ecd3f55c1a631258d69cf7a2def9de1400000000000000000000000000000010",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 13,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "0000000000000000000000000000000000000000000000000000000000000000edd3f55c1a631258d69cf7a2def9de1400000000000000000000000000000010",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 14,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "0000000000000000000000000000000000000000000000000000000000000000edffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 15,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 16,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "01000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 17,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "0100000000000000000000000000000000000000000000000000000000000000ecd3f55c1a631258d69cf7a2def9de1400000000000000000000000000000010",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 18,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "0100000000000000000000000000000000000000000000000000000000000000edd3f55c1a631258d69cf7a2def9de1400000000000000000000000000000010",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 19,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "0100000000000000000000000000000000000000000000000000000000000000edffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 20,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "edd3f55c1a631258d69cf7a2def9de14000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 21,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "edd3f55c1a631258d69cf7a2def9de14000000000000000000000000000000100100000000000000000000000000000000000000000000000000000000000000",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 22,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "edd3f55c1a631258d69cf7a2def9de1400000000000000000000000000000010ecd3f55c1a631258d69cf7a2def9de1400000000000000000000000000000010",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 23,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "edd3f55c1a631258d69cf7a2def9de1400000000000000000000000000000010edd3f55c1a631258d69cf7a2def9de1400000000000000000000000000000010",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 24,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "edd3f55c1a631258d69cf7a2def9de1400000000000000000000000000000010edffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 25,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "edffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 26,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "edffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0100000000000000000000000000000000000000000000000000000000000000",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 27,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "edffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fecd3f55c1a631258d69cf7a2def9de1400000000000000000000000000000010",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 28,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "edffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fedd3f55c1a631258d69cf7a2def9de1400000000000000000000000000000010",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 29,
+ "comment" : "special values for r and s",
+ "msg" : "3f",
+ "sig" : "edffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fedffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 30,
+ "comment" : "empty signature",
+ "msg" : "54657374",
+ "sig" : "",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 31,
+ "comment" : "s missing",
+ "msg" : "54657374",
+ "sig" : "7c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab0",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 32,
+ "comment" : "signature too short",
+ "msg" : "54657374",
+ "sig" : "7c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab07a9155711ecfaf7f99f277bad0c6ae7e39d4eef676573336a5c51eb6f946",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 33,
+ "comment" : "signature too long",
+ "msg" : "54657374",
+ "sig" : "7c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab07a9155711ecfaf7f99f277bad0c6ae7e39d4eef676573336a5c51eb6f946b30d2020",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 34,
+ "comment" : "include pk in signature",
+ "msg" : "54657374",
+ "sig" : "7c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab07a9155711ecfaf7f99f277bad0c6ae7e39d4eef676573336a5c51eb6f946b30d7d4d0e7f6153a69b6242b522abbee685fda4420f8834b108c3bdae369ef549fa",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 35,
+ "comment" : "prepending 0 byte to signature",
+ "msg" : "54657374",
+ "sig" : "007c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab07a9155711ecfaf7f99f277bad0c6ae7e39d4eef676573336a5c51eb6f946b30d",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 36,
+ "comment" : "prepending 0 byte to s",
+ "msg" : "54657374",
+ "sig" : "7c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab0007a9155711ecfaf7f99f277bad0c6ae7e39d4eef676573336a5c51eb6f946b30d",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 37,
+ "comment" : "appending 0 byte to signature",
+ "msg" : "54657374",
+ "sig" : "7c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab07a9155711ecfaf7f99f277bad0c6ae7e39d4eef676573336a5c51eb6f946b30d00",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 38,
+ "comment" : "removing 0 byte from signature",
+ "msg" : "546573743137",
+ "sig" : "93de3ca252426c95f735cb9edd92e83321ac62372d5aa5b379786bae111ab6b17251330e8f9a7c30d6993137c596007d7b001409287535ac4804e662bc58a3",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 39,
+ "comment" : "removing 0 byte from signature",
+ "msg" : "54657374313236",
+ "sig" : "dffed33a7f420b62bb1731cfd03be805affd18a281ec02b1067ba6e9d20826569e742347df59c88ae96db1f1969fb189b0ec34381d85633e1889da48d95e0e",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 40,
+ "comment" : "removing leading 0 byte from signature",
+ "msg" : "546573743530",
+ "sig" : "6e170c719577c25e0e1e8b8aa7a6346f8b109f37385cc2e85dc3b4c0f46a9c6bcafd67f52324c5dbaf40a1b673fb29c4a56052d2d6999d0838a8337bccb502",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 41,
+ "comment" : "dropping byte from signature",
+ "msg" : "54657374333437",
+ "sig" : "b0928b46e99fbbad3f5cb502d2cd309d94a7e86cfd4d84b1fcf4cea18075a9c36993c0582dba1e9e519fae5a8654f454201ae0c3cb397c37b8f4f8eef18400",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 42,
+ "comment" : "modified bit 0 in R",
+ "msg" : "313233343030",
+ "sig" : "647c1492402ab5ce03e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c281c2b1d125e5538f38afbcc1c84e489521083041d24bc6240767029da063271a1ff0c",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 43,
+ "comment" : "modified bit 1 in R",
+ "msg" : "313233343030",
+ "sig" : "677c1492402ab5ce03e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c281c2bc108ca4b87a49c9ed2cf383aecad8f54a962b2899da891e12004d7993a627e01",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 44,
+ "comment" : "modified bit 2 in R",
+ "msg" : "313233343030",
+ "sig" : "617c1492402ab5ce03e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c281c2b9ce23fc6213ed5b87912e9bbf92f5e2c780eae26d15c50a112d1e97d2ea33c06",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 45,
+ "comment" : "modified bit 7 in R",
+ "msg" : "313233343030",
+ "sig" : "e57c1492402ab5ce03e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c281c2bbb3eb51cd98dddb235a5f46f2bded6af184a58d09cce928bda43f41d69118a03",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 46,
+ "comment" : "modified bit 8 in R",
+ "msg" : "313233343030",
+ "sig" : "657d1492402ab5ce03e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c281c2bcd237dda9a116501f67a5705a854b9adc304f34720803a91b324f2c13e0f5a09",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 47,
+ "comment" : "modified bit 16 in R",
+ "msg" : "313233343030",
+ "sig" : "657c1592402ab5ce03e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c281c2b6b167bbdc0d881cc04d28905552c1876f3709851abc5007376940cc8a435c300",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 48,
+ "comment" : "modified bit 31 in R",
+ "msg" : "313233343030",
+ "sig" : "657c1412402ab5ce03e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c281c2b7fd2ac7da14afffcceeb13f2a0d6b887941cb1a5eb57a52f3cb131a16cce7b0e",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 49,
+ "comment" : "modified bit 32 in R",
+ "msg" : "313233343030",
+ "sig" : "657c1492412ab5ce03e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c281c2b7373ba13ebbef99cd2a8ead55ce735c987d85a35320925a8e871702dc7c5c40d",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 50,
+ "comment" : "modified bit 63 in R",
+ "msg" : "313233343030",
+ "sig" : "657c1492402ab54e03e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c281c2bd35bd331c03f0855504ca1cab87b83c36a028425a3cf007ede4f4254c261cb00",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 51,
+ "comment" : "modified bit 64 in R",
+ "msg" : "313233343030",
+ "sig" : "657c1492402ab5ce02e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c281c2bcb35101f73cf467deac8c1a03b6c3dc35af544132734b7e57ab20c89b2e4750d",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 52,
+ "comment" : "modified bit 97 in R",
+ "msg" : "313233343030",
+ "sig" : "657c1492402ab5ce03e2c3a7f2384d051b9cf3570f1207fc78c1bcc98c281c2bb58d2e8878290bff8d3355fdd4ea381924ee578752354eb6dee678ab4011c301",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 53,
+ "comment" : "modified bit 127 in R",
+ "msg" : "313233343030",
+ "sig" : "657c1492402ab5ce03e2c3a7f0384d851b9cf3570f1207fc78c1bcc98c281c2bb978c866187ffb1cc7b29a0b4045aefc08768df65717194ff0c6e63f4dea0d02",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 54,
+ "comment" : "modified bit 240 in R",
+ "msg" : "313233343030",
+ "sig" : "657c1492402ab5ce03e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c281d2b0576ecf8eaf675f00f3dfbe19f75b83b7607a6c96414f6821af920a2498d0305",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 55,
+ "comment" : "modified bit 247 in R",
+ "msg" : "313233343030",
+ "sig" : "657c1492402ab5ce03e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c289c2be5241a345c7b5428054c74b7c382fa10d4a5f1e8f8b79a71d3fdea2254f1ff0e",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 56,
+ "comment" : "modified bit 248 in R",
+ "msg" : "313233343030",
+ "sig" : "657c1492402ab5ce03e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c281c2a63950c85cd6dc96364e768de50ff7732b538f8a0b1615d799190ab600849230e",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 57,
+ "comment" : "modified bit 253 in R",
+ "msg" : "313233343030",
+ "sig" : "657c1492402ab5ce03e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c281c0b543bd3da0a56a8c9c152f59c9fec12f31fa66434d48b817b30d90cb4efa8b501",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 58,
+ "comment" : "modified bit 254 in R",
+ "msg" : "313233343030",
+ "sig" : "657c1492402ab5ce03e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c281c6b8da07efd07a6dafb015ed6a32fe136319a972ffbc341f3a0beae97ccf8136505",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 59,
+ "comment" : "modified bit 255 in R",
+ "msg" : "313233343030",
+ "sig" : "657c1492402ab5ce03e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c281cab227aedf259f910f0f3a759a335062665217925d019173b88917eae294f75d40f",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 60,
+ "comment" : "R==0",
+ "msg" : "313233343030",
+ "sig" : "0000000000000000000000000000000000000000000000000000000000000000e0b8e7770d51c7a36375d006c5bffd6af43ff54aaf47e4330dc118c71d61ec02",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 61,
+ "comment" : "invalid R",
+ "msg" : "313233343030",
+ "sig" : "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff463a1908382e7eb7693acef9884f7cf931a215e0791876be22c631a59881fd0e",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 62,
+ "comment" : "all bits flipped in R",
+ "msg" : "313233343030",
+ "sig" : "9a83eb6dbfd54a31fc1d3c580fc7b2fae4630ca8f0edf803873e433673d7e3d40e94254586cb6188c5386c3febed477cb9a6cb29e3979adc4cb27cf5278fb70a",
+ "result" : "invalid",
+ "flags" : []
+ },
+ {
+ "tcId" : 63,
+ "comment" : "checking malleability ",
+ "msg" : "54657374",
+ "sig" : "7c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab067654bce3832c2d76f8f6f5dafc08d9339d4eef676573336a5c51eb6f946b31d",
+ "result" : "invalid",
+ "flags" : [
+ "SignatureMalleability"
+ ]
+ },
+ {
+ "tcId" : 64,
+ "comment" : "checking malleability ",
+ "msg" : "54657374",
+ "sig" : "7c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab05439412b5395d42f462c67008eba6ca839d4eef676573336a5c51eb6f946b32d",
+ "result" : "invalid",
+ "flags" : [
+ "SignatureMalleability"
+ ]
+ },
+ {
+ "tcId" : 65,
+ "comment" : "checking malleability ",
+ "msg" : "54657374",
+ "sig" : "7c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab02ee12ce5875bf9dff26556464bae2ad239d4eef676573336a5c51eb6f946b34d",
+ "result" : "invalid",
+ "flags" : [
+ "SignatureMalleability"
+ ]
+ },
+ {
+ "tcId" : 66,
+ "comment" : "checking malleability ",
+ "msg" : "54657374",
+ "sig" : "7c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab0e2300459f1e742404cd934d2c595a6253ad4eef676573336a5c51eb6f946b38d",
+ "result" : "invalid",
+ "flags" : [
+ "SignatureMalleability"
+ ]
+ },
+ {
+ "tcId" : 67,
+ "comment" : "checking malleability ",
+ "msg" : "54657374",
+ "sig" : "7c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab07a9155711ecfaf7f99f277bad0c6ae7e39d4eef676573336a5c51eb6f946b32d",
+ "result" : "invalid",
+ "flags" : [
+ "SignatureMalleability"
+ ]
+ },
+ {
+ "tcId" : 68,
+ "comment" : "checking malleability ",
+ "msg" : "54657374",
+ "sig" : "7c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab07a9155711ecfaf7f99f277bad0c6ae7e39d4eef676573336a5c51eb6f946b34d",
+ "result" : "invalid",
+ "flags" : [
+ "SignatureMalleability"
+ ]
+ },
+ {
+ "tcId" : 69,
+ "comment" : "checking malleability ",
+ "msg" : "54657374",
+ "sig" : "7c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab07a9155711ecfaf7f99f277bad0c6ae7e39d4eef676573336a5c51eb6f946b38d",
+ "result" : "invalid",
+ "flags" : [
+ "SignatureMalleability"
+ ]
+ },
+ {
+ "tcId" : 70,
+ "comment" : "checking malleability ",
+ "msg" : "54657374",
+ "sig" : "7c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab0679155711ecfaf7f99f277bad0c6ae7e39d4eef676573336a5c51eb6f946b38d",
+ "result" : "invalid",
+ "flags" : [
+ "SignatureMalleability"
+ ]
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "CiOiAHKJEjeqCGS1dlE5UUkIeHh4zXcTWgBZiB0xPwA",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "oSwr63cmXyqslTtQCTSdlBVaA62kFqrUUTGUgOmDykw"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "a12c2beb77265f2aac953b5009349d94155a03ada416aad451319480e983ca4c",
+ "sk" : "0a23a20072891237aa0864b5765139514908787878cd77135a0059881d313f00",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100a12c2beb77265f2aac953b5009349d94155a03ada416aad451319480e983ca4c",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAoSwr63cmXyqslTtQCTSdlBVaA62kFqrUUTGUgOmDykw=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 71,
+ "comment" : "",
+ "msg" : "",
+ "sig" : "5056325d2ab440bf30bbf0f7173199aa8b4e6fbc091cf3eb6bc6cf87cd73d992ffc216c85e4ab5b8a0bbc7e9a6e9f8d33b7f6e5ac0ffdc22d9fcaf784af84302",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 72,
+ "comment" : "",
+ "msg" : "78",
+ "sig" : "481fafbf4364d7b682475282f517a3ac0538c9a6b6a562e99a3d8e5afb4f90a559b056b9f07af023905753b02d95eb329a35c77f154b79abbcd291615ce42f02",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 73,
+ "comment" : "",
+ "msg" : "54657374",
+ "sig" : "8a9bb4c465a3863abc9fd0dd35d80bb28f7d33d37d74679802d63f82b20da114b8d765a1206b3e9ad7cf2b2d8d778bb8651f1fa992db293c0039eacb6161480f",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 74,
+ "comment" : "",
+ "msg" : "48656c6c6f",
+ "sig" : "d839c20abfda1fd429531831c64f813f84b913e9928540310cf060b44c3dbf9457d44a7721fdc0d67724ff81cb450dd39b10cfb65db15dda4b8bf09d26bd3801",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 75,
+ "comment" : "",
+ "msg" : "313233343030",
+ "sig" : "9bbb1052dcfa8ad2715c2eb716ae4f1902dea353d42ee09fd4c0b4fcb8b52b5219e2200016e1199d0061891c263e31b0bc3b55673c19610c4e0fa5408004160b",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 76,
+ "comment" : "",
+ "msg" : "000000000000000000000000",
+ "sig" : "f63b5c0667c7897fc283296416f7f60e84bbde9cbd832e56be463ed9f568069702b17a2f7c341ebf590706a6388ac76ac613c1675ec0f2c7118f2573422a500b",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 77,
+ "comment" : "",
+ "msg" : "6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161",
+ "sig" : "1bc44d7001e6b5b9090fef34b2ca480f9786bbefa7d279353e5881e8dfb91b803ccd46500e270ef0109bfd741037558832120bc2a4f20fbe7b5fb3c3aaf23e08",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 78,
+ "comment" : "",
+ "msg" : "202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f60",
+ "sig" : "ea8e22143b02372e76e99aece3ed36aec529768a27e2bb49bdc135d44378061e1f62d1ac518f33ebf37b2ee8cc6dde68a4bd7d4a2f4d6cb77f015f71ca9fc30d",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 79,
+ "comment" : "",
+ "msg" : "ffffffffffffffffffffffffffffffff",
+ "sig" : "8acd679e1a914fc45d5fa83d3021f0509c805c8d271df54e52f43cfbd00cb6222bf81d58fe1de2de378df67ee9f453786626961fe50a9b05f12b6f0899ebdd0a",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "nWGxne_9WmC6hEr0kuwsxERJxWl7MmkZcDusAxyuf2A",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "11qYAYKxCrfVS_7TyWQHOg7hcvPapiMlrwIaaPcHURo"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a",
+ "sk" : "9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 80,
+ "comment" : "draft-josefsson-eddsa-ed25519-02: Test 1",
+ "msg" : "",
+ "sig" : "e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "TM0Imyj_ltqdtsNG7BFOD1uKMZ81q6Yk2oz27U-4pvs",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "PUAXw-hDiVqStwqnTRt-vJyYLM8uxJaMwM1V8Sr0Zgw"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "3d4017c3e843895a92b70aa74d1b7ebc9c982ccf2ec4968cc0cd55f12af4660c",
+ "sk" : "4ccd089b28ff96da9db6c346ec114e0f5b8a319f35aba624da8cf6ed4fb8a6fb",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321003d4017c3e843895a92b70aa74d1b7ebc9c982ccf2ec4968cc0cd55f12af4660c",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAPUAXw+hDiVqStwqnTRt+vJyYLM8uxJaMwM1V8Sr0Zgw=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 81,
+ "comment" : "draft-josefsson-eddsa-ed25519-02: Test 2",
+ "msg" : "72",
+ "sig" : "92a009a9f0d4cab8720e820b5f642540a2b27b5416503f8fb3762223ebdb69da085ac1e43e15996e458f3613d0f11d8c387b2eaeb4302aeeb00d291612bb0c00",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "xaqN9D-fg3vtt0QvMdy3sWbThTUHbwlLhc46LgtEWPc",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "_FHNjmIYoaONpH7QAjDwWAgW7RO6MwOsXeuRFUiQgCU"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "fc51cd8e6218a1a38da47ed00230f0580816ed13ba3303ac5deb911548908025",
+ "sk" : "c5aa8df43f9f837bedb7442f31dcb7b166d38535076f094b85ce3a2e0b4458f7",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100fc51cd8e6218a1a38da47ed00230f0580816ed13ba3303ac5deb911548908025",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA/FHNjmIYoaONpH7QAjDwWAgW7RO6MwOsXeuRFUiQgCU=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 82,
+ "comment" : "draft-josefsson-eddsa-ed25519-02: Test 3",
+ "msg" : "af82",
+ "sig" : "6291d657deec24024827e69c3abe01a30ce548a284743a445e3680d7db5ac3ac18ff9b538d16f290ae67f760984dc6594a7c15e9716ed28dc027beceea1ec40a",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "9eV2fPFTMZUXYw8iaHa4bIFgzFg7wBN0TGvyVfXMDuU",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "J4EX_BRMcjQPZ9DyMW6Dhs7_vyskKMnFH-98WX8dQm4"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "278117fc144c72340f67d0f2316e8386ceffbf2b2428c9c51fef7c597f1d426e",
+ "sk" : "f5e5767cf153319517630f226876b86c8160cc583bc013744c6bf255f5cc0ee5",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100278117fc144c72340f67d0f2316e8386ceffbf2b2428c9c51fef7c597f1d426e",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAJ4EX/BRMcjQPZ9DyMW6Dhs7/vyskKMnFH+98WX8dQm4=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 83,
+ "comment" : "draft-josefsson-eddsa-ed25519-02: Test 1024",
+ "msg" : "08b8b2b733424243760fe426a4b54908632110a66c2f6591eabd3345e3e4eb98fa6e264bf09efe12ee50f8f54e9f77b1e355f6c50544e23fb1433ddf73be84d879de7c0046dc4996d9e773f4bc9efe5738829adb26c81b37c93a1b270b20329d658675fc6ea534e0810a4432826bf58c941efb65d57a338bbd2e26640f89ffbc1a858efcb8550ee3a5e1998bd177e93a7363c344fe6b199ee5d02e82d522c4feba15452f80288a821a579116ec6dad2b3b310da903401aa62100ab5d1a36553e06203b33890cc9b832f79ef80560ccb9a39ce767967ed628c6ad573cb116dbefefd75499da96bd68a8a97b928a8bbc103b6621fcde2beca1231d206be6cd9ec7aff6f6c94fcd7204ed3455c68c83f4a41da4af2b74ef5c53f1d8ac70bdcb7ed185ce81bd84359d44254d95629e9855a94a7c1958d1f8ada5d0532ed8a5aa3fb2d17ba70eb6248e594e1a2297acbbb39d502f1a8c6eb6f1ce22b3de1a1f40cc24554119a831a9aad6079cad88425de6bde1a9187ebb6092cf67bf2b13fd65f27088d78b7e883c8759d2c4f5c65adb7553878ad575f9fad878e80a0c9ba63bcbcc2732e69485bbc9c90bfbd62481d9089beccf80cfe2df16a2cf65bd92dd597b0707e0917af48bbb75fed413d238f5555a7a569d80c3414a8d0859dc65a46128bab27af87a71314f318c782b23ebfe808b82b0ce26401d2e22f04d83d1255dc51addd3b75a2b1ae0784504df543af8969be3ea7082ff7fc9888c144da2af58429ec96031dbcad3dad9af0dcbaaaf268cb8fcffead94f3c7ca495e056a9b47acdb751fb73e666c6c655ade8297297d07ad1ba5e43f1bca32301651339e22904cc8c42f58c30c04aafdb038dda0847dd988dcda6f3bfd15c4b4c4525004aa06eeff8ca61783aacec57fb3d1f92b0fe2fd1a85f6724517b65e614ad6808d6f6ee34dff7310fdc82aebfd904b01e1dc54b2927094b2db68d6f903b68401adebf5a7e08d78ff4ef5d63653a65040cf9bfd4aca7984a74d37145986780fc0b16ac451649de6188a7dbdf191f64b5fc5e2ab47b57f7f7276cd419c17a3ca8e1b939ae49e488acba6b965610b5480109c8b17b80e1b7b750dfc7598d5d5011fd2dcc5600a32ef5b52a1ecc820e308aa342721aac0943bf6686b64b2579376504ccc493d97e6aed3fb0f9cd71a43dd497f01f17c0e2cb3797aa2a2f256656168e6c496afc5fb93246f6b1116398a346f1a641f3b041e989f7914f90cc2c7fff357876e506b50d334ba77c225bc307ba537152f3f1610e4eafe595f6d9d90d11faa933a15ef1369546868a7f3a45a96768d40fd9d03412c091c6315cf4fde7cb68606937380db2eaaa707b4c4185c32eddcdd306705e4dc1ffc872eeee475a64dfac86aba41c0618983f8741c5ef68d3a101e8a3b8cac60c905c15fc910840b94c00a0b9d0",
+ "sig" : "0aab4c900501b3e24d7cdf4663326a3a87df5e4843b2cbdb67cbf6e460fec350aa5371b1508f9f4528ecea23c436d94b5e8fcd4f681e30a6ac00a9704a188a03",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "160_H2u-BHfDw1eoBqGetBrj-UAlA1vIfygfjun8DjQ",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "j9ZZt3tVjtk4gsEVdDhFCshuxi1CHVaOmO4jbzgQKVo"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "8fd659b77b558ed93882c1157438450ac86ec62d421d568e98ee236f3810295a",
+ "sk" : "d7ad3f1f6bbe0477c3c357a806a19eb41ae3f94025035bc87f281f8ee9fc0e34",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321008fd659b77b558ed93882c1157438450ac86ec62d421d568e98ee236f3810295a",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAj9ZZt3tVjtk4gsEVdDhFCshuxi1CHVaOmO4jbzgQKVo=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 84,
+ "comment" : "Random test failure 1",
+ "msg" : "b0729a713593a92e46b56eaa66b9e435f7a09a8e7de03b078f6f282285276635f301e7aaafe42187c45d6f5b13f9f16b11195cc125c05b90d24dfe4c",
+ "sig" : "7db17557ac470c0eda4eedaabce99197ab62565653cf911f632ee8be0e5ffcfc88fb94276b42e0798fd3aa2f0318be7fc6a29fae75f70c3dcdc414a0ad866601",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "rZsieTM2_NrBDhNsTe6lmb4Yejju-Rwc98ek7IhN2gg",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "KmBr9nrHcMYHA4sAQQGzJe21ae_TQT0tHyw-a05uMII"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "2a606bf67ac770c607038b004101b325edb569efd3413d2d1f2c3e6b4e6e3082",
+ "sk" : "ad9b22793336fcdac10e136c4deea599be187a38eef91c1cf7c7a4ec884dda08",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321002a606bf67ac770c607038b004101b325edb569efd3413d2d1f2c3e6b4e6e3082",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAKmBr9nrHcMYHA4sAQQGzJe21ae/TQT0tHyw+a05uMII=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 85,
+ "comment" : "Random test failure 2",
+ "msg" : "a8546e50ba31cae3234310d32672447be213fad91a227a19669c53d309b959782b0e6b71f8791fdb470043b58122003157d2d96a43a6cbd7d3a8d86bf4c97391883e268d50af80e1e6e12939c2bd50ca746cdadfad4edf1bda875299740724148efb1ebe73fb60088cda890317658627a5f7ab5a0c075d9d8f3f97b6492b35519e50ff6b38377432a7081f9176bb1c29a862deac1336ca20b097a47829cec10a6a7cec178eda2d12f6dc6c87f910454af0123555ba184e68804d9cced60fd5c8c90943e56599c8f0ba59a38491ba5e5a53460682474c07e40ca142983314fd762856bb1093f359da6eb0a756bd93a3160c10dd8feea6b97e7c6a17cb54bd5d7649c05c66d7bdee056671dfdaf689fa3945bb8e29a429f4bd5d355dce9687b06f01d5e33e3999f0e8",
+ "sig" : "67d84d4c3945aaf06e06d524be63acbfb5dbb1988c4aea96a5ee9f7a9b9eecc29df4f66b8aa1d9e8607a58fb1ef0c2ad69aac005b4f58e34103344a9c8871a09",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 86,
+ "comment" : "Random test failure 24",
+ "msg" : "b477b0480bb84642608b908d29a51cf2fce63f24ee95",
+ "sig" : "28fafbb62b4d688fa79e1ac92851f46e319b161f801d4dc09acc21fdd6780a2c4292b8c1003c61c2bcebe7f3f88ccc4bb26d407387c5f27cb8c94cf6ce810405",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "BKZVPWipuu94ohda83VFjqoBzbdzUMYeKC718McRZZk",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "yclGy8VUSsdO70kfB8WIHBb69-wxzkqpG7YK57RTkFE"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "c9c946cbc5544ac74eef491f07c5881c16faf7ec31ce4aa91bb60ae7b4539051",
+ "sk" : "04a6553d68a9baef78a2175af375458eaa01cdb77350c61e282ef5f0c7116599",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100c9c946cbc5544ac74eef491f07c5881c16faf7ec31ce4aa91bb60ae7b4539051",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAyclGy8VUSsdO70kfB8WIHBb69+wxzkqpG7YK57RTkFE=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 87,
+ "comment" : "Random test failure 3",
+ "msg" : "cd2212eddb0706f62c995cef958634f0cb7793444cbf4d30e81c27c41ebea6cb02607510131f9c015692dfd521b148841e9a2d3564d20ac401f6cb8e40f520fe0cafbeaa88840b83013369d879f013463fe52a13267aa0c8c59c45cde9399cd1e6be8cc64cf48315ac2eb31a1c567a4fb7d601746d1f63b5ac020712adbbe07519bded6f",
+ "sig" : "24087d47f3e20af51b9668ae0a88ce76586802d0ec75d8c0f28fc30962b5e1d1a1d509571a1624ed125a8df92a6e963728d6b5de99200b8e285f70feb6f05207",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 88,
+ "comment" : "Random test failure 20",
+ "msg" : "27d465bc632743522aefa23c",
+ "sig" : "c2656951e2a0285585a51ff0eda7e9a23c2dfd2ffa273aee7808f4604e8f9a8c8ea49e9fce4eb2d8d75d36b7238fe6fc13b6c5d9427dd58f8c6615d033c0bd0f",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "w2fI0uvu7NcMHomFtww4CLdWV_JDshuk8yJ5JUDpIlc",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "Mq0Cb2k9DSr-f0OI2RxMlkQm_LnjZlw-vYZQAJuBXI4"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "32ad026f693d0d2afe7f4388d91c4c964426fcb9e3665c3ebd8650009b815c8e",
+ "sk" : "c367c8d2ebeeecd70c1e8985b70c3808b75657f243b21ba4f322792540e92257",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b657003210032ad026f693d0d2afe7f4388d91c4c964426fcb9e3665c3ebd8650009b815c8e",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAMq0Cb2k9DSr+f0OI2RxMlkQm/LnjZlw+vYZQAJuBXI4=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 89,
+ "comment" : "Random test failure 4",
+ "msg" : "ec5c7cb078",
+ "sig" : "d920d421a5956b69bfe1ba834c025e2babb6c7a6d78c97de1d9bb1116dfdd1185147b2887e34e15578172e150774275ea2aad9e02106f7e8ca1caa669a066f0c",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 90,
+ "comment" : "Random test failure 5",
+ "msg" : "4668c6a76f0e482190a7175b9f3806a5fe4314a004fa69f988373f7a",
+ "sig" : "4f62daf7f7c162038552ad7d306e195baa37ecf6ca7604142679d7d1128e1f8af52e4cb3545748c44ef1ff1c64e877e4f4d248259b7f6eb56e3ef72097dc8e0c",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 91,
+ "comment" : "Random test failure 8",
+ "msg" : "5dc9bb87eb11621a93f92abe53515697d2611b2eef73",
+ "sig" : "deecafb6f2ede73fec91a6f10e45b9c1c61c4b9bfbe6b6147e2de0b1df6938971f7896c3ab83851fb5d9e537037bff0fca0ccb4a3cc38f056f91f7d7a0557e08",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 92,
+ "comment" : "Random test failure 10",
+ "msg" : "7dcfe60f881e1285676f35b68a1b2dbcdd7be6f719a288ababc28d36e3a42ac3010a1ca54b32760e74",
+ "sig" : "7f8663cf98cbd39d5ff553f00bcf3d0d520605794f8866ce75714d77cc51e66c91818b657d7b0dae430a68353506edc4a714c345f5ddb5c8b958ba3d035f7a01",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 93,
+ "comment" : "Random test failure 12",
+ "msg" : "58e456064dff471109def4ca27fa8310a1df32739655b624f27e6418d34b7f007173f3faa5",
+ "sig" : "6aab49e5c0bc309b783378ee03ffda282f0185cdf94c847701ff307a6ee8d0865411c44e0a8206f6a5f606107451940c2593af790ce1860f4c14ab25b2deae08",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 94,
+ "comment" : "Random test failure 15",
+ "msg" : "a1",
+ "sig" : "1a74ed2cbdc7d8f3827014e8e6ecf8fd2698ac8f86833acccdd400df710fe0d6b0543c9cfa00d52bf024ab7ce0d91981944097233ec134d5c7abbd44bfd32d0d",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 95,
+ "comment" : "Random test failure 19",
+ "msg" : "11cb1eafa4c42a8402c4193c4696f7b2e6d4585e4b42dcf1a8b67a80b2da80bc9d4b649fb2f35eaf1f56c426fd0b",
+ "sig" : "14ceb2eaf4688d995d482f44852d71ad878cd7c77b41e60b0065fd01a59b054ee74759224187dbde9e59a763a70277c960892ef89fba997aba2576b2c54ba608",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 96,
+ "comment" : "Random test failure 25",
+ "msg" : "aa365b442d12b7f3c925",
+ "sig" : "83c40ce13d483cc58ff65844875862d93df4bd367af77efa469ec06a8ed9e6d7905a04879535708ddf225567a815c9b941d405c98e918fd0c151165cea7fb101",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 97,
+ "comment" : "Random test failure 28",
+ "msg" : "475f",
+ "sig" : "71a4a06a34075f2fd47bc3abf4714d46db7e97b08cb6180d3f1539ac50b18ce51f8af8ae95ed21d4fa0daab7235925631ecea1fd9d0d8a2ba7a7583fd04b900c",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "VsHiLWFsu23qhpKItLHAK7mGllg8L25lABOgPhcEnGI",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "wp7BiU4G0ntOQEhrT6UGPWanRsf5wyOxIgPAO3K4t4o"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "c29ec1894e06d27b4e40486b4fa5063d66a746c7f9c323b12203c03b72b8b78a",
+ "sk" : "56c1e22d616cbb6dea869288b4b1c02bb98696583c2f6e650013a03e17049c62",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100c29ec1894e06d27b4e40486b4fa5063d66a746c7f9c323b12203c03b72b8b78a",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAwp7BiU4G0ntOQEhrT6UGPWanRsf5wyOxIgPAO3K4t4o=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 98,
+ "comment" : "Random test failure 6",
+ "msg" : "0f325ffd87e58131ffa23c05ea4579513b287fdba87b44",
+ "sig" : "6669acf94667c5b541afe5307bde9476b13ae7e0e6058a772101ac8eb0a94331428eb4db0a2c68a9b6c1763b8624dab259b0876cdcfaeacc17b21a18e3fc010a",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 99,
+ "comment" : "Random test failure 21",
+ "msg" : "5ffa",
+ "sig" : "931e5152fcef078c22cc5d6a3a65f06e396289f6f5f2d1efa6340254a53526ef5dc6874eeddf35c3f50991c53cd02bf06313e37d93ee1f7022128ffa3b8f300b",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "t9L2QnbfQX_tJ9jhW06Q9v2T2s5wcpTDOL0yvEu9j9s",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "z9pbiZ41dkxSKeWSlf4SIrfdzhdmQ2l8KeRuy7oQzxA"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "cfda5b899e35764c5229e59295fe1222b7ddce176643697c29e46ecbba10cf10",
+ "sk" : "b7d2f64276df417fed27d8e15b4e90f6fd93dace707294c338bd32bc4bbd8fdb",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100cfda5b899e35764c5229e59295fe1222b7ddce176643697c29e46ecbba10cf10",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAz9pbiZ41dkxSKeWSlf4SIrfdzhdmQ2l8KeRuy7oQzxA=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 100,
+ "comment" : "Random test failure 7",
+ "msg" : "ec5c7cb078",
+ "sig" : "30490c28f806298225df62103521dcee047153912c33ab8ab8bbdd1ffabd70fd4fdb360f05be535b067d1cf4e78c2cb432206bf280aab3bd21aaa1cb894c5b06",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 101,
+ "comment" : "Random test failure 9",
+ "msg" : "67484059b2490b1a0a4f8dee77979e26",
+ "sig" : "4cd4f77ed473a6647387f3163541c67a1708a3c3bd1673247cb87f0cb68b3c56f04bfa72970c8a483efe659c87009ab4020b590b6641316b3deddb5450544e02",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 102,
+ "comment" : "Random test failure 11",
+ "msg" : "a020a4381dc9141f47ee508871ab7a8b5a3648727c4281ae9932376f23a8e1bcda0626b7129197d864178631ec89c4332dbb18",
+ "sig" : "1e41a24fe732bd7cab14c2a2f5134ee8c87fcbd2e987e60957ed9239e5c32404d56977e1b4282871896cb10625a1937468e4dc266e16a9c1b8e9891177eca802",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 103,
+ "comment" : "Random test failure 14",
+ "msg" : "a25176b3afea318b2ec11ddacb10caf7179c0b3f8eabbfa2895581138d3c1e0e",
+ "sig" : "2a833aadecd9f28235cb5896bf3781521dc71f28af2e91dbe1735a61dce3e31ac15ca24b3fc47817a59d386bbbb2ce60a6adc0a2703bb2bdea8f70f91051f706",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 104,
+ "comment" : "Random test failure 18",
+ "msg" : "a9e6d94870a67a9fe1cf13b1e6f9150cdd407bf6480ec841ea586ae3935e9787163cf419c1",
+ "sig" : "c97e3190f83bae7729ba473ad46b420b8aad735f0808ea42c0f898ccfe6addd4fd9d9fa3355d5e67ee21ab7e1f805cd07f1fce980e307f4d7ad36cc924eef00c",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "fVl8O3KDkp0H7Y8B8x0lloI-XkarImx75CNNGp3K7zc",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "UpkZyceAmFqEHEK6bBgP8tZ6J2zPvigQgOR6txp1j1Y"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "529919c9c780985a841c42ba6c180ff2d67a276ccfbe281080e47ab71a758f56",
+ "sk" : "7d597c3b7283929d07ed8f01f31d2596823e5e46ab226c7be4234d1a9dcaef37",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100529919c9c780985a841c42ba6c180ff2d67a276ccfbe281080e47ab71a758f56",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAUpkZyceAmFqEHEK6bBgP8tZ6J2zPvigQgOR6txp1j1Y=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 105,
+ "comment" : "Random test failure 13",
+ "msg" : "e1cbf2d86827825613fb7a85811d",
+ "sig" : "01abfa4d6bbc726b196928ec84fd03f0c953a4fa2b228249562ff1442a4f63a7150b064f3712b51c2af768d2c2711a71aabf8d186833e941a0301b82f0502905",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 106,
+ "comment" : "Random test failure 22",
+ "msg" : "25",
+ "sig" : "e4ae21f7a8f4b3b325c161a8c6e53e2edd7005b9c2f8a2e3b0ac4ba94aa80be6f2ee22ac8d4a96b9a3eb73a825e7bb5aff4a3393bf5b4a38119e9c9b1b041106",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "9AHO5L-xcy8Om42Lp5RpVlwxFSlhQdvffpwxGgrBgjs",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "IlKz1Xx0y_i8Rg3C4IKEeSa8Ai8Jq2rpV1Y2K_0RZ8E"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "2252b3d57c74cbf8bc460dc2e082847926bc022f09ab6ae95756362bfd1167c1",
+ "sk" : "f401cee4bfb1732f0e9b8d8ba79469565c3115296141dbdf7e9c311a0ac1823b",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321002252b3d57c74cbf8bc460dc2e082847926bc022f09ab6ae95756362bfd1167c1",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAIlKz1Xx0y/i8Rg3C4IKEeSa8Ai8Jq2rpV1Y2K/0RZ8E=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 107,
+ "comment" : "Random test failure 16",
+ "msg" : "975ef941710071a9e1e6325a0c860becd7c695b5117c3107b686e330e5",
+ "sig" : "af0fd9dda7e03e12313410d8d8844ebb6fe6b7f65141f22d7bcba5695a25414a9e54326fb44d59fb14707899a8aae70857b23d4080d7ab2c396ef3a36d45ce02",
+ "result" : "valid",
+ "flags" : []
+ },
+ {
+ "tcId" : 108,
+ "comment" : "Random test failure 23",
+ "msg" : "80fdd6218f29c8c8f6bd820945f9b0854e3a8824",
+ "sig" : "e097e0bd0370bff5bde359175a11b728ee9639095d5df8eda496395565616edfe079977f7d4dc8c75d6113a83d6a55e6e1676408c0967a2906339b43337dcb01",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "PWWJVkEDd9BkRnbSWZVCQSpPOw5Orft_P4NmFfQrGLw",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "wKdzEQ-XXeNzI1W7fsfwxBwJHAJSlmBwIFUWaTuZKko"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "c0a773110f975de3732355bb7ec7f0c41c091c0252966070205516693b992a4a",
+ "sk" : "3d658956410377d0644676d2599542412a4f3b0e4eadfb7f3f836615f42b18bc",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100c0a773110f975de3732355bb7ec7f0c41c091c0252966070205516693b992a4a",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAwKdzEQ+XXeNzI1W7fsfwxBwJHAJSlmBwIFUWaTuZKko=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 109,
+ "comment" : "Random test failure 17",
+ "msg" : "",
+ "sig" : "0280427e713378f49d478df6373c6cac847b622b567daa2376c839e7ac10e22c380ab0fa8617c9dcfe76c4d9db5459b21dc1413726e46cc8f387d359e344f407",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "vMthMjhAwqlvw29-VOpsjlX50iH38FeR7WACXgYGRDk",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "VM2mIyRXWa1tQ-YgpgaQi-_GM9YHkrx3mER6DvOOcxE"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "54cda623245759ad6d43e620a606908befc633d60792bc7798447a0ef38e7311",
+ "sk" : "bccb61323840c2a96fc36f7e54ea6c8e55f9d221f7f05791ed60025e06064439",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b657003210054cda623245759ad6d43e620a606908befc633d60792bc7798447a0ef38e7311",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAVM2mIyRXWa1tQ+YgpgaQi+/GM9YHkrx3mER6DvOOcxE=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 110,
+ "comment" : "Random test failure 26",
+ "msg" : "27e792b28b2f1702",
+ "sig" : "14d9b497c19b91d43481c55bb6f5056de252d9ecb637575c807e58e9b4c5eac8b284089d97e2192dc242014363208e2c9a3435edf8928fb1d893553e9be4c703",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "8tMCO5wZ4kF0i8QDmnpDxZVwHyNnVQUBUhOooqAnTBs",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "I2K6xRTV-tM4AmQul5oegt5utvG8v2pbME8rsCueV_4"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "2362bac514d5fad33802642e979a1e82de6eb6f1bcbf6a5b304f2bb02b9e57fe",
+ "sk" : "f2d3023b9c19e241748bc4039a7a43c595701f23675505015213a8a2a0274c1b",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321002362bac514d5fad33802642e979a1e82de6eb6f1bcbf6a5b304f2bb02b9e57fe",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAI2K6xRTV+tM4AmQul5oegt5utvG8v2pbME8rsCueV/4=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 111,
+ "comment" : "Random test failure 27",
+ "msg" : "eef3bb0f617c17d0420c115c21c28e3762edc7b7fb048529b84a9c2bc6",
+ "sig" : "242ddb3a5d938d07af690b1b0ef0fa75842c5f9549bf39c8750f75614c712e7cbaf2e37cc0799db38b858d41aec5b9dd2fca6a3c8e082c10408e2cf3932b9d08",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "EvwxxA1aevceBUJGI7qXC2cM9uy0TNphICEOY3AkXds",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "A3tVtCfcjaoPgPzrrwhGkCMJ-KbPGLRlwM6bZTlimsg"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "037b55b427dc8daa0f80fcebaf0846902309f8a6cf18b465c0ce9b6539629ac8",
+ "sk" : "12fc31c40d5a7af71e05424623ba970b670cf6ecb44cda6120210e6370245ddb",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100037b55b427dc8daa0f80fcebaf0846902309f8a6cf18b465c0ce9b6539629ac8",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAA3tVtCfcjaoPgPzrrwhGkCMJ+KbPGLRlwM6bZTlimsg=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 112,
+ "comment" : "Test case for overflow in signature generation",
+ "msg" : "01234567",
+ "sig" : "c964e100033ce8888b23466677da4f4aea29923f642ae508f9d0888d788150636ab9b2c3765e91bbb05153801114d9e52dc700df377212222bb766be4b8c020d",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "5UvMTOldtIByx7SVdWF90flAOwchBSWcoG2NAVMNB_s",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "nAAHaY8XeZinZmx895c-K4jpxJRuM4BKe76JaNI5Sy4"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "9c0007698f177998a7666c7cf7973e2b88e9c4946e33804a7bbe8968d2394b2e",
+ "sk" : "e54bcc4ce95db48072c7b49575617dd1f9403b072105259ca06d8d01530d07fb",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321009c0007698f177998a7666c7cf7973e2b88e9c4946e33804a7bbe8968d2394b2e",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAnAAHaY8XeZinZmx895c+K4jpxJRuM4BKe76JaNI5Sy4=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 113,
+ "comment" : "Test case for overflow in signature generation",
+ "msg" : "9399a6db9433d2a28d2b0c11c8794ab7d108c95b",
+ "sig" : "176065c6d64a136a2227687d77f61f3fca3b16122c966276fd9a8b14a1a2cea4c33b3533d11101717016684e3810efbea63bb23773f7cc480174199abd734f08",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "3n8rsSuHWnnMsFc0Syhnou2yXbwez8jLB8aeLdPfPgI",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "7TpvlyHclynB92Y1vPCA1wNuHC8CKGVMy74ec4wXuWM"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "ed3a6f9721dc9729c1f76635bcf080d7036e1c2f0228654ccbbe1e738c17b963",
+ "sk" : "de7f2bb12b875a79ccb057344b2867a2edb25dbc1ecfc8cb07c69e2dd3df3e02",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100ed3a6f9721dc9729c1f76635bcf080d7036e1c2f0228654ccbbe1e738c17b963",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA7TpvlyHclynB92Y1vPCA1wNuHC8CKGVMy74ec4wXuWM=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 114,
+ "comment" : "Test case for overflow in signature generation",
+ "msg" : "7af783afbbd44c1833ab7237ecaf63b94ffdd003",
+ "sig" : "7ca69331eec8610d38f00e2cdbd46966cb359dcde98a257ac6f362cc00c8f4fe85c02285fe4d66e31a44cadb2bf474e1a7957609eb4fe95a71473fe6699aa70d",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "6nkrep1CC_dPaoKnjliizJTzqz65MScGEbH42nXD1gs",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "Sr-1NTE3BaZXABhEDN7Bo64z5R81IRL6asvQxrw-qFk"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "4abfb535313705a6570018440cdec1a3ae33e51f352112fa6acbd0c6bc3ea859",
+ "sk" : "ea792b7a9d420bf74f6a82a78e58a2cc94f3ab3eb931270611b1f8da75c3d60b",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321004abfb535313705a6570018440cdec1a3ae33e51f352112fa6acbd0c6bc3ea859",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEASr+1NTE3BaZXABhEDN7Bo64z5R81IRL6asvQxrw+qFk=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 115,
+ "comment" : "Test case for overflow in signature generation",
+ "msg" : "321b5f663c19e30ee7bbb85e48ecf44db9d3f512",
+ "sig" : "f296715e855d8aecccba782b670163dedc4458fe4eb509a856bcac450920fd2e95a3a3eb212d2d9ccaf948c39ae46a2548af125f8e2ad9b77bd18f92d59f9200",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "7KKGRfY2Rlde4uS9s29Rg4FCziR0ZkwrZu8FSzevYSQ",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "TyFi5r8DpxLbDvpBi35wBuI4cdnX7FVaMTiFxK_ZY4U"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "4f2162e6bf03a712db0efa418b7e7006e23871d9d7ec555a313885c4afd96385",
+ "sk" : "eca28645f63646575ee2e4bdb36f51838142ce2474664c2b66ef054b37af6124",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321004f2162e6bf03a712db0efa418b7e7006e23871d9d7ec555a313885c4afd96385",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEATyFi5r8DpxLbDvpBi35wBuI4cdnX7FVaMTiFxK/ZY4U=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 116,
+ "comment" : "Test case for overflow in signature generation",
+ "msg" : "c48890e92aeeb3af04858a8dc1d34f16a4347b91",
+ "sig" : "367d07253a9d5a77d054b9c1a82d3c0a448a51905343320b3559325ef41839608aa45564978da1b2968c556cfb23b0c98a9be83e594d5e769d69d1156e1b1506",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "coI4YCt-Z1Oz9J6w_EzeOMe7FKtY3crvJTcnWxPpndM",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "BxfXXOJ-oYHtWjDmRWxkm1z0U6a0wSzT-f0Wsx4MJc0"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "0717d75ce27ea181ed5a30e6456c649b5cf453a6b4c12cd3f9fd16b31e0c25cd",
+ "sk" : "728238602b7e6753b3f49eb0fc4cde38c7bb14ab58ddcaef2537275b13e99dd3",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321000717d75ce27ea181ed5a30e6456c649b5cf453a6b4c12cd3f9fd16b31e0c25cd",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEABxfXXOJ+oYHtWjDmRWxkm1z0U6a0wSzT+f0Wsx4MJc0=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 117,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "26d5f0631f49106db58c4cfc903691134811b33c",
+ "sig" : "9588e02bc815649d359ce710cdc69814556dd8c8bab1c468f40a49ebefb7f0de7ed49725edfd1b708fa1bad277c35d6c1b9c5ec25990997645780f9203d7dd08",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "3ECS14CcawcPKAjENCZ7ZpdCj0qx5GJqtWowWWQ75Dw",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "21ueq36E5aE1BYZfpxHJyJbImGCfwR_JvB5VAo-Ult8"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "db5b9eab7e84e5a13505865fa711c9c896c898609fc11fc9bc1e55028f9496df",
+ "sk" : "dc4092d7809c6b070f2808c434267b6697428f4ab1e4626ab56a3059643be43c",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100db5b9eab7e84e5a13505865fa711c9c896c898609fc11fc9bc1e55028f9496df",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA21ueq36E5aE1BYZfpxHJyJbImGCfwR/JvB5VAo+Ult8=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 118,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "2a71f064af982a3a1103a75cef898732d7881981",
+ "sig" : "2217a0be57dd0d6c0090641496bcb65e37213f02a0df50aff0368ee2808e1376504f37b37494132dfc4d4887f58b9e86eff924040db3925ee4f8e1428c4c500e",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "OHZbiexWg26kGQ_JV4ArakcWf5te-ULpJlKAO33mq_0",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "e6wY9tJiXTkV8jNDTNo4pXckenMypRcLNxQqNGRBReA"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "7bac18f6d2625d3915f233434cda38a577247a7332a5170b37142a34644145e0",
+ "sk" : "38765b89ec56836ea4190fc957802b6a47167f9b5ef942e92652803b7de6abfd",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321007bac18f6d2625d3915f233434cda38a577247a7332a5170b37142a34644145e0",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAe6wY9tJiXTkV8jNDTNo4pXckenMypRcLNxQqNGRBReA=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 119,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "bf26796cef4ddafcf5033c8d105057db0210b6ad",
+ "sig" : "1fda6dd4519fdbefb515bfa39e8e5911f4a0a8aa65f40ef0c542b8b34b87f9c249dc57f320718ff457ed5915c4d0fc352affc1287724d3f3a9de1ff777a02e01",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "l1dTCKSQrwwUVBHdFtUZoHPvA8LkoKHNa13i6IHl6r4",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "OOrTBGJKvr8-KzHiDlYpUx4_xlkAiIfJEG9eVa27xio"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "38ead304624abebf3e2b31e20e5629531e3fc659008887c9106f5e55adbbc62a",
+ "sk" : "97575308a490af0c145411dd16d519a073ef03c2e4a0a1cd6b5de2e881e5eabe",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b657003210038ead304624abebf3e2b31e20e5629531e3fc659008887c9106f5e55adbbc62a",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAOOrTBGJKvr8+KzHiDlYpUx4/xlkAiIfJEG9eVa27xio=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 120,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "ae03da6997e40cea67935020152d3a9a365cc055",
+ "sig" : "068eafdc2f36b97f9bae7fbda88b530d16b0e35054d3a351e3a4c914b22854c711505e49682e1a447e10a69e3b04d0759c859897b64f71137acf355b63faf100",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "rRKeieDuyQjfUa3CJ8jEkIqAlddWIVNsiijcpLPDDbs",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "6byVBJr35IF7F8QCJpul52e3NIdXrIAC_sngg5DAqc8"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "e9bc95049af7e4817b17c402269ba5e767b7348757ac8002fec9e08390c0a9cf",
+ "sk" : "ad129e89e0eec908df51adc227c8c4908a8095d75621536c8a28dca4b3c30dbb",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100e9bc95049af7e4817b17c402269ba5e767b7348757ac8002fec9e08390c0a9cf",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA6byVBJr35IF7F8QCJpul52e3NIdXrIAC/sngg5DAqc8=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 121,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "489d473f7fb83c7f6823baf65482517bccd8f4ea",
+ "sig" : "43670abc9f09a8a415e76f4a21c6a46156f066b5a37b3c1e867cf67248c7b927e8d13a763e37abf936f5f27f7a8aa290539d21f740efd26b65fd5ad27085f400",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "A85kPW00G3BlvJ5w2oGTRRz4PKf_WoZA_QevCUZANlo",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "7oFVyk6P57xbylmSBE6rf4w8ahPbEXb0L0bCnaWwZPQ"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "ee8155ca4e8fe7bc5bca5992044eab7f8c3c6a13db1176f42f46c29da5b064f4",
+ "sk" : "03ce643d6d341b7065bc9e70da8193451cf83ca7ff5a8640fd07af094640365a",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100ee8155ca4e8fe7bc5bca5992044eab7f8c3c6a13db1176f42f46c29da5b064f4",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA7oFVyk6P57xbylmSBE6rf4w8ahPbEXb0L0bCnaWwZPQ=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 122,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "1b704d6692d60a07ad1e1d047b65e105a80d3459",
+ "sig" : "56388f2228893b14ce4f2a5e0cc626591061de3a57c50a5ecab7b9d5bb2caeea191560a1cf2344c75fdb4a085444aa68d727b39f498169eaa82cf64a31f59803",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "WB9ZOlzZRZTcD13RQgJqQ2qTDlczkbeu6mqCU-7vbOs",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "21B7_MlXY5P3FXuzYFMrBcX88udktpDMZpikow00kJU"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "db507bfcc9576393f7157bb360532b05c5fcf2e764b690cc6698a4a30d349095",
+ "sk" : "581f593a5cd94594dc0f5dd142026a436a930e573391b7aeea6a8253eeef6ceb",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100db507bfcc9576393f7157bb360532b05c5fcf2e764b690cc6698a4a30d349095",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA21B7/MlXY5P3FXuzYFMrBcX88udktpDMZpikow00kJU=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 123,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "dc87030862c4c32f56261e93a367caf458c6be27",
+ "sig" : "553e5845fc480a577da6544e602caadaa00ae3e5aa3dce9ef332b1541b6d5f21bdf1d01e98baf80b8435f9932f89b3eb70f02da24787aac8e77279e797d0bd0b",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "byB9yUuETU3HH5gtqNnzrgs3tGI-RB7KdbpiYhxSTZg",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "mU6vAzCdatnZWmVrwXROKIbwKQI6N1CzTzUIazxyJ_g"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "994eaf03309d6ad9d95a656bc1744e2886f029023a3750b34f35086b3c7227f8",
+ "sk" : "6f207dc94b844d4dc71f982da8d9f3ae0b37b4623e441eca75ba62621c524d98",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100994eaf03309d6ad9d95a656bc1744e2886f029023a3750b34f35086b3c7227f8",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAmU6vAzCdatnZWmVrwXROKIbwKQI6N1CzTzUIazxyJ/g=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 124,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "7f41ef68508343ef18813cb2fb332445ec6480cd",
+ "sig" : "bc10f88081b7be1f2505b6e76c5c82e358cf21ec11b7df1f334fb587bada465b53d9f7b4d4fec964432ee91ead1bc32ed3c82f2167da1c834a37515df7fe130e",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "3qm7ufsgUS-mfuppav14bzkoJl9SCK6rpjjzF30Ntw4",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "En035Abg2D5LVaCeIej1D7iK9H5KQ_AYzev_wZSHV_A"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "127d37e406e0d83e4b55a09e21e8f50fb88af47e4a43f018cdebffc1948757f0",
+ "sk" : "dea9bbb9fb20512fa67eea696afd786f3928265f5208aeaba638f3177d0db70e",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100127d37e406e0d83e4b55a09e21e8f50fb88af47e4a43f018cdebffc1948757f0",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAEn035Abg2D5LVaCeIej1D7iK9H5KQ/AYzev/wZSHV/A=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 125,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "e1ce107971534bc46a42ac609a1a37b4ca65791d",
+ "sig" : "00c11e76b5866b7c37528b0670188c1a0473fb93c33b72ae604a8865a7d6e094ff722e8ede3cb18389685ff3c4086c29006047466f81e71a329711e0b9294709",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "yZxSrh5h98eaFk7kkQ_cqgKUYlnqVEP2iyPXIdBHL2M",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "2DuoTt-0vsSfKb4x2Apkt8C1pQJDjNsdDdHg4-VXht4"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "d83ba84edfb4bec49f29be31d80a64b7c0b5a502438cdb1d0dd1e0e3e55786de",
+ "sk" : "c99c52ae1e61f7c79a164ee4910fdcaa02946259ea5443f68b23d721d0472f63",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100d83ba84edfb4bec49f29be31d80a64b7c0b5a502438cdb1d0dd1e0e3e55786de",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA2DuoTt+0vsSfKb4x2Apkt8C1pQJDjNsdDdHg4+VXht4=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 126,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "869a827397c585cf35acf88a8728833ab1c8c81e",
+ "sig" : "0a6f0ac47ea136cb3ff00f7a96638e4984048999ee2da0af6e5c86bffb0e70bb97406b6ad5a4b764f7c99ebb6ec0fd434b8efe253b0423ef876c037998e8ab07",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "2KqtB0nbFZVppotGBIs9PoJm4RAVAlHEKAbwdSqE6Vs",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "08mqLz1u8hehZuiuQD7UNsN_rLvjvs63jfbrQ5-PoEo"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "d3c9aa2f3d6ef217a166e8ae403ed436c37facbbe3beceb78df6eb439f8fa04a",
+ "sk" : "d8aaad0749db159569a68b46048b3d3e8266e110150251c42806f0752a84e95b",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100d3c9aa2f3d6ef217a166e8ae403ed436c37facbbe3beceb78df6eb439f8fa04a",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA08mqLz1u8hehZuiuQD7UNsN/rLvjvs63jfbrQ5+PoEo=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 127,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "619d8c4f2c93104be01cd574a385ceca08c33a9e",
+ "sig" : "b7cbb942a6661e2312f79548224f3e44f5841c6e880c68340756a00ce94a914e8404858265985e6bb97ef01d2d7e5e41340309606bfc43c8c6a8f925126b3d09",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "540mq1tybJ1N-x9jQIKr3tkEMqL9GAicfIUlOl0vx9A",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "1TKANnwcC5WsQRIhi5LGpxxR-2MSzmaN4ZbH1SoTYVU"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "d53280367c1c0b95ac4112218b92c6a71c51fb6312ce668de196c7d52a136155",
+ "sk" : "e78d26ab5b726c9d4dfb1f634082abded90432a2fd18089c7c85253a5d2fc7d0",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100d53280367c1c0b95ac4112218b92c6a71c51fb6312ce668de196c7d52a136155",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA1TKANnwcC5WsQRIhi5LGpxxR+2MSzmaN4ZbH1SoTYVU=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 128,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "5257a0bae8326d259a6ce97420c65e6c2794afe2",
+ "sig" : "27a4f24009e579173ff3064a6eff2a4d20224f8f85fdec982a9cf2e6a3b51537348a1d7851a3a932128a923a393ea84e6b35eb3473c32dceb9d7e9cab03a0f0d",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "jnylbgfxQ4rDYV_Z7HeuY2edDsBZtFlf6_QL5Z2XagU",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "lKwjNrqXpHb7TJ8rVWPkFnyiksbpnkIjUKkRrjFywxU"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "94ac2336ba97a476fb4c9f2b5563e4167ca292c6e99e422350a911ae3172c315",
+ "sk" : "8e7ca56e07f1438ac3615fd9ec77ae63679d0ec059b4595febf40be59d976a05",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b657003210094ac2336ba97a476fb4c9f2b5563e4167ca292c6e99e422350a911ae3172c315",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAlKwjNrqXpHb7TJ8rVWPkFnyiksbpnkIjUKkRrjFywxU=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 129,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "5acb6afc9b368f7acac0e71f6a4831c72d628405",
+ "sig" : "985b605fe3f449f68081197a68c714da0bfbf6ac2ab9abb0508b6384ea4999cb8d79af98e86f589409e8d2609a8f8bd7e80aaa8d92a84e7737fbe8dcef41920a",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "53Ulr1hWq531q7ZOUxJXa0mMwn9h8mbiHzguBSbU5vs",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "4ecxbSMffydb30AzYDBNoVCf3xrx_SXKIU6qwKKJOY8"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "e1e7316d231f7f275bdf403360304da1509fdf1af1fd25ca214eaac0a289398f",
+ "sk" : "e77525af5856ab9df5abb64e5312576b498cc27f61f266e21f382e0526d4e6fb",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100e1e7316d231f7f275bdf403360304da1509fdf1af1fd25ca214eaac0a289398f",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA4ecxbSMffydb30AzYDBNoVCf3xrx/SXKIU6qwKKJOY8=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 130,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "3c87b3453277b353941591fc7eaa7dd37604b42a",
+ "sig" : "1c8fbda3d39e2b441f06da6071c13115cb4115c7c3341704cf6513324d4cf1ef4a1dd7678a048b0dde84e48994d080befcd70854079d44b6a0b0f9fa002d130c",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "H0MjWtcW8b63VKsPVG36k0SI_fdHK0k9fMPGA1MAXSQ",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "__vupxIV76-YiP7CzGjts3A_8Rpm_WKbU8vaXqvBh1A"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "fffbeea71215efaf9888fec2cc68edb3703ff11a66fd629b53cbda5eabc18750",
+ "sk" : "1f43235ad716f1beb754ab0f546dfa934488fdf7472b493d7cc3c60353005d24",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100fffbeea71215efaf9888fec2cc68edb3703ff11a66fd629b53cbda5eabc18750",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA//vupxIV76+YiP7CzGjts3A/8Rpm/WKbU8vaXqvBh1A=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 131,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "0a68e27ef6847bfd9e398b328a0ded3679d4649d",
+ "sig" : "59097233eb141ed948b4f3c28a9496b9a7eca77454ecfe7e46737d1449a0b76b15aacf77cf48af27a668aa4434cfa26c504d75a2bcc4feac46465446234c0508",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "OXd4W5-MUyDlGjoW-MwixPfmSFdhf5VQFH-jXWhco08",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "GczAUnWZywMuC0xNdOYPE5AXaKmd8EHDvBv2wO8nEWk"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "19ccc0527599cb032e0b4c4d74e60f13901768a99df041c3bc1bf6c0ef271169",
+ "sk" : "3977785b9f8c5320e51a3a16f8cc22c4f7e64857617f9550147fa35d685ca34f",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b657003210019ccc0527599cb032e0b4c4d74e60f13901768a99df041c3bc1bf6c0ef271169",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAGczAUnWZywMuC0xNdOYPE5AXaKmd8EHDvBv2wO8nEWk=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 132,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "4e9bef60737c7d4dd10bd52567e1473a36d3573d",
+ "sig" : "519105608508fe2f1b6da4cc8b23e39798b1d18d25972beed0404cec722e01ba1b6a0f85e99e092cca8076b101b60d4ac5035684357f4d0daacdc642da742a06",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "GqRBXF2wExvsb6GI0MI9SaZb95VlcVP66Ud34_Gbz1Q",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "DnJuJwR1Y6oKGpwuCF2NJq8qy6Ep0IacZQMePmysMpo"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "0e726e27047563aa0a1a9c2e085d8d26af2acba129d0869c65031e3e6cac329a",
+ "sk" : "1aa4415c5db0131bec6fa188d0c23d49a65bf795657153fae94777e3f19bcf54",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321000e726e27047563aa0a1a9c2e085d8d26af2acba129d0869c65031e3e6cac329a",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEADnJuJwR1Y6oKGpwuCF2NJq8qy6Ep0IacZQMePmysMpo=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 133,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "cc82b3163efda3ba7e9240e765112caa69113694",
+ "sig" : "d8b03ee579e73f16477527fc9dc37a72eaac0748a733772c483ba013944f01ef64fb4ec5e3a95021dc22f4ae282baff6e9b9cc8433c6b6710d82e7397d72ef04",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "D7doClDT8pQAd-pN_LfrBAoSXE9LXc76FtOvlo_I5d4",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "53cXtUorXlvOW8y48MX9tf1993rCVAIPyRINwNTfQXg"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "e77717b54a2b5e5bce5bccb8f0c5fdb5fd7df77ac254020fc9120dc0d4df4178",
+ "sk" : "0fb7680a50d3f2940077ea4dfcb7eb040a125c4f4b5dcefa16d3af968fc8e5de",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100e77717b54a2b5e5bce5bccb8f0c5fdb5fd7df77ac254020fc9120dc0d4df4178",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA53cXtUorXlvOW8y48MX9tf1993rCVAIPyRINwNTfQXg=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 134,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "923a5c9e7b5635bb6c32c5a408a4a15b652450eb",
+ "sig" : "26da61fdfd38e6d01792813f27840c8b4766b0faaed39d0ee898cb450d94a5d5f57e58b6a003d7f9b56b20561954c6edcf66492d116b8b5e91f205a3a6449d0b",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "4iLERNa8ikeWoNWi1x0ZuYhFzFbjnKr4Iz6kxrBwTwk",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "YiCXLT99FQs2eQ19UiOEh21k1kDNmRMYaBXhYpWC7TY"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "6220972d3f7d150b36790d7d522384876d64d640cd9913186815e1629582ed36",
+ "sk" : "e222c444d6bc8a4796a0d5a2d71d19b98845cc56e39caaf8233ea4c6b0704f09",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321006220972d3f7d150b36790d7d522384876d64d640cd9913186815e1629582ed36",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAYiCXLT99FQs2eQ19UiOEh21k1kDNmRMYaBXhYpWC7TY=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 135,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "6f2f0245de4587062979d0422d349f93ccdc3af2",
+ "sig" : "4adeaff7a58c5010a5a067feea0ae504d37b0c6a76c6c153e222f13409dff2df0fab69bc5059b97d925dc1b89e9851d7c627cb82d65585f9fd976124553f8902",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "qJ6hhHa5rZDLFLix_yR3fk69AVvIEKYHhakVTazzvlI",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "e2SijFDsdnipDj4aIVIuMKydt7UhWuor-zO-oDfquYc"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "7b64a28c50ec7678a90e3e1a21522e30ac9db7b5215aea2bfb33bea037eab987",
+ "sk" : "a89ea18476b9ad90cb14b8b1ff24777e4ebd015bc810a60785a9154dacf3be52",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321007b64a28c50ec7678a90e3e1a21522e30ac9db7b5215aea2bfb33bea037eab987",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAe2SijFDsdnipDj4aIVIuMKydt7UhWuor+zO+oDfquYc=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 136,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "6e911edb27a170b983d4dee1110554f804330f41",
+ "sig" : "4204d620cde0c3008c0b2901f5d6b44f88f0e3cb4f4d62252bf6f3cb37c1fb150a9ccb296afe5e7c75f65b5c8edd13dc4910ffe1e1265b3707c59042cf9a5902",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "abHaVs3o0WdsKowOf5XH0L9gc579EwTdLMsCcp0Xoiw",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "ckRSIQqeTJlIGSKb8Sv4TpV2ijqXwI2Nj1-TmkytNMU"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "724452210a9e4c994819229bf12bf84e95768a3a97c08d8d8f5f939a4cad34c5",
+ "sk" : "69b1da56cde8d1676c2a8c0e7f95c7d0bf60739efd1304dd2ccb02729d17a22c",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100724452210a9e4c994819229bf12bf84e95768a3a97c08d8d8f5f939a4cad34c5",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAckRSIQqeTJlIGSKb8Sv4TpV2ijqXwI2Nj1+TmkytNMU=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 137,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "b8cf807eea809aaf739aa091f3b7a3f2fd39fb51",
+ "sig" : "f8a69d3fd8c2ff0a9dec41e4c6b43675ce08366a35e220b1185ffc246c339e22c20ac661e866f52054015efd04f42eca2adcee6834c4df923b4a62576e4dff0e",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "szImXPlVlfDJAiFZO1orPFdNYNxjTd_2GG8O7XmAo4M",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "utJlspTtL0IstqFBaUCGI4-_6YdXGqdl2LTzokEFqgE"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "bad265b294ed2f422cb6a141694086238fbfe987571aa765d8b4f3a24105aa01",
+ "sk" : "b332265cf95595f0c90221593b5a2b3c574d60dc634ddff6186f0eed7980a383",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100bad265b294ed2f422cb6a141694086238fbfe987571aa765d8b4f3a24105aa01",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAutJlspTtL0IstqFBaUCGI4+/6YdXGqdl2LTzokEFqgE=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 138,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "01a2b5f7fee813b4e9bd7fc25137648004795010",
+ "sig" : "61792c9442bc6338ac41fd42a40bee9b02ec1836503d60ff725128c63d72808880c36e6190b7da525cbee5d12900aa043547dd14a2709ef9e49d628f37f6b70c",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "-uyXZLNp3w7xCJDdAixQLlUaMiK0PoQpRVSWx2_upF0",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "Cq7ktyPbm1G6fSLrI-uKdqWsAvT8ndBvd76kLh037Fo"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "0aaee4b723db9b51ba7d22eb23eb8a76a5ac02f4fc9dd06f77bea42e1d37ec5a",
+ "sk" : "faec9764b369df0ef10890dd022c502e551a3222b43e8429455496c76feea45d",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321000aaee4b723db9b51ba7d22eb23eb8a76a5ac02f4fc9dd06f77bea42e1d37ec5a",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEACq7ktyPbm1G6fSLrI+uKdqWsAvT8ndBvd76kLh037Fo=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 139,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "0fbf5d47cb5d498feace8f98f1896208da38a885",
+ "sig" : "fa3cd41e3a8c00b19eecd404a63c3cb787cd30de0dfc936966cff2117f5aff18db6bef80fcfd8856f3fb2e9c3dc47593e9471103032af918feee638a33d40505",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "TrGeJ496MKBqfVXkLER3X0qBt6RcBRKq4CYmLnF3Daw",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "gSNErxWpG6g8LJHpbxcnrA88TEE4W5-oTvo5mtpRaL4"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "812344af15a91ba83c2c91e96f1727ac0f3c4c41385b9fa84efa399ada5168be",
+ "sk" : "4eb19e278f7a30a06a7d55e42c44775f4a81b7a45c0512aae026262e71770dac",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100812344af15a91ba83c2c91e96f1727ac0f3c4c41385b9fa84efa399ada5168be",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAgSNErxWpG6g8LJHpbxcnrA88TEE4W5+oTvo5mtpRaL4=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 140,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "36e67c1939750bffb3e4ba6cb85562612275e862",
+ "sig" : "97fbbcd7a1d0eb42d2f8c42448ef35a2c2472740556b645547865330d6c57068af377fced08aaf810c08cd3c43d296f1975710312e9334c98b485f831efa4103",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "GZjVlJyrNloA-Cjn0XsGxwjTP-8AMdNTpOFb9yIqc7A",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "DuXLVZf7343MxIsBSF45szqhM7UtMNI3QCdyZ8_sPj4"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "0ee5cb5597fbdf8dccc48b01485e39b33aa133b52d30d23740277267cfec3e3e",
+ "sk" : "1998d5949cab365a00f828e7d17b06c708d33fef0031d353a4e15bf7222a73b0",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321000ee5cb5597fbdf8dccc48b01485e39b33aa133b52d30d23740277267cfec3e3e",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEADuXLVZf7343MxIsBSF45szqhM7UtMNI3QCdyZ8/sPj4=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 141,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "13945c894c1d3fe8562e8b20e5f0efaa26ade8e3",
+ "sig" : "d7dbaa337ffd2a5fd8d5fd8ad5aeccc0c0f83795c2c59fe62a40b87903b1ae62ed748a8df5af4d32f9f822a65d0e498b6f40eaf369a9342a1164ee7d08b58103",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "YWRnYRTGa9mIfaw0HGYgncWHzPDMXNm6_9-skpWgDEo",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "n7od6StgtbRwMIl2PQ1vkSXk3X765B8IoiiCrvloksQ"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "9fba1de92b60b5b4703089763d0d6f9125e4dd7efae41f08a22882aef96892c4",
+ "sk" : "6164676114c66bd9887dac341c66209dc587ccf0cc5cd9baffdfac9295a00c4a",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321009fba1de92b60b5b4703089763d0d6f9125e4dd7efae41f08a22882aef96892c4",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAn7od6StgtbRwMIl2PQ1vkSXk3X765B8IoiiCrvloksQ=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 142,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "4de142af4b8402f80a47fa812df84f42e283cee7",
+ "sig" : "09a2ed303a2fa7027a1dd7c3b0d25121eeed2b644a2fbc17aa0c8aea4524071ede7e7dd7a536d5497f8165d29e4e1b63200f74bbae39fbbbccb29889c62c1f09",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "SwvQOgOyAGnMvMIUp0SEc_TnpJH6fOtI3b4kyDxKpLs",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "dYKrG1LhMW5cE2cfQ7Oco2soEzzQgygxvN3QsPIzmMs"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "7582ab1b52e1316e5c13671f43b39ca36b28133cd0832831bcddd0b0f23398cb",
+ "sk" : "4b0bd03a03b20069ccbcc214a7448473f4e7a491fa7ceb48ddbe24c83c4aa4bb",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b65700321007582ab1b52e1316e5c13671f43b39ca36b28133cd0832831bcddd0b0f23398cb",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAdYKrG1LhMW5cE2cfQ7Oco2soEzzQgygxvN3QsPIzmMs=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 143,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "563357f41b8b23b1d83f19f5667177a67da20b18",
+ "sig" : "e6884a6e6b2e60a0b5862251c001e7c79d581d777d6fc11d218d0aecd79f26a30e2ca22cc7c4674f8b72655bc4ee5cb5494ca07c05177656142ac55cc9d33e02",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "L854cL4fOS0h-x0jUOx4d9uKqZs1n-W91TOP81p5HRw",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "3S1ni64iLz-26CePCMyeGmYznJJsKawKFvlxf17hjNg"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "dd2d678bae222f3fb6e8278f08cc9e1a66339c926c29ac0a16f9717f5ee18cd8",
+ "sk" : "2fce7870be1f392d21fb1d2350ec7877db8aa99b359fe5bdd5338ff35a791d1c",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100dd2d678bae222f3fb6e8278f08cc9e1a66339c926c29ac0a16f9717f5ee18cd8",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA3S1ni64iLz+26CePCMyeGmYznJJsKawKFvlxf17hjNg=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 144,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "931bbf9c877a6571cf7d4609fc3eb867edd43f51",
+ "sig" : "6124c206d864507ea5d984b363b4cf583314db6856a45ded5e61eebff4d5e337e0b4c82b445ae2e52d549d2d961eace2ea01f81158e09a9686baa040db65ad08",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ },
+ {
+ "jwk" : {
+ "crv" : "Ed25519",
+ "d" : "qazkIZXduzoW82ayTdnTeooEPtLmAB9UZSKWdQN5Nn0",
+ "kid" : "none",
+ "kty" : "OKP",
+ "x" : "zL58suS8IVzuL4heHSL34NWCsru9eCwQTlSLFS0m_Gk"
+ },
+ "key" : {
+ "curve" : "edwards25519",
+ "keySize" : 255,
+ "pk" : "ccbe7cb2e4bc215cee2f885e1d22f7e0d582b2bbbd782c104e548b152d26fc69",
+ "sk" : "a9ace42195ddbb3a16f366b24dd9d37a8a043ed2e6001f54652296750379367d",
+ "type" : "EDDSAKeyPair"
+ },
+ "keyDer" : "302a300506032b6570032100ccbe7cb2e4bc215cee2f885e1d22f7e0d582b2bbbd782c104e548b152d26fc69",
+ "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAzL58suS8IVzuL4heHSL34NWCsru9eCwQTlSLFS0m/Gk=\n-----END PUBLIC KEY-----\n",
+ "type" : "EddsaVerify",
+ "tests" : [
+ {
+ "tcId" : 145,
+ "comment" : "regression test for arithmetic error",
+ "msg" : "44530b0b34f598767a7b875b0caee3c7b9c502d1",
+ "sig" : "cfbd450a2c83cb8436c348822fe3ee347d4ee937b7f2ea11ed755cc52852407c9eec2c1fa30d2f9aef90e89b2cc3bcef2b1b9ca59f712110d19894a9cf6a2802",
+ "result" : "valid",
+ "flags" : []
+ }
+ ]
+ }
+ ]
+}
diff --git a/security/nss/gtests/freebl_gtest/ed25519_unittest.cc b/security/nss/gtests/freebl_gtest/ed25519_unittest.cc
new file mode 100644
index 0000000000..e1dad02839
--- /dev/null
+++ b/security/nss/gtests/freebl_gtest/ed25519_unittest.cc
@@ -0,0 +1,148 @@
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this file,
+// You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#include "gtest/gtest.h"
+
+#include <stdint.h>
+
+#include "blapi.h"
+#include "nss_scoped_ptrs.h"
+#include "secerr.h"
+
+namespace nss_test {
+
+class EDDSATest : public ::testing::Test {
+ protected:
+ std::vector<uint8_t> hexStringToBytes(std::string s) {
+ std::vector<uint8_t> bytes;
+ for (size_t i = 0; i < s.length(); i += 2) {
+ bytes.push_back(std::stoul(s.substr(i, 2), nullptr, 16));
+ }
+ return bytes;
+ }
+ std::string bytesToHexString(std::vector<uint8_t> bytes) {
+ std::stringstream s;
+ for (auto b : bytes) {
+ s << std::setfill('0') << std::setw(2) << std::uppercase << std::hex
+ << static_cast<int>(b);
+ }
+ return s.str();
+ }
+
+ void TestEd25519_Sign(const std::string secret, const std::string p,
+ const std::string msg, const std::string signature) {
+ std::vector<uint8_t> secret_bytes = hexStringToBytes(secret);
+ ASSERT_GT(secret_bytes.size(), 0U);
+ SECItem secret_value = {siBuffer, secret_bytes.data(),
+ static_cast<unsigned int>(secret_bytes.size())};
+
+ std::vector<uint8_t> msg_bytes = hexStringToBytes(msg);
+ const SECItem msg_value = {siBuffer, msg_bytes.data(),
+ static_cast<unsigned int>(msg_bytes.size())};
+
+ std::vector<uint8_t> public_bytes = hexStringToBytes(p);
+ const SECItem public_value = {
+ siBuffer, public_bytes.data(),
+ static_cast<unsigned int>(public_bytes.size())};
+
+ ScopedSECItem signature_item(
+ SECITEM_AllocItem(nullptr, nullptr, ED25519_SIGN_LEN));
+
+ ECPrivateKey key;
+ key.privateValue = secret_value;
+
+ ECParams ecParams = {0};
+
+ ScopedSECItem ecEncodedParams(SECITEM_AllocItem(nullptr, nullptr, 0U));
+ ScopedPLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE));
+ ASSERT_TRUE(arena && ecEncodedParams);
+
+ ecParams.name = ECCurve_Ed25519;
+ key.ecParams = ecParams;
+
+ SECStatus rv = ED_SignMessage(&key, signature_item.get(), &msg_value);
+ ASSERT_EQ(SECSuccess, rv);
+
+ ECPublicKey public_key;
+ public_key.publicValue = public_value;
+ public_key.ecParams = ecParams;
+
+ rv = ED_VerifyMessage(&public_key, signature_item.get(), &msg_value);
+ ASSERT_EQ(SECSuccess, rv);
+
+ std::string signature_result = bytesToHexString(std::vector<uint8_t>(
+ signature_item->data, signature_item->data + signature_item->len));
+ EXPECT_EQ(signature_result, signature);
+ }
+};
+
+TEST_F(EDDSATest, TestEd25519_Sign) {
+ TestEd25519_Sign(
+ "4ccd089b28ff96da9db6c346ec114e0f5b8a319f35aba624da8cf6ed4fb8a6fb",
+ "3d4017c3e843895a92b70aa74d1b7ebc9c982ccf2ec4968cc0cd55f12af4660c", "72",
+ "92A009A9F0D4CAB8720E820B5F642540A2B27B5416503F8FB3762223EBDB69DA085AC1E4"
+ "3E15996E458F3613D0F11D8C387B2EAEB4302AEEB00D291612BB0C00");
+}
+TEST_F(EDDSATest, TestEd25519_Sign2) {
+ TestEd25519_Sign(
+ "9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60",
+ "d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a", "",
+ "E5564300C360AC729086E2CC806E828A84877F1EB8E5D974D873E065224901555FB88215"
+ "90A33BACC61E39701CF9B46BD25BF5F0595BBE24655141438E7A100B");
+}
+TEST_F(EDDSATest, TestEd25519_Sign3) {
+ TestEd25519_Sign(
+ "c5aa8df43f9f837bedb7442f31dcb7b166d38535076f094b85ce3a2e0b4458f7",
+ "fc51cd8e6218a1a38da47ed00230f0580816ed13ba3303ac5deb911548908025",
+ "af82",
+ "6291D657DEEC24024827E69C3ABE01A30CE548A284743A445E3680D7DB5AC3AC18FF9B53"
+ "8D16F290AE67F760984DC6594A7C15E9716ED28DC027BECEEA1EC40A");
+}
+TEST_F(EDDSATest, TestEd25519_Sign4) {
+ TestEd25519_Sign(
+ "f5e5767cf153319517630f226876b86c8160cc583bc013744c6bf255f5cc0ee5",
+ "278117fc144c72340f67d0f2316e8386ceffbf2b2428c9c51fef7c597f1d426e",
+ "08b8b2b733424243760fe426a4b54908632110a66c2f6591eabd3345e3e4eb98fa6e264b"
+ "f09efe12ee50f8f54e9f77b1e355f6c50544e23fb1433ddf73be84d879de7c0046dc4996"
+ "d9e773f4bc9efe5738829adb26c81b37c93a1b270b20329d658675fc6ea534e0810a4432"
+ "826bf58c941efb65d57a338bbd2e26640f89ffbc1a858efcb8550ee3a5e1998bd177e93a"
+ "7363c344fe6b199ee5d02e82d522c4feba15452f80288a821a579116ec6dad2b3b310da9"
+ "03401aa62100ab5d1a36553e06203b33890cc9b832f79ef80560ccb9a39ce767967ed628"
+ "c6ad573cb116dbefefd75499da96bd68a8a97b928a8bbc103b6621fcde2beca1231d206b"
+ "e6cd9ec7aff6f6c94fcd7204ed3455c68c83f4a41da4af2b74ef5c53f1d8ac70bdcb7ed1"
+ "85ce81bd84359d44254d95629e9855a94a7c1958d1f8ada5d0532ed8a5aa3fb2d17ba70e"
+ "b6248e594e1a2297acbbb39d502f1a8c6eb6f1ce22b3de1a1f40cc24554119a831a9aad6"
+ "079cad88425de6bde1a9187ebb6092cf67bf2b13fd65f27088d78b7e883c8759d2c4f5c6"
+ "5adb7553878ad575f9fad878e80a0c9ba63bcbcc2732e69485bbc9c90bfbd62481d9089b"
+ "eccf80cfe2df16a2cf65bd92dd597b0707e0917af48bbb75fed413d238f5555a7a569d80"
+ "c3414a8d0859dc65a46128bab27af87a71314f318c782b23ebfe808b82b0ce26401d2e22"
+ "f04d83d1255dc51addd3b75a2b1ae0784504df543af8969be3ea7082ff7fc9888c144da2"
+ "af58429ec96031dbcad3dad9af0dcbaaaf268cb8fcffead94f3c7ca495e056a9b47acdb7"
+ "51fb73e666c6c655ade8297297d07ad1ba5e43f1bca32301651339e22904cc8c42f58c30"
+ "c04aafdb038dda0847dd988dcda6f3bfd15c4b4c4525004aa06eeff8ca61783aacec57fb"
+ "3d1f92b0fe2fd1a85f6724517b65e614ad6808d6f6ee34dff7310fdc82aebfd904b01e1d"
+ "c54b2927094b2db68d6f903b68401adebf5a7e08d78ff4ef5d63653a65040cf9bfd4aca7"
+ "984a74d37145986780fc0b16ac451649de6188a7dbdf191f64b5fc5e2ab47b57f7f7276c"
+ "d419c17a3ca8e1b939ae49e488acba6b965610b5480109c8b17b80e1b7b750dfc7598d5d"
+ "5011fd2dcc5600a32ef5b52a1ecc820e308aa342721aac0943bf6686b64b2579376504cc"
+ "c493d97e6aed3fb0f9cd71a43dd497f01f17c0e2cb3797aa2a2f256656168e6c496afc5f"
+ "b93246f6b1116398a346f1a641f3b041e989f7914f90cc2c7fff357876e506b50d334ba7"
+ "7c225bc307ba537152f3f1610e4eafe595f6d9d90d11faa933a15ef1369546868a7f3a45"
+ "a96768d40fd9d03412c091c6315cf4fde7cb68606937380db2eaaa707b4c4185c32eddcd"
+ "d306705e4dc1ffc872eeee475a64dfac86aba41c0618983f8741c5ef68d3a101e8a3b8ca"
+ "c60c905c15fc910840b94c00a0b9d0",
+ "0AAB4C900501B3E24D7CDF4663326A3A87DF5E4843B2CBDB67CBF6E460FEC350AA5371B1"
+ "508F9F4528ECEA23C436D94B5E8FCD4F681E30A6AC00A9704A188A03");
+}
+TEST_F(EDDSATest, TestEd25519_Sign5) {
+ TestEd25519_Sign(
+ "833fe62409237b9d62ec77587520911e9a759cec1d19755b7da901b96dca3d42",
+ "ec172b93ad5e563bf4932c70e1245034c35467ef2efd4d64ebf819683467e2bf",
+ "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a"
+ "274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f",
+ "DC2A4459E7369633A52B1BF277839A00201009A3EFBF3ECB69BEA2186C26B58909351FC9"
+ "AC90B3ECFDFBC7C66431E0303DCA179C138AC17AD9BEF1177331A704");
+}
+
+} // namespace nss_test
diff --git a/security/nss/gtests/freebl_gtest/freebl_gtest.gyp b/security/nss/gtests/freebl_gtest/freebl_gtest.gyp
index ed1a557172..c7988776db 100644
--- a/security/nss/gtests/freebl_gtest/freebl_gtest.gyp
+++ b/security/nss/gtests/freebl_gtest/freebl_gtest.gyp
@@ -40,6 +40,7 @@
'mpi_unittest.cc',
'prng_kat_unittest.cc',
'rsa_unittest.cc',
+ 'ed25519_unittest.cc',
'<(DEPTH)/gtests/common/gtests.cc'
],
'dependencies': [
diff --git a/security/nss/gtests/pk11_gtest/manifest.mn b/security/nss/gtests/pk11_gtest/manifest.mn
index 7bfcb82f58..f9efc25e70 100644
--- a/security/nss/gtests/pk11_gtest/manifest.mn
+++ b/security/nss/gtests/pk11_gtest/manifest.mn
@@ -19,6 +19,7 @@ CPPSRCS = \
pk11_des_unittest.cc \
pk11_dsa_unittest.cc \
pk11_ecdsa_unittest.cc \
+ pk11_eddsa_unittest.cc \
pk11_ecdh_unittest.cc \
pk11_encrypt_derive_unittest.cc \
pk11_export_unittest.cc \
@@ -33,6 +34,7 @@ CPPSRCS = \
pk11_keygen.cc \
pk11_key_unittest.cc \
pk11_module_unittest.cc \
+ pk11_pbe_unittest.cc \
pk11_pbkdf2_unittest.cc \
pk11_prf_unittest.cc \
pk11_prng_unittest.cc \
diff --git a/security/nss/gtests/pk11_gtest/pk11_eddsa_unittest.cc b/security/nss/gtests/pk11_gtest/pk11_eddsa_unittest.cc
new file mode 100644
index 0000000000..669ac75243
--- /dev/null
+++ b/security/nss/gtests/pk11_gtest/pk11_eddsa_unittest.cc
@@ -0,0 +1,177 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include <memory>
+#include "nss.h"
+#include "pk11pub.h"
+#include "sechash.h"
+#include "cryptohi.h"
+
+#include "cpputil.h"
+#include "json_reader.h"
+#include "nss_scoped_ptrs.h"
+#include "testvectors_base/test-structs.h"
+
+#include "pk11_eddsa_vectors.h"
+#include "pk11_signature_test.h"
+#include "pk11_keygen.h"
+
+namespace nss_test {
+static const Pkcs11SignatureTestParams kEddsaVectors[] = {
+ {DataBuffer(kEd25519Pkcs8_1, sizeof(kEd25519Pkcs8_1)),
+ DataBuffer(kEd25519Spki_1, sizeof(kEd25519Spki_1)),
+ DataBuffer(kEd25519Message_1, sizeof(kEd25519Message_1)),
+ DataBuffer(kEd25519Signature_1, sizeof(kEd25519Signature_1))},
+
+ {DataBuffer(kEd25519Pkcs8_2, sizeof(kEd25519Pkcs8_2)),
+ DataBuffer(kEd25519Spki_2, sizeof(kEd25519Spki_2)),
+ DataBuffer(kEd25519Message_2, sizeof(kEd25519Message_2)),
+ DataBuffer(kEd25519Signature_2, sizeof(kEd25519Signature_2))},
+
+ {DataBuffer(kEd25519Pkcs8_3, sizeof(kEd25519Pkcs8_3)),
+ DataBuffer(kEd25519Spki_3, sizeof(kEd25519Spki_3)),
+ DataBuffer(kEd25519Message_3, sizeof(kEd25519Message_3)),
+ DataBuffer(kEd25519Signature_3, sizeof(kEd25519Signature_3))}};
+
+class Pkcs11EddsaTest
+ : public Pk11SignatureTest,
+ public ::testing::WithParamInterface<Pkcs11SignatureTestParams> {
+ protected:
+ Pkcs11EddsaTest() : Pk11SignatureTest(CKM_EDDSA) {}
+};
+
+TEST_P(Pkcs11EddsaTest, SignAndVerify) { SignAndVerifyRaw(GetParam()); }
+
+TEST_P(Pkcs11EddsaTest, ImportExport) { ImportExport(GetParam().pkcs8_); }
+
+TEST_P(Pkcs11EddsaTest, ImportConvertToPublic) {
+ ScopedSECKEYPrivateKey privKey(ImportPrivateKey(GetParam().pkcs8_));
+ ASSERT_TRUE(privKey);
+
+ ScopedSECKEYPublicKey pubKey(SECKEY_ConvertToPublicKey(privKey.get()));
+ ASSERT_TRUE(pubKey);
+}
+
+TEST_P(Pkcs11EddsaTest, ImportPublicCreateSubjectPKInfo) {
+ ScopedSECKEYPrivateKey privKey(ImportPrivateKey(GetParam().pkcs8_));
+ ASSERT_TRUE(privKey);
+
+ ScopedSECKEYPublicKey pubKey(
+ (SECKEYPublicKey*)SECKEY_ConvertToPublicKey(privKey.get()));
+ ASSERT_TRUE(pubKey);
+
+ ScopedSECItem der_spki(SECKEY_EncodeDERSubjectPublicKeyInfo(pubKey.get()));
+ ASSERT_TRUE(der_spki);
+ ASSERT_EQ(der_spki->len, GetParam().spki_.len());
+ ASSERT_EQ(0, memcmp(der_spki->data, GetParam().spki_.data(), der_spki->len));
+}
+
+INSTANTIATE_TEST_SUITE_P(EddsaSignVerify, Pkcs11EddsaTest,
+ ::testing::ValuesIn(kEddsaVectors));
+
+class Pkcs11EddsaRoundtripTest
+ : public Pk11SignatureTest,
+ public ::testing::WithParamInterface<Pkcs11SignatureTestParams> {
+ protected:
+ Pkcs11EddsaRoundtripTest() : Pk11SignatureTest(CKM_EDDSA) {}
+
+ protected:
+ void GenerateExportImportSignVerify(Pkcs11SignatureTestParams params) {
+ Pkcs11KeyPairGenerator generator(CKM_EC_EDWARDS_KEY_PAIR_GEN);
+ ScopedSECKEYPrivateKey priv;
+ ScopedSECKEYPublicKey pub;
+ generator.GenerateKey(&priv, &pub, false);
+
+ DataBuffer exported;
+ ExportPrivateKey(&priv, exported);
+
+ ScopedSECKEYPrivateKey privKey(ImportPrivateKey(exported));
+ ASSERT_NE(privKey, nullptr);
+ DataBuffer sig;
+
+ SignRaw(privKey, params.data_, &sig);
+ Verify(pub, params.data_, sig);
+ }
+};
+
+TEST_P(Pkcs11EddsaRoundtripTest, GenerateExportImportSignVerify) {
+ GenerateExportImportSignVerify(GetParam());
+}
+
+INSTANTIATE_TEST_SUITE_P(EddsaRound, Pkcs11EddsaRoundtripTest,
+ ::testing::ValuesIn(kEddsaVectors));
+
+class Pkcs11EddsaWycheproofTest : public ::testing::Test {
+ protected:
+ void Run(const std::string& name) {
+ WycheproofHeader(name, "EDDSA", "eddsa_verify_schema.json",
+ [this](JsonReader& r) { RunGroup(r); });
+ }
+
+ private:
+ void RunGroup(JsonReader& r) {
+ std::vector<EddsaTestVector> tests;
+ std::vector<uint8_t> public_key;
+
+ while (r.NextItem()) {
+ std::string n = r.ReadLabel();
+ if (n == "") {
+ break;
+ }
+
+ if (n == "jwk" || n == "key" || n == "keyPem") {
+ r.SkipValue();
+ } else if (n == "keyDer") {
+ public_key = r.ReadHex();
+ } else if (n == "type") {
+ ASSERT_EQ("EddsaVerify", r.ReadString());
+ } else if (n == "tests") {
+ WycheproofReadTests(r, &tests, ReadTestAttr);
+ } else {
+ FAIL() << "unknown label in group: " << n;
+ }
+ }
+
+ for (auto& t : tests) {
+ std::cout << "Running test " << t.id << std::endl;
+ t.public_key = public_key;
+ Derive(t);
+ }
+ }
+
+ static void ReadTestAttr(EddsaTestVector& t, const std::string& n,
+ JsonReader& r) {
+ if (n == "msg") {
+ t.msg = r.ReadHex();
+ } else if (n == "sig") {
+ t.sig = r.ReadHex();
+ } else {
+ FAIL() << "unknown test key: " << n;
+ }
+ }
+
+ void Derive(const EddsaTestVector& vec) {
+ SECItem spki_item = {siBuffer, toUcharPtr(vec.public_key.data()),
+ static_cast<unsigned int>(vec.public_key.size())};
+ SECItem sig_item = {siBuffer, toUcharPtr(vec.sig.data()),
+ static_cast<unsigned int>(vec.sig.size())};
+ SECItem msg_item = {siBuffer, toUcharPtr(vec.msg.data()),
+ static_cast<unsigned int>(vec.msg.size())};
+
+ ScopedCERTSubjectPublicKeyInfo cert_spki(
+ SECKEY_DecodeDERSubjectPublicKeyInfo(&spki_item));
+ ASSERT_TRUE(cert_spki);
+
+ ScopedSECKEYPublicKey pub_key(SECKEY_ExtractPublicKey(cert_spki.get()));
+ ASSERT_TRUE(pub_key);
+
+ SECStatus rv = PK11_VerifyWithMechanism(pub_key.get(), CKM_EDDSA, nullptr,
+ &sig_item, &msg_item, nullptr);
+ EXPECT_EQ(rv, vec.valid ? SECSuccess : SECFailure);
+ };
+};
+
+TEST_F(Pkcs11EddsaWycheproofTest, Ed25519) { Run("eddsa"); }
+
+} // namespace nss_test
diff --git a/security/nss/gtests/pk11_gtest/pk11_eddsa_vectors.h b/security/nss/gtests/pk11_gtest/pk11_eddsa_vectors.h
new file mode 100644
index 0000000000..896906ad50
--- /dev/null
+++ b/security/nss/gtests/pk11_gtest/pk11_eddsa_vectors.h
@@ -0,0 +1,164 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+namespace nss_test {
+/* The test vectors are coming from
+ * https://tools.ietf.org/html/rfc8032#section-7.
+ * The first TV is skipped, as NSS does not support signing empty messages.
+ */
+
+const uint8_t kEd25519Pkcs8_1[] = {
+ 0x30, 0x2e, 0x02, 0x01, 0x00, 0x30, 0x05, 0x06, 0x03, 0x2b, 0x65, 0x70,
+ 0x04, 0x22, 0x04, 0x20, 0x4c, 0xcd, 0x08, 0x9b, 0x28, 0xff, 0x96, 0xda,
+ 0x9d, 0xb6, 0xc3, 0x46, 0xec, 0x11, 0x4e, 0x0f, 0x5b, 0x8a, 0x31, 0x9f,
+ 0x35, 0xab, 0xa6, 0x24, 0xda, 0x8c, 0xf6, 0xed, 0x4f, 0xb8, 0xa6, 0xfb,
+};
+
+const uint8_t kEd25519Spki_1[] = {
+ 0x30, 0x2a, 0x30, 0x05, 0x06, 0x03, 0x2B, 0x65, 0x70, 0x03, 0x21,
+ 0x00, 0x3d, 0x40, 0x17, 0xc3, 0xe8, 0x43, 0x89, 0x5a, 0x92, 0xb7,
+ 0x0a, 0xa7, 0x4d, 0x1b, 0x7e, 0xbc, 0x9c, 0x98, 0x2c, 0xcf, 0x2e,
+ 0xc4, 0x96, 0x8c, 0xc0, 0xcd, 0x55, 0xf1, 0x2a, 0xf4, 0x66, 0x0c};
+
+const uint8_t kEd25519Message_1[] = {0x72};
+
+const uint8_t kEd25519Signature_1[64] = {
+ 0x92, 0xa0, 0x09, 0xa9, 0xf0, 0xd4, 0xca, 0xb8, 0x72, 0x0e, 0x82,
+ 0x0b, 0x5f, 0x64, 0x25, 0x40, 0xa2, 0xb2, 0x7b, 0x54, 0x16, 0x50,
+ 0x3f, 0x8f, 0xb3, 0x76, 0x22, 0x23, 0xeb, 0xdb, 0x69, 0xda, 0x08,
+ 0x5a, 0xc1, 0xe4, 0x3e, 0x15, 0x99, 0x6e, 0x45, 0x8f, 0x36, 0x13,
+ 0xd0, 0xf1, 0x1d, 0x8c, 0x38, 0x7b, 0x2e, 0xae, 0xb4, 0x30, 0x2a,
+ 0xee, 0xb0, 0x0d, 0x29, 0x16, 0x12, 0xbb, 0x0c, 0x00};
+
+const uint8_t kEd25519Pkcs8_2[] = {
+ 0x30, 0x2e, 0x02, 0x01, 0x00, 0x30, 0x05, 0x06, 0x03, 0x2b, 0x65, 0x70,
+ 0x04, 0x22, 0x04, 0x20, 0xc5, 0xaa, 0x8d, 0xf4, 0x3f, 0x9f, 0x83, 0x7b,
+ 0xed, 0xb7, 0x44, 0x2f, 0x31, 0xdc, 0xb7, 0xb1, 0x66, 0xd3, 0x85, 0x35,
+ 0x07, 0x6f, 0x09, 0x4b, 0x85, 0xce, 0x3a, 0x2e, 0x0b, 0x44, 0x58, 0xf7};
+
+const uint8_t kEd25519Spki_2[] = {
+ 0x30, 0x2a, 0x30, 0x05, 0x06, 0x03, 0x2B, 0x65, 0x70, 0x03, 0x21,
+ 0x00, 0xfc, 0x51, 0xcd, 0x8e, 0x62, 0x18, 0xa1, 0xa3, 0x8d, 0xa4,
+ 0x7e, 0xd0, 0x02, 0x30, 0xf0, 0x58, 0x08, 0x16, 0xed, 0x13, 0xba,
+ 0x33, 0x03, 0xac, 0x5d, 0xeb, 0x91, 0x15, 0x48, 0x90, 0x80, 0x25};
+
+const uint8_t kEd25519Message_2[] = {0xaf, 0x82};
+
+const uint8_t kEd25519Signature_2[64] = {
+ 0x62, 0x91, 0xd6, 0x57, 0xde, 0xec, 0x24, 0x02, 0x48, 0x27, 0xe6,
+ 0x9c, 0x3a, 0xbe, 0x01, 0xa3, 0x0c, 0xe5, 0x48, 0xa2, 0x84, 0x74,
+ 0x3a, 0x44, 0x5e, 0x36, 0x80, 0xd7, 0xdb, 0x5a, 0xc3, 0xac, 0x18,
+ 0xff, 0x9b, 0x53, 0x8d, 0x16, 0xf2, 0x90, 0xae, 0x67, 0xf7, 0x60,
+ 0x98, 0x4d, 0xc6, 0x59, 0x4a, 0x7c, 0x15, 0xe9, 0x71, 0x6e, 0xd2,
+ 0x8d, 0xc0, 0x27, 0xbe, 0xce, 0xea, 0x1e, 0xc4, 0x0a};
+
+const uint8_t kEd25519Pkcs8_3[] = {
+ 0x30, 0x2e, 0x02, 0x01, 0x00, 0x30, 0x05, 0x06, 0x03, 0x2b, 0x65, 0x70,
+ 0x04, 0x22, 0x04, 0x20, 0xf5, 0xe5, 0x76, 0x7c, 0xf1, 0x53, 0x31, 0x95,
+ 0x17, 0x63, 0x0f, 0x22, 0x68, 0x76, 0xb8, 0x6c, 0x81, 0x60, 0xcc, 0x58,
+ 0x3b, 0xc0, 0x13, 0x74, 0x4c, 0x6b, 0xf2, 0x55, 0xf5, 0xcc, 0x0e, 0xe5};
+
+const uint8_t kEd25519Spki_3[] = {
+ 0x30, 0x2a, 0x30, 0x05, 0x06, 0x03, 0x2B, 0x65, 0x70, 0x03, 0x21,
+ 0x00, 0x27, 0x81, 0x17, 0xfc, 0x14, 0x4c, 0x72, 0x34, 0x0f, 0x67,
+ 0xd0, 0xf2, 0x31, 0x6e, 0x83, 0x86, 0xce, 0xff, 0xbf, 0x2b, 0x24,
+ 0x28, 0xc9, 0xc5, 0x1f, 0xef, 0x7c, 0x59, 0x7f, 0x1d, 0x42, 0x6e};
+
+const uint8_t kEd25519Message_3[] = {
+ 0x08, 0xb8, 0xb2, 0xb7, 0x33, 0x42, 0x42, 0x43, 0x76, 0x0f, 0xe4, 0x26,
+ 0xa4, 0xb5, 0x49, 0x08, 0x63, 0x21, 0x10, 0xa6, 0x6c, 0x2f, 0x65, 0x91,
+ 0xea, 0xbd, 0x33, 0x45, 0xe3, 0xe4, 0xeb, 0x98, 0xfa, 0x6e, 0x26, 0x4b,
+ 0xf0, 0x9e, 0xfe, 0x12, 0xee, 0x50, 0xf8, 0xf5, 0x4e, 0x9f, 0x77, 0xb1,
+ 0xe3, 0x55, 0xf6, 0xc5, 0x05, 0x44, 0xe2, 0x3f, 0xb1, 0x43, 0x3d, 0xdf,
+ 0x73, 0xbe, 0x84, 0xd8, 0x79, 0xde, 0x7c, 0x00, 0x46, 0xdc, 0x49, 0x96,
+ 0xd9, 0xe7, 0x73, 0xf4, 0xbc, 0x9e, 0xfe, 0x57, 0x38, 0x82, 0x9a, 0xdb,
+ 0x26, 0xc8, 0x1b, 0x37, 0xc9, 0x3a, 0x1b, 0x27, 0x0b, 0x20, 0x32, 0x9d,
+ 0x65, 0x86, 0x75, 0xfc, 0x6e, 0xa5, 0x34, 0xe0, 0x81, 0x0a, 0x44, 0x32,
+ 0x82, 0x6b, 0xf5, 0x8c, 0x94, 0x1e, 0xfb, 0x65, 0xd5, 0x7a, 0x33, 0x8b,
+ 0xbd, 0x2e, 0x26, 0x64, 0x0f, 0x89, 0xff, 0xbc, 0x1a, 0x85, 0x8e, 0xfc,
+ 0xb8, 0x55, 0x0e, 0xe3, 0xa5, 0xe1, 0x99, 0x8b, 0xd1, 0x77, 0xe9, 0x3a,
+ 0x73, 0x63, 0xc3, 0x44, 0xfe, 0x6b, 0x19, 0x9e, 0xe5, 0xd0, 0x2e, 0x82,
+ 0xd5, 0x22, 0xc4, 0xfe, 0xba, 0x15, 0x45, 0x2f, 0x80, 0x28, 0x8a, 0x82,
+ 0x1a, 0x57, 0x91, 0x16, 0xec, 0x6d, 0xad, 0x2b, 0x3b, 0x31, 0x0d, 0xa9,
+ 0x03, 0x40, 0x1a, 0xa6, 0x21, 0x00, 0xab, 0x5d, 0x1a, 0x36, 0x55, 0x3e,
+ 0x06, 0x20, 0x3b, 0x33, 0x89, 0x0c, 0xc9, 0xb8, 0x32, 0xf7, 0x9e, 0xf8,
+ 0x05, 0x60, 0xcc, 0xb9, 0xa3, 0x9c, 0xe7, 0x67, 0x96, 0x7e, 0xd6, 0x28,
+ 0xc6, 0xad, 0x57, 0x3c, 0xb1, 0x16, 0xdb, 0xef, 0xef, 0xd7, 0x54, 0x99,
+ 0xda, 0x96, 0xbd, 0x68, 0xa8, 0xa9, 0x7b, 0x92, 0x8a, 0x8b, 0xbc, 0x10,
+ 0x3b, 0x66, 0x21, 0xfc, 0xde, 0x2b, 0xec, 0xa1, 0x23, 0x1d, 0x20, 0x6b,
+ 0xe6, 0xcd, 0x9e, 0xc7, 0xaf, 0xf6, 0xf6, 0xc9, 0x4f, 0xcd, 0x72, 0x04,
+ 0xed, 0x34, 0x55, 0xc6, 0x8c, 0x83, 0xf4, 0xa4, 0x1d, 0xa4, 0xaf, 0x2b,
+ 0x74, 0xef, 0x5c, 0x53, 0xf1, 0xd8, 0xac, 0x70, 0xbd, 0xcb, 0x7e, 0xd1,
+ 0x85, 0xce, 0x81, 0xbd, 0x84, 0x35, 0x9d, 0x44, 0x25, 0x4d, 0x95, 0x62,
+ 0x9e, 0x98, 0x55, 0xa9, 0x4a, 0x7c, 0x19, 0x58, 0xd1, 0xf8, 0xad, 0xa5,
+ 0xd0, 0x53, 0x2e, 0xd8, 0xa5, 0xaa, 0x3f, 0xb2, 0xd1, 0x7b, 0xa7, 0x0e,
+ 0xb6, 0x24, 0x8e, 0x59, 0x4e, 0x1a, 0x22, 0x97, 0xac, 0xbb, 0xb3, 0x9d,
+ 0x50, 0x2f, 0x1a, 0x8c, 0x6e, 0xb6, 0xf1, 0xce, 0x22, 0xb3, 0xde, 0x1a,
+ 0x1f, 0x40, 0xcc, 0x24, 0x55, 0x41, 0x19, 0xa8, 0x31, 0xa9, 0xaa, 0xd6,
+ 0x07, 0x9c, 0xad, 0x88, 0x42, 0x5d, 0xe6, 0xbd, 0xe1, 0xa9, 0x18, 0x7e,
+ 0xbb, 0x60, 0x92, 0xcf, 0x67, 0xbf, 0x2b, 0x13, 0xfd, 0x65, 0xf2, 0x70,
+ 0x88, 0xd7, 0x8b, 0x7e, 0x88, 0x3c, 0x87, 0x59, 0xd2, 0xc4, 0xf5, 0xc6,
+ 0x5a, 0xdb, 0x75, 0x53, 0x87, 0x8a, 0xd5, 0x75, 0xf9, 0xfa, 0xd8, 0x78,
+ 0xe8, 0x0a, 0x0c, 0x9b, 0xa6, 0x3b, 0xcb, 0xcc, 0x27, 0x32, 0xe6, 0x94,
+ 0x85, 0xbb, 0xc9, 0xc9, 0x0b, 0xfb, 0xd6, 0x24, 0x81, 0xd9, 0x08, 0x9b,
+ 0xec, 0xcf, 0x80, 0xcf, 0xe2, 0xdf, 0x16, 0xa2, 0xcf, 0x65, 0xbd, 0x92,
+ 0xdd, 0x59, 0x7b, 0x07, 0x07, 0xe0, 0x91, 0x7a, 0xf4, 0x8b, 0xbb, 0x75,
+ 0xfe, 0xd4, 0x13, 0xd2, 0x38, 0xf5, 0x55, 0x5a, 0x7a, 0x56, 0x9d, 0x80,
+ 0xc3, 0x41, 0x4a, 0x8d, 0x08, 0x59, 0xdc, 0x65, 0xa4, 0x61, 0x28, 0xba,
+ 0xb2, 0x7a, 0xf8, 0x7a, 0x71, 0x31, 0x4f, 0x31, 0x8c, 0x78, 0x2b, 0x23,
+ 0xeb, 0xfe, 0x80, 0x8b, 0x82, 0xb0, 0xce, 0x26, 0x40, 0x1d, 0x2e, 0x22,
+ 0xf0, 0x4d, 0x83, 0xd1, 0x25, 0x5d, 0xc5, 0x1a, 0xdd, 0xd3, 0xb7, 0x5a,
+ 0x2b, 0x1a, 0xe0, 0x78, 0x45, 0x04, 0xdf, 0x54, 0x3a, 0xf8, 0x96, 0x9b,
+ 0xe3, 0xea, 0x70, 0x82, 0xff, 0x7f, 0xc9, 0x88, 0x8c, 0x14, 0x4d, 0xa2,
+ 0xaf, 0x58, 0x42, 0x9e, 0xc9, 0x60, 0x31, 0xdb, 0xca, 0xd3, 0xda, 0xd9,
+ 0xaf, 0x0d, 0xcb, 0xaa, 0xaf, 0x26, 0x8c, 0xb8, 0xfc, 0xff, 0xea, 0xd9,
+ 0x4f, 0x3c, 0x7c, 0xa4, 0x95, 0xe0, 0x56, 0xa9, 0xb4, 0x7a, 0xcd, 0xb7,
+ 0x51, 0xfb, 0x73, 0xe6, 0x66, 0xc6, 0xc6, 0x55, 0xad, 0xe8, 0x29, 0x72,
+ 0x97, 0xd0, 0x7a, 0xd1, 0xba, 0x5e, 0x43, 0xf1, 0xbc, 0xa3, 0x23, 0x01,
+ 0x65, 0x13, 0x39, 0xe2, 0x29, 0x04, 0xcc, 0x8c, 0x42, 0xf5, 0x8c, 0x30,
+ 0xc0, 0x4a, 0xaf, 0xdb, 0x03, 0x8d, 0xda, 0x08, 0x47, 0xdd, 0x98, 0x8d,
+ 0xcd, 0xa6, 0xf3, 0xbf, 0xd1, 0x5c, 0x4b, 0x4c, 0x45, 0x25, 0x00, 0x4a,
+ 0xa0, 0x6e, 0xef, 0xf8, 0xca, 0x61, 0x78, 0x3a, 0xac, 0xec, 0x57, 0xfb,
+ 0x3d, 0x1f, 0x92, 0xb0, 0xfe, 0x2f, 0xd1, 0xa8, 0x5f, 0x67, 0x24, 0x51,
+ 0x7b, 0x65, 0xe6, 0x14, 0xad, 0x68, 0x08, 0xd6, 0xf6, 0xee, 0x34, 0xdf,
+ 0xf7, 0x31, 0x0f, 0xdc, 0x82, 0xae, 0xbf, 0xd9, 0x04, 0xb0, 0x1e, 0x1d,
+ 0xc5, 0x4b, 0x29, 0x27, 0x09, 0x4b, 0x2d, 0xb6, 0x8d, 0x6f, 0x90, 0x3b,
+ 0x68, 0x40, 0x1a, 0xde, 0xbf, 0x5a, 0x7e, 0x08, 0xd7, 0x8f, 0xf4, 0xef,
+ 0x5d, 0x63, 0x65, 0x3a, 0x65, 0x04, 0x0c, 0xf9, 0xbf, 0xd4, 0xac, 0xa7,
+ 0x98, 0x4a, 0x74, 0xd3, 0x71, 0x45, 0x98, 0x67, 0x80, 0xfc, 0x0b, 0x16,
+ 0xac, 0x45, 0x16, 0x49, 0xde, 0x61, 0x88, 0xa7, 0xdb, 0xdf, 0x19, 0x1f,
+ 0x64, 0xb5, 0xfc, 0x5e, 0x2a, 0xb4, 0x7b, 0x57, 0xf7, 0xf7, 0x27, 0x6c,
+ 0xd4, 0x19, 0xc1, 0x7a, 0x3c, 0xa8, 0xe1, 0xb9, 0x39, 0xae, 0x49, 0xe4,
+ 0x88, 0xac, 0xba, 0x6b, 0x96, 0x56, 0x10, 0xb5, 0x48, 0x01, 0x09, 0xc8,
+ 0xb1, 0x7b, 0x80, 0xe1, 0xb7, 0xb7, 0x50, 0xdf, 0xc7, 0x59, 0x8d, 0x5d,
+ 0x50, 0x11, 0xfd, 0x2d, 0xcc, 0x56, 0x00, 0xa3, 0x2e, 0xf5, 0xb5, 0x2a,
+ 0x1e, 0xcc, 0x82, 0x0e, 0x30, 0x8a, 0xa3, 0x42, 0x72, 0x1a, 0xac, 0x09,
+ 0x43, 0xbf, 0x66, 0x86, 0xb6, 0x4b, 0x25, 0x79, 0x37, 0x65, 0x04, 0xcc,
+ 0xc4, 0x93, 0xd9, 0x7e, 0x6a, 0xed, 0x3f, 0xb0, 0xf9, 0xcd, 0x71, 0xa4,
+ 0x3d, 0xd4, 0x97, 0xf0, 0x1f, 0x17, 0xc0, 0xe2, 0xcb, 0x37, 0x97, 0xaa,
+ 0x2a, 0x2f, 0x25, 0x66, 0x56, 0x16, 0x8e, 0x6c, 0x49, 0x6a, 0xfc, 0x5f,
+ 0xb9, 0x32, 0x46, 0xf6, 0xb1, 0x11, 0x63, 0x98, 0xa3, 0x46, 0xf1, 0xa6,
+ 0x41, 0xf3, 0xb0, 0x41, 0xe9, 0x89, 0xf7, 0x91, 0x4f, 0x90, 0xcc, 0x2c,
+ 0x7f, 0xff, 0x35, 0x78, 0x76, 0xe5, 0x06, 0xb5, 0x0d, 0x33, 0x4b, 0xa7,
+ 0x7c, 0x22, 0x5b, 0xc3, 0x07, 0xba, 0x53, 0x71, 0x52, 0xf3, 0xf1, 0x61,
+ 0x0e, 0x4e, 0xaf, 0xe5, 0x95, 0xf6, 0xd9, 0xd9, 0x0d, 0x11, 0xfa, 0xa9,
+ 0x33, 0xa1, 0x5e, 0xf1, 0x36, 0x95, 0x46, 0x86, 0x8a, 0x7f, 0x3a, 0x45,
+ 0xa9, 0x67, 0x68, 0xd4, 0x0f, 0xd9, 0xd0, 0x34, 0x12, 0xc0, 0x91, 0xc6,
+ 0x31, 0x5c, 0xf4, 0xfd, 0xe7, 0xcb, 0x68, 0x60, 0x69, 0x37, 0x38, 0x0d,
+ 0xb2, 0xea, 0xaa, 0x70, 0x7b, 0x4c, 0x41, 0x85, 0xc3, 0x2e, 0xdd, 0xcd,
+ 0xd3, 0x06, 0x70, 0x5e, 0x4d, 0xc1, 0xff, 0xc8, 0x72, 0xee, 0xee, 0x47,
+ 0x5a, 0x64, 0xdf, 0xac, 0x86, 0xab, 0xa4, 0x1c, 0x06, 0x18, 0x98, 0x3f,
+ 0x87, 0x41, 0xc5, 0xef, 0x68, 0xd3, 0xa1, 0x01, 0xe8, 0xa3, 0xb8, 0xca,
+ 0xc6, 0x0c, 0x90, 0x5c, 0x15, 0xfc, 0x91, 0x08, 0x40, 0xb9, 0x4c, 0x00,
+ 0xa0, 0xb9, 0xd0};
+
+const uint8_t kEd25519Signature_3[64] = {
+ 0x0a, 0xab, 0x4c, 0x90, 0x05, 0x01, 0xb3, 0xe2, 0x4d, 0x7c, 0xdf,
+ 0x46, 0x63, 0x32, 0x6a, 0x3a, 0x87, 0xdf, 0x5e, 0x48, 0x43, 0xb2,
+ 0xcb, 0xdb, 0x67, 0xcb, 0xf6, 0xe4, 0x60, 0xfe, 0xc3, 0x50, 0xaa,
+ 0x53, 0x71, 0xb1, 0x50, 0x8f, 0x9f, 0x45, 0x28, 0xec, 0xea, 0x23,
+ 0xc4, 0x36, 0xd9, 0x4b, 0x5e, 0x8f, 0xcd, 0x4f, 0x68, 0x1e, 0x30,
+ 0xa6, 0xac, 0x00, 0xa9, 0x70, 0x4a, 0x18, 0x8a, 0x03};
+
+} // namespace nss_test
diff --git a/security/nss/gtests/pk11_gtest/pk11_gtest.gyp b/security/nss/gtests/pk11_gtest/pk11_gtest.gyp
index 792d6546e4..c14dbf860e 100644
--- a/security/nss/gtests/pk11_gtest/pk11_gtest.gyp
+++ b/security/nss/gtests/pk11_gtest/pk11_gtest.gyp
@@ -25,6 +25,7 @@
'pk11_des_unittest.cc',
'pk11_dsa_unittest.cc',
'pk11_ecdsa_unittest.cc',
+ 'pk11_eddsa_unittest.cc',
'pk11_ecdh_unittest.cc',
'pk11_encrypt_derive_unittest.cc',
'pk11_find_certs_unittest.cc',
@@ -38,6 +39,7 @@
'pk11_keygen.cc',
'pk11_key_unittest.cc',
'pk11_module_unittest.cc',
+ 'pk11_pbe_unittest.cc',
'pk11_pbkdf2_unittest.cc',
'pk11_prf_unittest.cc',
'pk11_prng_unittest.cc',
diff --git a/security/nss/gtests/pk11_gtest/pk11_import_unittest.cc b/security/nss/gtests/pk11_gtest/pk11_import_unittest.cc
index 7fcc1cc4d7..6e11477045 100644
--- a/security/nss/gtests/pk11_gtest/pk11_import_unittest.cc
+++ b/security/nss/gtests/pk11_gtest/pk11_import_unittest.cc
@@ -88,6 +88,7 @@ class Pk11KeyImportTestBase : public ::testing::Test {
case dhKey:
return pub_key->u.dh.publicValue;
case ecKey:
+ case edKey:
return pub_key->u.ec.publicValue;
case kyberKey:
return pub_key->u.kyber.publicValue;
diff --git a/security/nss/gtests/pk11_gtest/pk11_keygen.cc b/security/nss/gtests/pk11_gtest/pk11_keygen.cc
index 1a300ca4c1..92c8ba7ed8 100644
--- a/security/nss/gtests/pk11_gtest/pk11_keygen.cc
+++ b/security/nss/gtests/pk11_gtest/pk11_keygen.cc
@@ -82,9 +82,11 @@ class DhParamHolder : public PqgParamHolder {
SECKEYDHParams params_;
};
+/* Also used for EdDSA. */
class EcParamHolder : public ParamHolder {
public:
EcParamHolder(SECOidTag curve_oid) {
+ /* For the case of ED curve_oid contains a EdDSA OID. */
SECOidData* curve = SECOID_FindOIDByTag(curve_oid);
EXPECT_NE(nullptr, curve);
@@ -142,6 +144,11 @@ std::unique_ptr<ParamHolder> Pkcs11KeyPairGenerator::MakeParams() const {
return std::unique_ptr<ParamHolder>(new DhParamHolder(pqg_params));
}
+ case CKM_EC_EDWARDS_KEY_PAIR_GEN:
+ std::cerr << "Generate ED pair on " << curve_ << std::endl;
+ return std::unique_ptr<ParamHolder>(
+ new EcParamHolder(SEC_OID_ED25519_PUBLIC_KEY));
+
case CKM_EC_KEY_PAIR_GEN:
std::cerr << "Generate EC pair on " << curve_ << std::endl;
return std::unique_ptr<ParamHolder>(new EcParamHolder(curve_));
diff --git a/security/nss/gtests/pk11_gtest/pk11_pbe_unittest.cc b/security/nss/gtests/pk11_gtest/pk11_pbe_unittest.cc
new file mode 100644
index 0000000000..5e90fd1bc9
--- /dev/null
+++ b/security/nss/gtests/pk11_gtest/pk11_pbe_unittest.cc
@@ -0,0 +1,69 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include <memory>
+#include "nss.h"
+#include "pk11pub.h"
+
+#include "gtest/gtest.h"
+#include "nss_scoped_ptrs.h"
+
+namespace nss_test {
+
+static unsigned char* ToUcharPtr(std::string& str) {
+ return const_cast<unsigned char*>(
+ reinterpret_cast<const unsigned char*>(str.c_str()));
+}
+
+class Pkcs11PbeTest : public ::testing::Test {
+ public:
+ void Derive(std::vector<uint8_t>& derived) {
+ // Shared between test vectors.
+ const unsigned int kIterations = 4096;
+ std::string pass("passwordPASSWORDpassword");
+ std::string salt("saltSALTsaltSALTsaltSALTsaltSALTsalt");
+
+ // Derivation must succeed with the right values.
+ EXPECT_TRUE(DeriveBytes(pass, salt, derived, kIterations));
+ }
+
+ private:
+ bool DeriveBytes(std::string& pass, std::string& salt,
+ std::vector<uint8_t>& derived, unsigned int kIterations) {
+ SECItem pass_item = {siBuffer, ToUcharPtr(pass),
+ static_cast<unsigned int>(pass.length())};
+ SECItem salt_item = {siBuffer, ToUcharPtr(salt),
+ static_cast<unsigned int>(salt.length())};
+
+ // Set up PBE params.
+ ScopedSECAlgorithmID alg_id(PK11_CreatePBEAlgorithmID(
+ SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_2KEY_TRIPLE_DES_CBC, kIterations,
+ &salt_item));
+
+ // Derive.
+ ScopedPK11SlotInfo slot(PK11_GetInternalSlot());
+ ScopedPK11SymKey sym_key(
+ PK11_PBEKeyGen(slot.get(), alg_id.get(), &pass_item, false, nullptr));
+
+ SECStatus rv = PK11_ExtractKeyValue(sym_key.get());
+ EXPECT_EQ(rv, SECSuccess);
+
+ SECItem* key_data = PK11_GetKeyData(sym_key.get());
+
+ return key_data->len == derived.size() &&
+ !memcmp(&derived[0], key_data->data, key_data->len);
+ }
+};
+
+TEST_F(Pkcs11PbeTest, DeriveKnown) {
+ std::vector<uint8_t> derived = {0x86, 0x6b, 0xce, 0xef, 0x26, 0xa4,
+ 0x4f, 0x02, 0x4a, 0x26, 0xcd, 0xd0,
+ 0x4f, 0x7c, 0x19, 0xad};
+
+ Derive(derived);
+}
+
+} // namespace nss_test
diff --git a/security/nss/gtests/pk11_gtest/pk11_signature_test.cc b/security/nss/gtests/pk11_gtest/pk11_signature_test.cc
index c9700707fe..bb029cd3a4 100644
--- a/security/nss/gtests/pk11_gtest/pk11_signature_test.cc
+++ b/security/nss/gtests/pk11_gtest/pk11_signature_test.cc
@@ -54,9 +54,8 @@ ScopedSECKEYPublicKey Pk11SignatureTest::ImportPublicKey(
return ScopedSECKEYPublicKey(SECKEY_ExtractPublicKey(certSpki.get()));
}
-bool Pk11SignatureTest::SignHashedData(ScopedSECKEYPrivateKey& privKey,
- const DataBuffer& hash,
- DataBuffer* sig) {
+bool Pk11SignatureTest::SignRaw(ScopedSECKEYPrivateKey& privKey,
+ const DataBuffer& hash, DataBuffer* sig) {
SECItem hashItem = {siBuffer, toUcharPtr(hash.data()),
static_cast<unsigned int>(hash.len())};
unsigned int sigLen = PK11_SignatureLen(privKey.get());
@@ -70,8 +69,8 @@ bool Pk11SignatureTest::SignHashedData(ScopedSECKEYPrivateKey& privKey,
return rv == SECSuccess;
}
-bool Pk11SignatureTest::SignData(ScopedSECKEYPrivateKey& privKey,
- const DataBuffer& data, DataBuffer* sig) {
+bool Pk11SignatureTest::DigestAndSign(ScopedSECKEYPrivateKey& privKey,
+ const DataBuffer& data, DataBuffer* sig) {
unsigned int sigLen = PK11_SignatureLen(privKey.get());
bool result = true;
EXPECT_LT(0, (int)sigLen);
@@ -123,11 +122,11 @@ bool Pk11SignatureTest::ImportPrivateKeyAndSignHashedData(
ADD_FAILURE() << "Failed to compute hash";
return false;
}
- if (!SignHashedData(privKey, hash, sig)) {
+ if (!SignRaw(privKey, hash, sig)) {
ADD_FAILURE() << "Failed to sign hashed data";
return false;
}
- if (!SignData(privKey, data, sig2)) {
+ if (!DigestAndSign(privKey, data, sig2)) {
/* failure was already added by SignData, with an error message */
return false;
}
@@ -138,11 +137,20 @@ void Pk11SignatureTest::Verify(ScopedSECKEYPublicKey& pubKey,
const DataBuffer& data, const DataBuffer& sig,
bool valid) {
SECStatus rv;
- DataBuffer hash;
SECItem sigItem = {siBuffer, toUcharPtr(sig.data()),
static_cast<unsigned int>(sig.len())};
+ if (skip_digest_) {
+ SECItem dataItem = {siBuffer, toUcharPtr(data.data()),
+ static_cast<unsigned int>(data.len())};
+ rv = PK11_VerifyWithMechanism(pubKey.get(), mechanism_, parameters(),
+ &sigItem, &dataItem, nullptr);
+ EXPECT_EQ(rv, valid ? SECSuccess : SECFailure);
+ return;
+ }
+
+ DataBuffer hash;
/* RSA single shot requires encoding the hash before calling
* VerifyWithMechanism. We already check that mechanism
* with the VFY_ interface, so just do the combined hash/Verify
@@ -175,5 +183,4 @@ void Pk11SignatureTest::Verify(ScopedSECKEYPublicKey& pubKey,
<< "verify failed Error:" << PORT_ErrorToString(PORT_GetError()) << "\n";
PK11_DestroyContext(context, PR_TRUE);
}
-
} // namespace nss_test
diff --git a/security/nss/gtests/pk11_gtest/pk11_signature_test.h b/security/nss/gtests/pk11_gtest/pk11_signature_test.h
index c4a8c52c38..f00a588fff 100644
--- a/security/nss/gtests/pk11_gtest/pk11_signature_test.h
+++ b/security/nss/gtests/pk11_gtest/pk11_signature_test.h
@@ -11,7 +11,6 @@
#include "databuffer.h"
#include "gtest/gtest.h"
-
namespace nss_test {
// For test vectors.
@@ -28,6 +27,11 @@ class Pk11SignatureTest : public ::testing::Test {
CK_MECHANISM_TYPE combo)
: mechanism_(mech), hash_oid_(hash_oid), combo_(combo) {
skip_raw_ = false;
+ skip_digest_ = false;
+ }
+
+ Pk11SignatureTest(CK_MECHANISM_TYPE mech) : mechanism_(mech) {
+ skip_digest_ = true;
}
virtual const SECItem* parameters() const { return nullptr; }
@@ -54,10 +58,10 @@ class Pk11SignatureTest : public ::testing::Test {
return rv == SECSuccess;
}
- bool SignHashedData(ScopedSECKEYPrivateKey& privKey, const DataBuffer& hash,
- DataBuffer* sig);
- bool SignData(ScopedSECKEYPrivateKey& privKey, const DataBuffer& data,
- DataBuffer* sig);
+ bool SignRaw(ScopedSECKEYPrivateKey& privKey, const DataBuffer& hash,
+ DataBuffer* sig);
+ bool DigestAndSign(ScopedSECKEYPrivateKey& privKey, const DataBuffer& data,
+ DataBuffer* sig);
bool ImportPrivateKeyAndSignHashedData(const DataBuffer& pkcs8,
const DataBuffer& data,
DataBuffer* sig, DataBuffer* sig2);
@@ -96,6 +100,15 @@ class Pk11SignatureTest : public ::testing::Test {
Verify(params, sig2, true);
}
+ void SignAndVerifyRaw(const Pkcs11SignatureTestParams& params) {
+ ScopedSECKEYPrivateKey privKey(ImportPrivateKey(params.pkcs8_));
+ ASSERT_NE(privKey, nullptr);
+ DataBuffer sig;
+ SignRaw(privKey, params.data_, &sig);
+ EXPECT_EQ(sig, params.signature_);
+ Verify(params, sig, true);
+ }
+
// Importing a private key in PKCS#8 format and reexporting it should
// result in the same binary representation.
void ImportExport(const DataBuffer& k) {
@@ -110,6 +123,7 @@ class Pk11SignatureTest : public ::testing::Test {
SECOidTag hash_oid_;
CK_MECHANISM_TYPE combo_;
bool skip_raw_;
+ bool skip_digest_;
};
} // namespace nss_test