aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/data/stream
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-10-20 20:15:16 -0400
committerJack Lloyd <[email protected]>2017-10-20 20:15:16 -0400
commitcba904d7a474ef4151654c762d110ffd19841b33 (patch)
treec49b12f2017607c43723465c2965b11a271e23e9 /src/tests/data/stream
parenta6e051bea6e7341f8f7b8ab40e042e1e099b9b8b (diff)
Allow setting CTR width via string
Prohibit very small counter widths (under 4 bytes), since they lead to trivial keystream reuse. Add tests. Fix clone which always returned an object with a block-wide counter.
Diffstat (limited to 'src/tests/data/stream')
-rw-r--r--src/tests/data/stream/ctr.vec18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tests/data/stream/ctr.vec b/src/tests/data/stream/ctr.vec
index 9fddf1cfc..3eccc3cf6 100644
--- a/src/tests/data/stream/ctr.vec
+++ b/src/tests/data/stream/ctr.vec
@@ -280,6 +280,24 @@ Nonce = 88D9C46E992B27AE
In = CD
Out = 9D
+[CTR-BE(AES-128,4)]
+Key = 2B7E151628AED2A6ABF7158809CF4F3C
+Nonce = FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+In = 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+Out = 8AF2860142F786F409307C1A3F7EAAAC597D5761063D8BAD232CB0136888AABB90B8CF63F44412CEEE802A522AB6566313C5E10652749056AD2F02CE3BBF5BEC
+
+[CTR-BE(AES-128,5)]
+Key = 2B7E151628AED2A6ABF7158809CF4F3C
+Nonce = FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+In = 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+Out = 8AF2860142F786F409307C1A3F7EAAACE0828A20E49595A19191201820125CC1B976913097C4A3245CAB186AE3B581F173DFEE01730EBB880CB63C673CBD4FC1
+
+[CTR-BE(AES-128,6)]
+Key = 2B7E151628AED2A6ABF7158809CF4F3C
+Nonce = FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+In = 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+Out = 8AF2860142F786F409307C1A3F7EAAAC33E25A114853DFEA903DB7B182593CB439E12B65EBFE27B2C1557F1EAD7AB52F0D42E2BB9772747085DD8C2AF5F357BB
+
[CTR-BE(AES-128)]
Key = 2B7E151628AED2A6ABF7158809CF4F3C
Nonce = F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF