aboutsummaryrefslogtreecommitdiffstats
path: root/src/extra_tests/timing/timing-tests/data
diff options
context:
space:
mode:
authorJuraj Somorovsky <[email protected]>2016-11-19 23:42:21 +0100
committerJuraj Somorovsky <[email protected]>2016-11-20 00:17:03 +0100
commit5848645d0726157a0a1ba8c811dc3d3567fc500e (patch)
treefe43ebc53ae8177aa63d180435f7801658ddc53c /src/extra_tests/timing/timing-tests/data
parent1e21b64bb96815ebadfab892a73094c758db142d (diff)
Timing test suite with the mona timing library
Diffstat (limited to 'src/extra_tests/timing/timing-tests/data')
-rw-r--r--src/extra_tests/timing/timing-tests/data/bleichenbacher.vec8
-rw-r--r--src/extra_tests/timing/timing-tests/data/lucky13sec3.vec4
-rw-r--r--src/extra_tests/timing/timing-tests/data/lucky13sec4sha1.vec13
-rw-r--r--src/extra_tests/timing/timing-tests/data/lucky13sec4sha256.vec7
-rw-r--r--src/extra_tests/timing/timing-tests/data/lucky13sha384.vec11
-rw-r--r--src/extra_tests/timing/timing-tests/data/manger.vec4
6 files changed, 47 insertions, 0 deletions
diff --git a/src/extra_tests/timing/timing-tests/data/bleichenbacher.vec b/src/extra_tests/timing/timing-tests/data/bleichenbacher.vec
new file mode 100644
index 000000000..76df90e68
--- /dev/null
+++ b/src/extra_tests/timing/timing-tests/data/bleichenbacher.vec
@@ -0,0 +1,8 @@
+# valid padding
+00021F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F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1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1FF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1
+# invalid length
+00021F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F001F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1FF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1 \ No newline at end of file
diff --git a/src/extra_tests/timing/timing-tests/data/lucky13sec3.vec b/src/extra_tests/timing/timing-tests/data/lucky13sec3.vec
new file mode 100644
index 000000000..97b7548bc
--- /dev/null
+++ b/src/extra_tests/timing/timing-tests/data/lucky13sec3.vec
@@ -0,0 +1,4 @@
+# Lucky 13 Section 3 - Distinguishing attack: 32 bytes of data followed by maximum padding 0xFF, 18 plaintext blocks
+00000000000000000000000000000000 00000000000000000000000000000000 ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff
+# Lucky 13 Section 3 - Distinguishing attack: minimum padding 0x00, 18 plaintext blocks
+00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000
diff --git a/src/extra_tests/timing/timing-tests/data/lucky13sec4sha1.vec b/src/extra_tests/timing/timing-tests/data/lucky13sec4sha1.vec
new file mode 100644
index 000000000..ee11ec5db
--- /dev/null
+++ b/src/extra_tests/timing/timing-tests/data/lucky13sec4sha1.vec
@@ -0,0 +1,13 @@
+# Lucky 13 Section 4.2: 4 plaintext blocks
+# Case 0: 0x00 padding byte
+00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000
+# Case 1: At least two valid padding bytes
+00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000101
+# Case 2: Invalid padding
+00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000004030303
+# Further cases (only for extended validations)
+#00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000020202
+#00000000000000000000000000000000 00000000000000000000000000000000 1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F 1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F
+#00000000000000000000000000000000 00000000000000000000000000000000
+#00000000000000000000000000000000 00000000000000000000000000000101
+#00000000000000000000000000000000 00000000000000000000000004030303 \ No newline at end of file
diff --git a/src/extra_tests/timing/timing-tests/data/lucky13sec4sha256.vec b/src/extra_tests/timing/timing-tests/data/lucky13sec4sha256.vec
new file mode 100644
index 000000000..d542238f6
--- /dev/null
+++ b/src/extra_tests/timing/timing-tests/data/lucky13sec4sha256.vec
@@ -0,0 +1,7 @@
+# Lucky 13 Section 4.2: 5 plaintext blocks, now for sha256. 32 bytes of output
+# Case 0: 0x00 padding byte
+00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000
+# Case 1: At least six valid padding bytes: 80+13-32-7 = 56
+00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000006060606060606
+# Case 2: Invalid padding
+00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000004030303
diff --git a/src/extra_tests/timing/timing-tests/data/lucky13sha384.vec b/src/extra_tests/timing/timing-tests/data/lucky13sha384.vec
new file mode 100644
index 000000000..b5a0e2441
--- /dev/null
+++ b/src/extra_tests/timing/timing-tests/data/lucky13sha384.vec
@@ -0,0 +1,11 @@
+# Lucky 13 test for SHA-384 (48 bytes output). SHA-384 uses 128 byte block length and 16 byte long encoding
+# <= 111 bytes: 1 compression
+# (111, 239] bytes: 2 compressions ...
+# Case 0: 160 bytes, 0x00 padding byte, results in (160-1-48+13)=124 MACed bytes
+00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000
+# Case 1: 160 bytes, 0x0D padding byte, results in (160-14-48+13)=111 MACed bytes
+00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+# Case 2: Further case with invalid padding
+00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 0000000000000000000000000000000A
+# Case 3: Further case with 0x0C
+00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C \ No newline at end of file
diff --git a/src/extra_tests/timing/timing-tests/data/manger.vec b/src/extra_tests/timing/timing-tests/data/manger.vec
new file mode 100644
index 000000000..1c370e0e5
--- /dev/null
+++ b/src/extra_tests/timing/timing-tests/data/manger.vec
@@ -0,0 +1,4 @@
+# valid first padding byte
+00021F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F00F1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F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