From 8e75ae488047c519f14f2c08b02a55bf7712fa1d Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Tue, 1 May 2018 17:01:04 -0400 Subject: [PATCH] Add a Wycheproof driver for AES-CBC. Change-Id: I782ea51e1db8d05f552832a7c6910954fa2dda5f Reviewed-on: https://boringssl-review.googlesource.com/27924 Commit-Queue: David Benjamin CQ-Verified: CQ bot account: commit-bot@chromium.org Reviewed-by: Adam Langley --- crypto/cipher_extra/cipher_test.cc | 119 +- crypto/fipsmodule/cipher/cipher.c | 4 + include/openssl/cipher.h | 4 + sources.cmake | 1 + third_party/wycheproof/aes_cbc_pkcs5_test.txt | 1812 +++++++++++++++++ third_party/wycheproof/convert_wycheproof.go | 4 +- 6 files changed, 1919 insertions(+), 25 deletions(-) create mode 100644 third_party/wycheproof/aes_cbc_pkcs5_test.txt diff --git a/crypto/cipher_extra/cipher_test.cc b/crypto/cipher_extra/cipher_test.cc index 977243cd..36059268 100644 --- a/crypto/cipher_extra/cipher_test.cc +++ b/crypto/cipher_extra/cipher_test.cc @@ -51,9 +51,11 @@ * ==================================================================== */ +#include #include #include +#include #include #include @@ -61,9 +63,11 @@ #include #include +#include #include "../test/file_test.h" #include "../test/test_util.h" +#include "../test/wycheproof_util.h" static const EVP_CIPHER *GetCipher(const std::string &name) { @@ -111,6 +115,38 @@ static const EVP_CIPHER *GetCipher(const std::string &name) { return nullptr; } +static bool DoCipher(EVP_CIPHER_CTX *ctx, std::vector *out, + bssl::Span in, size_t chunk) { + size_t max_out = in.size(); + if ((EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_NO_PADDING) == 0 && + EVP_CIPHER_CTX_encrypting(ctx)) { + unsigned block_size = EVP_CIPHER_CTX_block_size(ctx); + max_out += block_size - (max_out % block_size); + } + out->resize(max_out); + + size_t total = 0; + int len; + while (!in.empty()) { + size_t todo = chunk == 0 ? in.size() : std::min(in.size(), chunk); + EXPECT_LE(todo, static_cast(INT_MAX)); + if (!EVP_CipherUpdate(ctx, out->data() + total, &len, in.data(), + static_cast(todo))) { + return false; + } + EXPECT_GE(len, 0); + total += static_cast(len); + in = in.subspan(todo); + } + if (!EVP_CipherFinal_ex(ctx, out->data() + total, &len)) { + return false; + } + EXPECT_GE(len, 0); + total += static_cast(len); + out->resize(total); + return true; +} + static void TestOperation(FileTest *t, const EVP_CIPHER *cipher, bool encrypt, size_t chunk_size, const std::vector &key, const std::vector &iv, @@ -146,9 +182,7 @@ static void TestOperation(FileTest *t, const EVP_CIPHER *cipher, bool encrypt, } // The ciphers are run with no padding. For each of the ciphers we test, the // output size matches the input size. - std::vector result(in->size()); ASSERT_EQ(in->size(), out->size()); - int unused, result_len1 = 0, result_len2; ASSERT_TRUE(EVP_CIPHER_CTX_set_key_length(ctx.get(), key.size())); ASSERT_TRUE(EVP_CipherInit_ex(ctx.get(), nullptr, nullptr, key.data(), iv.data(), -1)); @@ -156,30 +190,13 @@ static void TestOperation(FileTest *t, const EVP_CIPHER *cipher, bool encrypt, // parameters are NULL, so it is important to skip the |in| and |aad| // |EVP_CipherUpdate| calls when empty. if (!aad.empty()) { + int unused; ASSERT_TRUE( EVP_CipherUpdate(ctx.get(), nullptr, &unused, aad.data(), aad.size())); } ASSERT_TRUE(EVP_CIPHER_CTX_set_padding(ctx.get(), 0)); - if (chunk_size != 0) { - for (size_t i = 0; i < in->size();) { - size_t todo = chunk_size; - if (i + todo > in->size()) { - todo = in->size() - i; - } - - int len; - ASSERT_TRUE(EVP_CipherUpdate(ctx.get(), result.data() + result_len1, &len, - in->data() + i, todo)); - result_len1 += len; - i += todo; - } - } else if (!in->empty()) { - ASSERT_TRUE(EVP_CipherUpdate(ctx.get(), result.data(), &result_len1, - in->data(), in->size())); - } - ASSERT_TRUE( - EVP_CipherFinal_ex(ctx.get(), result.data() + result_len1, &result_len2)); - result.resize(result_len1 + result_len2); + std::vector result; + ASSERT_TRUE(DoCipher(ctx.get(), &result, *in, chunk_size)); EXPECT_EQ(Bytes(*out), Bytes(result)); if (encrypt && is_aead) { uint8_t rtag[16]; @@ -285,3 +302,61 @@ TEST(CipherTest, CAVP_TDES_CBC) { TEST(CipherTest, CAVP_TDES_ECB) { FileTestGTest("crypto/cipher_extra/test/nist_cavp/tdes_ecb.txt", TestCipher); } + +TEST(CipherTest, WycheproofAESCBC) { + FileTestGTest("third_party/wycheproof/aes_cbc_pkcs5_test.txt", + [](FileTest *t) { + t->IgnoreInstruction("type"); + t->IgnoreInstruction("ivSize"); + + std::string key_size; + ASSERT_TRUE(t->GetInstruction(&key_size, "keySize")); + const EVP_CIPHER *cipher; + switch (atoi(key_size.c_str())) { + case 128: + cipher = EVP_aes_128_cbc(); + break; + case 192: + cipher = EVP_aes_192_cbc(); + break; + case 256: + cipher = EVP_aes_256_cbc(); + break; + default: + FAIL() << "Unsupported key size: " << key_size; + } + + std::vector key, iv, msg, ct; + ASSERT_TRUE(t->GetBytes(&key, "key")); + ASSERT_TRUE(t->GetBytes(&iv, "iv")); + ASSERT_TRUE(t->GetBytes(&msg, "msg")); + ASSERT_TRUE(t->GetBytes(&ct, "ct")); + ASSERT_EQ(EVP_CIPHER_key_length(cipher), key.size()); + ASSERT_EQ(EVP_CIPHER_iv_length(cipher), iv.size()); + WycheproofResult result; + ASSERT_TRUE(GetWycheproofResult(t, &result)); + + bssl::ScopedEVP_CIPHER_CTX ctx; + std::vector out; + const std::vector chunk_sizes = {0, 1, 2, 5, 7, 8, 9, 15, 16, + 17, 31, 32, 33, 63, 64, 65, 512}; + for (size_t chunk : chunk_sizes) { + SCOPED_TRACE(chunk); + if (result == WycheproofResult::kValid) { + ASSERT_TRUE(EVP_DecryptInit_ex(ctx.get(), cipher, nullptr, key.data(), + iv.data())); + ASSERT_TRUE(DoCipher(ctx.get(), &out, ct, chunk)); + EXPECT_EQ(Bytes(msg), Bytes(out)); + + ASSERT_TRUE(EVP_EncryptInit_ex(ctx.get(), cipher, nullptr, key.data(), + iv.data())); + ASSERT_TRUE(DoCipher(ctx.get(), &out, msg, chunk)); + EXPECT_EQ(Bytes(ct), Bytes(out)); + } else { + ASSERT_TRUE(EVP_DecryptInit_ex(ctx.get(), cipher, nullptr, key.data(), + iv.data())); + EXPECT_FALSE(DoCipher(ctx.get(), &out, ct, chunk)); + } + } + }); +} diff --git a/crypto/fipsmodule/cipher/cipher.c b/crypto/fipsmodule/cipher/cipher.c index f3d40574..39e038be 100644 --- a/crypto/fipsmodule/cipher/cipher.c +++ b/crypto/fipsmodule/cipher/cipher.c @@ -496,6 +496,10 @@ int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx) { return ctx->cipher->nid; } +int EVP_CIPHER_CTX_encrypting(const EVP_CIPHER_CTX *ctx) { + return ctx->encrypt; +} + unsigned EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx) { return ctx->cipher->block_size; } diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h index 643bf040..1db81ae5 100644 --- a/include/openssl/cipher.h +++ b/include/openssl/cipher.h @@ -243,6 +243,10 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_CIPHER_CTX_cipher( // configured. OPENSSL_EXPORT int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx); +// EVP_CIPHER_CTX_encrypting returns one if |ctx| is configured for encryption +// and zero otherwise. +OPENSSL_EXPORT int EVP_CIPHER_CTX_encrypting(const EVP_CIPHER_CTX *ctx); + // EVP_CIPHER_CTX_block_size returns the block size, in bytes, of the cipher // underlying |ctx|, or one if the cipher is a stream cipher. It will crash if // no cipher has been configured. diff --git a/sources.cmake b/sources.cmake index 45dc0933..4a3cad7e 100644 --- a/sources.cmake +++ b/sources.cmake @@ -59,6 +59,7 @@ set( crypto/x509/some_names1.pem crypto/x509/some_names2.pem crypto/x509/some_names3.pem + third_party/wycheproof/aes_cbc_pkcs5_test.txt third_party/wycheproof/aes_gcm_siv_test.txt third_party/wycheproof/aes_gcm_test.txt third_party/wycheproof/chacha20_poly1305_test.txt diff --git a/third_party/wycheproof/aes_cbc_pkcs5_test.txt b/third_party/wycheproof/aes_cbc_pkcs5_test.txt new file mode 100644 index 00000000..0d9bc9d6 --- /dev/null +++ b/third_party/wycheproof/aes_cbc_pkcs5_test.txt @@ -0,0 +1,1812 @@ +# Imported from Wycheproof's aes_cbc_pkcs5_test.json. +# This file is generated by convert_wycheproof.go. Do not edit by hand. +# +# Algorithm: AES-CBC-PKCS5 +# Generator version: 0.4 + +[ivSize = 128] +[keySize = 128] + +# tcId = 1 +# empty message +ct = b10ab60153276941361000414aed0a9d +iv = da9520f7d3520277035173299388bee2 +key = e34f15c7bd819930fe9d66e0c166e61c +msg = +result = valid + +# tcId = 2 +# message size divisible by block size +ct = d1fa697f3e2e04d64f1a0da203813ca5bc226a0b1d42287b2a5b994a66eaf14a +iv = c9ee3cd746bf208c65ca9e72a266d54f +key = e09eaa5a3f5e56d279d5e7a03373f6ea +msg = ef4eab37181f98423e53e947e7050fd0 +result = valid + +# tcId = 3 +# message size divisible by block size +ct = 514cbc69aced506926deacdeb0cc0a5a07d540f65d825b65c7db0075cf930a06e0124ae598461cab0b3251baa853e377 +iv = 8b2e86a9a185cfa6f51c7cc595b822bc +key = 9bd3902ed0996c869b572272e76f3889 +msg = a7ba19d49ee1ea02f098aa8e30c740d893a4456ccc294040484ed8a00a55f93e +result = valid + +# tcId = 4 +# message size divisible by block size +ct = 137c824d7f7dc36f24216dde37c2e1c10cee533f6453de92e44b898fc3037d2e9e19d67a96387136dd9717a56e28614a5c177158f402ce2936fd98d1feb6a817 +iv = 2717d10eb2eea3b39ec257e43307a260 +key = 75ce184447cada672e02290310d224f7 +msg = c774810a31a6421ad8eaafd5c22fa2455e2c167fee4a0b73ff927b2d96c69da1e939407b86b1c19bcfc69c434c3cf8a2 +result = valid + +# tcId = 5 +# small plaintext size +ct = 599d77aca16910b42d8b4ac9560efe1b +iv = 155fd397579b0b5d991d42607f2cc9ad +key = e1e726677f4893890f8c027f9d8ef80d +msg = 3f +result = valid + +# tcId = 6 +# small plaintext size +ct = 74e20bf03a0ad4b49edc86a1b19c3d1d +iv = 4eb836be6808db264cb1111a3283b394 +key = b151f491c4c006d1f28214aa3da9a985 +msg = 27d9 +result = valid + +# tcId = 7 +# small plaintext size +ct = 3f7a26558ba51cf352219d34c46907ae +iv = a8446c27ea9068d8d924d5c4eac91157 +key = c36ff15f72777ee21deec07b63c1a0cd +msg = 50b428 +result = valid + +# tcId = 8 +# small plaintext size +ct = c29d1463baccc558fd720c897da5bb98 +iv = ef026d27da3702d7bb72e5e364a8f8f2 +key = 32b9c5c78c3a0689a86052420fa1e8fc +msg = 0b9262ec +result = valid + +# tcId = 9 +# small plaintext size +ct = e24a717914f9cc8eaa1dc96f7840d6af +iv = c9defd3929dcd6c355c144e9750dd869 +key = 43151bbaef367277ebfc97509d0aa49c +msg = eaa91273e7 +result = valid + +# tcId = 10 +# small plaintext size +ct = f080e487f4e5b7aed793ea95ffe4bb30 +iv = ce91e0454b0123f1ead0f158826459e9 +key = 481440298525cc261f8159159aedf62d +msg = 6123c556c5cc +result = valid + +# tcId = 11 +# small plaintext size +ct = 27cadee413ed901f51c9366d731d95f6 +iv = 1cb7bc8fe00523e7743d3cd9f483d6fe +key = 9ca26eb88731efbf7f810d5d95e196ac +msg = 7e48f06183aa40 +result = valid + +# tcId = 12 +# small plaintext size +ct = 59bf12427b51a3aee0c9d3c540d04d24 +iv = a345f084229dbfe0ceab6c6939571532 +key = 48f0d03e41cc55c4b58f737b5acdea32 +msg = f4a133aa6d5985a0 +result = valid + +# tcId = 13 +# small plaintext size +ct = 1a0a18355f8ca4e6e2cf31da18d070da +iv = e5b6f73f132355b7be7d977bea068dfc +key = 1c958849f31996b28939ce513087d1be +msg = b0d2fee11b8e2f86b7 +result = valid + +# tcId = 14 +# small plaintext size +ct = cef498ea61715a27f400418d1d5bfbf0 +iv = c7cd10ca949ea03e7d4ba204b69e09b8 +key = 39de0ebea97c09b2301a90009a423253 +msg = 81e5c33b4c620852f044 +result = valid + +# tcId = 15 +# small plaintext size +ct = 7ab43ddc45835ce40d2280bcea6a63f2 +iv = bb8c9af30821dfeb7124392a554d9f01 +key = 91656d8fc0aced60ddb1c4006d0dde53 +msg = 7b3e440fe566790064b2ec +result = valid + +# tcId = 16 +# small plaintext size +ct = c70b457c945ad40895cf4c8be3ce7c66 +iv = 54c3b90ca6e933f9094334d0263d3775 +key = af7d5134720b5386158d51ea126e7cf9 +msg = 7cc6fcc925c20f3c83b5567c +result = valid + +# tcId = 17 +# small plaintext size +ct = f9900afee2acfe63f8f15d81bbf64c39 +iv = 9a2c5e91d4f0b9b9da64b46c5c2c8cb2 +key = 4ed56753de6f75a032ebabca3ce27971 +msg = 0c8c0f5619d9f8da5339281285 +result = valid + +# tcId = 18 +# small plaintext size +ct = da4137bd8ac78e75a700b3de806f2d6f +iv = cf7951501104e1434309e6b936ec1742 +key = beba50c936b696c15e25046dffb23a64 +msg = 821ea8532fbabffb6e3d212e9b46 +result = valid + +# tcId = 19 +# small plaintext size +ct = fed05321d11d978e2ec32527ecfce06c +iv = 90f5cf4fbfd2e2a1ab8eef402617bd5c +key = 501d81ebf912ddb87fbe3b7aac1437bc +msg = 2368e3c3636b5e8e94d2081adbf798 +result = valid + +# tcId = 20 +# plaintext size > 16 +ct = 8d55dc10584e243f55d2bdbb5758b7fabcd58c8d3785f01c7e3640b2a1dadcd9 +iv = 54f2459e40e002763144f4752cde2fb5 +key = 831e664c9e3f0c3094c0b27b9d908eb2 +msg = 26603bb76dd0a0180791c4ed4d3b058807 +result = valid + +# tcId = 21 +# plaintext size > 16 +ct = e9199842355ea0c3dbf1b2a94fef1c802a95d024df9e407883cf5bf1f02c3cdc +iv = 088e01c2c65b26e7ad6af7b92ea09d73 +key = cbffc6c8c7f76f46349c32d666f4efb0 +msg = 6df067add738195fd55ac2e76b476971b9a0e6d8 +result = valid + +# tcId = 22 +# plaintext size > 16 +ct = 19beb4db2be0f3aff0083583038b2281a77c85b5f345ba4d2bc7f742a14f9247 +iv = d9c9468796a2f5741b84d2d41430c5d3 +key = fda6a01194beb462953d7e6c49b32dac +msg = f60ae3b036abcab78c98fc1d4b67970c0955cb6fe24483f8907fd73319679b +result = valid + +# tcId = 23 +# plaintext size > 16 +ct = 84904fc92bd2e7590aa268e667370327b9446f41067dd40d3e5091a63a0d5687e4926e00cc3cb461c3b85d80ee2da818 +iv = c98b47808add45c0c891983ec4b09846 +key = efd9caa8ac68e9e29acdae57e93bcea8 +msg = 3e1d2001f1e475b972738936443a5f51eedaf802a66fadf2406cfaadb0549149fcb9f485e534dc2d +result = valid + +# tcId = 24 +# plaintext size > 16 +ct = 1d1391593a336be4b207295ad0542bc4ef2f39053066e12c38f71603f377fd42f4f0b2b5a42cdfeaee2af039f06fcf347abe171af3157ff07f3cdd3b33e11a60caecf9890325c132eeb66ab847278d165c26bca7c30486bb2fd83b63c5ff7ae0 +iv = 08e9410de244d3f40607ebae38fa74e7 +key = 37e4dbdc436258d5a9adb9f205c77cf3 +msg = 24a874aec067116ad22eb55846ded3f5e86919a135585c929a86d92b2958fed110e52e33804887243584a6a94402cc9a105e0c940ec335bd2890f16dcce3fc8bd02873c80ade6f1ac08683130bcca454 +result = valid + +# tcId = 25 +# zero padding +ct = aa62606a287476777b92d8e4c4e53028 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 26 +# zero padding +ct = ada437b682c92384b6c23ec10a21b3d8 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 27 +# zero padding +ct = 26c5b3e540ee3dd6b52d14afd01a44f8 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 303132333435363738396162636465 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 28 +# zero padding +ct = fbcbdfdaaf17980be939c0b243266ecbc0deb417e98aba3ee12fea2921f8ae51 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 29 +# zero padding +ct = fbcbdfdaaf17980be939c0b243266ecb1188ff22f6563f6173440547d1e0dfd8 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 30 +# padding with 0xff +ct = 726570a34cea08139d9f836579102a0e +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 31 +# padding with 0xff +ct = c8ef7ac3fd659ce7157d72a25f0a5048 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 32 +# padding with 0xff +ct = 6123c889bbc766acd4bca4cb982f9978 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 303132333435363738396162636465 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 33 +# padding with 0xff +ct = fbcbdfdaaf17980be939c0b243266ecb442cd16f7410fca70924b573f7967e84 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 34 +# padding with 0xff +ct = fbcbdfdaaf17980be939c0b243266ecbb20f899b0e7c1d65b931af94b5c44c25 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 35 +# bit padding +ct = 50aeed98a820c5a037a5aa4d4ef3090b +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 36 +# bit padding +ct = 25ee339006f948f42713543c62467ef9 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 37 +# bit padding +ct = 97914574676ed5b8db0b6f3931195b3f +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 303132333435363738396162636465 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 38 +# bit padding +ct = fbcbdfdaaf17980be939c0b243266ecb2874a1e2d28dd18e5573df9fd59fd789 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 39 +# bit padding +ct = fbcbdfdaaf17980be939c0b243266ecbb547c4fddbdcd3e02f438a2e48587594 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 40 +# padding longer than 1 block +ct = d17ccbb26f0aa95f397b20063547349bac24c5429cbea591e96595cccc11451b +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 41 +# padding longer than 1 block +ct = fc07025e81d43efa85f92afdf8781b1e88598e12d6812df43733e93414b9e901 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 42 +# padding longer than 1 block +ct = deb1746f4e9e0be4a21825b071b6e93303031651e0c59091e2ae0fbcce11b987 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 303132333435363738396162636465 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 43 +# padding longer than 1 block +ct = fbcbdfdaaf17980be939c0b243266ecb563d35096fde10ccb6f768438c9eb4ec90f399b76924c716e9f94143263306c6 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 44 +# padding longer than 1 block +ct = fbcbdfdaaf17980be939c0b243266ecbc8fd2e2c5362acf5212bd47859aa827d8469b87b0e6adafe3dba98c1885b6345 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 45 +# ANSI X.923 padding +ct = ca5dd2d09bd56eec9e8acaeca20af68e +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 46 +# ANSI X.923 padding +ct = 01e53a5ec9b0957c45f79ed0f4b2b982 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 47 +# ANSI X.923 padding +ct = fbcbdfdaaf17980be939c0b243266ecbd3909bb3457e5b946ff709be9a2ed84d +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 48 +# ANSI X.923 padding +ct = fbcbdfdaaf17980be939c0b243266ecbc5ab3ab637166a6a067b82b5672c08f8 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 49 +# ISO 10126 padding +ct = ba0726bd6dea11382b19c842e2ddead2 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 50 +# ISO 10126 padding +ct = 22f18b85c729903744fb8db5ed2840d4 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 51 +# ISO 10126 padding +ct = fbcbdfdaaf17980be939c0b243266ecb6b103fbe43519a18880b7e6d9153e1c2 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 52 +# ISO 10126 padding +ct = fbcbdfdaaf17980be939c0b243266ecbe00bdb15b8a61285447498700d35e0c6 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 53 +# padding longer than message +ct = d17ccbb26f0aa95f397b20063547349b +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 54 +# padding longer than message +ct = 2056dfa339fa00be6836999411a98c76 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 55 +# padding longer than message +ct = f92628f6418d8d9c9afac233861b3835 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 303132333435363738396162636465 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 56 +# padding longer than message +ct = fbcbdfdaaf17980be939c0b243266ecbc0c41093b495a7d5a080d976493fd0e7 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 57 +# padding longer than message +ct = fbcbdfdaaf17980be939c0b243266ecb6770446a5ccaa26f7d4f970cc5834eba +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 58 +# invalid padding +ct = 4ff3e623fdd432608c183f40864177af +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 59 +# invalid padding +ct = 6a1ef1e6ae6a788777aabd9ccf3cf43a +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 60 +# invalid padding +ct = fbcbdfdaaf17980be939c0b243266ecbee1345cd513161b241f4ae2799b0327f +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 61 +# invalid padding +ct = fbcbdfdaaf17980be939c0b243266ecbe0d539beef6f2d4f7cda4fd9f4f05570 +iv = 23468aa734f5f0f19827316ff168e94f +key = db4f3e5e3795cc09a073fa6a81e5a6bc +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +[ivSize = 128] +[keySize = 192] + +# tcId = 62 +# empty message +ct = ff0c315873b4b1872abef2353b792ef0 +iv = db20f9a6f4d6b4e478f1a4b9d4051d34 +key = 3d6bf9edae6d881eade0ff8c7076a4835b71320c1f36b631 +msg = +result = valid + +# tcId = 63 +# message size divisible by block size +ct = 7dbd573e4db58a318edfe29f199d8cda538a49f36486337c2711163e55fd5d0b +iv = 69a76dc4da64d89c580eb75ae975ec39 +key = f4bfa5aa4f0f4d62cf736cd2969c43d580fdb92f2753bedb +msg = 0e239f239705b282ce2200fe20de1165 +result = valid + +# tcId = 64 +# message size divisible by block size +ct = bd0258909e5b72438d95ca4b29c8a79c6228fd06a3b2fa06f7659654c7b24610f23f2fb16313b7d3614cb0cd16fabb8e +iv = 6525667350930fb945dd1895a3abfcd1 +key = 9d11abc1fcb248a436598e695be12c3c2ed90a18ba09d62c +msg = aa5182cae2a8fb068c0b3fb2be3e57ae523d13dffd1a944587707c2b67447f3f +result = valid + +# tcId = 65 +# message size divisible by block size +ct = 6cbeacf8de25d7dd9dcdc087bf2f80873b1eb335400589076f8d2bf81e294c5d72b85eb8ac9558b0de9e9fbee4b18716e5220c507fbb9d319a08f67816765ca6 +iv = 3943d8fddd5bb2a59772df31a31a8fff +key = 7e41d83181659a2c38da5ead353cdb04c2b4d4a3cfe58e25 +msg = 8a32d11c7a11aa72e13381632b1310f4fd90fc209a6a350e61c069a561871214f9c04fc1df7354cbe4d8d639c525d324 +result = valid + +# tcId = 66 +# small plaintext size +ct = 519925956d32e4fa350b1144f088e4e8 +iv = 1379d48493f743e6a149deb3b9bab31e +key = 915429743435c28997a33b33b6574a953d81dae0e7032e6a +msg = 58 +result = valid + +# tcId = 67 +# small plaintext size +ct = bfb90aa7de1bdeed5bdc5703bdfd9630 +iv = 48c7f44b43a1279d820733e6cb30617a +key = f0c288ba26b284f9fb321b444a6517b3cdda1a799d55fdff +msg = 0f7e +result = valid + +# tcId = 68 +# small plaintext size +ct = b1a25816908c086f26037d10b7be9ad9 +iv = 2c287b38cc30c8c351b087b91a6a97ba +key = 6b55e4d4fd6847a80a6bfb0dcc0aa93f9fd797fc5c50292e +msg = 33f530 +result = valid + +# tcId = 69 +# small plaintext size +ct = 74dbdecbfa94b71d2d6ef03200c7d095 +iv = 61f6060919c9c09ef06be28f39c344aa +key = 1eb21a9e995a8e45c9e71ecbd6fe615b3e0318007c64b644 +msg = 3aa73c48 +result = valid + +# tcId = 70 +# small plaintext size +ct = 10c860aaee23c3c3c1b9306b189dd80d +iv = 7682005907bfef3ce00196a17ad2246d +key = 710e2d5d4a9f0bc7e50796655e046a18cc5769d7764355da +msg = 7e4c690a88 +result = valid + +# tcId = 71 +# small plaintext size +ct = 673dcd444386930a0cc577fab4501e5c +iv = 1f6c912997ce007701e5fdf407c6b421 +key = d8c09ea400779b63e774bdacd0cb7b5dd6f736ca23d52acf +msg = e9520280973b +result = valid + +# tcId = 72 +# small plaintext size +ct = 059e5f72a81d8820add8eae8fabcdd42 +iv = 5854033ae50de090678432781a168b6c +key = 8e67e9a0863b55bed408866f1cbc05357abe3f9d79f406f2 +msg = 4880b412287a0b +result = valid + +# tcId = 73 +# small plaintext size +ct = c412159fd5ae20d771b7d2e734124d6a +iv = 003b2d86d8b636c58cf664565572d5e6 +key = 28d8da67806410e5565bcc5a9d7ab9fb357413fa0158378c +msg = 004e3f4a4e6db955 +result = valid + +# tcId = 74 +# small plaintext size +ct = 4aba571c2c5ab9a6140f16efc68c8ec1 +iv = 3f22b50f888ab9424ba871d15aac55b7 +key = dc968dd89fd602bb7eca6f3a8a13e4f59c08d02a514b1934 +msg = 41a25354efeb1bc3b8 +result = valid + +# tcId = 75 +# small plaintext size +ct = 66d1b9152a8cd1a88eab341c775070b4 +iv = e4b8dde04b49fa6b88bfccd8d70c21d1 +key = 7658951c0f620d82afd92756cc2d7983b79da3e56fdd1b78 +msg = f0e82fb5c5666f4af49f +result = valid + +# tcId = 76 +# small plaintext size +ct = d9377788e2881a48f9347786db7df51f +iv = 7753f616cd8796c9b8a3bbfbe6cb1e7f +key = d9574c3a221b986690931faac5258d9d3c52362b2cb9b054 +msg = 178ea8404ba54ee4e4522c +result = valid + +# tcId = 77 +# small plaintext size +ct = db825f4434ea3bb53576fa7385fb7dfe +iv = eae9ee19ccb7f8b087675709c4d35f73 +key = 704409bab28085c44981f28f75dd143a4f747106f63f262e +msg = cda5709e7f115624e74ab031 +result = valid + +# tcId = 78 +# small plaintext size +ct = 3e7287df2a5ed9de4d817e352bd47ea7 +iv = a6aaff339a729d30a7ec1328db36d23e +key = d8d06ef6a53bbff5c8f12d791b8f4c67e574bf440736d1cc +msg = a1171eae1979f48345dd9485a0 +result = valid + +# tcId = 79 +# small plaintext size +ct = 17c3ade4b469ae614760039a8fa6250e +iv = 92fda71e88c70d18ed71b992735a2150 +key = 71129e781613f39d9ac39fbde2628b44c250c14deb5ef9e2 +msg = 967593cc64bcbf7f3c58d04cb82b +result = valid + +# tcId = 80 +# small plaintext size +ct = 9cafecff2a28d02f732573f65a2cadca +iv = ed6596c86b98123ad2f3c573e974d051 +key = 850fc859e9f7b89a367611dee6698f33962d8245ca8dc331 +msg = 586f4f171af116519061a8e0e77940 +result = valid + +# tcId = 81 +# plaintext size > 16 +ct = 401ad889bdb9d38816c782e00b168ccccde9bf75f4be868ceb91237e8b37b750 +iv = c45b52a240eba3bdde5dfd57f3d474fb +key = cfd3f68873d81a27d2bfce876c79f6e609074dec39e34614 +msg = b1973cb25aa87ef9d1a8888b0a0f5c04c6 +result = valid + +# tcId = 82 +# plaintext size > 16 +ct = 455d516e87851e6c894578a0f7126e0acbc7cfbb1d80296647ab89a79dfa6f71 +iv = 07ece5fe02266e073499fd4d66929034 +key = b7f165bced1613da5e747fdf9255832d30c07f2deeb5a326 +msg = 289647ea8d0ff31375a82aa1c620903048bb1d0e +result = valid + +# tcId = 83 +# plaintext size > 16 +ct = cbf541330a5a9bda24984976b0cf96ba08ef521fa2cdb3df839128570e222ac4 +iv = d799157bc1f77c182027be918b30783a +key = 9bbe6e004fb260dadb02b68b78954f1da5e6a2d02e0aeefe +msg = 665423092ce95b927e98b8082030f58e33f3ec1b0c29532c2f421855f00f97 +result = valid + +# tcId = 84 +# plaintext size > 16 +ct = 03225f08592efca14ad8ecf822465e8be4157465d0be150dd3d645b6fef1b19ca7bbaa5940b2a7895fa2b0ee55b0d4ec +iv = fdf97645e4192ba84728bbf6683f79de +key = 1381fbd5e79045d40f29790fc1a436c95b040a046ebf0b0f +msg = d575dce596dd0a2cd1c18dab7eb0948fafb8669969a48b6314493bfb8daf8acacd51382f9bb5b357 +result = valid + +# tcId = 85 +# plaintext size > 16 +ct = 27ad00313f328f0d3e6c3238ab560cb7243a9f54f7dff79b5a7a879439993d458017f09e8d3f694098bc19e61fe54085138664abb51a5b328cf2c9ce5d59726fff5e1b7553c143d9e0493c51cab23ff2ecdad91bd72bb12b32f3b611f9a4225d +iv = 059685f59247eea5d3f2a1532cb9d6b2 +key = 1bb4ed0e8435e20729f48c1b7e3af6e69e4cebf0731131cf +msg = 6d29dab6a0568c961ab3c825e0d89940cef06c63ade7e557cd3e92792eaf23c8cd5a0f029c63b1cdce4754ccfad7a73c7c9e50ffe081e9136f5e9a424077339de12ea43572afe1b034e833e5887763aa +result = valid + +# tcId = 86 +# zero padding +ct = 2c010faa25c68c3b30b8c1491c316d5f +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 87 +# zero padding +ct = 818454d433154a8e00e8f590b8a1c38c +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 88 +# zero padding +ct = 0a7423fae3f4c8d4633f839d36f2e9ff +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 303132333435363738396162636465 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 89 +# zero padding +ct = a7cfcdabcc5a2736a2708c1cb0b61432e83f6e522c371e6e71bde539595b70b7 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 90 +# zero padding +ct = a7cfcdabcc5a2736a2708c1cb0b6143254d15f47701fa54f5957828f386e1d97 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 91 +# padding with 0xff +ct = 6ded36cc7603e514014dfb7199900676 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 92 +# padding with 0xff +ct = 839f772f8e5f50afdc02f954094869fe +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 93 +# padding with 0xff +ct = eefe3553c099c187929b287e54f95726 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 303132333435363738396162636465 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 94 +# padding with 0xff +ct = a7cfcdabcc5a2736a2708c1cb0b61432d0531a2641d40467353542d79ce20ea8 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 95 +# padding with 0xff +ct = a7cfcdabcc5a2736a2708c1cb0b61432aaf08a090ecf66167ba5958100be7950 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 96 +# bit padding +ct = c0e402c8bbdda18c8ddd86470bd4b244 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 97 +# bit padding +ct = dc185d4572565e01131e471ec4c48125 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 98 +# bit padding +ct = 3ad1ddf3c3b320398785e6ec6544e9a2 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 303132333435363738396162636465 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 99 +# bit padding +ct = a7cfcdabcc5a2736a2708c1cb0b614325876f90cfbbdbcd85e8252d37c44c638 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 100 +# bit padding +ct = a7cfcdabcc5a2736a2708c1cb0b61432d18f57216b0e6426d911998a0e44156b +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 101 +# padding longer than 1 block +ct = f1605abb4e6628347c616da350fe243043a8d7b6aea244ca013f45241d802213 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 102 +# padding longer than 1 block +ct = a5f027fb9514ec8844534d452c940feb2c1807f57ed628156cf753f2ab698356 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 103 +# padding longer than 1 block +ct = f346fbc9744d723c42bbb2a4c934cdd4f1019e58c226cb2491fed621271a38f3 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 303132333435363738396162636465 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 104 +# padding longer than 1 block +ct = a7cfcdabcc5a2736a2708c1cb0b6143263eb325d36e13aa1d3dd1d7e071700104c7eb3e22e0859aa06296bc3194bb909 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 105 +# padding longer than 1 block +ct = a7cfcdabcc5a2736a2708c1cb0b61432219485d41584bd110a6d7a9cad472815d93921c48d4bcb509fdf2e63d7627c37 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 106 +# ANSI X.923 padding +ct = 215571a18a70140f3a0fd4c1b2dd6316 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 107 +# ANSI X.923 padding +ct = 2529985ec0ec3cf4bd22746e00d7bdc6 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 108 +# ANSI X.923 padding +ct = a7cfcdabcc5a2736a2708c1cb0b614329a8058657ac4a150e995cf83efccf051 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 109 +# ANSI X.923 padding +ct = a7cfcdabcc5a2736a2708c1cb0b614328a068626780ba600f880bd5323f8ac15 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 110 +# ISO 10126 padding +ct = 13e75f9ffe2afa81b9a2e7faf74aab6d +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 111 +# ISO 10126 padding +ct = a382197fe491f5c3f91b629dc47c3d58 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 112 +# ISO 10126 padding +ct = a7cfcdabcc5a2736a2708c1cb0b614320b842e5d6e32660263ff814a0277659f +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 113 +# ISO 10126 padding +ct = a7cfcdabcc5a2736a2708c1cb0b614321d2f736515cfe17921800eb392e0139d +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 114 +# padding longer than message +ct = f1605abb4e6628347c616da350fe2430 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 115 +# padding longer than message +ct = b3602ff0f797cbbdde35105d27e55b94 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 116 +# padding longer than message +ct = 0334c1bc34b597f60a639e74d8b45c4e +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 303132333435363738396162636465 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 117 +# padding longer than message +ct = a7cfcdabcc5a2736a2708c1cb0b61432c3f9fe42d9715035bcda97d27405ced7 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 118 +# padding longer than message +ct = a7cfcdabcc5a2736a2708c1cb0b61432362b014a9abdaf25ae1f6dfb99d03d9d +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 119 +# invalid padding +ct = 97ab405b86c388f144cf74fbb9358493 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 120 +# invalid padding +ct = 691f6009802f0fb4920928db7eca1349 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 121 +# invalid padding +ct = a7cfcdabcc5a2736a2708c1cb0b61432a99fc96a6fa0c9fcb18de1672d74914d +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 122 +# invalid padding +ct = a7cfcdabcc5a2736a2708c1cb0b61432dd1bb2e98102322fb1aa92c979d4c7c3 +iv = a3fe6f76e8f582830bbe83574a7bb729 +key = 9e20311eaf2eaf3e3a04bc52564e67313c84940a2996e3f2 +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +[ivSize = 128] +[keySize = 256] + +# tcId = 123 +# empty message +ct = e7c166554d1bb32792c981fa674cc4d8 +iv = eb38ef61717e1324ae064e86f1c3e797 +key = 7bf9e536b66a215c22233fe2daaa743a898b9acb9f7802de70b40e3d6e43ef97 +msg = +result = valid + +# tcId = 124 +# message size divisible by block size +ct = 299295be47e9f5441fe83a7a811c4aeb2650333e681e69fa6b767d28a6ccf282 +iv = 9ec7b863ac845cad5e4673da21f5b6a9 +key = 612e837843ceae7f61d49625faa7e7494f9253e20cb3adcea686512b043936cd +msg = cc37fae15f745a2f40e2c8b192f2b38d +result = valid + +# tcId = 125 +# message size divisible by block size +ct = a615a39ff8f59f82cf72ed13e1b01e32459700561be112412961365c7a0b58aa7a16d68c065e77ebe504999051476bd7 +iv = e70d83a77a2ce722ac214c00837acedf +key = 96e1e4896fb2cd05f133a6a100bc5609a7ac3ca6d81721e922dadd69ad07a892 +msg = 91a17e4dfcc3166a1add26ff0e7c12056e8a654f28a6de24f4ba739ceb5b5b18 +result = valid + +# tcId = 126 +# message size divisible by block size +ct = ed3ed8ecdbabc0a8c06259e913f3ab9a1f1dc6d05e5dfdd9c80e1008f3423064d540681291bbd3e159820fee3ff190a68fe506d8ab9e62c8e7b3816093336dbc +iv = bd003c0a9d804c29f053a77cb380cb47 +key = 649e373e681ef52e3c10ac265484750932a9918f28fb824f7cb50adab39781fe +msg = 39b447bd3a01983c1cb761b456d69000948ceb870562a536126a0d18a8e7e49b16de8fe672f13d0808d8b7d957899917 +result = valid + +# tcId = 127 +# small plaintext size +ct = 42c0b89a706ed2606cd94f9cb361fa51 +iv = 014d2e13dfbcb969ba3bb91442d52eca +key = e754076ceab3fdaf4f9bcab7d4f0df0cbbafbc87731b8f9b7cd2166472e8eebc +msg = 40 +result = valid + +# tcId = 128 +# small plaintext size +ct = b90c326b72eb222ddb4dae47f2bc223c +iv = fae3e2054113f6b3b904aadbfe59655c +key = ea3b016bdd387dd64d837c71683808f335dbdc53598a4ea8c5f952473fafaf5f +msg = 6601 +result = valid + +# tcId = 129 +# small plaintext size +ct = 567c45c5e6d570bef583d21cac43757d +iv = 203cd3e0068e43d38b6f2e48a188f252 +key = 73d4709637857dafab6ad8b2b0a51b06524717fedf100296644f7cfdaae1805b +msg = f1d300 +result = valid + +# tcId = 130 +# small plaintext size +ct = c45afe62fc9351ad0fc9b03bc2f3a91f +iv = abcf220eede012279c3a2d33295ff273 +key = d5c81b399d4c0d1583a13da56de6d2dc45a66e7b47c24ab1192e246dc961dd77 +msg = 2ae63cbf +result = valid + +# tcId = 131 +# small plaintext size +ct = 281fa533d0740cc6cdf94dd1a5f7402d +iv = 01373953578902909ae4f6cb0a72587c +key = 2521203fa0dddf59d837b2830f87b1aa61f958155df3ca4d1df2457cb4284dc8 +msg = af3a015ea1 +result = valid + +# tcId = 132 +# small plaintext size +ct = 3f3f39697bd7e88d85a14132be1cbc48 +iv = 3fb0d5ecd06c71150748b599595833cb +key = 665a02bc265a66d01775091da56726b6668bfd903cb7af66fb1b78a8a062e43c +msg = 3f56935def3f +result = valid + +# tcId = 133 +# small plaintext size +ct = 379990d91557614836381d5026fa04a0 +iv = 27a2db6114ece34fb6c23302d9ba07c6 +key = facd75b22221380047305bc981f570e2a1af38928ea7e2059e3af5fc6b82b493 +msg = 57bb86beed156f +result = valid + +# tcId = 134 +# small plaintext size +ct = 7ecefe24caa78a68f4031d40fdb9a43a +iv = 9b2b631e3f24bdc814a14abb3416059e +key = 505aa98819809ef63b9a368a1e8bc2e922da45b03ce02d9a7966b15006dba2d5 +msg = 2e4e7ef728fe11af +result = valid + +# tcId = 135 +# small plaintext size +ct = ffe4ec8baf4af40ab2e7f4d6193fae9c +iv = 92cfc4eb146b18b73fc76483fc5e1229 +key = f942093842808ba47f64e427f7351dde6b9546e66de4e7d60aa6f328182712cf +msg = 852a21d92848e627c7 +result = valid + +# tcId = 136 +# small plaintext size +ct = ef96215e7950e7be8aae78b9ec8aaf39 +iv = 4ceed8dcb75b6259dad737bdef96f099 +key = 64be162b39c6e5f1fed9c32d9f674d9a8cde6eaa2443214d86bd4a1fb53b81b4 +msg = 195a3b292f93baff0a2c +result = valid + +# tcId = 137 +# small plaintext size +ct = 4ed0eac75b05868078303875f82fb4f0 +iv = 2d4cead3f1120a2b4b59419d04951e20 +key = b259a555d44b8a20c5489e2f38392ddaa6be9e35b9833b67e1b5fdf6cb3e4c6c +msg = afd73117330c6e8528a6e4 +result = valid + +# tcId = 138 +# small plaintext size +ct = f4d298caea7c390fc8c7f558f584f852 +iv = a10392634143c2a3332fa0fb3f72200a +key = 2c6fc62daa77ba8c6881b3dd6989898fef646663cc7b0a3db8228a707b85f2dc +msg = 0ff54d6b6759120c2e8a51e3 +result = valid + +# tcId = 139 +# small plaintext size +ct = 5e1c00e2ec829f92b87c6adf5c25262d +iv = 38b916a7ad3a9251ae3bd8865ca3a688 +key = abab815d51df29f740e4e2079fb798e0152836e6ab57d1536ae8929e52c06eb8 +msg = f0058d412a104e53d820b95a7f +result = valid + +# tcId = 140 +# small plaintext size +ct = bf3a04ddb2dbfe7c6dc9e15aa67be25d +iv = bfcc3ac44d12e42d780c1188ac64b57f +key = 3d5da1af83f7287458bff7a7651ea5d8db72259401333f6b82096996dd7eaf19 +msg = aacc36972f183057919ff57b49e1 +result = valid + +# tcId = 141 +# small plaintext size +ct = fdcfa77f5bd09326b4c11f9281b72474 +iv = 35bc82e3503b95044c6406a8b2c2ecff +key = c19bdf314c6cf64381425467f42aefa17c1cc9358be16ce31b1d214859ce86aa +msg = 5d066a92c300e9b6ddd63a7c13ae33 +result = valid + +# tcId = 142 +# plaintext size > 16 +ct = fbea776fb1653635f88e2937ed2450ba4e9063e96d7cdba04928f01cb85492fe +iv = 4b74bd981ea9d074757c3e2ef515e5fb +key = 73216fafd0022d0d6ee27198b2272578fa8f04dd9f44467fbb6437aa45641bf7 +msg = d5247b8f6c3edcbfb1d591d13ece23d2f5 +result = valid + +# tcId = 143 +# plaintext size > 16 +ct = 3a79bb6084c7116b58afe52d7181a0aacee1caa11df959090e2e7b0073d74817 +iv = 9a1d8ccc24c5e4d3995480af236be103 +key = c2039f0d05951aa8d9fbdf68be58a37cf99bd1afcedda286a9db470c3729ca92 +msg = ed5b5e28e9703bdf5c7b3b080f2690a605fcd0d9 +result = valid + +# tcId = 144 +# plaintext size > 16 +ct = 642b11efb79b49e5d038bc7aa29b8c6c3ce0bf11c3a69670eb565799908be66d +iv = 400aab92803bcbb44a96ef789655b34e +key = 4f097858a1aec62cf18f0966b2b120783aa4ae9149d3213109740506ae47adfe +msg = ee53d8e5039e82d9fcca114e375a014febfea117a7e709d9008d43858e3660 +result = valid + +# tcId = 145 +# plaintext size > 16 +ct = a9b051354f0cf61f11921b330e60f996de796aeb68140a0f9c5962e1f48e4805262fb6f53b26d9bb2fa0e359efe14734 +iv = 6eedf45753ffe38f2407fbc28ab5959c +key = 5f99f7d60653d79f088dd07ef306b65e057d36e053fa1c9f6854425c019fd4df +msg = fcc9212c23675c5d69a1266c77389bc955e453daba20034aabbcd502a1b73e05af30f8b7622abdbc +result = valid + +# tcId = 146 +# plaintext size > 16 +ct = 5074f46f1a6d0eeff070d623172eb15bbfc83e7d16466a00c9da5f4545eecf44adbf60cf9ac9aa1a3ec5eca22d4a34a7b21ca44d214c9d04ab1cb0b2c07001de9adb46f3c12f8f48436b516a409bf6cbdf1871dee3115d5cbb7943558b68867e +iv = f88551c6aa197f9ad80251c2e32d7663 +key = 95aaa5df4ccb529e9b2dc929e770c1f419f8e8933bfb36f632f532b3dcad2ba6 +msg = f5735567b7c8312f116517788b091cc6cb1d474b010a77910154fd11c3b2f0cd19f713b63d66492e8cc7ee8ad714783f46c305a26416e11ff4b99ec5ce2550593cc5ec1b86ba6a66d10f82bdff827055 +result = valid + +# tcId = 147 +# zero padding +ct = e07558d746574528fb813f34e3fb7719 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 148 +# zero padding +ct = c01af61276368818a8295f7d4b5bb2fd +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 149 +# zero padding +ct = 97dd9716f06be49160399a5b212250ae +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 303132333435363738396162636465 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 150 +# zero padding +ct = 8881e9e02fa9e3037b397957ba1fb7ce783bb4b4e18d7c646f38e0bb8ff92896 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 151 +# zero padding +ct = 8881e9e02fa9e3037b397957ba1fb7ce64679a46621b792f643542a735f0bbbf +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 152 +# padding with 0xff +ct = c007ddffb76b95208505fe7f3be96172 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 153 +# padding with 0xff +ct = e9b7719c4c2b9fa6b94cb50e87b28156 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 154 +# padding with 0xff +ct = 77b31f474c4bd489dbadd532643d1fa5 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 303132333435363738396162636465 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 155 +# padding with 0xff +ct = 8881e9e02fa9e3037b397957ba1fb7cea0166e9e1c0122cb2e2983fc0fac7176 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 156 +# padding with 0xff +ct = 8881e9e02fa9e3037b397957ba1fb7ce6f0effa789cbb0b875cc53cc8f7b3caf +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 157 +# bit padding +ct = 4dd5f910c94700235c9ed239160e34e2 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 158 +# bit padding +ct = 94d18b5923f8f3608ae7ad494fbb517e +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 159 +# bit padding +ct = 0c92886dbcb030b873123a25d224da42 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 303132333435363738396162636465 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 160 +# bit padding +ct = 8881e9e02fa9e3037b397957ba1fb7ce851be67798a2937cd6681165da6dce03 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 161 +# bit padding +ct = 8881e9e02fa9e3037b397957ba1fb7ce45658a37aaebc51098866b0894007e8e +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 162 +# padding longer than 1 block +ct = 524236e25956e950713bec0d3d579068f34e4d18c4ccab081317dae526fe7fca +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 163 +# padding longer than 1 block +ct = d29eb845640c3a8878f51bc50e290aa4a65a34a93728fe8f82fdb8d3d2b7c648 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 164 +# padding longer than 1 block +ct = c34563be2952277c0f5c67ae1d6f847118730dd7f6a502ceef3c4bce5999f7aa +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 303132333435363738396162636465 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 165 +# padding longer than 1 block +ct = 8881e9e02fa9e3037b397957ba1fb7cec0f74a1aa92fd9c96f9d15d193d1695c1eb33486e269277612f90f509f0535c2 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 166 +# padding longer than 1 block +ct = 8881e9e02fa9e3037b397957ba1fb7ce151ade309ec5200bacdd83b57ce794cd2b3bf9f8957def829e8465f7db266f9e +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 167 +# ANSI X.923 padding +ct = fb38cbef13f1d5be9c0ac7ed9cbe023c +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 168 +# ANSI X.923 padding +ct = 18cf8988abe9a2463a3a75db1fac8bcc +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 169 +# ANSI X.923 padding +ct = 8881e9e02fa9e3037b397957ba1fb7cee16d6fc4b4d3cdf6f915996e437fd4cc +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 170 +# ANSI X.923 padding +ct = 8881e9e02fa9e3037b397957ba1fb7cea8f41f61ead6e9936cbe7ee5a1163b9b +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 171 +# ISO 10126 padding +ct = a05c14da0109093c195b4998812fe150 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 172 +# ISO 10126 padding +ct = c477877250c8e4ca2869f35c4757cdb4 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 173 +# ISO 10126 padding +ct = 8881e9e02fa9e3037b397957ba1fb7ce69f57c6e99c7b9df7d4879ccd15caf3d +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 174 +# ISO 10126 padding +ct = 8881e9e02fa9e3037b397957ba1fb7ce77f89a247c928f147748ce6bc8fc4b67 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 175 +# padding longer than message +ct = 524236e25956e950713bec0d3d579068 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 176 +# padding longer than message +ct = e03b6f2ae1c963b6dfa40b42d34314b7 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 177 +# padding longer than message +ct = df14f4cbbccca57b9727d68270a1b6c1 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 303132333435363738396162636465 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 178 +# padding longer than message +ct = 8881e9e02fa9e3037b397957ba1fb7ceea228bf1edd41c390e2eef140142bc00 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 179 +# padding longer than message +ct = 8881e9e02fa9e3037b397957ba1fb7ce3937e0e9abf7f672a34a500ba8e9099a +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 180 +# invalid padding +ct = 32ac6057df2a5d1e2e5131348c6ebc4e +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 181 +# invalid padding +ct = df4a7c3b9f4756d30fca0d18e9b28960 +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 6162636465666768 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 182 +# invalid padding +ct = 8881e9e02fa9e3037b397957ba1fb7ceae2855c47c7988873d57f901e049494b +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 30313233343536373839414243444546 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + +# tcId = 183 +# invalid padding +ct = 8881e9e02fa9e3037b397957ba1fb7ce0714c8de200b27ac91d9257fc93c13be +iv = f010f61c31c9aa8fa0d5be5f6b0f2f70 +key = 7c78f34dbce8f0557d43630266f59babd1cb92ba624bd1a8f45a2a91c84a804a +msg = 3031323334353637383941424344454647 +result = invalid +# The ciphertext in this test vector is the message encrypted with an invalid or +# unexpected padding. This allows to find implementations that are not properly +# checking the padding during decryption. + diff --git a/third_party/wycheproof/convert_wycheproof.go b/third_party/wycheproof/convert_wycheproof.go index d5650f90..2f6e52a8 100644 --- a/third_party/wycheproof/convert_wycheproof.go +++ b/third_party/wycheproof/convert_wycheproof.go @@ -227,6 +227,7 @@ func convertWycheproof(jsonPath, txtPath string) error { func main() { jsonPaths := []string{ + "aes_cbc_pkcs5_test.json", "aes_gcm_siv_test.json", "aes_gcm_test.json", "chacha20_poly1305_test.json", @@ -241,9 +242,6 @@ func main() { "eddsa_test.json", "rsa_signature_test.json", "x25519_test.json", - - // TODO(davidben): The following tests still need test drivers. - // "aes_cbc_pkcs5_test.json", } for _, jsonPath := range jsonPaths { if !strings.HasSuffix(jsonPath, ".json") {