aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/data/pad.vec
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-11-15 20:08:22 -0500
committerJack Lloyd <[email protected]>2016-11-15 20:08:22 -0500
commitdb3a868cb8c477dbd909bed53879f2124a443306 (patch)
tree78bed218f47d93f28685075a8f8540d40d00360f /src/tests/data/pad.vec
parentca972385dd259f1a80d37b153a504fc14b370795 (diff)
Add negative tests for cipher mode padding
Diffstat (limited to 'src/tests/data/pad.vec')
-rw-r--r--src/tests/data/pad.vec95
1 files changed, 69 insertions, 26 deletions
diff --git a/src/tests/data/pad.vec b/src/tests/data/pad.vec
index edd0892fc..ee24d3497 100644
--- a/src/tests/data/pad.vec
+++ b/src/tests/data/pad.vec
@@ -1,104 +1,147 @@
[NoPadding]
-In = FFFFFF
+In = FFFFFF
Out = FFFFFF
Blocksize = 16
-In = FFFFFFFF
+In = FFFFFFFF
Out = FFFFFFFF
Blocksize = 32
-In = FFFFFFFFFFFF
+In = FFFFFFFFFFFF
Out = FFFFFFFFFFFF
Blocksize = 64
-In = FFFFFFFFFFFFFFFF
+In = FFFFFFFFFFFFFFFF
Out = FFFFFFFFFFFFFFFF
Blocksize = 8
-In = FFFFFFFFFFFFFFFFFF
+In = FFFFFFFFFFFFFFFFFF
Out = FFFFFFFFFFFFFFFFFF
Blocksize = 8
[PKCS7]
-In = FFFFFF
+In = FFFFFF
Out = FFFFFF0D0D0D0D0D0D0D0D0D0D0D0D0D
Blocksize = 16
-In = FFFFFFFF
+In = FFFFFFFF
Out = FFFFFFFF1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C
Blocksize = 32
-In = FFFFFFFFFFFF
+In = FFFFFFFFFFFF
Out = FFFFFFFFFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
Blocksize = 64
-In = FFFFFFFFFFFFFFFF
+In = FFFFFFFFFFFFFFFF
Out = FFFFFFFFFFFFFFFF0808080808080808
Blocksize = 8
-In = FFFFFFFFFFFFFFFFFF
+In = FFFFFFFFFFFFFFFFFF
Out = FFFFFFFFFFFFFFFFFF07070707070707
Blocksize = 8
+[PKCS7_Invalid]
+In = FFFFFFFFFFFFFFFFFF07070706070707
+Blocksize = 8
+
+In = FFFFFFFFFFFFFFFFFFFF070707070707
+Blocksize = 8
+
[OneAndZeros]
-In = FFFFFF
+In = FFFFFF
Out = FFFFFF80000000000000000000000000
Blocksize = 16
-In = FFFFFFFF
+In = FFFFFFFF
Out = FFFFFFFF80000000000000000000000000000000000000000000000000000000
Blocksize = 32
-In = FFFFFFFFFFFF
+In = FFFFFFFFFFFF
Out = FFFFFFFFFFFF80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Blocksize = 64
-In = FFFFFFFFFFFFFFFF
+In = FFFFFFFFFFFFFFFF
Out = FFFFFFFFFFFFFFFF8000000000000000
Blocksize = 8
-In = FFFFFFFFFFFFFFFFFF
+In = FFFFFFFFFFFFFFFFFF
Out = FFFFFFFFFFFFFFFFFF80000000000000
Blocksize = 8
+[OneAndZeros_Invalid]
+In = FF80000000000008
+Blocksize = 8
+
+In = FF70000000000008
+Blocksize = 8
+
+In = FF70000000000081
+Blocksize = 8
+
[X9.23]
-In = FFFFFF
+In = FFFFFF
Out = FFFFFF0000000000000000000000000D
Blocksize = 16
-In = FFFFFFFF
+In = FFFFFFFF
Out = FFFFFFFF0000000000000000000000000000000000000000000000000000001C
Blocksize = 32
-In = FFFFFFFFFFFF
+In = FFFFFFFFFFFF
Out = FFFFFFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003A
Blocksize = 64
-In = FFFFFFFFFFFFFFFF
+In = FFFFFFFFFFFFFFFF
Out = FFFFFFFFFFFFFFFF0000000000000008
Blocksize = 8
-In = FFFFFFFFFFFFFFFFFF
+In = FFFFFFFFFFFFFFFFFF
Out = FFFFFFFFFFFFFFFFFF00000000000007
Blocksize = 8
+[X9.23_Invalid]
+In = FFFFFFFFFFFFFFFFFF000000FFFFF00007
+Blocksize = 8
+
+In = FFFFFFFFFFFFFFFFFF0000000FF00007
+Blocksize = 8
+
+In = FFFFFF8000000000000000000000000D
+Blocksize = 16
+
[ESP]
-In = FFFFFF
+In = FFFFFF
Out = FFFFFF0102030405060708090A0B0C0D
Blocksize = 16
-In = FFFFFFFF
+In = FFFFFFFF
Out = FFFFFFFF0102030405060708090A0B0C0D0E0F101112131415161718191A1B1C
Blocksize = 32
-In = FFFFFFFFFFFF
+In = FFFFFFFFFFFF
Out = FFFFFFFFFFFF0102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A
Blocksize = 64
-In = FFFFFFFFFFFFFFFF
+In = FFFFFFFFFFFFFFFF
Out = FFFFFFFFFFFFFFFF0102030405060708
Blocksize = 8
-In = FFFFFFFFFFFFFFFFFF
+In = FFFFFFFFFFFFFFFFFF
Out = FFFFFFFFFFFFFFFFFF01020304050607
-Blocksize = 8 \ No newline at end of file
+Blocksize = 8
+
+[ESP_Invalid]
+In = FF010202
+Blocksize = 4
+
+In = FF010204
+Blocksize = 4
+
+In = FFFFFF0102030405060708090A0B0C0F
+Blocksize = 16
+
+In = FFFFFF0102030404060708090A0B0C0D
+Blocksize = 16
+
+In = FFFFFFFF0002030405060708090A0B0C
+Blocksize = 16