diff options
Diffstat (limited to 'src/tests/data')
-rw-r--r-- | src/tests/data/timing/bleichenbacher.vec | 8 | ||||
-rw-r--r-- | src/tests/data/timing/ecdsa.vec | 4 | ||||
-rw-r--r-- | src/tests/data/timing/lucky13sec3.vec | 4 | ||||
-rw-r--r-- | src/tests/data/timing/lucky13sec4sha1.vec | 13 | ||||
-rw-r--r-- | src/tests/data/timing/lucky13sec4sha256.vec | 7 | ||||
-rw-r--r-- | src/tests/data/timing/lucky13sha384.vec | 11 | ||||
-rw-r--r-- | src/tests/data/timing/manger.vec | 4 |
7 files changed, 51 insertions, 0 deletions
diff --git a/src/tests/data/timing/bleichenbacher.vec b/src/tests/data/timing/bleichenbacher.vec new file mode 100644 index 000000000..76df90e68 --- /dev/null +++ b/src/tests/data/timing/bleichenbacher.vec @@ -0,0 +1,8 @@ +# valid padding +00021F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F00F1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1 +# invalid padding +00031F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1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F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F001F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1FF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1
\ No newline at end of file diff --git a/src/tests/data/timing/ecdsa.vec b/src/tests/data/timing/ecdsa.vec new file mode 100644 index 000000000..579fe0d1b --- /dev/null +++ b/src/tests/data/timing/ecdsa.vec @@ -0,0 +1,4 @@ +# leading zeros +01 +# no leading zeros +FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF diff --git a/src/tests/data/timing/lucky13sec3.vec b/src/tests/data/timing/lucky13sec3.vec new file mode 100644 index 000000000..97b7548bc --- /dev/null +++ b/src/tests/data/timing/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/tests/data/timing/lucky13sec4sha1.vec b/src/tests/data/timing/lucky13sec4sha1.vec new file mode 100644 index 000000000..ee11ec5db --- /dev/null +++ b/src/tests/data/timing/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/tests/data/timing/lucky13sec4sha256.vec b/src/tests/data/timing/lucky13sec4sha256.vec new file mode 100644 index 000000000..d542238f6 --- /dev/null +++ b/src/tests/data/timing/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/tests/data/timing/lucky13sha384.vec b/src/tests/data/timing/lucky13sha384.vec new file mode 100644 index 000000000..b5a0e2441 --- /dev/null +++ b/src/tests/data/timing/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/tests/data/timing/manger.vec b/src/tests/data/timing/manger.vec new file mode 100644 index 000000000..1c370e0e5 --- /dev/null +++ b/src/tests/data/timing/manger.vec @@ -0,0 +1,4 @@ +# valid first padding byte +00021F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F00F1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1F1FFF1F1F1F1F1F1F1F1 +# invalid first padding byte +01021F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1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