summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2015-03-28 04:28:46 -0400
committerJesse Luehrs <doy@tozt.net>2015-03-28 04:28:46 -0400
commit75b5c3f2f36d527216920d6d437bc1eef3237cd0 (patch)
tree5cc168e5c35b3344e8d28f339a53f718b1d8f9d0 /tests
parent301a4e5cdf5d206edc63f2bb632d1e0f0d4cc7f6 (diff)
downloadmatasano-75b5c3f2f36d527216920d6d437bc1eef3237cd0.tar.gz
matasano-75b5c3f2f36d527216920d6d437bc1eef3237cd0.zip
problem 18
Diffstat (limited to 'tests')
-rw-r--r--tests/lib.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/lib.rs b/tests/lib.rs
index 5fb8261..f0ead77 100644
--- a/tests/lib.rs
+++ b/tests/lib.rs
@@ -392,3 +392,16 @@ fn problem_17 () {
assert_eq!(&plaintext, expected);
}
}
+
+#[test]
+fn problem_18 () {
+ let ciphertext = b"L77na/nrFsKvynd6HzOoG7GHTLXsTVu9qvY/2syL\
+ XzhPweyyMTJULu/6/kXX0KSvoOLSFQ==".from_base64().unwrap();
+ let plaintext = &b"Yo, VIP Let's kick it Ice, Ice, baby Ice, Ice, baby "[..];
+ let got = matasano::aes_128_ctr(
+ &ciphertext[..],
+ b"YELLOW SUBMARINE",
+ 0
+ );
+ assert_eq!(got, plaintext);
+}