Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2085)

Unified Diff: content/test/data/webcrypto/aes_cbc.json

Issue 147613002: [refactor] Move webcrypto test data to separate files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/webcrypto/webcrypto_impl_unittest.cc ('k') | content/test/data/webcrypto/aes_gcm.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/webcrypto/aes_cbc.json
diff --git a/content/test/data/webcrypto/aes_cbc.json b/content/test/data/webcrypto/aes_cbc.json
new file mode 100644
index 0000000000000000000000000000000000000000..6fa36cf9b077240fdd6592da1a01bd1f5b7066cf
--- /dev/null
+++ b/content/test/data/webcrypto/aes_cbc.json
@@ -0,0 +1,34 @@
+[
+ // F.2.1 (CBC-AES128.Encrypt)
+ // http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
+ {
+ "key": "2b7e151628aed2a6abf7158809cf4f3c",
+ "iv": "000102030405060708090a0b0c0d0e0f",
+ "plain_text": "6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e5130c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417be66c3710",
+ // Added a padding block: encryption of {0x10, 0x10, ... 0x10}) (not given by the
+ // NIST test vector)
+ "cipher_text": "7649abac8119b246cee98e9b12e9197d5086cb9b507219ee95db113a917678b273bed6b8e3c1743b7116e69e222295163ff1caa1681fac09120eca307586e1a78cb82807230e1321d3fae00d18cc2012"
+ },
+
+ // F.2.6 CBC-AES256.Decrypt [*]
+ // http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
+ //
+ // [*] Truncated 3 bytes off the plain text, so block 4 differs from the
+ // NIST vector.
+ {
+ "key": "603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4",
+ "iv": "000102030405060708090a0b0c0d0e0f",
+ // Truncated the last block to make it more interesting.
+ "plain_text": "6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e5130c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417be6",
+ // Last block differs from source vector (due to truncation)
+ "cipher_text": "f58c4c04d6e5f1ba779eabfb5f7bfbd69cfc4e967edb808d679f777bc6702c7d39f23369a9d9bacfa530e26304231461c9aaf02a6a54e9e242ccbf48c59daca6"
+ },
+
+ // Taken from encryptor_unittest.cc (EncryptorTest.EmptyEncrypt())
+ {
+ "key": "3132383d5369787465656e4279746573",
+ "iv": "5377656574205369787465656e204956",
+ "plain_text": "",
+ "cipher_text": "8518b8878d34e7185e300d0fcc426396"
+ }
+]
« no previous file with comments | « content/renderer/webcrypto/webcrypto_impl_unittest.cc ('k') | content/test/data/webcrypto/aes_gcm.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698