diff options
author | bleichen <bleichen@google.com> | 2023-03-13 06:41:53 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-03-13 06:42:31 -0700 |
commit | b2cc2fdbeb3cf802811da0082a9f8324dc334c3b (patch) | |
tree | cac5f3407c2ce5735748d28345be55fa75243e6e | |
parent | 813bb2c2a5bcfb51e23528cc9b66fac4a4ac19a3 (diff) | |
download | wycheproof-b2cc2fdbeb3cf802811da0082a9f8324dc334c3b.tar.gz |
Adding test vectors for PBE with BMPStrings.
RFC 7292 uses BMPStrings to encode passwords.
This encoding uses UTF-16 encoded strings with big-endian ordering
and a NULL terminator.
Adding a few more test vectors with invalid UTF-8 encoding.
NOKEYCHECK=True
PiperOrigin-RevId: 516194647
-rw-r--r-- | testvectors_v1/pbes2_hmacsha1_aes_128_test.json | 274 | ||||
-rw-r--r-- | testvectors_v1/pbes2_hmacsha1_aes_192_test.json | 274 | ||||
-rw-r--r-- | testvectors_v1/pbes2_hmacsha1_aes_256_test.json | 274 | ||||
-rw-r--r-- | testvectors_v1/pbes2_hmacsha224_aes_128_test.json | 274 | ||||
-rw-r--r-- | testvectors_v1/pbes2_hmacsha224_aes_192_test.json | 274 | ||||
-rw-r--r-- | testvectors_v1/pbes2_hmacsha224_aes_256_test.json | 274 | ||||
-rw-r--r-- | testvectors_v1/pbes2_hmacsha256_aes_128_test.json | 274 | ||||
-rw-r--r-- | testvectors_v1/pbes2_hmacsha256_aes_192_test.json | 274 | ||||
-rw-r--r-- | testvectors_v1/pbes2_hmacsha256_aes_256_test.json | 274 | ||||
-rw-r--r-- | testvectors_v1/pbes2_hmacsha384_aes_128_test.json | 274 | ||||
-rw-r--r-- | testvectors_v1/pbes2_hmacsha384_aes_192_test.json | 274 | ||||
-rw-r--r-- | testvectors_v1/pbes2_hmacsha384_aes_256_test.json | 274 | ||||
-rw-r--r-- | testvectors_v1/pbes2_hmacsha512_aes_128_test.json | 274 | ||||
-rw-r--r-- | testvectors_v1/pbes2_hmacsha512_aes_192_test.json | 274 | ||||
-rw-r--r-- | testvectors_v1/pbes2_hmacsha512_aes_256_test.json | 274 |
15 files changed, 3870 insertions, 240 deletions
diff --git a/testvectors_v1/pbes2_hmacsha1_aes_128_test.json b/testvectors_v1/pbes2_hmacsha1_aes_128_test.json index 662f0e9..a52773d 100644 --- a/testvectors_v1/pbes2_hmacsha1_aes_128_test.json +++ b/testvectors_v1/pbes2_hmacsha1_aes_128_test.json @@ -2,7 +2,7 @@ "algorithm" : "PbeWithHmacSha1AndAes_128", "schema" : "pbe_test_schema.json", "generatorVersion" : "0.9", - "numberOfTests" : 68, + "numberOfTests" : 84, "header" : [ "Test vector of type PbeTest are used for PBES1 or PBES2." ], @@ -11,6 +11,10 @@ "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password consisting of ASCII characters." }, + "BmpString" : { + "bugType" : "FUNCTIONALITY", + "description" : "The test vectors contains a password that is a valid BMPString as used in RFC 7292. This RFC uses big endian encoding and a null terminator." + }, "NonUtf8" : { "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password that is not a valid UTF-8 string." @@ -828,6 +832,186 @@ }, { "tcId" : 58, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "002d0000", + "salt" : "66a92292e6db2d9e", + "iterationCount" : 4096, + "iv" : "7911306933f1131299247a85b585bed8", + "msg" : "63219964fd79651fe1be8ad5e90f414c", + "ct" : "dd01fdce378777558f5f66dc423a91efafab047a08e247ba31f1ca2a8485045d", + "result" : "valid" + }, + { + "tcId" : 59, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "00470000", + "salt" : "88abb902385f0efc", + "iterationCount" : 4096, + "iv" : "109f2c7a8aacc98d0aa176b1b43f2ece", + "msg" : "34ce8c499c20714c34506b8e8b87b103d2", + "ct" : "f9034cf9e72d94916a3f0593a8f0ddb01b7c95c2b980f8a37211d63d67caf2b3", + "result" : "valid" + }, + { + "tcId" : 60, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "004400640042004d0064006d000100790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "dc3395e31374d53f993e136d6b5051ef53a958ef530453e1a37636c3075e1843", + "result" : "valid" + }, + { + "tcId" : 61, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007400760025002a0012005b005c00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "99e1e73a5dd49e0deba0633b391d3bd1e8a573a768b78f1dafd17cac02eed72f", + "result" : "valid" + }, + { + "tcId" : 62, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0023000d00510069001d0077002a0009001200010034004d00520070006100290000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "a5573a4a3c9d52ba722c8fe9cf4c70c06c09133a2cbe46fb69d163e4205021c3", + "result" : "valid" + }, + { + "tcId" : 63, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007300520057005c005600180030003c004b0050007c004f00020020002600390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "ac2cb5128d9760bb191a24b457419e35b590a2c139c0cb56569cd35213dc6c33", + "result" : "valid" + }, + { + "tcId" : 64, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "92ae0000", + "salt" : "6978583ea9c24c49", + "iterationCount" : 4096, + "iv" : "0192ad10599677f253e7dea587373553", + "msg" : "c06bcb3b5cd9c1317f5eb7ba50882530", + "ct" : "a97fb52651734d7c61762aca1fff6e59ec61e007682085f157808e536dc688aa", + "result" : "valid" + }, + { + "tcId" : 65, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "38a90000", + "salt" : "c217b8c980fe4698", + "iterationCount" : 4096, + "iv" : "890a0303475f07189a0fe14b4e509217", + "msg" : "1ea8b43513275537d021c0f75849c01840", + "ct" : "e8ce9a7662fd4663c63b7c533c98bf3baf77ede39d193a90812a9dd808aa5e36", + "result" : "valid" + }, + { + "tcId" : 66, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "4464c2cde4ed81790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "3f3fb94979594d4e1d97f0b02987fbb205d12b6e0550cc5c34a3717fe0a88f62", + "result" : "valid" + }, + { + "tcId" : 67, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f4f6a52a925b00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "32ce6a152fdd25d2f36570c905c525b8a489bce72ee8dfb41a561cc871eb2b0a", + "result" : "valid" + }, + { + "tcId" : 68, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "a38d51691d77aa891281b44d52f061a90000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "36f9ee8202d2436fa6bd4bde7d4ac223c4af532d73cd1d738530e8bfa4f087be", + "result" : "valid" + }, + { + "tcId" : 69, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f35257dc5698b0bccbd0fc4f02a026390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "d049547b61d499cdeddd35c38c588c135675771e706fecbbfc0b17badc5dfcd2", + "result" : "valid" + }, + { + "tcId" : 70, "comment" : "empty password", "flags" : [ "Printable" @@ -841,7 +1025,7 @@ "result" : "valid" }, { - "tcId" : 59, + "tcId" : 71, "comment" : "empty password", "flags" : [ "Printable" @@ -855,7 +1039,37 @@ "result" : "valid" }, { - "tcId" : 60, + "tcId" : 72, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "f488f026badc3624", + "iterationCount" : 4096, + "iv" : "2979c2a734e4cd5da5d9a7e69c3f8b8e", + "msg" : "d63088e9bf4e9105bc287f0ab6823af9", + "ct" : "288a57a00fe51003669965f2e5294581124652a565f3f95e5fd454ca6279830b", + "result" : "valid" + }, + { + "tcId" : 73, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "542ada9132800d2c", + "iterationCount" : 4096, + "iv" : "844635e540de3a85c02f2df9413ff911", + "msg" : "08dfdd58aa603d5fc4bdaa9cb24ce82bca", + "ct" : "2ddb971c0fee6640c8d9e9e603ee81c51cbce9e838d40a98095098105f7be380", + "result" : "valid" + }, + { + "tcId" : 74, "comment" : "long password", "flags" : [ "Printable" @@ -869,7 +1083,7 @@ "result" : "valid" }, { - "tcId" : 61, + "tcId" : 75, "comment" : "long password", "flags" : [ "Printable" @@ -883,7 +1097,7 @@ "result" : "valid" }, { - "tcId" : 62, + "tcId" : 76, "comment" : "long password", "flags" : [ "Printable" @@ -897,7 +1111,7 @@ "result" : "valid" }, { - "tcId" : 63, + "tcId" : 77, "comment" : "special case password", "flags" : [ "NonUtf8" @@ -911,8 +1125,22 @@ "result" : "valid" }, { - "tcId" : 64, - "comment" : "special case password", + "tcId" : 78, + "comment" : "special case: truncated UTF-8 string", + "flags" : [ + "NonUtf8" + ], + "password" : "c0", + "salt" : "e19e4f175a64d35a", + "iterationCount" : 4096, + "iv" : "7545745f8d0bfe38f024371e12008a5f", + "msg" : "9e21b64aeff5338eb9bc71b19ef8f8e7", + "ct" : "3f57aee83a71dabbe7f7f6dfb48dbc6ab9a573568a34f931d1e2d25ba111953f", + "result" : "valid" + }, + { + "tcId" : 79, + "comment" : "special case: invalid UTF-8 bytes", "flags" : [ "NonUtf8" ], @@ -925,8 +1153,8 @@ "result" : "valid" }, { - "tcId" : 65, - "comment" : "special case password", + "tcId" : 80, + "comment" : "special case: invalid 2 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -939,8 +1167,8 @@ "result" : "valid" }, { - "tcId" : 66, - "comment" : "special case password", + "tcId" : 81, + "comment" : "special case: invalid 3 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -953,8 +1181,8 @@ "result" : "valid" }, { - "tcId" : 67, - "comment" : "special case password", + "tcId" : 82, + "comment" : "special case: invalid UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -967,8 +1195,22 @@ "result" : "valid" }, { - "tcId" : 68, - "comment" : "special case password", + "tcId" : 83, + "comment" : "special case for UTF-16", + "flags" : [ + "NonUtf8" + ], + "password" : "dbdbdbdbdbdbdbdb", + "salt" : "ba21795fffb901bc", + "iterationCount" : 4096, + "iv" : "753675f249b8c153997a797116495204", + "msg" : "706c565ba28370ff433460cc9f8d845a", + "ct" : "092375312cbe8397b0bca894c8b04ef2a960ac933830f60a5a813691ade153d6", + "result" : "valid" + }, + { + "tcId" : 84, + "comment" : "special case: long all zero password", "flags" : [ "Ascii" ], diff --git a/testvectors_v1/pbes2_hmacsha1_aes_192_test.json b/testvectors_v1/pbes2_hmacsha1_aes_192_test.json index d74504c..8a6c73b 100644 --- a/testvectors_v1/pbes2_hmacsha1_aes_192_test.json +++ b/testvectors_v1/pbes2_hmacsha1_aes_192_test.json @@ -2,7 +2,7 @@ "algorithm" : "PbeWithHmacSha1AndAes_192", "schema" : "pbe_test_schema.json", "generatorVersion" : "0.9", - "numberOfTests" : 68, + "numberOfTests" : 84, "header" : [ "Test vector of type PbeTest are used for PBES1 or PBES2." ], @@ -11,6 +11,10 @@ "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password consisting of ASCII characters." }, + "BmpString" : { + "bugType" : "FUNCTIONALITY", + "description" : "The test vectors contains a password that is a valid BMPString as used in RFC 7292. This RFC uses big endian encoding and a null terminator." + }, "NonUtf8" : { "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password that is not a valid UTF-8 string." @@ -828,6 +832,186 @@ }, { "tcId" : 58, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "002d0000", + "salt" : "66a92292e6db2d9e", + "iterationCount" : 4096, + "iv" : "7911306933f1131299247a85b585bed8", + "msg" : "63219964fd79651fe1be8ad5e90f414c", + "ct" : "cf00ef2563595c10dc71505efffd7364aa4378ff8009595cbb2a8606f4e38955", + "result" : "valid" + }, + { + "tcId" : 59, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "00470000", + "salt" : "88abb902385f0efc", + "iterationCount" : 4096, + "iv" : "109f2c7a8aacc98d0aa176b1b43f2ece", + "msg" : "34ce8c499c20714c34506b8e8b87b103d2", + "ct" : "cc7fccb727c5cf234022529c14a65ae1a4d465ad36d02298c687dbe2ad1881c2", + "result" : "valid" + }, + { + "tcId" : 60, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "004400640042004d0064006d000100790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "6bc1911b5d4f494eaed472f0584c3ed12cd22bf890170c385f5428c29b37dbab", + "result" : "valid" + }, + { + "tcId" : 61, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007400760025002a0012005b005c00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "8821dea3780f1ac5251116450c8de8236addf1e133f1c140ed0f9008780d0176", + "result" : "valid" + }, + { + "tcId" : 62, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0023000d00510069001d0077002a0009001200010034004d00520070006100290000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "e38d195c0220f8399858a1d5f0ee0030493e1fb486989b50a1e229fed7c2f9ce", + "result" : "valid" + }, + { + "tcId" : 63, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007300520057005c005600180030003c004b0050007c004f00020020002600390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "791dc3b0d8f82b94416b7fa1435bf759ac3430b8881f8cd64fa706476e0d85d0", + "result" : "valid" + }, + { + "tcId" : 64, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "92ae0000", + "salt" : "6978583ea9c24c49", + "iterationCount" : 4096, + "iv" : "0192ad10599677f253e7dea587373553", + "msg" : "c06bcb3b5cd9c1317f5eb7ba50882530", + "ct" : "59a0140c4999aa394f84742d43f31bf155ae9c12c8324740b29d22d767fc5b8f", + "result" : "valid" + }, + { + "tcId" : 65, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "38a90000", + "salt" : "c217b8c980fe4698", + "iterationCount" : 4096, + "iv" : "890a0303475f07189a0fe14b4e509217", + "msg" : "1ea8b43513275537d021c0f75849c01840", + "ct" : "02e1af9053975f0ab31b8c1d947c524a2b6b3dc8eb0076375dc7fbd7cd217b43", + "result" : "valid" + }, + { + "tcId" : 66, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "4464c2cde4ed81790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "9e79057e0d5ce2a88f6a41c5dce1bc607af54c05fc2dcba9a051667bc1a8cb07", + "result" : "valid" + }, + { + "tcId" : 67, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f4f6a52a925b00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "48761607cd07cb4fb921acb2fd925016c64ef9bae01972f905f0d4f25d8cc072", + "result" : "valid" + }, + { + "tcId" : 68, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "a38d51691d77aa891281b44d52f061a90000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "6ffe7688a60abbba20042ec14cc449e5c6bb2c51ba215bf47ab3960331c8a483", + "result" : "valid" + }, + { + "tcId" : 69, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f35257dc5698b0bccbd0fc4f02a026390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "791a34c35cdabb8906d68fa8ec54d72a55484029bde0d5d5b2aaff004fc7366e", + "result" : "valid" + }, + { + "tcId" : 70, "comment" : "empty password", "flags" : [ "Printable" @@ -841,7 +1025,7 @@ "result" : "valid" }, { - "tcId" : 59, + "tcId" : 71, "comment" : "empty password", "flags" : [ "Printable" @@ -855,7 +1039,37 @@ "result" : "valid" }, { - "tcId" : 60, + "tcId" : 72, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "f488f026badc3624", + "iterationCount" : 4096, + "iv" : "2979c2a734e4cd5da5d9a7e69c3f8b8e", + "msg" : "d63088e9bf4e9105bc287f0ab6823af9", + "ct" : "6710d123043c8b8c9493272b99e39255ac3cbd3a02d34cfb92b34d9b4b9599f8", + "result" : "valid" + }, + { + "tcId" : 73, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "542ada9132800d2c", + "iterationCount" : 4096, + "iv" : "844635e540de3a85c02f2df9413ff911", + "msg" : "08dfdd58aa603d5fc4bdaa9cb24ce82bca", + "ct" : "77878e40251a87cc1e27514fc8cafa1cda82235d4fb8817595ab01a3ae1b03b6", + "result" : "valid" + }, + { + "tcId" : 74, "comment" : "long password", "flags" : [ "Printable" @@ -869,7 +1083,7 @@ "result" : "valid" }, { - "tcId" : 61, + "tcId" : 75, "comment" : "long password", "flags" : [ "Printable" @@ -883,7 +1097,7 @@ "result" : "valid" }, { - "tcId" : 62, + "tcId" : 76, "comment" : "long password", "flags" : [ "Printable" @@ -897,7 +1111,7 @@ "result" : "valid" }, { - "tcId" : 63, + "tcId" : 77, "comment" : "special case password", "flags" : [ "NonUtf8" @@ -911,8 +1125,22 @@ "result" : "valid" }, { - "tcId" : 64, - "comment" : "special case password", + "tcId" : 78, + "comment" : "special case: truncated UTF-8 string", + "flags" : [ + "NonUtf8" + ], + "password" : "c0", + "salt" : "e19e4f175a64d35a", + "iterationCount" : 4096, + "iv" : "7545745f8d0bfe38f024371e12008a5f", + "msg" : "9e21b64aeff5338eb9bc71b19ef8f8e7", + "ct" : "58f547a4e772b319928287e4e439d984d733b41c41025e21c65588893ea5d171", + "result" : "valid" + }, + { + "tcId" : 79, + "comment" : "special case: invalid UTF-8 bytes", "flags" : [ "NonUtf8" ], @@ -925,8 +1153,8 @@ "result" : "valid" }, { - "tcId" : 65, - "comment" : "special case password", + "tcId" : 80, + "comment" : "special case: invalid 2 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -939,8 +1167,8 @@ "result" : "valid" }, { - "tcId" : 66, - "comment" : "special case password", + "tcId" : 81, + "comment" : "special case: invalid 3 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -953,8 +1181,8 @@ "result" : "valid" }, { - "tcId" : 67, - "comment" : "special case password", + "tcId" : 82, + "comment" : "special case: invalid UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -967,8 +1195,22 @@ "result" : "valid" }, { - "tcId" : 68, - "comment" : "special case password", + "tcId" : 83, + "comment" : "special case for UTF-16", + "flags" : [ + "NonUtf8" + ], + "password" : "dbdbdbdbdbdbdbdb", + "salt" : "ba21795fffb901bc", + "iterationCount" : 4096, + "iv" : "753675f249b8c153997a797116495204", + "msg" : "706c565ba28370ff433460cc9f8d845a", + "ct" : "c60e72f13df800e435bfe6dcd965c4c1b27e1aad9a36603701f0db1493670415", + "result" : "valid" + }, + { + "tcId" : 84, + "comment" : "special case: long all zero password", "flags" : [ "Ascii" ], diff --git a/testvectors_v1/pbes2_hmacsha1_aes_256_test.json b/testvectors_v1/pbes2_hmacsha1_aes_256_test.json index 6bc046b..9e02e3e 100644 --- a/testvectors_v1/pbes2_hmacsha1_aes_256_test.json +++ b/testvectors_v1/pbes2_hmacsha1_aes_256_test.json @@ -2,7 +2,7 @@ "algorithm" : "PbeWithHmacSha1AndAes_256", "schema" : "pbe_test_schema.json", "generatorVersion" : "0.9", - "numberOfTests" : 68, + "numberOfTests" : 84, "header" : [ "Test vector of type PbeTest are used for PBES1 or PBES2." ], @@ -11,6 +11,10 @@ "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password consisting of ASCII characters." }, + "BmpString" : { + "bugType" : "FUNCTIONALITY", + "description" : "The test vectors contains a password that is a valid BMPString as used in RFC 7292. This RFC uses big endian encoding and a null terminator." + }, "NonUtf8" : { "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password that is not a valid UTF-8 string." @@ -828,6 +832,186 @@ }, { "tcId" : 58, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "002d0000", + "salt" : "66a92292e6db2d9e", + "iterationCount" : 4096, + "iv" : "7911306933f1131299247a85b585bed8", + "msg" : "63219964fd79651fe1be8ad5e90f414c", + "ct" : "e1dfec01bda37328ee7079b0f2fb207c6412d66452835958fbfc938c0b4388f3", + "result" : "valid" + }, + { + "tcId" : 59, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "00470000", + "salt" : "88abb902385f0efc", + "iterationCount" : 4096, + "iv" : "109f2c7a8aacc98d0aa176b1b43f2ece", + "msg" : "34ce8c499c20714c34506b8e8b87b103d2", + "ct" : "79b665b49812314699468ed611c2dc936903a0fc7c4f678fe87c8ead01bd9f02", + "result" : "valid" + }, + { + "tcId" : 60, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "004400640042004d0064006d000100790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "6e0994e79d512d4ece5adc3780e04b661c536d06c1ab4a2edeb155107cd7db79", + "result" : "valid" + }, + { + "tcId" : 61, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007400760025002a0012005b005c00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "5afa3b1bce4c730ab9fe1d74968ab6b6b1864a259e57d1cf249d00c39a113e52", + "result" : "valid" + }, + { + "tcId" : 62, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0023000d00510069001d0077002a0009001200010034004d00520070006100290000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "40f00ab03adf899988c4c9b51a6ca14fe5de7e3a081f4f5983748c0601cb32db", + "result" : "valid" + }, + { + "tcId" : 63, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007300520057005c005600180030003c004b0050007c004f00020020002600390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "857348a472322aa4073bba8833712932ee96f74edc986a0373eea8cb51e95e84", + "result" : "valid" + }, + { + "tcId" : 64, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "92ae0000", + "salt" : "6978583ea9c24c49", + "iterationCount" : 4096, + "iv" : "0192ad10599677f253e7dea587373553", + "msg" : "c06bcb3b5cd9c1317f5eb7ba50882530", + "ct" : "d662b0cd5f508c7426fd31c1143a1de494799f86203129ba637afca83e3e6da9", + "result" : "valid" + }, + { + "tcId" : 65, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "38a90000", + "salt" : "c217b8c980fe4698", + "iterationCount" : 4096, + "iv" : "890a0303475f07189a0fe14b4e509217", + "msg" : "1ea8b43513275537d021c0f75849c01840", + "ct" : "b99dc159d93b124e7b6ed30318441a850528b0f5479ded51774368162cc2e637", + "result" : "valid" + }, + { + "tcId" : 66, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "4464c2cde4ed81790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "f32a2e07c68836d88dadfdd00aa384f86df4cf04517af2ff0fd67f1eb5de7e5b", + "result" : "valid" + }, + { + "tcId" : 67, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f4f6a52a925b00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "98f0c5440715b6e8f9734c27ba6fc43bfb6abd9d3d96411af6abf937d49606d3", + "result" : "valid" + }, + { + "tcId" : 68, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "a38d51691d77aa891281b44d52f061a90000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "2aafb053042daa04a80681fba4537cedfd6f610c07bcc26cda4cdc55ddb07024", + "result" : "valid" + }, + { + "tcId" : 69, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f35257dc5698b0bccbd0fc4f02a026390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "0a138cfc74922af7a3a32381e7c1418d8e3c2cf8152bbcef63393ddf307742a6", + "result" : "valid" + }, + { + "tcId" : 70, "comment" : "empty password", "flags" : [ "Printable" @@ -841,7 +1025,7 @@ "result" : "valid" }, { - "tcId" : 59, + "tcId" : 71, "comment" : "empty password", "flags" : [ "Printable" @@ -855,7 +1039,37 @@ "result" : "valid" }, { - "tcId" : 60, + "tcId" : 72, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "f488f026badc3624", + "iterationCount" : 4096, + "iv" : "2979c2a734e4cd5da5d9a7e69c3f8b8e", + "msg" : "d63088e9bf4e9105bc287f0ab6823af9", + "ct" : "62244af96ce39afcd4033807e638b0934998003fda48884a5760536be637c67d", + "result" : "valid" + }, + { + "tcId" : 73, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "542ada9132800d2c", + "iterationCount" : 4096, + "iv" : "844635e540de3a85c02f2df9413ff911", + "msg" : "08dfdd58aa603d5fc4bdaa9cb24ce82bca", + "ct" : "9c3445b15a2c1c271ad34afeb2d0bc489121f8c784195625ad08013cbcb54f76", + "result" : "valid" + }, + { + "tcId" : 74, "comment" : "long password", "flags" : [ "Printable" @@ -869,7 +1083,7 @@ "result" : "valid" }, { - "tcId" : 61, + "tcId" : 75, "comment" : "long password", "flags" : [ "Printable" @@ -883,7 +1097,7 @@ "result" : "valid" }, { - "tcId" : 62, + "tcId" : 76, "comment" : "long password", "flags" : [ "Printable" @@ -897,7 +1111,7 @@ "result" : "valid" }, { - "tcId" : 63, + "tcId" : 77, "comment" : "special case password", "flags" : [ "NonUtf8" @@ -911,8 +1125,22 @@ "result" : "valid" }, { - "tcId" : 64, - "comment" : "special case password", + "tcId" : 78, + "comment" : "special case: truncated UTF-8 string", + "flags" : [ + "NonUtf8" + ], + "password" : "c0", + "salt" : "e19e4f175a64d35a", + "iterationCount" : 4096, + "iv" : "7545745f8d0bfe38f024371e12008a5f", + "msg" : "9e21b64aeff5338eb9bc71b19ef8f8e7", + "ct" : "cf2d0228b5c4f9ec86cb5c85c0fc74c33408a9aedcc4640da28473fb02fdc365", + "result" : "valid" + }, + { + "tcId" : 79, + "comment" : "special case: invalid UTF-8 bytes", "flags" : [ "NonUtf8" ], @@ -925,8 +1153,8 @@ "result" : "valid" }, { - "tcId" : 65, - "comment" : "special case password", + "tcId" : 80, + "comment" : "special case: invalid 2 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -939,8 +1167,8 @@ "result" : "valid" }, { - "tcId" : 66, - "comment" : "special case password", + "tcId" : 81, + "comment" : "special case: invalid 3 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -953,8 +1181,8 @@ "result" : "valid" }, { - "tcId" : 67, - "comment" : "special case password", + "tcId" : 82, + "comment" : "special case: invalid UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -967,8 +1195,22 @@ "result" : "valid" }, { - "tcId" : 68, - "comment" : "special case password", + "tcId" : 83, + "comment" : "special case for UTF-16", + "flags" : [ + "NonUtf8" + ], + "password" : "dbdbdbdbdbdbdbdb", + "salt" : "ba21795fffb901bc", + "iterationCount" : 4096, + "iv" : "753675f249b8c153997a797116495204", + "msg" : "706c565ba28370ff433460cc9f8d845a", + "ct" : "76ceea50daf6278c8ac352a50b6e422d098681bc1a866055ade03fcbfe47e224", + "result" : "valid" + }, + { + "tcId" : 84, + "comment" : "special case: long all zero password", "flags" : [ "Ascii" ], diff --git a/testvectors_v1/pbes2_hmacsha224_aes_128_test.json b/testvectors_v1/pbes2_hmacsha224_aes_128_test.json index 2944833..c26b1b3 100644 --- a/testvectors_v1/pbes2_hmacsha224_aes_128_test.json +++ b/testvectors_v1/pbes2_hmacsha224_aes_128_test.json @@ -2,7 +2,7 @@ "algorithm" : "PbeWithHmacSha224AndAes_128", "schema" : "pbe_test_schema.json", "generatorVersion" : "0.9", - "numberOfTests" : 68, + "numberOfTests" : 84, "header" : [ "Test vector of type PbeTest are used for PBES1 or PBES2." ], @@ -11,6 +11,10 @@ "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password consisting of ASCII characters." }, + "BmpString" : { + "bugType" : "FUNCTIONALITY", + "description" : "The test vectors contains a password that is a valid BMPString as used in RFC 7292. This RFC uses big endian encoding and a null terminator." + }, "NonUtf8" : { "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password that is not a valid UTF-8 string." @@ -828,6 +832,186 @@ }, { "tcId" : 58, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "002d0000", + "salt" : "66a92292e6db2d9e", + "iterationCount" : 4096, + "iv" : "7911306933f1131299247a85b585bed8", + "msg" : "63219964fd79651fe1be8ad5e90f414c", + "ct" : "f719fdd864e5c35853a110c8e1f4cdd394dd5825b83af102516be6149fd993b7", + "result" : "valid" + }, + { + "tcId" : 59, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "00470000", + "salt" : "88abb902385f0efc", + "iterationCount" : 4096, + "iv" : "109f2c7a8aacc98d0aa176b1b43f2ece", + "msg" : "34ce8c499c20714c34506b8e8b87b103d2", + "ct" : "ba312527b7ca3e14742cf9463b7c59577fa339564433b6a66230ba1b5f85a572", + "result" : "valid" + }, + { + "tcId" : 60, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "004400640042004d0064006d000100790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "cd39357d3db9f0d40f9edf7b9ea3611869611f75ab112d47f90f1f1fee690880", + "result" : "valid" + }, + { + "tcId" : 61, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007400760025002a0012005b005c00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "547d3e54433f9598477a97a4fc892769fbfee4318ede970b28cfa0e21b79caee", + "result" : "valid" + }, + { + "tcId" : 62, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0023000d00510069001d0077002a0009001200010034004d00520070006100290000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "dcafa543324725602e7f072d72f924659c4b8bedbc905b0003e10b7cc1e40672", + "result" : "valid" + }, + { + "tcId" : 63, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007300520057005c005600180030003c004b0050007c004f00020020002600390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "0be897800bae789830402c2b20e078973c6fc280b9012ceb1c9ff6ae29755e9e", + "result" : "valid" + }, + { + "tcId" : 64, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "92ae0000", + "salt" : "6978583ea9c24c49", + "iterationCount" : 4096, + "iv" : "0192ad10599677f253e7dea587373553", + "msg" : "c06bcb3b5cd9c1317f5eb7ba50882530", + "ct" : "d1bede717e5548a34ebc83114264aa982acbba3b8d5d50e85a962af04d517500", + "result" : "valid" + }, + { + "tcId" : 65, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "38a90000", + "salt" : "c217b8c980fe4698", + "iterationCount" : 4096, + "iv" : "890a0303475f07189a0fe14b4e509217", + "msg" : "1ea8b43513275537d021c0f75849c01840", + "ct" : "6620b9f55dde3aa95020c3cc177e0ab8d836d5dcbbc5b0897b1198f4a8dc6029", + "result" : "valid" + }, + { + "tcId" : 66, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "4464c2cde4ed81790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "250534be2da11159e48443af3952bd28324e05ff7942fc446666fa141beff0d6", + "result" : "valid" + }, + { + "tcId" : 67, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f4f6a52a925b00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "2f64f382e07288ad6517a571facfc25ba779bca1bfa433d114e2316b09c560a2", + "result" : "valid" + }, + { + "tcId" : 68, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "a38d51691d77aa891281b44d52f061a90000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "77be03e6b2ca102104cf62796e6fab4fe31c024d041964bcb84b3333e6d74a3b", + "result" : "valid" + }, + { + "tcId" : 69, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f35257dc5698b0bccbd0fc4f02a026390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "fe70312f41570f2a69cbbd550d6f4bf4f1e936ac630f835695c52546edcb1caf", + "result" : "valid" + }, + { + "tcId" : 70, "comment" : "empty password", "flags" : [ "Printable" @@ -841,7 +1025,7 @@ "result" : "valid" }, { - "tcId" : 59, + "tcId" : 71, "comment" : "empty password", "flags" : [ "Printable" @@ -855,7 +1039,37 @@ "result" : "valid" }, { - "tcId" : 60, + "tcId" : 72, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "f488f026badc3624", + "iterationCount" : 4096, + "iv" : "2979c2a734e4cd5da5d9a7e69c3f8b8e", + "msg" : "d63088e9bf4e9105bc287f0ab6823af9", + "ct" : "1bc035603302b785ab678e01180c7f0c2f0f6287e2b61606fd5ebe0e892e88de", + "result" : "valid" + }, + { + "tcId" : 73, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "542ada9132800d2c", + "iterationCount" : 4096, + "iv" : "844635e540de3a85c02f2df9413ff911", + "msg" : "08dfdd58aa603d5fc4bdaa9cb24ce82bca", + "ct" : "9d548d2f350aa3a91d5b5ba5d03503a7c76d468d9c37c6716839219c89e05b67", + "result" : "valid" + }, + { + "tcId" : 74, "comment" : "long password", "flags" : [ "Printable" @@ -869,7 +1083,7 @@ "result" : "valid" }, { - "tcId" : 61, + "tcId" : 75, "comment" : "long password", "flags" : [ "Printable" @@ -883,7 +1097,7 @@ "result" : "valid" }, { - "tcId" : 62, + "tcId" : 76, "comment" : "long password", "flags" : [ "Printable" @@ -897,7 +1111,7 @@ "result" : "valid" }, { - "tcId" : 63, + "tcId" : 77, "comment" : "special case password", "flags" : [ "NonUtf8" @@ -911,8 +1125,22 @@ "result" : "valid" }, { - "tcId" : 64, - "comment" : "special case password", + "tcId" : 78, + "comment" : "special case: truncated UTF-8 string", + "flags" : [ + "NonUtf8" + ], + "password" : "c0", + "salt" : "e19e4f175a64d35a", + "iterationCount" : 4096, + "iv" : "7545745f8d0bfe38f024371e12008a5f", + "msg" : "9e21b64aeff5338eb9bc71b19ef8f8e7", + "ct" : "d730b1cada62a7b215c24627faa03b5cc95685536d5d432597d8541f336aa740", + "result" : "valid" + }, + { + "tcId" : 79, + "comment" : "special case: invalid UTF-8 bytes", "flags" : [ "NonUtf8" ], @@ -925,8 +1153,8 @@ "result" : "valid" }, { - "tcId" : 65, - "comment" : "special case password", + "tcId" : 80, + "comment" : "special case: invalid 2 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -939,8 +1167,8 @@ "result" : "valid" }, { - "tcId" : 66, - "comment" : "special case password", + "tcId" : 81, + "comment" : "special case: invalid 3 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -953,8 +1181,8 @@ "result" : "valid" }, { - "tcId" : 67, - "comment" : "special case password", + "tcId" : 82, + "comment" : "special case: invalid UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -967,8 +1195,22 @@ "result" : "valid" }, { - "tcId" : 68, - "comment" : "special case password", + "tcId" : 83, + "comment" : "special case for UTF-16", + "flags" : [ + "NonUtf8" + ], + "password" : "dbdbdbdbdbdbdbdb", + "salt" : "ba21795fffb901bc", + "iterationCount" : 4096, + "iv" : "753675f249b8c153997a797116495204", + "msg" : "706c565ba28370ff433460cc9f8d845a", + "ct" : "ce0455e816767e80106349edb668db107974f81b0231171a45676489eecd3b93", + "result" : "valid" + }, + { + "tcId" : 84, + "comment" : "special case: long all zero password", "flags" : [ "Ascii" ], diff --git a/testvectors_v1/pbes2_hmacsha224_aes_192_test.json b/testvectors_v1/pbes2_hmacsha224_aes_192_test.json index ca4c391..212515d 100644 --- a/testvectors_v1/pbes2_hmacsha224_aes_192_test.json +++ b/testvectors_v1/pbes2_hmacsha224_aes_192_test.json @@ -2,7 +2,7 @@ "algorithm" : "PbeWithHmacSha224AndAes_192", "schema" : "pbe_test_schema.json", "generatorVersion" : "0.9", - "numberOfTests" : 68, + "numberOfTests" : 84, "header" : [ "Test vector of type PbeTest are used for PBES1 or PBES2." ], @@ -11,6 +11,10 @@ "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password consisting of ASCII characters." }, + "BmpString" : { + "bugType" : "FUNCTIONALITY", + "description" : "The test vectors contains a password that is a valid BMPString as used in RFC 7292. This RFC uses big endian encoding and a null terminator." + }, "NonUtf8" : { "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password that is not a valid UTF-8 string." @@ -828,6 +832,186 @@ }, { "tcId" : 58, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "002d0000", + "salt" : "66a92292e6db2d9e", + "iterationCount" : 4096, + "iv" : "7911306933f1131299247a85b585bed8", + "msg" : "63219964fd79651fe1be8ad5e90f414c", + "ct" : "17d9839119889a4a92e60b97dbbe9a5801340027f1f66ef8d54601017b587316", + "result" : "valid" + }, + { + "tcId" : 59, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "00470000", + "salt" : "88abb902385f0efc", + "iterationCount" : 4096, + "iv" : "109f2c7a8aacc98d0aa176b1b43f2ece", + "msg" : "34ce8c499c20714c34506b8e8b87b103d2", + "ct" : "76ce033eb259862ba27cb3e89b0c3e69021bb62bf311108f1a3fc5e25ee3bb3d", + "result" : "valid" + }, + { + "tcId" : 60, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "004400640042004d0064006d000100790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "3a1d0c45c8dfbf2f2a17b73031b425f6ddc353c0656620b66695643a2c56426e", + "result" : "valid" + }, + { + "tcId" : 61, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007400760025002a0012005b005c00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "3ab9e4e6684f07806e6c92359c46236911dd70abeb6b067bc22c10b3a57b8105", + "result" : "valid" + }, + { + "tcId" : 62, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0023000d00510069001d0077002a0009001200010034004d00520070006100290000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "1534d8c7bccac4f9155abd2cf22b42190bce696aba16ed717375c685ec963c3c", + "result" : "valid" + }, + { + "tcId" : 63, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007300520057005c005600180030003c004b0050007c004f00020020002600390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "512e3c7a54a5942968d80a710f1156dee004eeb5a5a6df0e11df7a76ec6e1059", + "result" : "valid" + }, + { + "tcId" : 64, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "92ae0000", + "salt" : "6978583ea9c24c49", + "iterationCount" : 4096, + "iv" : "0192ad10599677f253e7dea587373553", + "msg" : "c06bcb3b5cd9c1317f5eb7ba50882530", + "ct" : "38eb996ca2bc6305b09981d128230f13fd4a4b09ab8bbb235981df52fde532a5", + "result" : "valid" + }, + { + "tcId" : 65, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "38a90000", + "salt" : "c217b8c980fe4698", + "iterationCount" : 4096, + "iv" : "890a0303475f07189a0fe14b4e509217", + "msg" : "1ea8b43513275537d021c0f75849c01840", + "ct" : "3f1abbe35b43975a6850c1a65e7b752a8c13c6767ed06b00593c97e32bb8d831", + "result" : "valid" + }, + { + "tcId" : 66, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "4464c2cde4ed81790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "dcc56e511fec76e62942a14c5199e0570cd6ccc7c9452b442e89b2d5505b07bf", + "result" : "valid" + }, + { + "tcId" : 67, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f4f6a52a925b00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "340ca00e8c82ba7239b34b4753efba0e5a34d99eff19b6fb68b55c6cdf5eab31", + "result" : "valid" + }, + { + "tcId" : 68, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "a38d51691d77aa891281b44d52f061a90000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "8a6741b7f9b2ef2a5a974cac9de46bbf954a00e71b67f0532c7c911f3a3751ed", + "result" : "valid" + }, + { + "tcId" : 69, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f35257dc5698b0bccbd0fc4f02a026390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "e6aa48348551caf7a547dafa0a261a84af57dd42f98765c5420da233b51384f9", + "result" : "valid" + }, + { + "tcId" : 70, "comment" : "empty password", "flags" : [ "Printable" @@ -841,7 +1025,7 @@ "result" : "valid" }, { - "tcId" : 59, + "tcId" : 71, "comment" : "empty password", "flags" : [ "Printable" @@ -855,7 +1039,37 @@ "result" : "valid" }, { - "tcId" : 60, + "tcId" : 72, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "f488f026badc3624", + "iterationCount" : 4096, + "iv" : "2979c2a734e4cd5da5d9a7e69c3f8b8e", + "msg" : "d63088e9bf4e9105bc287f0ab6823af9", + "ct" : "f7679477bc1ba6f1c6c3144ad19f4c0393cdea6b777d44c3dbd678b67c2e06f7", + "result" : "valid" + }, + { + "tcId" : 73, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "542ada9132800d2c", + "iterationCount" : 4096, + "iv" : "844635e540de3a85c02f2df9413ff911", + "msg" : "08dfdd58aa603d5fc4bdaa9cb24ce82bca", + "ct" : "055f02f2e6ff350bf48ba4246679633b2a517670637354a9f228ed1483a9d12a", + "result" : "valid" + }, + { + "tcId" : 74, "comment" : "long password", "flags" : [ "Printable" @@ -869,7 +1083,7 @@ "result" : "valid" }, { - "tcId" : 61, + "tcId" : 75, "comment" : "long password", "flags" : [ "Printable" @@ -883,7 +1097,7 @@ "result" : "valid" }, { - "tcId" : 62, + "tcId" : 76, "comment" : "long password", "flags" : [ "Printable" @@ -897,7 +1111,7 @@ "result" : "valid" }, { - "tcId" : 63, + "tcId" : 77, "comment" : "special case password", "flags" : [ "NonUtf8" @@ -911,8 +1125,22 @@ "result" : "valid" }, { - "tcId" : 64, - "comment" : "special case password", + "tcId" : 78, + "comment" : "special case: truncated UTF-8 string", + "flags" : [ + "NonUtf8" + ], + "password" : "c0", + "salt" : "e19e4f175a64d35a", + "iterationCount" : 4096, + "iv" : "7545745f8d0bfe38f024371e12008a5f", + "msg" : "9e21b64aeff5338eb9bc71b19ef8f8e7", + "ct" : "0cf91934dce3396f6170a3a9d1034725f9018bc6d76b8359c1e1bf3d6a403338", + "result" : "valid" + }, + { + "tcId" : 79, + "comment" : "special case: invalid UTF-8 bytes", "flags" : [ "NonUtf8" ], @@ -925,8 +1153,8 @@ "result" : "valid" }, { - "tcId" : 65, - "comment" : "special case password", + "tcId" : 80, + "comment" : "special case: invalid 2 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -939,8 +1167,8 @@ "result" : "valid" }, { - "tcId" : 66, - "comment" : "special case password", + "tcId" : 81, + "comment" : "special case: invalid 3 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -953,8 +1181,8 @@ "result" : "valid" }, { - "tcId" : 67, - "comment" : "special case password", + "tcId" : 82, + "comment" : "special case: invalid UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -967,8 +1195,22 @@ "result" : "valid" }, { - "tcId" : 68, - "comment" : "special case password", + "tcId" : 83, + "comment" : "special case for UTF-16", + "flags" : [ + "NonUtf8" + ], + "password" : "dbdbdbdbdbdbdbdb", + "salt" : "ba21795fffb901bc", + "iterationCount" : 4096, + "iv" : "753675f249b8c153997a797116495204", + "msg" : "706c565ba28370ff433460cc9f8d845a", + "ct" : "aee4fe6f4920632b59feb9c2fe93d1c74a7a4f3e7cbdc1301ee434dbaa23ce03", + "result" : "valid" + }, + { + "tcId" : 84, + "comment" : "special case: long all zero password", "flags" : [ "Ascii" ], diff --git a/testvectors_v1/pbes2_hmacsha224_aes_256_test.json b/testvectors_v1/pbes2_hmacsha224_aes_256_test.json index 24addf2..4df09b5 100644 --- a/testvectors_v1/pbes2_hmacsha224_aes_256_test.json +++ b/testvectors_v1/pbes2_hmacsha224_aes_256_test.json @@ -2,7 +2,7 @@ "algorithm" : "PbeWithHmacSha224AndAes_256", "schema" : "pbe_test_schema.json", "generatorVersion" : "0.9", - "numberOfTests" : 68, + "numberOfTests" : 84, "header" : [ "Test vector of type PbeTest are used for PBES1 or PBES2." ], @@ -11,6 +11,10 @@ "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password consisting of ASCII characters." }, + "BmpString" : { + "bugType" : "FUNCTIONALITY", + "description" : "The test vectors contains a password that is a valid BMPString as used in RFC 7292. This RFC uses big endian encoding and a null terminator." + }, "NonUtf8" : { "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password that is not a valid UTF-8 string." @@ -828,6 +832,186 @@ }, { "tcId" : 58, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "002d0000", + "salt" : "66a92292e6db2d9e", + "iterationCount" : 4096, + "iv" : "7911306933f1131299247a85b585bed8", + "msg" : "63219964fd79651fe1be8ad5e90f414c", + "ct" : "5b99be6119d7bb8f57a4558e004c9c96f8ccf489c61b12afac429800fc26c96e", + "result" : "valid" + }, + { + "tcId" : 59, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "00470000", + "salt" : "88abb902385f0efc", + "iterationCount" : 4096, + "iv" : "109f2c7a8aacc98d0aa176b1b43f2ece", + "msg" : "34ce8c499c20714c34506b8e8b87b103d2", + "ct" : "407fbae7a478679774095c1b0e7f75757cf3913661fd77cd34438115bd868aeb", + "result" : "valid" + }, + { + "tcId" : 60, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "004400640042004d0064006d000100790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "802989aaf35ddb888c58e989af59f776a4207fd04af26e1da532839b1ad2e50a", + "result" : "valid" + }, + { + "tcId" : 61, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007400760025002a0012005b005c00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "3ffe8266f8d8dcbaff168688e35a28d81114744c7184ee8ab70c65d822b15147", + "result" : "valid" + }, + { + "tcId" : 62, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0023000d00510069001d0077002a0009001200010034004d00520070006100290000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "154ff256215e82ad90a68e33088c0af1b1672bcebe6c9dd0172810fb4bab9f7c", + "result" : "valid" + }, + { + "tcId" : 63, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007300520057005c005600180030003c004b0050007c004f00020020002600390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "02fd0c25bf6f0d17a7ec1962d196b5169f6ec5cfbb416753c4a51e554f26908a", + "result" : "valid" + }, + { + "tcId" : 64, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "92ae0000", + "salt" : "6978583ea9c24c49", + "iterationCount" : 4096, + "iv" : "0192ad10599677f253e7dea587373553", + "msg" : "c06bcb3b5cd9c1317f5eb7ba50882530", + "ct" : "d62342f6c453e70dd2c5e7aa1767cb9afe716e3b8aa6e6b874247db64c951db5", + "result" : "valid" + }, + { + "tcId" : 65, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "38a90000", + "salt" : "c217b8c980fe4698", + "iterationCount" : 4096, + "iv" : "890a0303475f07189a0fe14b4e509217", + "msg" : "1ea8b43513275537d021c0f75849c01840", + "ct" : "f67fe2794f9b3851d5cc17dd860d8bc4e1191ab709a309f0e95ecbbf0114b340", + "result" : "valid" + }, + { + "tcId" : 66, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "4464c2cde4ed81790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "dd7268acdcc7f3c793e495cf0d389ba71477050a9688cb5551c32daccd77b593", + "result" : "valid" + }, + { + "tcId" : 67, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f4f6a52a925b00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "017fe301c99448d2fe2a406c5ba5804548167b2d9b249596eb85093a64401ed7", + "result" : "valid" + }, + { + "tcId" : 68, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "a38d51691d77aa891281b44d52f061a90000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "cb73d793daf47bc1ee9923a60c1a99673accb4d99cdceb0614c72023ac3a6608", + "result" : "valid" + }, + { + "tcId" : 69, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f35257dc5698b0bccbd0fc4f02a026390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "b6e758634e74720b4e3488c852016b456b5fcbbaf376ebd302a3a7a1810fd09f", + "result" : "valid" + }, + { + "tcId" : 70, "comment" : "empty password", "flags" : [ "Printable" @@ -841,7 +1025,7 @@ "result" : "valid" }, { - "tcId" : 59, + "tcId" : 71, "comment" : "empty password", "flags" : [ "Printable" @@ -855,7 +1039,37 @@ "result" : "valid" }, { - "tcId" : 60, + "tcId" : 72, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "f488f026badc3624", + "iterationCount" : 4096, + "iv" : "2979c2a734e4cd5da5d9a7e69c3f8b8e", + "msg" : "d63088e9bf4e9105bc287f0ab6823af9", + "ct" : "207f606cf4e199447a8ae2ee882ed07ef38e390003120480e8e17e48435e151b", + "result" : "valid" + }, + { + "tcId" : 73, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "542ada9132800d2c", + "iterationCount" : 4096, + "iv" : "844635e540de3a85c02f2df9413ff911", + "msg" : "08dfdd58aa603d5fc4bdaa9cb24ce82bca", + "ct" : "2f3060f6bfbe4a0a1b8fb9246bbf30d35717363e0b3863d7cae560897172e2be", + "result" : "valid" + }, + { + "tcId" : 74, "comment" : "long password", "flags" : [ "Printable" @@ -869,7 +1083,7 @@ "result" : "valid" }, { - "tcId" : 61, + "tcId" : 75, "comment" : "long password", "flags" : [ "Printable" @@ -883,7 +1097,7 @@ "result" : "valid" }, { - "tcId" : 62, + "tcId" : 76, "comment" : "long password", "flags" : [ "Printable" @@ -897,7 +1111,7 @@ "result" : "valid" }, { - "tcId" : 63, + "tcId" : 77, "comment" : "special case password", "flags" : [ "NonUtf8" @@ -911,8 +1125,22 @@ "result" : "valid" }, { - "tcId" : 64, - "comment" : "special case password", + "tcId" : 78, + "comment" : "special case: truncated UTF-8 string", + "flags" : [ + "NonUtf8" + ], + "password" : "c0", + "salt" : "e19e4f175a64d35a", + "iterationCount" : 4096, + "iv" : "7545745f8d0bfe38f024371e12008a5f", + "msg" : "9e21b64aeff5338eb9bc71b19ef8f8e7", + "ct" : "3e943ffdc7122b7c585cd0292357fca21e472e7a992355f2d07bc097c1fb7813", + "result" : "valid" + }, + { + "tcId" : 79, + "comment" : "special case: invalid UTF-8 bytes", "flags" : [ "NonUtf8" ], @@ -925,8 +1153,8 @@ "result" : "valid" }, { - "tcId" : 65, - "comment" : "special case password", + "tcId" : 80, + "comment" : "special case: invalid 2 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -939,8 +1167,8 @@ "result" : "valid" }, { - "tcId" : 66, - "comment" : "special case password", + "tcId" : 81, + "comment" : "special case: invalid 3 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -953,8 +1181,8 @@ "result" : "valid" }, { - "tcId" : 67, - "comment" : "special case password", + "tcId" : 82, + "comment" : "special case: invalid UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -967,8 +1195,22 @@ "result" : "valid" }, { - "tcId" : 68, - "comment" : "special case password", + "tcId" : 83, + "comment" : "special case for UTF-16", + "flags" : [ + "NonUtf8" + ], + "password" : "dbdbdbdbdbdbdbdb", + "salt" : "ba21795fffb901bc", + "iterationCount" : 4096, + "iv" : "753675f249b8c153997a797116495204", + "msg" : "706c565ba28370ff433460cc9f8d845a", + "ct" : "d66e123ceeb1c5484defaf767240e5ff999227fb257dba3cef8b0011b4a36731", + "result" : "valid" + }, + { + "tcId" : 84, + "comment" : "special case: long all zero password", "flags" : [ "Ascii" ], diff --git a/testvectors_v1/pbes2_hmacsha256_aes_128_test.json b/testvectors_v1/pbes2_hmacsha256_aes_128_test.json index d045301..ed67772 100644 --- a/testvectors_v1/pbes2_hmacsha256_aes_128_test.json +++ b/testvectors_v1/pbes2_hmacsha256_aes_128_test.json @@ -2,7 +2,7 @@ "algorithm" : "PbeWithHmacSha256AndAes_128", "schema" : "pbe_test_schema.json", "generatorVersion" : "0.9", - "numberOfTests" : 68, + "numberOfTests" : 84, "header" : [ "Test vector of type PbeTest are used for PBES1 or PBES2." ], @@ -11,6 +11,10 @@ "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password consisting of ASCII characters." }, + "BmpString" : { + "bugType" : "FUNCTIONALITY", + "description" : "The test vectors contains a password that is a valid BMPString as used in RFC 7292. This RFC uses big endian encoding and a null terminator." + }, "NonUtf8" : { "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password that is not a valid UTF-8 string." @@ -828,6 +832,186 @@ }, { "tcId" : 58, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "002d0000", + "salt" : "66a92292e6db2d9e", + "iterationCount" : 4096, + "iv" : "7911306933f1131299247a85b585bed8", + "msg" : "63219964fd79651fe1be8ad5e90f414c", + "ct" : "cccf3ba42cb9521cea83e7e22b5f9b756868d4a1b5b3f0f6a7ba2b74826898c8", + "result" : "valid" + }, + { + "tcId" : 59, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "00470000", + "salt" : "88abb902385f0efc", + "iterationCount" : 4096, + "iv" : "109f2c7a8aacc98d0aa176b1b43f2ece", + "msg" : "34ce8c499c20714c34506b8e8b87b103d2", + "ct" : "af5099b76f9df55f00c163b8f1ff758b125a6a8053787a6d1ca7bb4d974ba487", + "result" : "valid" + }, + { + "tcId" : 60, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "004400640042004d0064006d000100790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "927e4452ccab0219a12f2cf13c408335e42c8d76d67db2d1ef241092607c3f68", + "result" : "valid" + }, + { + "tcId" : 61, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007400760025002a0012005b005c00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "3d5715a06c4fe38c7553f8dd5563895abe4082226a15e718ac021b7c3fa27f11", + "result" : "valid" + }, + { + "tcId" : 62, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0023000d00510069001d0077002a0009001200010034004d00520070006100290000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "28111e433f5977c0a114d3ccddca9953aa35cf55982b91e086ea18601500408a", + "result" : "valid" + }, + { + "tcId" : 63, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007300520057005c005600180030003c004b0050007c004f00020020002600390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "d77a5cee1925a7b4662b190d4ce3e056867df4cbffc92b940439824314a72e34", + "result" : "valid" + }, + { + "tcId" : 64, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "92ae0000", + "salt" : "6978583ea9c24c49", + "iterationCount" : 4096, + "iv" : "0192ad10599677f253e7dea587373553", + "msg" : "c06bcb3b5cd9c1317f5eb7ba50882530", + "ct" : "ceeeb7dd0cdc1bfcfab0f8ce5653a3c7010ca49a726f7849d5311ea601978913", + "result" : "valid" + }, + { + "tcId" : 65, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "38a90000", + "salt" : "c217b8c980fe4698", + "iterationCount" : 4096, + "iv" : "890a0303475f07189a0fe14b4e509217", + "msg" : "1ea8b43513275537d021c0f75849c01840", + "ct" : "5f74e55388d75672f0130aa6035bce1cc36e7a2b6ca57bc29044eacde2f4d751", + "result" : "valid" + }, + { + "tcId" : 66, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "4464c2cde4ed81790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "8df185eb9062623927da2f983f60406b850b3130fb208e5f641221e228301add", + "result" : "valid" + }, + { + "tcId" : 67, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f4f6a52a925b00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "1e834ab0ace5b25f5e497dc92975f9f5021d4ed7663b23ffc15e13513597f3b7", + "result" : "valid" + }, + { + "tcId" : 68, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "a38d51691d77aa891281b44d52f061a90000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "04605d7b233eab9be7195d9bbff72eae6faf19e8e29fd7cb6d0194e9b76d0892", + "result" : "valid" + }, + { + "tcId" : 69, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f35257dc5698b0bccbd0fc4f02a026390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "d5d30e35937806bfc23de227c36e36f69b8d979b512f30ee8e797fbefa66f044", + "result" : "valid" + }, + { + "tcId" : 70, "comment" : "empty password", "flags" : [ "Printable" @@ -841,7 +1025,7 @@ "result" : "valid" }, { - "tcId" : 59, + "tcId" : 71, "comment" : "empty password", "flags" : [ "Printable" @@ -855,7 +1039,37 @@ "result" : "valid" }, { - "tcId" : 60, + "tcId" : 72, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "f488f026badc3624", + "iterationCount" : 4096, + "iv" : "2979c2a734e4cd5da5d9a7e69c3f8b8e", + "msg" : "d63088e9bf4e9105bc287f0ab6823af9", + "ct" : "ecd7411c719e0d03900e22d7c355984a29c1fa31cce28e764dd51cbdefdb5432", + "result" : "valid" + }, + { + "tcId" : 73, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "542ada9132800d2c", + "iterationCount" : 4096, + "iv" : "844635e540de3a85c02f2df9413ff911", + "msg" : "08dfdd58aa603d5fc4bdaa9cb24ce82bca", + "ct" : "ca8e3a6330f8d4b030660ba9cdc6e6bff0ad905edd2ea1c858b6ae4069779214", + "result" : "valid" + }, + { + "tcId" : 74, "comment" : "long password", "flags" : [ "Printable" @@ -869,7 +1083,7 @@ "result" : "valid" }, { - "tcId" : 61, + "tcId" : 75, "comment" : "long password", "flags" : [ "Printable" @@ -883,7 +1097,7 @@ "result" : "valid" }, { - "tcId" : 62, + "tcId" : 76, "comment" : "long password", "flags" : [ "Printable" @@ -897,7 +1111,7 @@ "result" : "valid" }, { - "tcId" : 63, + "tcId" : 77, "comment" : "special case password", "flags" : [ "NonUtf8" @@ -911,8 +1125,22 @@ "result" : "valid" }, { - "tcId" : 64, - "comment" : "special case password", + "tcId" : 78, + "comment" : "special case: truncated UTF-8 string", + "flags" : [ + "NonUtf8" + ], + "password" : "c0", + "salt" : "e19e4f175a64d35a", + "iterationCount" : 4096, + "iv" : "7545745f8d0bfe38f024371e12008a5f", + "msg" : "9e21b64aeff5338eb9bc71b19ef8f8e7", + "ct" : "0db6ab6fe3aadcb6c8553becdbf4283472c4121adadf11fea4c18512846748c6", + "result" : "valid" + }, + { + "tcId" : 79, + "comment" : "special case: invalid UTF-8 bytes", "flags" : [ "NonUtf8" ], @@ -925,8 +1153,8 @@ "result" : "valid" }, { - "tcId" : 65, - "comment" : "special case password", + "tcId" : 80, + "comment" : "special case: invalid 2 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -939,8 +1167,8 @@ "result" : "valid" }, { - "tcId" : 66, - "comment" : "special case password", + "tcId" : 81, + "comment" : "special case: invalid 3 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -953,8 +1181,8 @@ "result" : "valid" }, { - "tcId" : 67, - "comment" : "special case password", + "tcId" : 82, + "comment" : "special case: invalid UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -967,8 +1195,22 @@ "result" : "valid" }, { - "tcId" : 68, - "comment" : "special case password", + "tcId" : 83, + "comment" : "special case for UTF-16", + "flags" : [ + "NonUtf8" + ], + "password" : "dbdbdbdbdbdbdbdb", + "salt" : "ba21795fffb901bc", + "iterationCount" : 4096, + "iv" : "753675f249b8c153997a797116495204", + "msg" : "706c565ba28370ff433460cc9f8d845a", + "ct" : "3463229fa3acd945e66a6fc4be055067eabb54e613c8828a570025ea814b106d", + "result" : "valid" + }, + { + "tcId" : 84, + "comment" : "special case: long all zero password", "flags" : [ "Ascii" ], diff --git a/testvectors_v1/pbes2_hmacsha256_aes_192_test.json b/testvectors_v1/pbes2_hmacsha256_aes_192_test.json index b1d0468..2deea71 100644 --- a/testvectors_v1/pbes2_hmacsha256_aes_192_test.json +++ b/testvectors_v1/pbes2_hmacsha256_aes_192_test.json @@ -2,7 +2,7 @@ "algorithm" : "PbeWithHmacSha256AndAes_192", "schema" : "pbe_test_schema.json", "generatorVersion" : "0.9", - "numberOfTests" : 68, + "numberOfTests" : 84, "header" : [ "Test vector of type PbeTest are used for PBES1 or PBES2." ], @@ -11,6 +11,10 @@ "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password consisting of ASCII characters." }, + "BmpString" : { + "bugType" : "FUNCTIONALITY", + "description" : "The test vectors contains a password that is a valid BMPString as used in RFC 7292. This RFC uses big endian encoding and a null terminator." + }, "NonUtf8" : { "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password that is not a valid UTF-8 string." @@ -828,6 +832,186 @@ }, { "tcId" : 58, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "002d0000", + "salt" : "66a92292e6db2d9e", + "iterationCount" : 4096, + "iv" : "7911306933f1131299247a85b585bed8", + "msg" : "63219964fd79651fe1be8ad5e90f414c", + "ct" : "b9ab9dc17afbddb8399d8b521dd52408fb2892718bb7457b1a9d44fcd407fbc7", + "result" : "valid" + }, + { + "tcId" : 59, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "00470000", + "salt" : "88abb902385f0efc", + "iterationCount" : 4096, + "iv" : "109f2c7a8aacc98d0aa176b1b43f2ece", + "msg" : "34ce8c499c20714c34506b8e8b87b103d2", + "ct" : "1ba92fccbd84a249ccbd6066a69a8e833bab7a03b5d4d71a5caba46a0b92186e", + "result" : "valid" + }, + { + "tcId" : 60, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "004400640042004d0064006d000100790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "655453e8af3a0c4c797445219c5f3656fd8fff51bedffaad06efd01ab90ceaed", + "result" : "valid" + }, + { + "tcId" : 61, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007400760025002a0012005b005c00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "95e5e7043203a6a365949100450ba1a96223c2aaf0901d147c9263ce556a030a", + "result" : "valid" + }, + { + "tcId" : 62, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0023000d00510069001d0077002a0009001200010034004d00520070006100290000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "0de9ff7ff9a061b486889a0ddef2535ab57400f24fec8a018894aa22a7524793", + "result" : "valid" + }, + { + "tcId" : 63, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007300520057005c005600180030003c004b0050007c004f00020020002600390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "5b06181d8cd890753a5e85a8558296f55c93d5476aacf46e2b1cf8edbdb5dce4", + "result" : "valid" + }, + { + "tcId" : 64, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "92ae0000", + "salt" : "6978583ea9c24c49", + "iterationCount" : 4096, + "iv" : "0192ad10599677f253e7dea587373553", + "msg" : "c06bcb3b5cd9c1317f5eb7ba50882530", + "ct" : "6009ab44e15a5402788c6dc9e3757fb3f01aa358220f82f6402798af1aed3cea", + "result" : "valid" + }, + { + "tcId" : 65, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "38a90000", + "salt" : "c217b8c980fe4698", + "iterationCount" : 4096, + "iv" : "890a0303475f07189a0fe14b4e509217", + "msg" : "1ea8b43513275537d021c0f75849c01840", + "ct" : "593e495f9b975920b8c269b6df7052e4f2c455b4a6d8a3055fdbbf703725de6b", + "result" : "valid" + }, + { + "tcId" : 66, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "4464c2cde4ed81790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "7e341afed0a7457dbf003697b57b7b0436ae5bb310f0f230463451b61cb36620", + "result" : "valid" + }, + { + "tcId" : 67, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f4f6a52a925b00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "8c18dff6d16379721bce7ba23aa5c5d5e2d262a8782808c4101e87847ecb51cf", + "result" : "valid" + }, + { + "tcId" : 68, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "a38d51691d77aa891281b44d52f061a90000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "5c48870cc9a3ee037e90a2b2ca8c0b4e74ea6751547f1d4265f578d5a1257a33", + "result" : "valid" + }, + { + "tcId" : 69, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f35257dc5698b0bccbd0fc4f02a026390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "a6fd67ce9f0eef4bf2075fa6064d87e5e8bb2175f0f48d96ffac7a200f558c56", + "result" : "valid" + }, + { + "tcId" : 70, "comment" : "empty password", "flags" : [ "Printable" @@ -841,7 +1025,7 @@ "result" : "valid" }, { - "tcId" : 59, + "tcId" : 71, "comment" : "empty password", "flags" : [ "Printable" @@ -855,7 +1039,37 @@ "result" : "valid" }, { - "tcId" : 60, + "tcId" : 72, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "f488f026badc3624", + "iterationCount" : 4096, + "iv" : "2979c2a734e4cd5da5d9a7e69c3f8b8e", + "msg" : "d63088e9bf4e9105bc287f0ab6823af9", + "ct" : "4c79c59bfb7ba872d912f03f6ba6b4ad70a77f90d6b228aa1f8d12b61a48fc3f", + "result" : "valid" + }, + { + "tcId" : 73, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "542ada9132800d2c", + "iterationCount" : 4096, + "iv" : "844635e540de3a85c02f2df9413ff911", + "msg" : "08dfdd58aa603d5fc4bdaa9cb24ce82bca", + "ct" : "c4cde3772b66700a48a28ca36fd2331faaac67ba4020ae945127e0e9a14cca44", + "result" : "valid" + }, + { + "tcId" : 74, "comment" : "long password", "flags" : [ "Printable" @@ -869,7 +1083,7 @@ "result" : "valid" }, { - "tcId" : 61, + "tcId" : 75, "comment" : "long password", "flags" : [ "Printable" @@ -883,7 +1097,7 @@ "result" : "valid" }, { - "tcId" : 62, + "tcId" : 76, "comment" : "long password", "flags" : [ "Printable" @@ -897,7 +1111,7 @@ "result" : "valid" }, { - "tcId" : 63, + "tcId" : 77, "comment" : "special case password", "flags" : [ "NonUtf8" @@ -911,8 +1125,22 @@ "result" : "valid" }, { - "tcId" : 64, - "comment" : "special case password", + "tcId" : 78, + "comment" : "special case: truncated UTF-8 string", + "flags" : [ + "NonUtf8" + ], + "password" : "c0", + "salt" : "e19e4f175a64d35a", + "iterationCount" : 4096, + "iv" : "7545745f8d0bfe38f024371e12008a5f", + "msg" : "9e21b64aeff5338eb9bc71b19ef8f8e7", + "ct" : "226acdd8ad6ae50420b331f6617da5442fc264fdffe5d4dc33281e98bf77f47e", + "result" : "valid" + }, + { + "tcId" : 79, + "comment" : "special case: invalid UTF-8 bytes", "flags" : [ "NonUtf8" ], @@ -925,8 +1153,8 @@ "result" : "valid" }, { - "tcId" : 65, - "comment" : "special case password", + "tcId" : 80, + "comment" : "special case: invalid 2 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -939,8 +1167,8 @@ "result" : "valid" }, { - "tcId" : 66, - "comment" : "special case password", + "tcId" : 81, + "comment" : "special case: invalid 3 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -953,8 +1181,8 @@ "result" : "valid" }, { - "tcId" : 67, - "comment" : "special case password", + "tcId" : 82, + "comment" : "special case: invalid UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -967,8 +1195,22 @@ "result" : "valid" }, { - "tcId" : 68, - "comment" : "special case password", + "tcId" : 83, + "comment" : "special case for UTF-16", + "flags" : [ + "NonUtf8" + ], + "password" : "dbdbdbdbdbdbdbdb", + "salt" : "ba21795fffb901bc", + "iterationCount" : 4096, + "iv" : "753675f249b8c153997a797116495204", + "msg" : "706c565ba28370ff433460cc9f8d845a", + "ct" : "62d03f19f80f559158149c81ece282b9f35031ca7aff5b344d5ff088fd941e94", + "result" : "valid" + }, + { + "tcId" : 84, + "comment" : "special case: long all zero password", "flags" : [ "Ascii" ], diff --git a/testvectors_v1/pbes2_hmacsha256_aes_256_test.json b/testvectors_v1/pbes2_hmacsha256_aes_256_test.json index 57bc014..546e153 100644 --- a/testvectors_v1/pbes2_hmacsha256_aes_256_test.json +++ b/testvectors_v1/pbes2_hmacsha256_aes_256_test.json @@ -2,7 +2,7 @@ "algorithm" : "PbeWithHmacSha256AndAes_256", "schema" : "pbe_test_schema.json", "generatorVersion" : "0.9", - "numberOfTests" : 68, + "numberOfTests" : 84, "header" : [ "Test vector of type PbeTest are used for PBES1 or PBES2." ], @@ -11,6 +11,10 @@ "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password consisting of ASCII characters." }, + "BmpString" : { + "bugType" : "FUNCTIONALITY", + "description" : "The test vectors contains a password that is a valid BMPString as used in RFC 7292. This RFC uses big endian encoding and a null terminator." + }, "NonUtf8" : { "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password that is not a valid UTF-8 string." @@ -828,6 +832,186 @@ }, { "tcId" : 58, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "002d0000", + "salt" : "66a92292e6db2d9e", + "iterationCount" : 4096, + "iv" : "7911306933f1131299247a85b585bed8", + "msg" : "63219964fd79651fe1be8ad5e90f414c", + "ct" : "de450ec9d21386ea991ef2feace402741b77008659a197f7fbf8b93d61b5c83e", + "result" : "valid" + }, + { + "tcId" : 59, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "00470000", + "salt" : "88abb902385f0efc", + "iterationCount" : 4096, + "iv" : "109f2c7a8aacc98d0aa176b1b43f2ece", + "msg" : "34ce8c499c20714c34506b8e8b87b103d2", + "ct" : "2c557710758eda61f49d27c43c416d5a7b95e1dee715c45e4486e25ee755c47e", + "result" : "valid" + }, + { + "tcId" : 60, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "004400640042004d0064006d000100790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "5e2760564bfbba4a062cb0a6eed3d05cca3e3299b591e9a25673c30fc76de5c0", + "result" : "valid" + }, + { + "tcId" : 61, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007400760025002a0012005b005c00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "228b0b001cba73e8890e632283fb6a8f2ec02c957649d2c9233d71da4c561959", + "result" : "valid" + }, + { + "tcId" : 62, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0023000d00510069001d0077002a0009001200010034004d00520070006100290000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "bdd7e8873f29192ac7a37be8e72d74c81967d776c1441b7fe5bcbd7c9e165076", + "result" : "valid" + }, + { + "tcId" : 63, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007300520057005c005600180030003c004b0050007c004f00020020002600390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "f1635822eb7fbb5497837ed82db858fd8f40a7930a8cce8b20d87058af016da1", + "result" : "valid" + }, + { + "tcId" : 64, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "92ae0000", + "salt" : "6978583ea9c24c49", + "iterationCount" : 4096, + "iv" : "0192ad10599677f253e7dea587373553", + "msg" : "c06bcb3b5cd9c1317f5eb7ba50882530", + "ct" : "be6df7b6bdc7e6a183a6d98f642107018099b89ccc7a484444ea0e502e6006fd", + "result" : "valid" + }, + { + "tcId" : 65, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "38a90000", + "salt" : "c217b8c980fe4698", + "iterationCount" : 4096, + "iv" : "890a0303475f07189a0fe14b4e509217", + "msg" : "1ea8b43513275537d021c0f75849c01840", + "ct" : "de844f8e9423c681c7d17e7545a2670f3e4008ec319e211940c34d74c94ab599", + "result" : "valid" + }, + { + "tcId" : 66, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "4464c2cde4ed81790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "87100410e4153f3fa6cd600e44f410156f0d87b1b85e98a18270f6c9197c388c", + "result" : "valid" + }, + { + "tcId" : 67, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f4f6a52a925b00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "277aa92ddc247b3422ddc443357c1df01ad6fc7808f92df206a12042bf3943ab", + "result" : "valid" + }, + { + "tcId" : 68, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "a38d51691d77aa891281b44d52f061a90000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "4d97d3a58346a81dc25625d546f78d5caf24bdc59346c42a20dc37a63465c9a9", + "result" : "valid" + }, + { + "tcId" : 69, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f35257dc5698b0bccbd0fc4f02a026390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "4a16b15f44a9e3c3460915fa82861c3949496a3db81242e062229c46970f892b", + "result" : "valid" + }, + { + "tcId" : 70, "comment" : "empty password", "flags" : [ "Printable" @@ -841,7 +1025,7 @@ "result" : "valid" }, { - "tcId" : 59, + "tcId" : 71, "comment" : "empty password", "flags" : [ "Printable" @@ -855,7 +1039,37 @@ "result" : "valid" }, { - "tcId" : 60, + "tcId" : 72, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "f488f026badc3624", + "iterationCount" : 4096, + "iv" : "2979c2a734e4cd5da5d9a7e69c3f8b8e", + "msg" : "d63088e9bf4e9105bc287f0ab6823af9", + "ct" : "b64b1d37859b69d9e9a72600bfadd2ae645bfdf2abb74665e075825222386c21", + "result" : "valid" + }, + { + "tcId" : 73, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "542ada9132800d2c", + "iterationCount" : 4096, + "iv" : "844635e540de3a85c02f2df9413ff911", + "msg" : "08dfdd58aa603d5fc4bdaa9cb24ce82bca", + "ct" : "8619618f5d1a8e8d183388a8d6db75f844d29843bb7d20b3edada2f1c7beee96", + "result" : "valid" + }, + { + "tcId" : 74, "comment" : "long password", "flags" : [ "Printable" @@ -869,7 +1083,7 @@ "result" : "valid" }, { - "tcId" : 61, + "tcId" : 75, "comment" : "long password", "flags" : [ "Printable" @@ -883,7 +1097,7 @@ "result" : "valid" }, { - "tcId" : 62, + "tcId" : 76, "comment" : "long password", "flags" : [ "Printable" @@ -897,7 +1111,7 @@ "result" : "valid" }, { - "tcId" : 63, + "tcId" : 77, "comment" : "special case password", "flags" : [ "NonUtf8" @@ -911,8 +1125,22 @@ "result" : "valid" }, { - "tcId" : 64, - "comment" : "special case password", + "tcId" : 78, + "comment" : "special case: truncated UTF-8 string", + "flags" : [ + "NonUtf8" + ], + "password" : "c0", + "salt" : "e19e4f175a64d35a", + "iterationCount" : 4096, + "iv" : "7545745f8d0bfe38f024371e12008a5f", + "msg" : "9e21b64aeff5338eb9bc71b19ef8f8e7", + "ct" : "2f5d473677a005e556ee918f0647c0d713bac24d7b5fd9a5b69c8ca30ab00789", + "result" : "valid" + }, + { + "tcId" : 79, + "comment" : "special case: invalid UTF-8 bytes", "flags" : [ "NonUtf8" ], @@ -925,8 +1153,8 @@ "result" : "valid" }, { - "tcId" : 65, - "comment" : "special case password", + "tcId" : 80, + "comment" : "special case: invalid 2 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -939,8 +1167,8 @@ "result" : "valid" }, { - "tcId" : 66, - "comment" : "special case password", + "tcId" : 81, + "comment" : "special case: invalid 3 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -953,8 +1181,8 @@ "result" : "valid" }, { - "tcId" : 67, - "comment" : "special case password", + "tcId" : 82, + "comment" : "special case: invalid UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -967,8 +1195,22 @@ "result" : "valid" }, { - "tcId" : 68, - "comment" : "special case password", + "tcId" : 83, + "comment" : "special case for UTF-16", + "flags" : [ + "NonUtf8" + ], + "password" : "dbdbdbdbdbdbdbdb", + "salt" : "ba21795fffb901bc", + "iterationCount" : 4096, + "iv" : "753675f249b8c153997a797116495204", + "msg" : "706c565ba28370ff433460cc9f8d845a", + "ct" : "1b30f1fcf268eefa0e52e009e92dd6dcc13f840138285176f8707ee8380bf456", + "result" : "valid" + }, + { + "tcId" : 84, + "comment" : "special case: long all zero password", "flags" : [ "Ascii" ], diff --git a/testvectors_v1/pbes2_hmacsha384_aes_128_test.json b/testvectors_v1/pbes2_hmacsha384_aes_128_test.json index eff2f1c..f10d1b8 100644 --- a/testvectors_v1/pbes2_hmacsha384_aes_128_test.json +++ b/testvectors_v1/pbes2_hmacsha384_aes_128_test.json @@ -2,7 +2,7 @@ "algorithm" : "PbeWithHmacSha384AndAes_128", "schema" : "pbe_test_schema.json", "generatorVersion" : "0.9", - "numberOfTests" : 68, + "numberOfTests" : 84, "header" : [ "Test vector of type PbeTest are used for PBES1 or PBES2." ], @@ -11,6 +11,10 @@ "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password consisting of ASCII characters." }, + "BmpString" : { + "bugType" : "FUNCTIONALITY", + "description" : "The test vectors contains a password that is a valid BMPString as used in RFC 7292. This RFC uses big endian encoding and a null terminator." + }, "NonUtf8" : { "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password that is not a valid UTF-8 string." @@ -828,6 +832,186 @@ }, { "tcId" : 58, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "002d0000", + "salt" : "66a92292e6db2d9e", + "iterationCount" : 4096, + "iv" : "7911306933f1131299247a85b585bed8", + "msg" : "63219964fd79651fe1be8ad5e90f414c", + "ct" : "dc19f2c70f74a2f351e3e3621efc6db189aa8832625cd19387c4f94cc3065327", + "result" : "valid" + }, + { + "tcId" : 59, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "00470000", + "salt" : "88abb902385f0efc", + "iterationCount" : 4096, + "iv" : "109f2c7a8aacc98d0aa176b1b43f2ece", + "msg" : "34ce8c499c20714c34506b8e8b87b103d2", + "ct" : "9546b20b26efca6eeeaa200c261436cac58b6a73c144f54141174c50faff1177", + "result" : "valid" + }, + { + "tcId" : 60, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "004400640042004d0064006d000100790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "e71c08a01bfb0dad03bfe1a08019b1514f1860b763c21128a7d7a06693397c97", + "result" : "valid" + }, + { + "tcId" : 61, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007400760025002a0012005b005c00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "377c53b84b636c51c0dd690ac34c5a87e51307aaab6b7636f04cd3e650d00e89", + "result" : "valid" + }, + { + "tcId" : 62, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0023000d00510069001d0077002a0009001200010034004d00520070006100290000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "fc72f46a6a218abcd49f9490f7c4c432cdd8d7f92dcb179daefe77174c50dc57", + "result" : "valid" + }, + { + "tcId" : 63, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007300520057005c005600180030003c004b0050007c004f00020020002600390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "6cc3458936506c17c0f5ab23dd2ab44ce70a0639f83eb3b8273c233500732f8f", + "result" : "valid" + }, + { + "tcId" : 64, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "92ae0000", + "salt" : "6978583ea9c24c49", + "iterationCount" : 4096, + "iv" : "0192ad10599677f253e7dea587373553", + "msg" : "c06bcb3b5cd9c1317f5eb7ba50882530", + "ct" : "5849756a311c4b01e00c61b247ab57cee4ede04c4ba64916aba88db757496f0c", + "result" : "valid" + }, + { + "tcId" : 65, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "38a90000", + "salt" : "c217b8c980fe4698", + "iterationCount" : 4096, + "iv" : "890a0303475f07189a0fe14b4e509217", + "msg" : "1ea8b43513275537d021c0f75849c01840", + "ct" : "2231981c079c4bdfe069380dc3b8685d621f1c11159e0805817204dd68baf64b", + "result" : "valid" + }, + { + "tcId" : 66, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "4464c2cde4ed81790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "a418710d7f39742c591e6d210b485425ef035d2608f16d49ce62402f84da53ae", + "result" : "valid" + }, + { + "tcId" : 67, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f4f6a52a925b00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "41efdfd9d6c5da2248297dddf2d5b3d4a86509bebc0be1f725ee65b6c2d9793e", + "result" : "valid" + }, + { + "tcId" : 68, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "a38d51691d77aa891281b44d52f061a90000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "d70f07c8088779f856805a3435c35ccda52c4bfe6b0897b8bf0c4bf07a5e1eb0", + "result" : "valid" + }, + { + "tcId" : 69, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f35257dc5698b0bccbd0fc4f02a026390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "9cc8b256a91c50aaf9ddb3fb26e6779ee77a61d1dc72cc1706024c70e3d51c0e", + "result" : "valid" + }, + { + "tcId" : 70, "comment" : "empty password", "flags" : [ "Printable" @@ -841,7 +1025,7 @@ "result" : "valid" }, { - "tcId" : 59, + "tcId" : 71, "comment" : "empty password", "flags" : [ "Printable" @@ -855,7 +1039,37 @@ "result" : "valid" }, { - "tcId" : 60, + "tcId" : 72, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "f488f026badc3624", + "iterationCount" : 4096, + "iv" : "2979c2a734e4cd5da5d9a7e69c3f8b8e", + "msg" : "d63088e9bf4e9105bc287f0ab6823af9", + "ct" : "5cff9fb6910b37f77cbba3d8c414050878d5d782d191cc6f749b903f5fbaf7b2", + "result" : "valid" + }, + { + "tcId" : 73, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "542ada9132800d2c", + "iterationCount" : 4096, + "iv" : "844635e540de3a85c02f2df9413ff911", + "msg" : "08dfdd58aa603d5fc4bdaa9cb24ce82bca", + "ct" : "5ddaf7f56c4f1b33073bb433c0d12679ac5cb6dfacd715a8c8cc2f98e558722f", + "result" : "valid" + }, + { + "tcId" : 74, "comment" : "long password", "flags" : [ "Printable" @@ -869,7 +1083,7 @@ "result" : "valid" }, { - "tcId" : 61, + "tcId" : 75, "comment" : "long password", "flags" : [ "Printable" @@ -883,7 +1097,7 @@ "result" : "valid" }, { - "tcId" : 62, + "tcId" : 76, "comment" : "long password", "flags" : [ "Printable" @@ -897,7 +1111,7 @@ "result" : "valid" }, { - "tcId" : 63, + "tcId" : 77, "comment" : "special case password", "flags" : [ "NonUtf8" @@ -911,8 +1125,22 @@ "result" : "valid" }, { - "tcId" : 64, - "comment" : "special case password", + "tcId" : 78, + "comment" : "special case: truncated UTF-8 string", + "flags" : [ + "NonUtf8" + ], + "password" : "c0", + "salt" : "e19e4f175a64d35a", + "iterationCount" : 4096, + "iv" : "7545745f8d0bfe38f024371e12008a5f", + "msg" : "9e21b64aeff5338eb9bc71b19ef8f8e7", + "ct" : "70d9920180a8a1561b377d7fe78e6364888ab4af0a60d34868ce457b11d2c5d7", + "result" : "valid" + }, + { + "tcId" : 79, + "comment" : "special case: invalid UTF-8 bytes", "flags" : [ "NonUtf8" ], @@ -925,8 +1153,8 @@ "result" : "valid" }, { - "tcId" : 65, - "comment" : "special case password", + "tcId" : 80, + "comment" : "special case: invalid 2 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -939,8 +1167,8 @@ "result" : "valid" }, { - "tcId" : 66, - "comment" : "special case password", + "tcId" : 81, + "comment" : "special case: invalid 3 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -953,8 +1181,8 @@ "result" : "valid" }, { - "tcId" : 67, - "comment" : "special case password", + "tcId" : 82, + "comment" : "special case: invalid UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -967,8 +1195,22 @@ "result" : "valid" }, { - "tcId" : 68, - "comment" : "special case password", + "tcId" : 83, + "comment" : "special case for UTF-16", + "flags" : [ + "NonUtf8" + ], + "password" : "dbdbdbdbdbdbdbdb", + "salt" : "ba21795fffb901bc", + "iterationCount" : 4096, + "iv" : "753675f249b8c153997a797116495204", + "msg" : "706c565ba28370ff433460cc9f8d845a", + "ct" : "3859c91fb73238e01fffd2b405fd5cc1cb4dbc42fe7d9385b1a7f6cf770d6971", + "result" : "valid" + }, + { + "tcId" : 84, + "comment" : "special case: long all zero password", "flags" : [ "Ascii" ], diff --git a/testvectors_v1/pbes2_hmacsha384_aes_192_test.json b/testvectors_v1/pbes2_hmacsha384_aes_192_test.json index 3351b0c..4b36590 100644 --- a/testvectors_v1/pbes2_hmacsha384_aes_192_test.json +++ b/testvectors_v1/pbes2_hmacsha384_aes_192_test.json @@ -2,7 +2,7 @@ "algorithm" : "PbeWithHmacSha384AndAes_192", "schema" : "pbe_test_schema.json", "generatorVersion" : "0.9", - "numberOfTests" : 68, + "numberOfTests" : 84, "header" : [ "Test vector of type PbeTest are used for PBES1 or PBES2." ], @@ -11,6 +11,10 @@ "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password consisting of ASCII characters." }, + "BmpString" : { + "bugType" : "FUNCTIONALITY", + "description" : "The test vectors contains a password that is a valid BMPString as used in RFC 7292. This RFC uses big endian encoding and a null terminator." + }, "NonUtf8" : { "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password that is not a valid UTF-8 string." @@ -828,6 +832,186 @@ }, { "tcId" : 58, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "002d0000", + "salt" : "66a92292e6db2d9e", + "iterationCount" : 4096, + "iv" : "7911306933f1131299247a85b585bed8", + "msg" : "63219964fd79651fe1be8ad5e90f414c", + "ct" : "f00e009202d1e1d129539330ab095f0437d7afc9f366f8412721a088fc991633", + "result" : "valid" + }, + { + "tcId" : 59, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "00470000", + "salt" : "88abb902385f0efc", + "iterationCount" : 4096, + "iv" : "109f2c7a8aacc98d0aa176b1b43f2ece", + "msg" : "34ce8c499c20714c34506b8e8b87b103d2", + "ct" : "9996fcd08292525efabba468042a732e05cd0898703ed10c31a473f9c0a29c23", + "result" : "valid" + }, + { + "tcId" : 60, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "004400640042004d0064006d000100790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "8963492bc6debce149743e7f7e11d71c057711dcd73f05beb72cf896f301979d", + "result" : "valid" + }, + { + "tcId" : 61, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007400760025002a0012005b005c00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "c961b642c79cb91bb0b1608ca377f644105da21b130f117de0fadd4853790126", + "result" : "valid" + }, + { + "tcId" : 62, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0023000d00510069001d0077002a0009001200010034004d00520070006100290000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "48420e12c7329777d6f202356280168d356e2a5a506e176ddf9bf46b706a4b1b", + "result" : "valid" + }, + { + "tcId" : 63, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007300520057005c005600180030003c004b0050007c004f00020020002600390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "40e32ac0acffacfd25a9c6e1189e05136785fae83c667dbeccd2472749c7ee44", + "result" : "valid" + }, + { + "tcId" : 64, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "92ae0000", + "salt" : "6978583ea9c24c49", + "iterationCount" : 4096, + "iv" : "0192ad10599677f253e7dea587373553", + "msg" : "c06bcb3b5cd9c1317f5eb7ba50882530", + "ct" : "4e97c52c1bf5ca905217cfcb812176959d4bc23c7668d1e0924d983ea81bd1f0", + "result" : "valid" + }, + { + "tcId" : 65, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "38a90000", + "salt" : "c217b8c980fe4698", + "iterationCount" : 4096, + "iv" : "890a0303475f07189a0fe14b4e509217", + "msg" : "1ea8b43513275537d021c0f75849c01840", + "ct" : "aafcb9c8b13c33240f07c41f7c2940bba19c013e8cf01acdccdfa4a768dbab86", + "result" : "valid" + }, + { + "tcId" : 66, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "4464c2cde4ed81790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "92a2636f449f06280db4de836deee6416b34fba197cea2658bcbb790ed469eb2", + "result" : "valid" + }, + { + "tcId" : 67, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f4f6a52a925b00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "28cb87c71110b327ee7d76505a3eb4504b9ca92a0984f9a4d605732610a4e3c5", + "result" : "valid" + }, + { + "tcId" : 68, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "a38d51691d77aa891281b44d52f061a90000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "6740b172ac1aafd951e0aac66114bf2d2d5476d6a46a831c14e2f61313bc3f95", + "result" : "valid" + }, + { + "tcId" : 69, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f35257dc5698b0bccbd0fc4f02a026390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "c90bf69cbe659b9597a466e3251f097d8ea2bce8a132c67bef04036d6f5b5395", + "result" : "valid" + }, + { + "tcId" : 70, "comment" : "empty password", "flags" : [ "Printable" @@ -841,7 +1025,7 @@ "result" : "valid" }, { - "tcId" : 59, + "tcId" : 71, "comment" : "empty password", "flags" : [ "Printable" @@ -855,7 +1039,37 @@ "result" : "valid" }, { - "tcId" : 60, + "tcId" : 72, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "f488f026badc3624", + "iterationCount" : 4096, + "iv" : "2979c2a734e4cd5da5d9a7e69c3f8b8e", + "msg" : "d63088e9bf4e9105bc287f0ab6823af9", + "ct" : "d3efc69c59759e611d4e714307c0fd47f104d9c402f14d8c4792d639e672494a", + "result" : "valid" + }, + { + "tcId" : 73, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "542ada9132800d2c", + "iterationCount" : 4096, + "iv" : "844635e540de3a85c02f2df9413ff911", + "msg" : "08dfdd58aa603d5fc4bdaa9cb24ce82bca", + "ct" : "df68786bd386b4f096648fe73ac29eb32dbdfff539046a2b89c108cbc691c0a9", + "result" : "valid" + }, + { + "tcId" : 74, "comment" : "long password", "flags" : [ "Printable" @@ -869,7 +1083,7 @@ "result" : "valid" }, { - "tcId" : 61, + "tcId" : 75, "comment" : "long password", "flags" : [ "Printable" @@ -883,7 +1097,7 @@ "result" : "valid" }, { - "tcId" : 62, + "tcId" : 76, "comment" : "long password", "flags" : [ "Printable" @@ -897,7 +1111,7 @@ "result" : "valid" }, { - "tcId" : 63, + "tcId" : 77, "comment" : "special case password", "flags" : [ "NonUtf8" @@ -911,8 +1125,22 @@ "result" : "valid" }, { - "tcId" : 64, - "comment" : "special case password", + "tcId" : 78, + "comment" : "special case: truncated UTF-8 string", + "flags" : [ + "NonUtf8" + ], + "password" : "c0", + "salt" : "e19e4f175a64d35a", + "iterationCount" : 4096, + "iv" : "7545745f8d0bfe38f024371e12008a5f", + "msg" : "9e21b64aeff5338eb9bc71b19ef8f8e7", + "ct" : "fd15deaa5960556a0aad7266b985d7d5305bc44fdec4d47ceaad421fd2d3df26", + "result" : "valid" + }, + { + "tcId" : 79, + "comment" : "special case: invalid UTF-8 bytes", "flags" : [ "NonUtf8" ], @@ -925,8 +1153,8 @@ "result" : "valid" }, { - "tcId" : 65, - "comment" : "special case password", + "tcId" : 80, + "comment" : "special case: invalid 2 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -939,8 +1167,8 @@ "result" : "valid" }, { - "tcId" : 66, - "comment" : "special case password", + "tcId" : 81, + "comment" : "special case: invalid 3 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -953,8 +1181,8 @@ "result" : "valid" }, { - "tcId" : 67, - "comment" : "special case password", + "tcId" : 82, + "comment" : "special case: invalid UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -967,8 +1195,22 @@ "result" : "valid" }, { - "tcId" : 68, - "comment" : "special case password", + "tcId" : 83, + "comment" : "special case for UTF-16", + "flags" : [ + "NonUtf8" + ], + "password" : "dbdbdbdbdbdbdbdb", + "salt" : "ba21795fffb901bc", + "iterationCount" : 4096, + "iv" : "753675f249b8c153997a797116495204", + "msg" : "706c565ba28370ff433460cc9f8d845a", + "ct" : "0d4273637003316945ae89acb151f3960ffa832372ad18694a0134ac8f9abd35", + "result" : "valid" + }, + { + "tcId" : 84, + "comment" : "special case: long all zero password", "flags" : [ "Ascii" ], diff --git a/testvectors_v1/pbes2_hmacsha384_aes_256_test.json b/testvectors_v1/pbes2_hmacsha384_aes_256_test.json index cf7ca2a..cc38055 100644 --- a/testvectors_v1/pbes2_hmacsha384_aes_256_test.json +++ b/testvectors_v1/pbes2_hmacsha384_aes_256_test.json @@ -2,7 +2,7 @@ "algorithm" : "PbeWithHmacSha384AndAes_256", "schema" : "pbe_test_schema.json", "generatorVersion" : "0.9", - "numberOfTests" : 68, + "numberOfTests" : 84, "header" : [ "Test vector of type PbeTest are used for PBES1 or PBES2." ], @@ -11,6 +11,10 @@ "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password consisting of ASCII characters." }, + "BmpString" : { + "bugType" : "FUNCTIONALITY", + "description" : "The test vectors contains a password that is a valid BMPString as used in RFC 7292. This RFC uses big endian encoding and a null terminator." + }, "NonUtf8" : { "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password that is not a valid UTF-8 string." @@ -828,6 +832,186 @@ }, { "tcId" : 58, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "002d0000", + "salt" : "66a92292e6db2d9e", + "iterationCount" : 4096, + "iv" : "7911306933f1131299247a85b585bed8", + "msg" : "63219964fd79651fe1be8ad5e90f414c", + "ct" : "2f964667b6c34145b0d5cad13e288550e00f8fb22e54c980631ce9d6ccf1a020", + "result" : "valid" + }, + { + "tcId" : 59, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "00470000", + "salt" : "88abb902385f0efc", + "iterationCount" : 4096, + "iv" : "109f2c7a8aacc98d0aa176b1b43f2ece", + "msg" : "34ce8c499c20714c34506b8e8b87b103d2", + "ct" : "2f360dc2190325628d9d4c2fca52139cae16621f068d437ddb43bd2e21649518", + "result" : "valid" + }, + { + "tcId" : 60, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "004400640042004d0064006d000100790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "0658e5f241fc1ff9f92b4aaf78ae1fb94d0a659dd531058989971be09d6d5cad", + "result" : "valid" + }, + { + "tcId" : 61, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007400760025002a0012005b005c00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "44498b6f5b09ee0f3d7de6cca1ee00b1912167d43f1bea61a12812098b063b49", + "result" : "valid" + }, + { + "tcId" : 62, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0023000d00510069001d0077002a0009001200010034004d00520070006100290000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "a86e17ef97c47410fac8b0da568d2d08da7f0abfd9f849c78bee6140b3c4112e", + "result" : "valid" + }, + { + "tcId" : 63, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007300520057005c005600180030003c004b0050007c004f00020020002600390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "0dda6f6544821d31702b823aafd2aaf32609ef4bbf0467379537dcb0f682d063", + "result" : "valid" + }, + { + "tcId" : 64, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "92ae0000", + "salt" : "6978583ea9c24c49", + "iterationCount" : 4096, + "iv" : "0192ad10599677f253e7dea587373553", + "msg" : "c06bcb3b5cd9c1317f5eb7ba50882530", + "ct" : "7c79927ed4e6b195101444550aa2d9b96800dd719a53550f5f26c624e0c8377f", + "result" : "valid" + }, + { + "tcId" : 65, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "38a90000", + "salt" : "c217b8c980fe4698", + "iterationCount" : 4096, + "iv" : "890a0303475f07189a0fe14b4e509217", + "msg" : "1ea8b43513275537d021c0f75849c01840", + "ct" : "3ab78e55a55c58baf5151d144d59d5a3a8f1cf25666e245e49c90c917d4fc4dc", + "result" : "valid" + }, + { + "tcId" : 66, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "4464c2cde4ed81790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "b38859abdba3ae7bfe5d32e4878715b60d06be30274f7714619088065f78b132", + "result" : "valid" + }, + { + "tcId" : 67, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f4f6a52a925b00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "b5027a230172cef6b60c5f93f9d3fbad185dbcd78163fbe4243210ce88f65e10", + "result" : "valid" + }, + { + "tcId" : 68, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "a38d51691d77aa891281b44d52f061a90000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "40fa2309f45e598da4523e9f82a8244da4573fe63979a47b79513874b387d10c", + "result" : "valid" + }, + { + "tcId" : 69, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f35257dc5698b0bccbd0fc4f02a026390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "a75e222b19dc1505c608cc116a1799d71d172d7c7f822695e8b58f4bf49cd2ac", + "result" : "valid" + }, + { + "tcId" : 70, "comment" : "empty password", "flags" : [ "Printable" @@ -841,7 +1025,7 @@ "result" : "valid" }, { - "tcId" : 59, + "tcId" : 71, "comment" : "empty password", "flags" : [ "Printable" @@ -855,7 +1039,37 @@ "result" : "valid" }, { - "tcId" : 60, + "tcId" : 72, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "f488f026badc3624", + "iterationCount" : 4096, + "iv" : "2979c2a734e4cd5da5d9a7e69c3f8b8e", + "msg" : "d63088e9bf4e9105bc287f0ab6823af9", + "ct" : "0466ea12294f7f5be9f2f798f1940b2778c876a48c1a44bb80fa0850b0a9ee3b", + "result" : "valid" + }, + { + "tcId" : 73, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "542ada9132800d2c", + "iterationCount" : 4096, + "iv" : "844635e540de3a85c02f2df9413ff911", + "msg" : "08dfdd58aa603d5fc4bdaa9cb24ce82bca", + "ct" : "e82b92a659e8b1b495276348df4a4c0cee8b51b49a7f7cad5f7a7407d7d320b1", + "result" : "valid" + }, + { + "tcId" : 74, "comment" : "long password", "flags" : [ "Printable" @@ -869,7 +1083,7 @@ "result" : "valid" }, { - "tcId" : 61, + "tcId" : 75, "comment" : "long password", "flags" : [ "Printable" @@ -883,7 +1097,7 @@ "result" : "valid" }, { - "tcId" : 62, + "tcId" : 76, "comment" : "long password", "flags" : [ "Printable" @@ -897,7 +1111,7 @@ "result" : "valid" }, { - "tcId" : 63, + "tcId" : 77, "comment" : "special case password", "flags" : [ "NonUtf8" @@ -911,8 +1125,22 @@ "result" : "valid" }, { - "tcId" : 64, - "comment" : "special case password", + "tcId" : 78, + "comment" : "special case: truncated UTF-8 string", + "flags" : [ + "NonUtf8" + ], + "password" : "c0", + "salt" : "e19e4f175a64d35a", + "iterationCount" : 4096, + "iv" : "7545745f8d0bfe38f024371e12008a5f", + "msg" : "9e21b64aeff5338eb9bc71b19ef8f8e7", + "ct" : "7a147bff3c442785e5794c773dbdc5477addcbc4f2f6676f67dc04280f13afc1", + "result" : "valid" + }, + { + "tcId" : 79, + "comment" : "special case: invalid UTF-8 bytes", "flags" : [ "NonUtf8" ], @@ -925,8 +1153,8 @@ "result" : "valid" }, { - "tcId" : 65, - "comment" : "special case password", + "tcId" : 80, + "comment" : "special case: invalid 2 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -939,8 +1167,8 @@ "result" : "valid" }, { - "tcId" : 66, - "comment" : "special case password", + "tcId" : 81, + "comment" : "special case: invalid 3 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -953,8 +1181,8 @@ "result" : "valid" }, { - "tcId" : 67, - "comment" : "special case password", + "tcId" : 82, + "comment" : "special case: invalid UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -967,8 +1195,22 @@ "result" : "valid" }, { - "tcId" : 68, - "comment" : "special case password", + "tcId" : 83, + "comment" : "special case for UTF-16", + "flags" : [ + "NonUtf8" + ], + "password" : "dbdbdbdbdbdbdbdb", + "salt" : "ba21795fffb901bc", + "iterationCount" : 4096, + "iv" : "753675f249b8c153997a797116495204", + "msg" : "706c565ba28370ff433460cc9f8d845a", + "ct" : "2f0d299139ee74123c04e34654861d724e16ac12df3824ed1dc50f936fdf6725", + "result" : "valid" + }, + { + "tcId" : 84, + "comment" : "special case: long all zero password", "flags" : [ "Ascii" ], diff --git a/testvectors_v1/pbes2_hmacsha512_aes_128_test.json b/testvectors_v1/pbes2_hmacsha512_aes_128_test.json index 8ff60e2..74f9c55 100644 --- a/testvectors_v1/pbes2_hmacsha512_aes_128_test.json +++ b/testvectors_v1/pbes2_hmacsha512_aes_128_test.json @@ -2,7 +2,7 @@ "algorithm" : "PbeWithHmacSha512AndAes_128", "schema" : "pbe_test_schema.json", "generatorVersion" : "0.9", - "numberOfTests" : 68, + "numberOfTests" : 84, "header" : [ "Test vector of type PbeTest are used for PBES1 or PBES2." ], @@ -11,6 +11,10 @@ "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password consisting of ASCII characters." }, + "BmpString" : { + "bugType" : "FUNCTIONALITY", + "description" : "The test vectors contains a password that is a valid BMPString as used in RFC 7292. This RFC uses big endian encoding and a null terminator." + }, "NonUtf8" : { "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password that is not a valid UTF-8 string." @@ -828,6 +832,186 @@ }, { "tcId" : 58, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "002d0000", + "salt" : "66a92292e6db2d9e", + "iterationCount" : 4096, + "iv" : "7911306933f1131299247a85b585bed8", + "msg" : "63219964fd79651fe1be8ad5e90f414c", + "ct" : "0bc32c86dbb3b2056826d0361eba510ea209038735f8d5f09deb721ffdc0a1dd", + "result" : "valid" + }, + { + "tcId" : 59, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "00470000", + "salt" : "88abb902385f0efc", + "iterationCount" : 4096, + "iv" : "109f2c7a8aacc98d0aa176b1b43f2ece", + "msg" : "34ce8c499c20714c34506b8e8b87b103d2", + "ct" : "e2ffdb2b50eb2ad85f378c10c04f2480e62ed90f63be41ccc5ccd041a54d5a09", + "result" : "valid" + }, + { + "tcId" : 60, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "004400640042004d0064006d000100790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "388d466f8fe6e4d476643ccf4f1fe90dc7599de32c752982f2f01b8ad083b55a", + "result" : "valid" + }, + { + "tcId" : 61, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007400760025002a0012005b005c00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "051862c76cae986bd61705633f47fccbf85cb0c4d1205c375207898426d12b26", + "result" : "valid" + }, + { + "tcId" : 62, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0023000d00510069001d0077002a0009001200010034004d00520070006100290000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "51d6d5a2f467585a9ea9b37b9c0c0a892e63c72d95d8dfc06f82d0c773dd3db9", + "result" : "valid" + }, + { + "tcId" : 63, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007300520057005c005600180030003c004b0050007c004f00020020002600390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "bd53c9935b0c6d856a7a5a9b8441ad541dbef72843f63c6de3e3f119c8aa2514", + "result" : "valid" + }, + { + "tcId" : 64, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "92ae0000", + "salt" : "6978583ea9c24c49", + "iterationCount" : 4096, + "iv" : "0192ad10599677f253e7dea587373553", + "msg" : "c06bcb3b5cd9c1317f5eb7ba50882530", + "ct" : "45d48692199abd2cf8d665b9c6ea66bdccee5a39f60930d4fdabde0bdee12fb5", + "result" : "valid" + }, + { + "tcId" : 65, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "38a90000", + "salt" : "c217b8c980fe4698", + "iterationCount" : 4096, + "iv" : "890a0303475f07189a0fe14b4e509217", + "msg" : "1ea8b43513275537d021c0f75849c01840", + "ct" : "8cd5d52f900e1d808106b096129e05334adbd8805b24dad7fbb8e39aac8697b9", + "result" : "valid" + }, + { + "tcId" : 66, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "4464c2cde4ed81790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "9d02e45659d082ff22886523ded518c8e89281af5fb806fd69bc2e64cdceb9a5", + "result" : "valid" + }, + { + "tcId" : 67, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f4f6a52a925b00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "2c46f7cf9d18fad8950a2dc37e66214ecfa3cfbe8e2314754548393b1a004424", + "result" : "valid" + }, + { + "tcId" : 68, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "a38d51691d77aa891281b44d52f061a90000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "705c8ed149e0776331c4e726be646c98dd3ae5d4ca06d1462adb8a86fd750643", + "result" : "valid" + }, + { + "tcId" : 69, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f35257dc5698b0bccbd0fc4f02a026390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "b43470fa162e0bd04e19f7994ad660d9cad6170847b18b5693924d5d8a224574", + "result" : "valid" + }, + { + "tcId" : 70, "comment" : "empty password", "flags" : [ "Printable" @@ -841,7 +1025,7 @@ "result" : "valid" }, { - "tcId" : 59, + "tcId" : 71, "comment" : "empty password", "flags" : [ "Printable" @@ -855,7 +1039,37 @@ "result" : "valid" }, { - "tcId" : 60, + "tcId" : 72, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "f488f026badc3624", + "iterationCount" : 4096, + "iv" : "2979c2a734e4cd5da5d9a7e69c3f8b8e", + "msg" : "d63088e9bf4e9105bc287f0ab6823af9", + "ct" : "12a32347ead154d6086352ab16b65a309e145cf529abd022047c14b734b9e3dc", + "result" : "valid" + }, + { + "tcId" : 73, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "542ada9132800d2c", + "iterationCount" : 4096, + "iv" : "844635e540de3a85c02f2df9413ff911", + "msg" : "08dfdd58aa603d5fc4bdaa9cb24ce82bca", + "ct" : "49fdf270fa19cd4affe4d1b80dc9b71e13f41d34576a9fe81d2f7ac6fd872010", + "result" : "valid" + }, + { + "tcId" : 74, "comment" : "long password", "flags" : [ "Printable" @@ -869,7 +1083,7 @@ "result" : "valid" }, { - "tcId" : 61, + "tcId" : 75, "comment" : "long password", "flags" : [ "Printable" @@ -883,7 +1097,7 @@ "result" : "valid" }, { - "tcId" : 62, + "tcId" : 76, "comment" : "long password", "flags" : [ "Printable" @@ -897,7 +1111,7 @@ "result" : "valid" }, { - "tcId" : 63, + "tcId" : 77, "comment" : "special case password", "flags" : [ "NonUtf8" @@ -911,8 +1125,22 @@ "result" : "valid" }, { - "tcId" : 64, - "comment" : "special case password", + "tcId" : 78, + "comment" : "special case: truncated UTF-8 string", + "flags" : [ + "NonUtf8" + ], + "password" : "c0", + "salt" : "e19e4f175a64d35a", + "iterationCount" : 4096, + "iv" : "7545745f8d0bfe38f024371e12008a5f", + "msg" : "9e21b64aeff5338eb9bc71b19ef8f8e7", + "ct" : "a7281489fd919702680867547bee4789d23eb08617ebb292e36d6ed5e51fbf7a", + "result" : "valid" + }, + { + "tcId" : 79, + "comment" : "special case: invalid UTF-8 bytes", "flags" : [ "NonUtf8" ], @@ -925,8 +1153,8 @@ "result" : "valid" }, { - "tcId" : 65, - "comment" : "special case password", + "tcId" : 80, + "comment" : "special case: invalid 2 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -939,8 +1167,8 @@ "result" : "valid" }, { - "tcId" : 66, - "comment" : "special case password", + "tcId" : 81, + "comment" : "special case: invalid 3 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -953,8 +1181,8 @@ "result" : "valid" }, { - "tcId" : 67, - "comment" : "special case password", + "tcId" : 82, + "comment" : "special case: invalid UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -967,8 +1195,22 @@ "result" : "valid" }, { - "tcId" : 68, - "comment" : "special case password", + "tcId" : 83, + "comment" : "special case for UTF-16", + "flags" : [ + "NonUtf8" + ], + "password" : "dbdbdbdbdbdbdbdb", + "salt" : "ba21795fffb901bc", + "iterationCount" : 4096, + "iv" : "753675f249b8c153997a797116495204", + "msg" : "706c565ba28370ff433460cc9f8d845a", + "ct" : "58bb7dfc01ff01359d516a0701ebf6b54dc11db898f504da24be5a1bedbf0856", + "result" : "valid" + }, + { + "tcId" : 84, + "comment" : "special case: long all zero password", "flags" : [ "Ascii" ], diff --git a/testvectors_v1/pbes2_hmacsha512_aes_192_test.json b/testvectors_v1/pbes2_hmacsha512_aes_192_test.json index f73d798..7d4c9f7 100644 --- a/testvectors_v1/pbes2_hmacsha512_aes_192_test.json +++ b/testvectors_v1/pbes2_hmacsha512_aes_192_test.json @@ -2,7 +2,7 @@ "algorithm" : "PbeWithHmacSha512AndAes_192", "schema" : "pbe_test_schema.json", "generatorVersion" : "0.9", - "numberOfTests" : 68, + "numberOfTests" : 84, "header" : [ "Test vector of type PbeTest are used for PBES1 or PBES2." ], @@ -11,6 +11,10 @@ "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password consisting of ASCII characters." }, + "BmpString" : { + "bugType" : "FUNCTIONALITY", + "description" : "The test vectors contains a password that is a valid BMPString as used in RFC 7292. This RFC uses big endian encoding and a null terminator." + }, "NonUtf8" : { "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password that is not a valid UTF-8 string." @@ -828,6 +832,186 @@ }, { "tcId" : 58, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "002d0000", + "salt" : "66a92292e6db2d9e", + "iterationCount" : 4096, + "iv" : "7911306933f1131299247a85b585bed8", + "msg" : "63219964fd79651fe1be8ad5e90f414c", + "ct" : "37f5876d37bb9070d1666fd5cebc8864263590fca113f9591717d2cf07e96b36", + "result" : "valid" + }, + { + "tcId" : 59, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "00470000", + "salt" : "88abb902385f0efc", + "iterationCount" : 4096, + "iv" : "109f2c7a8aacc98d0aa176b1b43f2ece", + "msg" : "34ce8c499c20714c34506b8e8b87b103d2", + "ct" : "1e622b5eb83ed77b494f3804fa70c463c51ff5514554d9d3434b8efa8c7d4a80", + "result" : "valid" + }, + { + "tcId" : 60, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "004400640042004d0064006d000100790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "7708ca6620abf91f85d2e39e6fd288c4c1ee171c628eb50e0105d07af8001de9", + "result" : "valid" + }, + { + "tcId" : 61, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007400760025002a0012005b005c00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "86c33520e9046be34ab6d7607ac54219ca78628eb65c3f28e62cea7e15c11c2e", + "result" : "valid" + }, + { + "tcId" : 62, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0023000d00510069001d0077002a0009001200010034004d00520070006100290000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "dd72dcfb88b6b0adb4400b021156091007af3889873d6164a88d8eacff5d88be", + "result" : "valid" + }, + { + "tcId" : 63, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007300520057005c005600180030003c004b0050007c004f00020020002600390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "d4fc56fa5afd8b875cc797e1d9a921fb85d7a14c9c5b41ab61dab9c465a162de", + "result" : "valid" + }, + { + "tcId" : 64, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "92ae0000", + "salt" : "6978583ea9c24c49", + "iterationCount" : 4096, + "iv" : "0192ad10599677f253e7dea587373553", + "msg" : "c06bcb3b5cd9c1317f5eb7ba50882530", + "ct" : "980e41b0d29d9b548735423e71bf759b882d0c62a0bec3719307ed56d3aaeb51", + "result" : "valid" + }, + { + "tcId" : 65, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "38a90000", + "salt" : "c217b8c980fe4698", + "iterationCount" : 4096, + "iv" : "890a0303475f07189a0fe14b4e509217", + "msg" : "1ea8b43513275537d021c0f75849c01840", + "ct" : "5d949c51e771a3806fb747e14885aa18254b3498f3eac978f58f4766b7e0583f", + "result" : "valid" + }, + { + "tcId" : 66, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "4464c2cde4ed81790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "facef8660a7d6ee3b583fbbba66a5b0cd0c65e90c5b4626dbd5fc6f52090c63e", + "result" : "valid" + }, + { + "tcId" : 67, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f4f6a52a925b00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "d99c2f7430c7755569bd52fc3d93935718046dc9be99cf3157f656ca5e95baa2", + "result" : "valid" + }, + { + "tcId" : 68, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "a38d51691d77aa891281b44d52f061a90000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "255e94d08f2f871abb5fcb1c5560efaedad2252e4890b2d0c0e4da0753076866", + "result" : "valid" + }, + { + "tcId" : 69, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f35257dc5698b0bccbd0fc4f02a026390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "8dd31c1309d2e76e81fdb197db7c4145f7cff557dbed4af7b537d4b2760c85a9", + "result" : "valid" + }, + { + "tcId" : 70, "comment" : "empty password", "flags" : [ "Printable" @@ -841,7 +1025,7 @@ "result" : "valid" }, { - "tcId" : 59, + "tcId" : 71, "comment" : "empty password", "flags" : [ "Printable" @@ -855,7 +1039,37 @@ "result" : "valid" }, { - "tcId" : 60, + "tcId" : 72, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "f488f026badc3624", + "iterationCount" : 4096, + "iv" : "2979c2a734e4cd5da5d9a7e69c3f8b8e", + "msg" : "d63088e9bf4e9105bc287f0ab6823af9", + "ct" : "90e945989f45288dc85947a9f6627cc69c26a5ff4970b5ff08c083875609ada8", + "result" : "valid" + }, + { + "tcId" : 73, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "542ada9132800d2c", + "iterationCount" : 4096, + "iv" : "844635e540de3a85c02f2df9413ff911", + "msg" : "08dfdd58aa603d5fc4bdaa9cb24ce82bca", + "ct" : "2b710db0adb0c1b76f64c590858d77291fe3ecff6e76c046e542b57eef9e8936", + "result" : "valid" + }, + { + "tcId" : 74, "comment" : "long password", "flags" : [ "Printable" @@ -869,7 +1083,7 @@ "result" : "valid" }, { - "tcId" : 61, + "tcId" : 75, "comment" : "long password", "flags" : [ "Printable" @@ -883,7 +1097,7 @@ "result" : "valid" }, { - "tcId" : 62, + "tcId" : 76, "comment" : "long password", "flags" : [ "Printable" @@ -897,7 +1111,7 @@ "result" : "valid" }, { - "tcId" : 63, + "tcId" : 77, "comment" : "special case password", "flags" : [ "NonUtf8" @@ -911,8 +1125,22 @@ "result" : "valid" }, { - "tcId" : 64, - "comment" : "special case password", + "tcId" : 78, + "comment" : "special case: truncated UTF-8 string", + "flags" : [ + "NonUtf8" + ], + "password" : "c0", + "salt" : "e19e4f175a64d35a", + "iterationCount" : 4096, + "iv" : "7545745f8d0bfe38f024371e12008a5f", + "msg" : "9e21b64aeff5338eb9bc71b19ef8f8e7", + "ct" : "413d5336e5f72e7fb9eae85936b0e2c2342096623dab1c37ab6e060047e10184", + "result" : "valid" + }, + { + "tcId" : 79, + "comment" : "special case: invalid UTF-8 bytes", "flags" : [ "NonUtf8" ], @@ -925,8 +1153,8 @@ "result" : "valid" }, { - "tcId" : 65, - "comment" : "special case password", + "tcId" : 80, + "comment" : "special case: invalid 2 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -939,8 +1167,8 @@ "result" : "valid" }, { - "tcId" : 66, - "comment" : "special case password", + "tcId" : 81, + "comment" : "special case: invalid 3 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -953,8 +1181,8 @@ "result" : "valid" }, { - "tcId" : 67, - "comment" : "special case password", + "tcId" : 82, + "comment" : "special case: invalid UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -967,8 +1195,22 @@ "result" : "valid" }, { - "tcId" : 68, - "comment" : "special case password", + "tcId" : 83, + "comment" : "special case for UTF-16", + "flags" : [ + "NonUtf8" + ], + "password" : "dbdbdbdbdbdbdbdb", + "salt" : "ba21795fffb901bc", + "iterationCount" : 4096, + "iv" : "753675f249b8c153997a797116495204", + "msg" : "706c565ba28370ff433460cc9f8d845a", + "ct" : "532ec7681f9ec4adfecb7cada33c6697fbad344e363967428d5f5e50d4f1a105", + "result" : "valid" + }, + { + "tcId" : 84, + "comment" : "special case: long all zero password", "flags" : [ "Ascii" ], diff --git a/testvectors_v1/pbes2_hmacsha512_aes_256_test.json b/testvectors_v1/pbes2_hmacsha512_aes_256_test.json index cc52bda..6aa408c 100644 --- a/testvectors_v1/pbes2_hmacsha512_aes_256_test.json +++ b/testvectors_v1/pbes2_hmacsha512_aes_256_test.json @@ -2,7 +2,7 @@ "algorithm" : "PbeWithHmacSha512AndAes_256", "schema" : "pbe_test_schema.json", "generatorVersion" : "0.9", - "numberOfTests" : 68, + "numberOfTests" : 84, "header" : [ "Test vector of type PbeTest are used for PBES1 or PBES2." ], @@ -11,6 +11,10 @@ "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password consisting of ASCII characters." }, + "BmpString" : { + "bugType" : "FUNCTIONALITY", + "description" : "The test vectors contains a password that is a valid BMPString as used in RFC 7292. This RFC uses big endian encoding and a null terminator." + }, "NonUtf8" : { "bugType" : "FUNCTIONALITY", "description" : "The test vector contains a password that is not a valid UTF-8 string." @@ -828,6 +832,186 @@ }, { "tcId" : 58, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "002d0000", + "salt" : "66a92292e6db2d9e", + "iterationCount" : 4096, + "iv" : "7911306933f1131299247a85b585bed8", + "msg" : "63219964fd79651fe1be8ad5e90f414c", + "ct" : "bb7c5866e67053918e6b564af840c90dc5da2f4f9ee398451e907cdf37318eb3", + "result" : "valid" + }, + { + "tcId" : 59, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "00470000", + "salt" : "88abb902385f0efc", + "iterationCount" : 4096, + "iv" : "109f2c7a8aacc98d0aa176b1b43f2ece", + "msg" : "34ce8c499c20714c34506b8e8b87b103d2", + "ct" : "a5adefa3fa3c475bca63cf72fb619becd932ba843cba83c341513ef246f23489", + "result" : "valid" + }, + { + "tcId" : 60, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "004400640042004d0064006d000100790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "747676997c878e16f10f1c55d5cd334d6e45366d5967d2481a88f4aae339305d", + "result" : "valid" + }, + { + "tcId" : 61, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007400760025002a0012005b005c00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "a1fb0d3a8f201fdfee204105784f3dbaf7b080661e8a57f41ae772692e5188ec", + "result" : "valid" + }, + { + "tcId" : 62, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0023000d00510069001d0077002a0009001200010034004d00520070006100290000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "06c679c61b99d0486584ca8b97d7f199752c0f46b0f694b38a33252f3e7d55ed", + "result" : "valid" + }, + { + "tcId" : 63, + "comment" : "password is an ASCII string encoded as BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "007300520057005c005600180030003c004b0050007c004f00020020002600390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "36325dde6ed09958dc1377001cf2e277e949c9ed1a98c5fa032f43b532006af6", + "result" : "valid" + }, + { + "tcId" : 64, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "92ae0000", + "salt" : "6978583ea9c24c49", + "iterationCount" : 4096, + "iv" : "0192ad10599677f253e7dea587373553", + "msg" : "c06bcb3b5cd9c1317f5eb7ba50882530", + "ct" : "fe55702b764202154a8c1fd98e23f93dc9e5aec9cff0a210dd9049fb0f659434", + "result" : "valid" + }, + { + "tcId" : 65, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "38a90000", + "salt" : "c217b8c980fe4698", + "iterationCount" : 4096, + "iv" : "890a0303475f07189a0fe14b4e509217", + "msg" : "1ea8b43513275537d021c0f75849c01840", + "ct" : "00f029ebf9b5859d0e2719b1e15d7aa63a88b48091f1076c342dfa26ca849dd0", + "result" : "valid" + }, + { + "tcId" : 66, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "4464c2cde4ed81790000", + "salt" : "675617aaff664428", + "iterationCount" : 4096, + "iv" : "c08dd25d3aa04749850301e9b8f8eb28", + "msg" : "4f5f5d4d0a21d463419db42fdff6ae6c", + "ct" : "1c714d2e1d11da29d917531bf2928e1d90ddd67bc1ca33f73123daa7e05602b7", + "result" : "valid" + }, + { + "tcId" : 67, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f4f6a52a925b00610000", + "salt" : "957a9ab7ad9fc7de", + "iterationCount" : 4096, + "iv" : "126081b5c830984abd553ec39b080f39", + "msg" : "ede5a5ea322b7972a789bb5af48f384218", + "ct" : "e96a71f1725c145f282053b40b9e41dd7e2fe36f241dd4aef8c4360d0a76a772", + "result" : "valid" + }, + { + "tcId" : 68, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "a38d51691d77aa891281b44d52f061a90000", + "salt" : "deea2dabe885caf6", + "iterationCount" : 4096, + "iv" : "698a466cec24214100bb3f30a6820bf7", + "msg" : "930b94a70883efd733f63f841dfc3d17", + "ct" : "95796a8c76039924e4d2e32e3b572ba4087d37b2edbc584b0d79d909d55e61fa", + "result" : "valid" + }, + { + "tcId" : 69, + "comment" : "password is a BMPString", + "flags" : [ + "NonUtf8", + "BmpString" + ], + "password" : "f35257dc5698b0bccbd0fc4f02a026390000", + "salt" : "6ed69f23acf64114", + "iterationCount" : 4096, + "iv" : "59efebfe7a6056507dc17778e5c444c5", + "msg" : "538705a997333fc2bf4f44f2bb90f3cd26", + "ct" : "d4671a72ea0b4ac7439d1238459a6ae2b2ea2d08b0feffc4f1a6de2901ed1004", + "result" : "valid" + }, + { + "tcId" : 70, "comment" : "empty password", "flags" : [ "Printable" @@ -841,7 +1025,7 @@ "result" : "valid" }, { - "tcId" : 59, + "tcId" : 71, "comment" : "empty password", "flags" : [ "Printable" @@ -855,7 +1039,37 @@ "result" : "valid" }, { - "tcId" : 60, + "tcId" : 72, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "f488f026badc3624", + "iterationCount" : 4096, + "iv" : "2979c2a734e4cd5da5d9a7e69c3f8b8e", + "msg" : "d63088e9bf4e9105bc287f0ab6823af9", + "ct" : "4f153ea449f8c851f9de6b3e92808d69595f31bfb35046963fc602a8a941f488", + "result" : "valid" + }, + { + "tcId" : 73, + "comment" : "password is an empty BMPString", + "flags" : [ + "Ascii", + "BmpString" + ], + "password" : "0000", + "salt" : "542ada9132800d2c", + "iterationCount" : 4096, + "iv" : "844635e540de3a85c02f2df9413ff911", + "msg" : "08dfdd58aa603d5fc4bdaa9cb24ce82bca", + "ct" : "18f83db3c007c1d76412a423463592a07e58cf87ec4c7667dc989f0c9b32f389", + "result" : "valid" + }, + { + "tcId" : 74, "comment" : "long password", "flags" : [ "Printable" @@ -869,7 +1083,7 @@ "result" : "valid" }, { - "tcId" : 61, + "tcId" : 75, "comment" : "long password", "flags" : [ "Printable" @@ -883,7 +1097,7 @@ "result" : "valid" }, { - "tcId" : 62, + "tcId" : 76, "comment" : "long password", "flags" : [ "Printable" @@ -897,7 +1111,7 @@ "result" : "valid" }, { - "tcId" : 63, + "tcId" : 77, "comment" : "special case password", "flags" : [ "NonUtf8" @@ -911,8 +1125,22 @@ "result" : "valid" }, { - "tcId" : 64, - "comment" : "special case password", + "tcId" : 78, + "comment" : "special case: truncated UTF-8 string", + "flags" : [ + "NonUtf8" + ], + "password" : "c0", + "salt" : "e19e4f175a64d35a", + "iterationCount" : 4096, + "iv" : "7545745f8d0bfe38f024371e12008a5f", + "msg" : "9e21b64aeff5338eb9bc71b19ef8f8e7", + "ct" : "98ef193cf91baa60897ba2bdc58eab2e4e4eac659283b61cc43837bc0c74659e", + "result" : "valid" + }, + { + "tcId" : 79, + "comment" : "special case: invalid UTF-8 bytes", "flags" : [ "NonUtf8" ], @@ -925,8 +1153,8 @@ "result" : "valid" }, { - "tcId" : 65, - "comment" : "special case password", + "tcId" : 80, + "comment" : "special case: invalid 2 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -939,8 +1167,8 @@ "result" : "valid" }, { - "tcId" : 66, - "comment" : "special case password", + "tcId" : 81, + "comment" : "special case: invalid 3 byte UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -953,8 +1181,8 @@ "result" : "valid" }, { - "tcId" : 67, - "comment" : "special case password", + "tcId" : 82, + "comment" : "special case: invalid UTF-8 code points", "flags" : [ "NonUtf8" ], @@ -967,8 +1195,22 @@ "result" : "valid" }, { - "tcId" : 68, - "comment" : "special case password", + "tcId" : 83, + "comment" : "special case for UTF-16", + "flags" : [ + "NonUtf8" + ], + "password" : "dbdbdbdbdbdbdbdb", + "salt" : "ba21795fffb901bc", + "iterationCount" : 4096, + "iv" : "753675f249b8c153997a797116495204", + "msg" : "706c565ba28370ff433460cc9f8d845a", + "ct" : "d7435491c34f88edcfba4626e6778afc2015f6485fc166bfe0510eaba9761884", + "result" : "valid" + }, + { + "tcId" : 84, + "comment" : "special case: long all zero password", "flags" : [ "Ascii" ], |