Add AES-KWP

KWP is Key Wrap with Padding, defined in RFC 5649 and SP 800-38F. Like
Key Wrap, it's a poor-man's AEAD and shouldn't be used. However, some
existing systems use it and we need to interoperate.

The interface of the added functions is a little unfortunate, but they
match the interfaces of the existing Key Wrap functions which, in turn,
match functions in OpenSSL. Hopefully this way, if OpenSSL ever add
support, we'll line up.

Change-Id: I3496c288f32230a891261586ca2e9c4ee8456c09
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36324
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/crypto/fipsmodule/aes/aes_test.cc b/crypto/fipsmodule/aes/aes_test.cc
index 1f9a491..7fadb35 100644
--- a/crypto/fipsmodule/aes/aes_test.cc
+++ b/crypto/fipsmodule/aes/aes_test.cc
@@ -122,12 +122,40 @@
                                ciphertext.data(), ciphertext.size()));
 }
 
+static void TestKeyWrapWithPadding(FileTest *t) {
+  std::vector<uint8_t> key, plaintext, ciphertext;
+  ASSERT_TRUE(t->GetBytes(&key, "Key"));
+  ASSERT_TRUE(t->GetBytes(&plaintext, "Plaintext"));
+  ASSERT_TRUE(t->GetBytes(&ciphertext, "Ciphertext"));
+
+  // Test encryption.
+  AES_KEY aes_key;
+  ASSERT_EQ(0, AES_set_encrypt_key(key.data(), 8 * key.size(), &aes_key));
+  std::unique_ptr<uint8_t[]> buf(new uint8_t[plaintext.size() + 15]);
+  size_t len;
+  ASSERT_TRUE(AES_wrap_key_padded(&aes_key, buf.get(), &len,
+                                  plaintext.size() + 15, plaintext.data(),
+                                  plaintext.size()));
+  EXPECT_EQ(Bytes(ciphertext), Bytes(buf.get(), static_cast<size_t>(len)));
+
+  // Test decryption
+  ASSERT_EQ(0, AES_set_decrypt_key(key.data(), 8 * key.size(), &aes_key));
+  buf.reset(new uint8_t[ciphertext.size() - 8]);
+  ASSERT_TRUE(AES_unwrap_key_padded(&aes_key, buf.get(), &len,
+                                    ciphertext.size() - 8, ciphertext.data(),
+                                    ciphertext.size()));
+  ASSERT_EQ(len, plaintext.size());
+  EXPECT_EQ(Bytes(plaintext), Bytes(buf.get(), static_cast<size_t>(len)));
+}
+
 TEST(AESTest, TestVectors) {
   FileTestGTest("crypto/fipsmodule/aes/aes_tests.txt", [](FileTest *t) {
     if (t->GetParameter() == "Raw") {
       TestRaw(t);
     } else if (t->GetParameter() == "KeyWrap") {
       TestKeyWrap(t);
+    } else if (t->GetParameter() == "KeyWrapWithPadding") {
+      TestKeyWrapWithPadding(t);
     } else {
       ADD_FAILURE() << "Unknown mode " << t->GetParameter();
     }
@@ -172,6 +200,48 @@
   });
 }
 
+TEST(AESTest, WycheproofKeyWrapWithPadding) {
+  FileTestGTest("third_party/wycheproof_testvectors/kwp_test.txt",
+                [](FileTest *t) {
+    std::string key_size;
+    ASSERT_TRUE(t->GetInstruction(&key_size, "keySize"));
+    std::vector<uint8_t> ct, key, msg;
+    ASSERT_TRUE(t->GetBytes(&ct, "ct"));
+    ASSERT_TRUE(t->GetBytes(&key, "key"));
+    ASSERT_TRUE(t->GetBytes(&msg, "msg"));
+    ASSERT_EQ(static_cast<unsigned>(atoi(key_size.c_str())), key.size() * 8);
+    WycheproofResult result;
+    ASSERT_TRUE(GetWycheproofResult(t, &result));
+
+    // Wycheproof contains test vectors with empty messages that it believes
+    // should pass. However, both RFC 5649 and SP 800-38F section 5.3.1 say that
+    // the minimum length is one. Therefore we consider test cases with an empty
+    // message to be invalid.
+    if (result != WycheproofResult::kInvalid && !msg.empty()) {
+      AES_KEY aes;
+      ASSERT_EQ(0, AES_set_decrypt_key(key.data(), 8 * key.size(), &aes));
+      std::vector<uint8_t> out(ct.size() - 8);
+      size_t len;
+      ASSERT_TRUE(AES_unwrap_key_padded(&aes, out.data(), &len, ct.size() - 8,
+                                        ct.data(), ct.size()));
+      EXPECT_EQ(Bytes(msg), Bytes(out.data(), len));
+
+      out.resize(msg.size() + 15);
+      ASSERT_EQ(0, AES_set_encrypt_key(key.data(), 8 * key.size(), &aes));
+      ASSERT_TRUE(AES_wrap_key_padded(&aes, out.data(), &len, msg.size() + 15,
+                                      msg.data(), msg.size()));
+      EXPECT_EQ(Bytes(ct), Bytes(out.data(), len));
+    } else {
+      AES_KEY aes;
+      ASSERT_EQ(0, AES_set_decrypt_key(key.data(), 8 * key.size(), &aes));
+      std::vector<uint8_t> out(ct.size());
+      size_t len;
+      ASSERT_FALSE(AES_unwrap_key_padded(&aes, out.data(), &len, ct.size(),
+                                         ct.data(), ct.size()));
+    }
+  });
+}
+
 TEST(AESTest, WrapBadLengths) {
   uint8_t key[128/8] = {0};
   AES_KEY aes;
diff --git a/crypto/fipsmodule/aes/aes_tests.txt b/crypto/fipsmodule/aes/aes_tests.txt
index d4e4c61..efbe294 100644
--- a/crypto/fipsmodule/aes/aes_tests.txt
+++ b/crypto/fipsmodule/aes/aes_tests.txt
@@ -48,3 +48,16 @@
 Key = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
 Plaintext = 00112233445566778899aabbccddeeff000102030405060708090a0b0c0d0e0f
 Ciphertext = 28c9f404c4b810f4cbccb35cfb87f8263f5786e2d80ed326cbc7f0e71a99f43bfb988b9b7a02dd21
+
+
+# Test vectors from https://tools.ietf.org/html/rfc5649#section-6
+
+Mode = KeyWrapWithPadding
+Key = 5840df6e29b02af1ab493b705bf16ea1ae8338f4dcc176a8
+Plaintext = c37b7e6492584340bed12207808941155068f738
+Ciphertext = 138bdeaa9b8fa7fc61f97742e72248ee5ae6ae5360d1ae6a5f54f373fa543b6a
+
+Mode = KeyWrapWithPadding
+Key = 5840df6e29b02af1ab493b705bf16ea1ae8338f4dcc176a8
+Plaintext = 466f7250617369
+Ciphertext = afbeb0f07dfbf5419200f2ccb50bb24f
diff --git a/crypto/fipsmodule/aes/key_wrap.c b/crypto/fipsmodule/aes/key_wrap.c
index a52c983..9a5b28d 100644
--- a/crypto/fipsmodule/aes/key_wrap.c
+++ b/crypto/fipsmodule/aes/key_wrap.c
@@ -48,6 +48,7 @@
 
 #include <openssl/aes.h>
 
+#include <assert.h>
 #include <limits.h>
 #include <string.h>
 
@@ -100,18 +101,17 @@
   return (int)in_len + 8;
 }
 
-int AES_unwrap_key(const AES_KEY *key, const uint8_t *iv, uint8_t *out,
-                   const uint8_t *in, size_t in_len) {
+// aes_unwrap_key_inner performs steps one and two from
+// https://tools.ietf.org/html/rfc3394#section-2.2.2
+static int aes_unwrap_key_inner(const AES_KEY *key, uint8_t *out,
+                                uint8_t out_iv[8], const uint8_t *in,
+                                size_t in_len) {
   // See RFC 3394, section 2.2.2. Additionally, note that section 2 requires the
   // plaintext be at least two 8-byte blocks, so the ciphertext must be at least
   // three blocks.
 
   if (in_len > INT_MAX || in_len < 24 || in_len % 8 != 0) {
-    return -1;
-  }
-
-  if (iv == NULL) {
-    iv = kDefaultIV;
+    return 0;
   }
 
   uint8_t A[AES_BLOCK_SIZE];
@@ -133,9 +133,104 @@
     }
   }
 
-  if (CRYPTO_memcmp(A, iv, 8) != 0) {
+  memcpy(out_iv, A, 8);
+  return 1;
+}
+
+int AES_unwrap_key(const AES_KEY *key, const uint8_t *iv, uint8_t *out,
+                   const uint8_t *in, size_t in_len) {
+  uint8_t calculated_iv[8];
+  if (!aes_unwrap_key_inner(key, out, calculated_iv, in, in_len)) {
+    return -1;
+  }
+
+  if (iv == NULL) {
+    iv = kDefaultIV;
+  }
+  if (CRYPTO_memcmp(calculated_iv, iv, 8) != 0) {
     return -1;
   }
 
   return (int)in_len - 8;
 }
+
+// kPaddingConstant is used in Key Wrap with Padding. See
+// https://tools.ietf.org/html/rfc5649#section-3
+static const uint8_t kPaddingConstant[4] = {0xa6, 0x59, 0x59, 0xa6};
+
+int AES_wrap_key_padded(const AES_KEY *key, uint8_t *out, size_t *out_len,
+                        size_t max_out, const uint8_t *in, size_t in_len) {
+  // See https://tools.ietf.org/html/rfc5649#section-4.1
+  const uint32_t in_len32_be = CRYPTO_bswap4(in_len);
+  const uint64_t in_len64 = in_len;
+  const size_t padded_len = (in_len + 7) & ~7;
+
+  *out_len = 0;
+  if (in_len == 0 || in_len64 > 0xffffffffu || in_len + 7 < in_len ||
+      padded_len + 8 < padded_len || max_out < padded_len + 8) {
+    return 0;
+  }
+
+  uint8_t block[AES_BLOCK_SIZE];
+  memcpy(block, kPaddingConstant, sizeof(kPaddingConstant));
+  memcpy(block + 4, &in_len32_be, sizeof(in_len32_be));
+
+  if (in_len <= 8) {
+    memset(block + 8, 0, 8);
+    memcpy(block + 8, in, in_len);
+    AES_encrypt(block, out, key);
+    *out_len = AES_BLOCK_SIZE;
+    return 1;
+  }
+
+  uint8_t *padded_in = OPENSSL_malloc(padded_len);
+  if (padded_in == NULL) {
+    return 0;
+  }
+  assert(padded_len >= 8);
+  memset(padded_in + padded_len - 8, 0, 8);
+  memcpy(padded_in, in, in_len);
+  const int ret = AES_wrap_key(key, block, out, padded_in, padded_len);
+  OPENSSL_free(padded_in);
+  if (ret < 0) {
+    return 0;
+  }
+  *out_len = ret;
+  return 1;
+}
+
+int AES_unwrap_key_padded(const AES_KEY *key, uint8_t *out, size_t *out_len,
+                          size_t max_out, const uint8_t *in, size_t in_len) {
+  *out_len = 0;
+  if (in_len < AES_BLOCK_SIZE || max_out < in_len - 8) {
+    return 0;
+  }
+
+  uint8_t iv[8];
+  if (in_len == AES_BLOCK_SIZE) {
+    uint8_t block[AES_BLOCK_SIZE];
+    AES_decrypt(in, block, key);
+    memcpy(iv, block, sizeof(iv));
+    memcpy(out, block + 8, 8);
+  } else if (!aes_unwrap_key_inner(key, out, iv, in, in_len)) {
+    return 0;
+  }
+  assert(in_len % 8 == 0);
+
+  crypto_word_t ok = constant_time_eq_int(
+      CRYPTO_memcmp(iv, kPaddingConstant, sizeof(kPaddingConstant)), 0);
+
+  uint32_t claimed_len32;
+  memcpy(&claimed_len32, iv + 4, sizeof(claimed_len32));
+  const size_t claimed_len = CRYPTO_bswap4(claimed_len32);
+  ok &= ~constant_time_is_zero_w(claimed_len);
+  ok &= constant_time_eq_w((claimed_len - 1) >> 3, (in_len - 9) >> 3);
+
+  // Check that padding bytes are all zero.
+  for (size_t i = in_len - 15; i < in_len - 8; i++) {
+    ok &= constant_time_is_zero_w(constant_time_ge_8(i, claimed_len) & out[i]);
+  }
+
+  *out_len = constant_time_select_w(ok, claimed_len, 0);
+  return ok & 1;
+}
diff --git a/include/openssl/aes.h b/include/openssl/aes.h
index 3606bfc..e560625 100644
--- a/include/openssl/aes.h
+++ b/include/openssl/aes.h
@@ -6,7 +6,7 @@
  * are met:
  *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
+ *    notice, this list of conditions and the following disclaimer.
  *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
@@ -163,6 +163,31 @@
                                   size_t in_len);
 
 
+// AES key wrap with padding.
+//
+// These functions implement AES Key Wrap with Padding mode, as defined in RFC
+// 5649. They should never be used except to interoperate with existing systems
+// that use this mode.
+
+// AES_wrap_key_padded performs a padded AES key wrap on |in| which must be
+// between 1 and 2^32-1 bytes. |key| must have been configured for encryption.
+// On success it writes at most |max_out| bytes of ciphertext to |out|, sets
+// |*out_len| to the number of bytes written, and returns one. On failure it
+// returns zero. To ensure success, set |max_out| to at least |in_len| + 15.
+OPENSSL_EXPORT int AES_wrap_key_padded(const AES_KEY *key, uint8_t *out,
+                                       size_t *out_len, size_t max_out,
+                                       const uint8_t *in, size_t in_len);
+
+// AES_unwrap_key_padded performs a padded AES key unwrap on |in| which must be
+// a multiple of 8 bytes. |key| must have been configured for decryption. On
+// success it writes at most |max_out| bytes to |out|, sets |*out_len| to the
+// number of bytes written, and returns one. On failure it returns zero. Setting
+// |max_out| to |in_len| is a sensible estimate.
+OPENSSL_EXPORT int AES_unwrap_key_padded(const AES_KEY *key, uint8_t *out,
+                                         size_t *out_len, size_t max_out,
+                                         const uint8_t *in, size_t in_len);
+
+
 #if defined(__cplusplus)
 }  // extern C
 #endif
diff --git a/sources.cmake b/sources.cmake
index 6213512..569a835 100644
--- a/sources.cmake
+++ b/sources.cmake
@@ -80,6 +80,7 @@
   third_party/wycheproof_testvectors/ecdsa_secp384r1_sha512_test.txt
   third_party/wycheproof_testvectors/ecdsa_secp521r1_sha512_test.txt
   third_party/wycheproof_testvectors/eddsa_test.txt
+  third_party/wycheproof_testvectors/kwp_test.txt
   third_party/wycheproof_testvectors/kw_test.txt
   third_party/wycheproof_testvectors/rsa_pss_2048_sha1_mgf1_20_test.txt
   third_party/wycheproof_testvectors/rsa_pss_2048_sha256_mgf1_0_test.txt
diff --git a/third_party/wycheproof_testvectors/kwp_test.txt b/third_party/wycheproof_testvectors/kwp_test.txt
new file mode 100644
index 0000000..ef48491
--- /dev/null
+++ b/third_party/wycheproof_testvectors/kwp_test.txt
@@ -0,0 +1,1562 @@
+# Imported from Wycheproof's third_party/wycheproof_testvectors/kwp_test.json.
+# This file is generated by convert_wycheproof.go. Do not edit by hand.
+#
+# Algorithm: KWP
+# Generator version: 0.4.12
+
+[keySize = 128]
+
+# tcId = 1
+ct = 8cd63fa6788aa5edfa753fc87d645a672b14107c3b4519e7
+key = 6f67486d1e914419cb43c28509c7c1ea
+msg = 8dc0632d92ee0be4f740028410b08270
+result = valid
+
+# tcId = 2
+ct = e8bac475d1429034b32f9bdeec09a37f9b3704028f1e0270
+key = a0b17172bb296db7f5c869e9a36b5ce3
+msg = 615dd022d607c910f20178cbdf42060f
+result = valid
+
+# tcId = 3
+ct = 4c8bcd601b508ef399f71b841294497a4493c4a0014c0103
+key = 0e49d571c19b5250effd41d94bde39d6
+msg = f25e4de8caca363fd5f29442eb147b55
+result = valid
+
+# tcId = 4
+# wrapped key is longer than wrapping key
+ct = 9e4510cc84c4bd7abab0a8a5d7f1e6ff3e6777ca2dff9be7e223652239fe57d8
+key = e0e12959109103e30ae8b5684a22e662
+msg = dbb0f2bb2be912a20430972d9842ce3fd3b928e573e1ac8e
+result = acceptable
+
+# tcId = 5
+# wrapped key is longer than wrapping key
+ct = 8fbf39ae583bd4efa7a3e8f7b86870b34766ae7d8923a8e97b0cd289ad98cacb
+key = dd583d9f1059861430ec8b5d8a180e9b
+msg = f2e34f356362a31b51d6e02bcd333c9e6170494ca5ff5487
+result = acceptable
+
+# tcId = 6
+# wrapped key is longer than wrapping key
+ct = df2fbe5fa86418edc7b5b04a4aea724aca17e88cedc84ca8b0b0f048e64590cb
+key = faf5ccfae42b43cee2c5f0f3177a7c5d
+msg = 4e02084833660c463830483b36dab866c64c8cf7429cac3d
+result = acceptable
+
+# tcId = 7
+# wrapped key is longer than wrapping key
+ct = 67f8edf57f84ea0a35b35511d67d3f299c9984b2c07d3809c3d7f5f45091f1a8fbb937ed447677f6
+key = c2b9d23f2831ddcdeb456853d4014db9
+msg = f4cfea98e58b939cc859554385cf3a6c7f8217f728efb431c964786de8274907
+result = acceptable
+
+# tcId = 8
+# wrapped key is longer than wrapping key
+ct = 60d55a22ba7dbd7d8f317388e01e6be561d15d29f85c566f1259aa7e7dc3d5d30e0ef5f4c6267553
+key = 620a08f320cdedbf7ae551add348d95e
+msg = cec34eaf8e67e1ce619ddfc309531c42f16033a7e2cbc4f5eb3a548164e9b291
+result = acceptable
+
+# tcId = 9
+# wrapped key is longer than wrapping key
+ct = d78a8291108f0f2d8be0ec10ec08240bf4d3021f0a5ed7faba0748db73762f34a0504bd373212df2
+key = ed089ac274f8c7cea2415671a94b5e53
+msg = 6065e41df14daeeefacac5daeb7674cdc9c1f686013b797153e80ef215893299
+result = acceptable
+
+# tcId = 10
+# Round counter overflows 256
+ct = 9341221aca1c647e2afc2bdd9cf4ed6e60058eb0a84cb3fc2daf3a87d9fad0a1f8268b27aaf7201d705e72f7e2240309ad98742094e3f1c99b7faa9ae181b441f5004b8bc93cdd4160d403d0884749a3c379d47c112a45788c05c2106c98f59758d393e04c880691b0e8683a12df7f876e1e1f68b4acbae9cc8310b34d59ccf4617cee72e845df1e0e32e5b4938f2923d55f1bb5156dd8c787401e6ef241ea4073d0a59ddfcd7a53db5d89b480b030cfb9084ea8479b964f090bb612d5251eee9ef8870a45f1e76fd24abdd9b350fe148b15a4cfeb032d57b5743b3548a7ce9eec8e21a31ce832530edfd1cffd9bb37369e6463c6b373ab60d80b0a2677e92e658f7daf2a5234b7312bf2d967cd0bc809e9be2f706ae63bd632fd611f161e48ee19677f3243aa0e91f6651a1cef62feff7a72eedf830bae1dc6d89e55ccb5e6f97889c6266f7d3f2eb0aea6c8c42200febccc5916825368adc87e04e835de06fd7bc2805c219e7f0b6252563f29969b1f30cfa1a8da4b90ae7534fb849d068a7e77de7360f8af173
+key = b6121acad51038e11873aaa7e6c7be06
+msg = 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+result = acceptable
+
+# tcId = 11
+# wrapping small key
+ct = a65959a600000000
+key = 1abf4b7fa2bb62a78f09ddab04625dca
+msg = 
+result = acceptable
+
+# tcId = 12
+# wrapping small key
+ct = 09bcbab50b8dd45ad83412e2919030d3
+key = 1abf4b7fa2bb62a78f09ddab04625dca
+msg = 4c
+result = acceptable
+
+# tcId = 13
+# wrapping small key
+ct = 0cbe852cdce4f0b5333366f446b2b1c5
+key = 1abf4b7fa2bb62a78f09ddab04625dca
+msg = be52
+result = acceptable
+
+# tcId = 14
+# wrapping small key
+ct = a9dc66e03435ab3d4f97ff66f2c911a3
+key = 1abf4b7fa2bb62a78f09ddab04625dca
+msg = 2d5244
+result = acceptable
+
+# tcId = 15
+# wrapping small key
+ct = 1b970c8ecb4187447e60e6083da03086
+key = 1abf4b7fa2bb62a78f09ddab04625dca
+msg = 6c3d3b4c
+result = acceptable
+
+# tcId = 16
+# wrapping small key
+ct = 0344f7b34ab8ef28aaa843f276b0b3d5
+key = 1abf4b7fa2bb62a78f09ddab04625dca
+msg = 0412ab3ec6
+result = acceptable
+
+# tcId = 17
+# wrapping small key
+ct = 17356c7148334ca1a24aab7e82a66e18
+key = 1abf4b7fa2bb62a78f09ddab04625dca
+msg = 8ae08938929c
+result = acceptable
+
+# tcId = 18
+# wrapping small key
+ct = 1db7510a55591a455d9f8167e6db3c88
+key = 1abf4b7fa2bb62a78f09ddab04625dca
+msg = 7c8dfbb68d72af
+result = acceptable
+
+# tcId = 19
+# wrapping small key
+ct = 936fe58b629ea6ec158145218f2361c7
+key = 1abf4b7fa2bb62a78f09ddab04625dca
+msg = 536f8f83b64771c1
+result = acceptable
+
+# tcId = 20
+# wrapping small key
+ct = 6787816804b3127d0ca4073f1dba5c4d3db1ec9c227e6556
+key = 1abf4b7fa2bb62a78f09ddab04625dca
+msg = 8571f282b18b64ec5e
+result = acceptable
+
+# tcId = 21
+# wrapping small key
+ct = 34131c3bfcc48af15eea8672e52927b462f81d5ba0e6260f
+key = 1abf4b7fa2bb62a78f09ddab04625dca
+msg = 8ada889862813e364c4d
+result = acceptable
+
+# tcId = 22
+# wrapping small key
+ct = 4d1ec9287cd4dd378b9aefee79d4ed35bcb98ad9fa9fe529
+key = 1abf4b7fa2bb62a78f09ddab04625dca
+msg = f9c56e8058758a5c7c2baa
+result = acceptable
+
+# tcId = 23
+# wrapping small key
+ct = 7209f5b6bd5d4916f4995d280e9aa89edd5e96e3c9283ad2
+key = 1abf4b7fa2bb62a78f09ddab04625dca
+msg = 7c7dbc83fa62206a521ed4ad
+result = acceptable
+
+# tcId = 24
+# wrapping small key
+ct = d85a1efc6ab3a40948f723d9810a5deb019b3ce0208a0d94
+key = 1abf4b7fa2bb62a78f09ddab04625dca
+msg = a6614daf00df6d14f50388bad5
+result = acceptable
+
+# tcId = 25
+# wrapping small key
+ct = 43509b5df3688b6e44c1a994592f4c03da34712f886e63d5
+key = 1abf4b7fa2bb62a78f09ddab04625dca
+msg = 450580a47d7008321496bfb82f48
+result = acceptable
+
+# tcId = 26
+# wrapping small key
+ct = 16e369351c40f220d3fb1197f35da652a3a40ca3b1e99bfb
+key = 1abf4b7fa2bb62a78f09ddab04625dca
+msg = 9efd21e13855eea8907afdcd8935f4
+result = acceptable
+
+# tcId = 27
+# Modified IV
+ct = 82af032f5389caa503147d2825336eab84816fb6f8ae6df4
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 28
+# Modified IV
+ct = 4e00a9eeef87eb6d7be4ec46204d94006c216d5177d2a83c
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 29
+# Modified IV
+ct = d3dc6c3b4707a08039d621879caf419b9895482fff7bdcd0
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 30
+# Modified IV
+ct = 09d3bfc3c9c5af2b2951b06406f7ea4d84e9c37402637e2c
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 31
+# Modified IV
+ct = 3396679a4d87caf7ce7eb4707ba1c6526728f5a973191713
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 32
+# Modified IV
+ct = ec637d90d945e92929c1c873d9aa9c47bc7b172237319d15
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 33
+# Modified IV
+ct = 748f373d48d8590e2216b294b9ef94860dbb6b0b0ab625c5
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 34
+# Modified IV
+ct = 61d7c584197f257caf2583e444896f1d3ba12509b1ef725b
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 35
+# Modified IV
+ct = 7f8cda973fe58b484b120fc710b520c5636057629795f89a
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 36
+# Modified IV
+ct = ccea198029edb9d848d6ca76667b666b1dbebd1e4b1faa8d
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 37
+# Modified IV
+ct = ee08cb9d20a98b88b2d8f0e39acf34219d105dc14afbe364
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 38
+# Modified IV
+ct = 6782992bf8cff068cf41341dd2ca04adedea92e846f74411
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 39
+# Modified IV
+ct = 7ed35d0c08042dd56bb5df78056ecd21b8c797d36f57aaec
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 40
+# Modified IV
+ct = 37e3b4cefee648766a8efe73d6af12812eded603ab7141bb
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 41
+# Modified IV
+ct = fe73777d8992e07eef0d053ad5ec0bf8243fc7e0bc2b405b
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 42
+# Modified IV
+ct = 39292c91b6b826d47d502043c3ba4f41e2ce32960a0291b5
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 43
+# Modified IV
+ct = 36ef8fc13d0f1f5745e3939877b62b8ecba2f5f0b19f9e90
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 44
+# Modified IV
+ct = 7255c4eacb4105a68095e9e5b5a4bd8f9623a0da5c6fc230
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 45
+# Modified IV
+ct = ea26eec89a46ff1a628834c7247a8e4e45d8a8d3229e26cc
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 46
+# Modified IV
+ct = 508593fa85a8effd27c8a225981978fcec6e992eb488c9c2
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 47
+# Modified IV
+ct = b8a4cb22f15529864d4ced8e8abae69752a9045a084dfc3f
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 48
+# Modified IV
+ct = a0a6bf5e47e89706932b1057b680c3c81dc4d9d0b4f9153b
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 49
+# Modified IV
+ct = 11f3af4ed30e77520517c880f1d0c272a89a968dc697cb5a
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 50
+# Modified IV
+ct = 6fc912a0bda73bacfa93db4002f18f349fa30f22f7a95ab9
+key = 4f710eb6b5e28703becfc3dc52fa8bc1
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 51
+# RFC 3349 padding
+ct = 3731038571c35f7dcc55e48892de353e54c079b89774bbfd
+key = 48a53c11ef2d727db7eb9a834b134ea9
+msg = 000102030405060708090a0b0c0d0e0f
+result = invalid
+
+# tcId = 52
+# Invalid encryption
+ct = d85c6bfd092df1aeae5a548e47aa7681
+key = 48a53c11ef2d727db7eb9a834b134ea9
+msg = 0001020304050607
+result = invalid
+
+# tcId = 53
+# padding too long
+ct = 7a92427387f5587ee825d1ffa011c40286844ecdadce31cd9678338694ea2682
+key = 48a53c11ef2d727db7eb9a834b134ea9
+msg = 000000000000000000000000000000000000000000000000
+result = invalid
+
+# tcId = 54
+# padding too long
+ct = a437d354606ae752894feb62c8def7d17046d8e47f9aed755fba48b3a3009e3ff67d34e26a779064
+key = 48a53c11ef2d727db7eb9a834b134ea9
+msg = 0000000000000000000000000000000000000000000000000000000000000000
+result = invalid
+
+# tcId = 55
+# incorrectly encoded length
+ct = e8d240d64f16d1522ae2ded42ced257dfec158ff2fe1467d
+key = 48a53c11ef2d727db7eb9a834b134ea9
+msg = 00000000000000000000000000000000
+result = invalid
+
+# tcId = 56
+# length = 2**32-1
+ct = 6d1bfda356b7b954e7aaccc6df953322f75be95947b02b30
+key = 48a53c11ef2d727db7eb9a834b134ea9
+msg = 00000000000000000000000000000000
+result = invalid
+
+# tcId = 57
+# length = 2**32-1
+ct = 17dbf878ef4076cfcaba5f81d7b123d7
+key = 48a53c11ef2d727db7eb9a834b134ea9
+msg = 0000000000000000
+result = invalid
+
+# tcId = 58
+# length = 2**31-1
+ct = 75c23e253478037802fae0f86af9c78d4e4d9be0c3bff89f
+key = 48a53c11ef2d727db7eb9a834b134ea9
+msg = 00000000000000000000000000000000
+result = invalid
+
+# tcId = 59
+# length = 2**31 + 16
+ct = 55717658c6a35e15ee36c66cce91083b63091f51525c0b51
+key = 48a53c11ef2d727db7eb9a834b134ea9
+msg = 00000000000000000000000000000000
+result = invalid
+
+# tcId = 60
+# data is incorrectly padded
+ct = 8ede88a52ccb8a6d617456955a9f04c94d87696125ded87eebe3e97e185496d9
+key = 48a53c11ef2d727db7eb9a834b134ea9
+msg = ffffffffffffffffffffffffffffffffffffffffffffffff
+result = invalid
+
+# tcId = 61
+# data is incorrectly padded
+ct = 5b4a8f1abffa51676ac8b5ddf9366c12
+key = 48a53c11ef2d727db7eb9a834b134ea9
+msg = 0001020304050607
+result = invalid
+
+# tcId = 62
+# length = 0
+ct = 205cc6dd9592da0ebff6b4b48a0c450eeaeb11a60d33f387
+key = 48a53c11ef2d727db7eb9a834b134ea9
+msg = 00000000000000000000000000000000
+result = invalid
+
+# tcId = 63
+# RFC 3349 padding with incorrect size
+ct = 908a68b0d2054e199220d37c34a2e136
+key = 48a53c11ef2d727db7eb9a834b134ea9
+msg = 0001020304050607
+result = invalid
+
+# tcId = 64
+# length = 9
+ct = f84bdb15045cee3a8a0f3ed2f07c1771
+key = 48a53c11ef2d727db7eb9a834b134ea9
+msg = 0000000000000000
+result = invalid
+
+# tcId = 65
+# length = 16
+ct = 7592b1ee6ee92c9467db366adcfa65bb
+key = 48a53c11ef2d727db7eb9a834b134ea9
+msg = 0000000000000000
+result = invalid
+
+# tcId = 66
+# length = 2**31 + 8
+ct = db93a1db3b5babc80a304d527682c1ef
+key = 48a53c11ef2d727db7eb9a834b134ea9
+msg = 0000000000000000
+result = invalid
+
+[keySize = 192]
+
+# tcId = 67
+ct = 5c117a678223cfe5ee691503061e7ab1e5f720e005171b32
+key = f75a2f49a630c7dc91626b00ce029f0bd2981d7c74a93ebe
+msg = 9adbc00c710b1101bdf6a4ed65b32d72
+result = valid
+
+# tcId = 68
+ct = 6a7f9e03b6f379c56da3a56d8f32eba515454a91fd417449
+key = b713f6b7814f98894d7b153974684359f1460213eb74be68
+msg = 78585f0c49922e82caf17ebc3721b4db
+result = valid
+
+# tcId = 69
+ct = 764097f5ee8236bc0d93bbcea139a652f4b211cc33a61ac9
+key = 13ecf423211caa334ba6db37259a535c20de8ad10fc8c432
+msg = 4fc75d0f221e22408a37e11265d49a05
+result = valid
+
+# tcId = 70
+ct = 04b83ec803a75bbcb2f87fc6f488a4ccc1827b412483070eed195b6f0048ccbe
+key = 4417fbbea51bdd91818d74051957dd70e135c5cf3732bdf1
+msg = f5357da9f8fd4a1190f36e9fa09a90fcf14d87d62332f1a5
+result = valid
+
+# tcId = 71
+ct = 46ab71f032cb1ccbcc7447a5183574268c0167a26a93fe8422bf284417aa93ea
+key = b3f26d8a22fdd61f709841231fbde695b3f28dddced6d41e
+msg = 0d0af955d2e3829cc3d643219b301e64e0510dfbc428119a
+result = valid
+
+# tcId = 72
+ct = 47ca298ee47b1b755a499129347e11e7a25754ccb6c2689e8eff270e98c81d18
+key = f70cfb262c729a18206c8afd74356ec7e049d10b44a6e000
+msg = 241cedfa64c4e7bec541a2eb4c368269e0f0ddebc58267ea
+result = valid
+
+# tcId = 73
+# wrapped key is longer than wrapping key
+ct = ecac4c91758e1ae7bb010c34f4c5f99a3d728b9fa92cb778d3fe80d777a20d3de85ef46e7a0c6a6a
+key = 1639f9f81e53e2eeb677a249e5eced3af108971301601a7b
+msg = ec3c6a1f1a9585327fe658490c74635e5300876da5846a629398984fb551d691
+result = acceptable
+
+# tcId = 74
+# wrapped key is longer than wrapping key
+ct = 39b7326a44eaed08bffbd4aeaf3e2c3f899c1fd049384ed7b3eb92b788c6449acd6385f0bb18cf28
+key = 1f22d5658aa685b8ba8659dc342880d5b2399e6a815005b0
+msg = 50be4c1b2f29a63f44d7fc63737f600f0194ea3fb36e173d2ddd19f218656380
+result = acceptable
+
+# tcId = 75
+# wrapped key is longer than wrapping key
+ct = 3d2e9f39c7b13e9585227c4344fbe596f92b002456616f137deacc6a8c941649ce294bb2695c1807
+key = 3a2f4aa50441954bba5a1836294ce071f9296b23dbed6771
+msg = 65da02ff21b483a1e39575490b4319e84ae0299f1f00b3859fbe2e74b3ec2aaf
+result = acceptable
+
+# tcId = 76
+# Round counter overflows 256
+ct = d6aacfb52c26baae78c2f54259a4e4168f817064344e2ba8fbfa7fae9f1fd69bd5bc5c1e20a6101b4a7119cbce028e25a9e93d29ee260c4e609baedee788411c2afe60218ce1b0d28b9c29b941251fdcbac3009d59040a0337b8b4a3a020c6d8f310cba63db046d8f36b64c9092e75cee463fc7692ef56bed395c4579da0ecb02129e45ad8a7f116aac6170204888e40693f017a6a0a7dd3962004e60db3a9b6c8b7614a467ccb799bce1ba83f5c0921f1e52bb3909bc0486ec0eaea736498f3ba520a519c3ddf491307958620b737613417b15b438b80b43189baa455031f5771502002ea170c767b33d247feebce62e606f2262537f85f18d1951cc75cedef291c6a501cb1778586249b58156eb8d7283a3f508ee8bcc1206d77bbd6892fe74b865bfc02a8f07223087a6c1e50a41b7cf5f6ee04bd07766b2e5b34c4a7666b0ce06f670e6434a59fb74e0df36c91d94e5e8b721e53e09b6f6504c5d515492a373fcc348a63122cc6e4716e0e1a543d038c6f7731199f691780a8a655cca6718e3dc56e815b3669
+key = b6121acad51038e11873aaa7e6c7be06f93826b74fec0ea1
+msg = 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+result = acceptable
+
+# tcId = 77
+# wrapping small key
+ct = a65959a600000000
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b
+msg = 
+result = acceptable
+
+# tcId = 78
+# wrapping small key
+ct = 52c7f388d0d4237afaa29f2b94723475
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b
+msg = a3
+result = acceptable
+
+# tcId = 79
+# wrapping small key
+ct = 833431ce8799be69b36aafe3f38d9dac
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b
+msg = 594b
+result = acceptable
+
+# tcId = 80
+# wrapping small key
+ct = 31674f46b989f6ead582c70dedc8c6b9
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b
+msg = 72ab34
+result = acceptable
+
+# tcId = 81
+# wrapping small key
+ct = 80535172d2a498aa31601d70fdca9dea
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b
+msg = d4d9460f
+result = acceptable
+
+# tcId = 82
+# wrapping small key
+ct = 56232300dd7b2a71d2328b6df47af8e3
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b
+msg = 643972e552
+result = acceptable
+
+# tcId = 83
+# wrapping small key
+ct = e27e08efe39adbbad8d300b87be2c258
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b
+msg = f3cdb73d2561
+result = acceptable
+
+# tcId = 84
+# wrapping small key
+ct = 8f90942cdab33e58b24a23ad7efb7538
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b
+msg = 7b0b53b6429e14
+result = acceptable
+
+# tcId = 85
+# wrapping small key
+ct = 0ebaf23c858015d3bda5b8d908db6049
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b
+msg = 6b2393773e6d1378
+result = acceptable
+
+# tcId = 86
+# wrapping small key
+ct = d56f89977b8eff511158edad6b993007189e5a4b8c0e2faf
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b
+msg = 2c52d6639e769960e8
+result = acceptable
+
+# tcId = 87
+# wrapping small key
+ct = dd889475a76733849f59bed49a15d4315bdb5ba00dc63470
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b
+msg = 707c9356216d69c69048
+result = acceptable
+
+# tcId = 88
+# wrapping small key
+ct = 1a9b3369239b0f40a8dc5bd8d965caf7431445799337b99b
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b
+msg = 615f6fa79e1847e7359a8a
+result = acceptable
+
+# tcId = 89
+# wrapping small key
+ct = 5232f8f6679a17d3303b0bd72b06b56b5089e80372dc295b
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b
+msg = 7f5e999168ec60624426cbb1
+result = acceptable
+
+# tcId = 90
+# wrapping small key
+ct = e5544361c60980f3d38f2d8820a150f48f49ef3f9184b29f
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b
+msg = 3f93aaf4463775baf6c0c975ae
+result = acceptable
+
+# tcId = 91
+# wrapping small key
+ct = 55396065905915ec914b8d1efbf471e37d283fc2c1496b49
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b
+msg = fefcf10c976309b2beb085771e50
+result = acceptable
+
+# tcId = 92
+# wrapping small key
+ct = d90376be302a24c541bd6d96094f0025e3d73888391b4306
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b
+msg = 6854354d0099f7eff740b0587140b3
+result = acceptable
+
+# tcId = 93
+# Modified IV
+ct = eee27510be39cc88379459420f3773642a423ac1ff0cfb84
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 94
+# Modified IV
+ct = 765df3fa1aca6f13268ba79f8659807049a313a0308b643e
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 95
+# Modified IV
+ct = 71346c17a2718cb7c357e3af2b2d0c3e29b7e02317926746
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 96
+# Modified IV
+ct = 55fd49ba081fdf72896068c5a968e2b3c4a473786a2e12c2
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 97
+# Modified IV
+ct = 133c66fcbf0e9d5139eff3fcb494b672d72bb622d7015c4b
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 98
+# Modified IV
+ct = 8439244f27470e5f1f294cfa22ef5412675d7fbbd92ff016
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 99
+# Modified IV
+ct = 4265bdb7d8ea30d9a51e5f48b7ac5487e0c95f154ea8baeb
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 100
+# Modified IV
+ct = 31afcca8ff2b8806408c3460181ee5a96bbaf51d133211be
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 101
+# Modified IV
+ct = 196f2a6eccb5368fe6a3f2fa0874d8fc9b3b52484e2d6351
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 102
+# Modified IV
+ct = 8dc73d363fdb32f6e0ff830c2a48db5815f66d0922694c74
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 103
+# Modified IV
+ct = e90022b9da998b4a30c91c1bd1a1f8ca05a52432867e5e78
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 104
+# Modified IV
+ct = c9898a1b70bd718df45f1f3eca82eab1eaddb8ed7f2380dc
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 105
+# Modified IV
+ct = cc3f2cd6476eddbbfdc801b61174301688554f3db54c2903
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 106
+# Modified IV
+ct = 23e15705e7b00d82bd052f0e0135ab7ac0dcce471ff2f1a7
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 107
+# Modified IV
+ct = b8e2862c0f9eae4f44ad99496e3ed62b3b9c4ce7ab5afb74
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 108
+# Modified IV
+ct = 66d8a7769d81421efda456992f6c26cb17665fe080b0160e
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 109
+# Modified IV
+ct = a6a28bceb91551a395369ff09370658cc92b092855f417aa
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 110
+# Modified IV
+ct = 03ff601cf12b432078a2185590fb5d01e3441cf084bcb04a
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 111
+# Modified IV
+ct = e250d358d16d9fd20ad80a99656509229dca391aad3798f0
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 112
+# Modified IV
+ct = 643a17860b116ec74089bc574685a6328a3d7a07cd18b520
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 113
+# Modified IV
+ct = 3e86e8128904f753c0f3fe3401ba36672966567725c4726c
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 114
+# Modified IV
+ct = d4b8cc849176b8344b0849490143d3512915171bd7d5759e
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 115
+# Modified IV
+ct = f84e0e6ff64e0b27b8b59b5b77c223023f0fea95433864ec
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 116
+# Modified IV
+ct = 4030b4b0e9c1b1ce8e52f6bdb48088e65b05844307989c8b
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 117
+# Modified IV
+ct = ccb3b36c26b2d901b7f0765362d992b2d5089c2a7559b195becbe173780352fa
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1
+result = invalid
+
+# tcId = 118
+# Modified IV
+ct = 4e5fc8dccaeec9b1c8a606a2bd7d7201eede62b9c2e939a5aba663a6a040e361
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1
+result = invalid
+
+# tcId = 119
+# Modified IV
+ct = af21f5e7f15a63c8ea6001cf024f281e7f44aedd68954564fc2bd146e96d793a
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1
+result = invalid
+
+# tcId = 120
+# Modified IV
+ct = 3a4f571ffbf761d3f7d413172ee1e4ae2862baacfd5ab66dc685b9af8b70b538
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1
+result = invalid
+
+# tcId = 121
+# Modified IV
+ct = 273de386d5fef497f9487afd54c1c0fae8aacabf2af465caf352e2300d29266b
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1
+result = invalid
+
+# tcId = 122
+# Modified IV
+ct = 16511743dc44199cee1dbf5045141b075f01ee13326c9faf2c74b7c99791830f
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1
+result = invalid
+
+# tcId = 123
+# Modified IV
+ct = 370f92db00f7fc8a0e654318a5b3ff89a604034f421339201d79e0ec4d6088de
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1
+result = invalid
+
+# tcId = 124
+# Modified IV
+ct = e3edd0e84832f3615f6deefb444de3b9ec527741686029db91de0bb9b2a5c05d
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1
+result = invalid
+
+# tcId = 125
+# RFC 3349 padding
+ct = 36ee480138edf11e144efcddd24d2c121749da6e4eab17fe
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702e
+msg = 000102030405060708090a0b0c0d0e0f
+result = invalid
+
+# tcId = 126
+# Invalid encryption
+ct = 166beb49e97a4a9cc7b0ccf441ec15b5
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702e
+msg = 0001020304050607
+result = invalid
+
+# tcId = 127
+# padding too long
+ct = 74ff3070a0a08471c001febb95a890f35159a9fe263719e40c2332ce5c58fada
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702e
+msg = 000000000000000000000000000000000000000000000000
+result = invalid
+
+# tcId = 128
+# padding too long
+ct = 4f0b38eb328d1227b1e17c103a44a373ff67cee953c59eea26117947b5d3ef8932c8858b4f9fb47c
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702e
+msg = 0000000000000000000000000000000000000000000000000000000000000000
+result = invalid
+
+# tcId = 129
+# incorrectly encoded length
+ct = 775dcabab9e4be8fd9963a4dc7a1447ef82888403882bdb6
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702e
+msg = 00000000000000000000000000000000
+result = invalid
+
+# tcId = 130
+# length = 2**32-1
+ct = 669803237fa10eabb4d2c6ad85bd9f7df5f4a33340eb0ce9
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702e
+msg = 00000000000000000000000000000000
+result = invalid
+
+# tcId = 131
+# length = 2**32-1
+ct = c788504d786f5c21b6671bf190657301
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702e
+msg = 0000000000000000
+result = invalid
+
+# tcId = 132
+# length = 2**31-1
+ct = d079f60d3258f5e695d1a73db008ef38516b713eca2c0eaf
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702e
+msg = 00000000000000000000000000000000
+result = invalid
+
+# tcId = 133
+# length = 2**31 + 16
+ct = f1ae4b8865013b0fc63b463e664cec3c6031f61f2de82f43
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702e
+msg = 00000000000000000000000000000000
+result = invalid
+
+# tcId = 134
+# data is incorrectly padded
+ct = 8874e1b6e15e3ef6c461411a5f5ad0c8b05368cd5b3ee39b2b413d18a4eebfc9
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702e
+msg = ffffffffffffffffffffffffffffffffffffffffffffffff
+result = invalid
+
+# tcId = 135
+# data is incorrectly padded
+ct = 890a3dab8439bb73b14c6e99c34f0b0e
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702e
+msg = 0001020304050607
+result = invalid
+
+# tcId = 136
+# length = 0
+ct = d4f633aedeb89e349a98738b00ee42c90d583b16e986e49f
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702e
+msg = 00000000000000000000000000000000
+result = invalid
+
+# tcId = 137
+# RFC 3349 padding with incorrect size
+ct = b8b2a5b1d3280dcb4daeeed43f36509b
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702e
+msg = 0001020304050607
+result = invalid
+
+# tcId = 138
+# length = 9
+ct = 4429cf64251d8a54a9d1389c01c30900
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702e
+msg = 0000000000000000
+result = invalid
+
+# tcId = 139
+# length = 16
+ct = e5634eca10372c867c7f91ee813ec3f3
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702e
+msg = 0000000000000000
+result = invalid
+
+# tcId = 140
+# length = 2**31 + 8
+ct = 9e517d4d0142e1544ba1e7419a696c21
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702e
+msg = 0000000000000000
+result = invalid
+
+# tcId = 141
+# RFC 3394
+ct = 138bdeaa9b8fa7fc61f97742e72248ee5ae6ae5360d1ae6a5f54f373fa543b6a
+key = 5840df6e29b02af1ab493b705bf16ea1ae8338f4dcc176a8
+msg = c37b7e6492584340bed12207808941155068f738
+result = valid
+
+# tcId = 142
+# RFC 3394
+ct = afbeb0f07dfbf5419200f2ccb50bb24f
+key = 5840df6e29b02af1ab493b705bf16ea1ae8338f4dcc176a8
+msg = 466f7250617369
+result = valid
+
+[keySize = 256]
+
+# tcId = 143
+ct = e3eab96d9a2fda12f9e252053aff15e753e5ea6f5172c92b
+key = fce0429c610658ef8e7cfb0154c51de2239a8a317f5af5b6714f985fb5c4d75c
+msg = 287326b5ed0078e7ca0164d748f667e7
+result = valid
+
+# tcId = 144
+ct = 9d2b42fb2fdb92c89fb0c3bcd9e1600d3334b4e35e791369
+key = 0dda6da5123e2c37c6fa16ba0d334cd01acd652f8994211751dfab4faac2fc22
+msg = b40b6828729b456322a8d065abc0d081
+result = valid
+
+# tcId = 145
+ct = 5291e05abd55f5886850855e3f9f2f576b101acc222d6766
+key = d6925914cd06308f81ad91e23073593d99d4e50351b20eb2a8d1a1ac4ced6588
+msg = 037b27b3dc95b19d15bd4091e320bfe1
+result = valid
+
+# tcId = 146
+ct = 4b1220525c537aec30ebcd562b694b4e9e2ccd819de22ef608b5d8090779d9de
+key = 07518a82cbc8da1dcec55f3763a206d277487abd03cedd0b8bef9ee2fb157121
+msg = faa4664d79fce3c7d2fdd462f6c1c423c2f8e6b69be2e071
+result = valid
+
+# tcId = 147
+ct = 67b2cbd68f6a208d647bdc5af7d0bccf6711a9e8fd0d9434363006addd4b9696
+key = ea46991d4e71f53dd624e7fe7fde11944a7c5942d232369b8065d42b8cd2dde1
+msg = dffc5cf1dd5411d015d84601fa38df5effe885c7f26a4825
+result = valid
+
+# tcId = 148
+ct = cfdbbd95f187508a488fe017c5e5d5a5975b68441d520e0e931922388e28784c
+key = fdcfa902c6f222f527af84da533b14b52e2615da3a89d1d35708b0cd49f60d87
+msg = 966b07047354966a703e79607b556032f4f596b7f9206f05
+result = valid
+
+# tcId = 149
+ct = b63b7e0fec7e315816233db6758fd3e744b9f6a40862bdf866487e53bcb950d8b2649269e51b4475
+key = 38e1b1d075d9d852b9a6c01c8ff6965af01bac457a4e339ae3e1d7b2ffacc0cd
+msg = 80ad6820f1c90981e2ca42b817a345c1179d0a11d8e23a8adc0505e13d87295a
+result = valid
+
+# tcId = 150
+ct = 837cfc316b49299edaf427e0988020ee876204b29d847669daab72c8660b0d860e9de3bd851198ff
+key = c641f1689d81caa8ba37d895272240664054ed974cfffc40e6c5c0cad1b916c7
+msg = 3fd0ba19955e46749f54d88e99d080b7339d588fe612ec0f4021ca3ca2104270
+result = valid
+
+# tcId = 151
+ct = 0e9e2e9aa34bbf973d67bc534ac86fc5b5a5f9da5f026866177894ec6077a5c84501510e1bf4afb3
+key = aa0ab9d68ed4a04e723f81b44c0c88d0bcde7a80cfd476eb4b8836d9aa01ec4c
+msg = 57faa8766f6d6a0aa1cf643f857c150df5b31303b50af480e21c4b5e8c8a15d5
+result = valid
+
+# tcId = 152
+# Round counter overflows 256
+ct = 1c6b7e4003384f071bf29baea9098ad81da8e9862909329f52793b35d592c10dba15aa89400ea6403df8dcaffd0dbf5606303f109f79ad700ed5d5ad4e59950ce9ce5296c9d186a0df441973d1835f9ac000ad1a6797875c3a03161e9e3f5ea464032e407854eadca5a9e7a386bb0d29253e3804adefd8c0402cc8c40ac7f9041429cc0bb77a405b284baa2dae764ea09c654c0a82f2c5724221ba44e341503d3103dbc393c7702182f8cc2762ddbc873b7f84197709886a4b5df5b04ff9d21b79b50904af3c32128dfb9cde94fe1254d981e6ce3acfda82db1fa2badbccd2d29052a04a69ce1f5652f30496ea57edc7e3e885dd4a35ca15aba602bb4c888a8064da94c2ac5c12c11f608810af46fbb49c3e8f8771ff661f8d8dccd163d0c4a401b8b9aa74e68a56011cf78d21dc7541a974f9dad5ae27f8a26d1b0e76be2f86c6a21e9d1c2b5df3c8878a8bcae143b3af1f082afc52616eeadd2232926597b245d394931e02e493b0bc27a92d013e111694cac2c5a2a46e008a8498b5c31bb5ec35a4e9957e365d
+key = b6121acad51038e11873aaa7e6c7be06f93826b74fec0ea1c02f9981ed49d16a
+msg = 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+result = acceptable
+
+# tcId = 153
+# wrapping small key
+ct = a65959a600000000
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b162baa53d2700093
+msg = 
+result = acceptable
+
+# tcId = 154
+# wrapping small key
+ct = 06c1e65ac0f385b4e8c400d229f39422
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b162baa53d2700093
+msg = ae
+result = acceptable
+
+# tcId = 155
+# wrapping small key
+ct = c98da5936a1313eba1a6773b8060ea5e
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b162baa53d2700093
+msg = c548
+result = acceptable
+
+# tcId = 156
+# wrapping small key
+ct = b2a77d9b837e87cdb7391e1df7cdaf14
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b162baa53d2700093
+msg = f713b9
+result = acceptable
+
+# tcId = 157
+# wrapping small key
+ct = d8ecf20191f75aa36686298bfa5022ab
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b162baa53d2700093
+msg = f375cbf7
+result = acceptable
+
+# tcId = 158
+# wrapping small key
+ct = 077362f50356fc7c54c70f9cb4306f7d
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b162baa53d2700093
+msg = d9445094b1
+result = acceptable
+
+# tcId = 159
+# wrapping small key
+ct = a4bd6a116ad88a52aae3f0c0cb893f9b
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b162baa53d2700093
+msg = fab43e91ae15
+result = acceptable
+
+# tcId = 160
+# wrapping small key
+ct = 68a52de00ec0f1ebbedc38fee6be0c23
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b162baa53d2700093
+msg = 90735025797bd2
+result = acceptable
+
+# tcId = 161
+# wrapping small key
+ct = 3a6746052a1744cfe7e2f36dafc4042d
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b162baa53d2700093
+msg = e43f5e4e123a03c4
+result = acceptable
+
+# tcId = 162
+# wrapping small key
+ct = db7e73da22219e1baac0f4e955c3db2b900b5d3078f94b59
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b162baa53d2700093
+msg = 1723eb9d000916996a
+result = acceptable
+
+# tcId = 163
+# wrapping small key
+ct = f77ec14a010777f1f1071808f285c1c00b4e9420f0e8bf48
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b162baa53d2700093
+msg = 8b18daecde14b8472ffd
+result = acceptable
+
+# tcId = 164
+# wrapping small key
+ct = 6b40d4f0863581a7d0365ad477568bfad94f8bf134984838
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b162baa53d2700093
+msg = e5bd6fbacbf3ef0d40c884
+result = acceptable
+
+# tcId = 165
+# wrapping small key
+ct = 660f645b02405a18f7225b68c0a09a949b2b5ba784922cfe
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b162baa53d2700093
+msg = b3be5e5397df5f46b099e821
+result = acceptable
+
+# tcId = 166
+# wrapping small key
+ct = 6bea6bf57601bf063873f47ec3572cfb9cfb595d8bdb5e97
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b162baa53d2700093
+msg = 4cdd960cabcf8aaf69c37da1d3
+result = acceptable
+
+# tcId = 167
+# wrapping small key
+ct = b631292536aaf02d829cc6d3c39e5a5cd76240889e9d51d0
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b162baa53d2700093
+msg = da29e0889cf98742612e0326300b
+result = acceptable
+
+# tcId = 168
+# wrapping small key
+ct = de497acf18a177a3a9b3d8da46d74dfa58dcc537a3a95323
+key = 1abf4b7fa2bb62a78f09ddab04625dcacdd9e551d1a69b6b162baa53d2700093
+msg = 72aaee126a822184806c7d22eed66b
+result = acceptable
+
+# tcId = 169
+# Modified IV
+ct = aef4d2357a8fc5c3b4a80a15ed49781d3a82c98eb78c9180
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 170
+# Modified IV
+ct = 6eaefd5193f0725fea545077a430860663901979f0b6f4a3
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 171
+# Modified IV
+ct = f9ded536c1ae9c680f7d9c4b91a566a07b1628e9b9f4fccd
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 172
+# Modified IV
+ct = 443526477c779a329ded0b230307afa64fdc10dfc86414dd
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 173
+# Modified IV
+ct = 21ba79f3b423a66e7baad86fe49786e07a33dfdf227687e9
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 174
+# Modified IV
+ct = 3e65dbacaae556fa18bd192035cd55958adeac30e5ca7b3b
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 175
+# Modified IV
+ct = de2054883b00f81ff68e42b7ff1c05ef5faaf75b2bb14004
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 176
+# Modified IV
+ct = 2aa3c6ba891d1211677d59f886cc6d05698243d10dc189f7
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae37
+result = invalid
+
+# tcId = 177
+# Modified IV
+ct = 9b1e7d6caf42bb3a15530f2387ed7329310ba76e1852566a
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 178
+# Modified IV
+ct = daf6a9f5e4b4985fcd4815bf6298a3039bcb32327b0876ff
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 179
+# Modified IV
+ct = 14c4079399721142fd5fce26e9417064c7e0201fb7b5255c
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 180
+# Modified IV
+ct = f48a30b8691a2a80dd79c355c281addf779bfed8971e3ce4
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 181
+# Modified IV
+ct = 248f867430ffc954b494c936a3ef815b1754009928aaf0c4
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 182
+# Modified IV
+ct = dcaa88dad9b03e59a3ac8350239824368004e2ca616c15d7
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 183
+# Modified IV
+ct = a6cc8470192687ec9a31258ddb73084005784475f3442705
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 184
+# Modified IV
+ct = 0527ab5408b4f1484b27f98641511143ab88783688256815
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070
+result = invalid
+
+# tcId = 185
+# Modified IV
+ct = 7fd3ad3aee0545da1ed3a54d5a198a2c76cf8290c011c042
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 186
+# Modified IV
+ct = a24e94c12b2e6b776c8febe9179521beae0cfbd507d358b4
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 187
+# Modified IV
+ct = 9395b071fa3d9908b2e1b349bf7cd6a1cfc86b979c8c73cd
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 188
+# Modified IV
+ct = 1eb452770bc0f26a3576b604bf5ac72f714fc468c357eba7
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 189
+# Modified IV
+ct = b42bcb4161f40b30f3d2f740f43e441d3c9a39613914f1c6
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 190
+# Modified IV
+ct = f3d76dd320e5f1b3f85b8f73a9ebcfabfb8346daafaf36e6
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 191
+# Modified IV
+ct = b8e26164496942f44f16751096fb47952ec478bb288e72a1
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 192
+# Modified IV
+ct = fa783b3aca0ec1e677378f23ebe937776fa590ecc6b01392
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5
+result = invalid
+
+# tcId = 193
+# Modified IV
+ct = 8b011408049eab81cc185796b9636982c1ad28e940e5c35ab1219434c23e8c59
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1
+result = invalid
+
+# tcId = 194
+# Modified IV
+ct = 08db2f06aa2400d4cc1113b1c9e3ba1b39e3e26a84918f9266796c426c166428
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1
+result = invalid
+
+# tcId = 195
+# Modified IV
+ct = 3114404be000ee167b65dd3cfae3b10c50dffe1df864b5e52a2805f0c80021c0
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1
+result = invalid
+
+# tcId = 196
+# Modified IV
+ct = 405ae5bdeff8b05d28ea55900b8e81dc789d532ec3fc457730819e762172f751
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1
+result = invalid
+
+# tcId = 197
+# Modified IV
+ct = 7c19e66d21c0f1409ee6f03a36ab6ba532349e2567200b95d7f5012b2b7e5d33
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1
+result = invalid
+
+# tcId = 198
+# Modified IV
+ct = 955ac67d6e496b9b93a4dda8f6e65e668f1326b256ee146a7647ba18deee7986
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1
+result = invalid
+
+# tcId = 199
+# Modified IV
+ct = c8600aa18be27279493fd68c84130c8bc328b0f6821e01e892b6c2dc1c005270
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1
+result = invalid
+
+# tcId = 200
+# Modified IV
+ct = 492566e0dc539e234b08b95fb23594a6d14f59fa4367799495c2e7f2993135ec
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1
+result = invalid
+
+# tcId = 201
+# Modified IV
+ct = 8c5c2ea18125a03d15d2a624c9bfcccdf53709a89ae03d5728c98943b13df72c6f02fc8e1cfcdfa7
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1acce3497352690
+result = invalid
+
+# tcId = 202
+# Modified IV
+ct = 8836c5cb2eec2ca2541b18c1259933ebd601bd6763d9f7cebf06ed6abbe37d455aca13a2db87d111
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1acce3497352690
+result = invalid
+
+# tcId = 203
+# Modified IV
+ct = 2554e0faf721d77f7dfadaaa90b70c2f242f93bdc4f876cd058a86ccfff33f8fd88736997f505d98
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1acce3497352690
+result = invalid
+
+# tcId = 204
+# Modified IV
+ct = 53ee4c8f03212b389f5bc2b26bc898deb91a457f258a22028a688919e12c4da23090c26b5c9ff692
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1acce3497352690
+result = invalid
+
+# tcId = 205
+# Modified IV
+ct = 3a63b0283ec071a4d4c32b0f30b384eccb3cd8d7fb12de6806e12fef5da82a7a39aad8128c3e5915
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1acce3497352690
+result = invalid
+
+# tcId = 206
+# Modified IV
+ct = d1cfaaa9adc25f948c0c4720967b01488e06d3dfc5622b5de38a722798d4a3a44fa6194a92c5ede7
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1acce3497352690
+result = invalid
+
+# tcId = 207
+# Modified IV
+ct = 251a71511a4e73d1469a051fd88fa78cae96547fd8ca8e323b05d8717cdcd239292c7bbe0708fae5
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1acce3497352690
+result = invalid
+
+# tcId = 208
+# Modified IV
+ct = 14a62f7284124d795826cc89852e97dbe6b8a30ac56df07173878cf0136dbe386ec46327d6fc65f1
+key = 4f710eb6b5e28703becfc3dc52fa8bc1dd44a4a6d38a84b4f94e89ac32d987e7
+msg = a828cbda9b5ff0ae374f84fa01d070a5f0a17a0c462be4f1acce3497352690
+result = invalid
+
+# tcId = 209
+# RFC 3349 padding
+ct = ac1a774a5de27e4f9c356e4f62deaf8b7eeee6bcafafd895
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702eb2c31d96a58c9be2
+msg = 000102030405060708090a0b0c0d0e0f
+result = invalid
+
+# tcId = 210
+# Invalid encryption
+ct = b3941437f55e7cbc3f88050aff703967
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702eb2c31d96a58c9be2
+msg = 0001020304050607
+result = invalid
+
+# tcId = 211
+# padding too long
+ct = 86175acf19ad0b7ac60d1fe4bb7850635e7ec6f8a314f85b6dd3d8f9349ea38d
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702eb2c31d96a58c9be2
+msg = 000000000000000000000000000000000000000000000000
+result = invalid
+
+# tcId = 212
+# padding too long
+ct = 791f088847a76731e0d56b9b2dcb28bf9f091a9725790e0a64fc8e7cb3ad50f380297a98e3b1c33e
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702eb2c31d96a58c9be2
+msg = 0000000000000000000000000000000000000000000000000000000000000000
+result = invalid
+
+# tcId = 213
+# incorrectly encoded length
+ct = 868c34495bd3d7b4e2c1861e7fcbbdb372099488dd96c9ea
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702eb2c31d96a58c9be2
+msg = 00000000000000000000000000000000
+result = invalid
+
+# tcId = 214
+# length = 2**32-1
+ct = 4a8b4aeaa713469bfd9bf88d4072379fc858e40b24b0bebe
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702eb2c31d96a58c9be2
+msg = 00000000000000000000000000000000
+result = invalid
+
+# tcId = 215
+# length = 2**32-1
+ct = c210aa3b5fbf5eac97e68d98d7727f38
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702eb2c31d96a58c9be2
+msg = 0000000000000000
+result = invalid
+
+# tcId = 216
+# length = 2**31-1
+ct = e0ebd376e050cc9027b76dfc38ee2c6ae2808cecf480a560
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702eb2c31d96a58c9be2
+msg = 00000000000000000000000000000000
+result = invalid
+
+# tcId = 217
+# length = 2**31 + 16
+ct = 23a693e211c08ab9b222c2ede2db18f437e22917fdff8032
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702eb2c31d96a58c9be2
+msg = 00000000000000000000000000000000
+result = invalid
+
+# tcId = 218
+# data is incorrectly padded
+ct = 003f2916fea6827e01199028d3dc4e03889113f97b1860cc242e5a0f28a0f159
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702eb2c31d96a58c9be2
+msg = ffffffffffffffffffffffffffffffffffffffffffffffff
+result = invalid
+
+# tcId = 219
+# data is incorrectly padded
+ct = 5c25a170d5225a6d66e117c691b37383
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702eb2c31d96a58c9be2
+msg = 0001020304050607
+result = invalid
+
+# tcId = 220
+# length = 0
+ct = df9ef924eb59634be5b27cabd33d72bd6be6e01e4672ab05
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702eb2c31d96a58c9be2
+msg = 00000000000000000000000000000000
+result = invalid
+
+# tcId = 221
+# RFC 3349 padding with incorrect size
+ct = e6e66fad359a7b63a977788acd297121
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702eb2c31d96a58c9be2
+msg = 0001020304050607
+result = invalid
+
+# tcId = 222
+# length = 9
+ct = 76b88ecda760b1af80703036185fc476
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702eb2c31d96a58c9be2
+msg = 0000000000000000
+result = invalid
+
+# tcId = 223
+# length = 16
+ct = fd101943f4ab7c38ec68c75d4b3193dc
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702eb2c31d96a58c9be2
+msg = 0000000000000000
+result = invalid
+
+# tcId = 224
+# length = 2**31 + 8
+ct = 1793a3a9bd146726edbcb9589f20e849
+key = 48a53c11ef2d727db7eb9a834b134ea9602273aca929702eb2c31d96a58c9be2
+msg = 0000000000000000
+result = invalid
+
diff --git a/util/convert_wycheproof.go b/util/convert_wycheproof.go
index 7846067..e6eab95 100644
--- a/util/convert_wycheproof.go
+++ b/util/convert_wycheproof.go
@@ -212,6 +212,7 @@
 	"ecdsa_secp521r1_sha512_test.json",
 	"eddsa_test.json",
 	"kw_test.json",
+	"kwp_test.json",
 	"rsa_pss_2048_sha1_mgf1_20_test.json",
 	"rsa_pss_2048_sha256_mgf1_0_test.json",
 	"rsa_pss_2048_sha256_mgf1_32_test.json",