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

Unified Diff: chrome/test/data/third_party/kraken/tests/kraken-1.1/stanford-crypto-ccm.js

Issue 11348021: Automate Kraken benchmark with Chrome Remote Control. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
Index: chrome/test/data/third_party/kraken/tests/kraken-1.1/stanford-crypto-ccm.js
diff --git a/chrome/test/data/third_party/kraken/tests/kraken-1.1/stanford-crypto-ccm.js b/chrome/test/data/third_party/kraken/tests/kraken-1.1/stanford-crypto-ccm.js
deleted file mode 100644
index 1047ad78fdb0a7c3fc79056f9bf1a97d64280ea7..0000000000000000000000000000000000000000
--- a/chrome/test/data/third_party/kraken/tests/kraken-1.1/stanford-crypto-ccm.js
+++ /dev/null
@@ -1,33 +0,0 @@
-new sjcl.test.TestCase("CCM mode tests", function (cb) {
- if (!sjcl.cipher.aes || !sjcl.mode.ccm) {
- this.unimplemented();
- cb && cb();
- return;
- }
-
- var i, kat = sjcl.test.vector.ccm, tv, iv, ct, aes, len, tlen, thiz=this, w=sjcl.bitArray, pt, h=sjcl.codec.hex, ad;
- browserUtil.cpsIterate(function (j, cbb) {
- for (i=100*j; i<kat.length && i<100*(j+1); i++) {
- tv = kat[i];
- len = 32 * tv.key.length;
- aes = new sjcl.cipher.aes(h.toBits(tv.key));
-
- // Convert from strings
- iv = h.toBits(tv.iv);
- ad = h.toBits(tv.adata);
- pt = h.toBits(tv.pt);
- ct = h.toBits(tv.ct + tv.tag);
- tlen = tv.tag.length * 4;
-
- thiz.require(w.equal(sjcl.mode.ccm.encrypt(aes, pt, iv, ad, tlen), ct), "aes-"+len+"-ccm-encrypt #"+i);
- try {
- thiz.require(w.equal(sjcl.mode.ccm.decrypt(aes, ct, iv, ad, tlen), pt), "aes-"+len+"-ccm-decrypt #"+i);
- } catch (e) {
- thiz.fail("aes-ccm-decrypt #"+i+" (exn "+e+")");
- }
- }
- cbb();
- }, 0, kat.length / 100, true, cb);
-});
-
-sjcl.test.run();

Powered by Google App Engine
This is Rietveld 408576698