aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cipher/turing/turing.cpp37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/cipher/turing/turing.cpp b/src/cipher/turing/turing.cpp
index 204771e06..51473f49d 100644
--- a/src/cipher/turing/turing.cpp
+++ b/src/cipher/turing/turing.cpp
@@ -96,25 +96,23 @@ void Turing::generate()
0xEF72A3F1, 0x3F59E096, 0x0224253F, 0xD20F6658 };
const byte OFFSETS[221] = {
-0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 14, 15, 16,
-5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 2, 3, 4,
-10, 11, 12, 13, 14, 15, 16, 0, 1, 5, 7, 8, 9,
-15, 16, 0, 1, 2, 3, 4, 5, 6, 10, 12, 13, 14,
-3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 0, 1, 2,
-8, 9, 10, 11, 12, 13, 14, 15, 16, 3, 5, 6, 7,
-13, 14, 15, 16, 0, 1, 2, 3, 4, 8, 10, 11, 12,
-1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 15, 16, 0,
-6, 7, 8, 9, 10, 11, 12, 13, 14, 1, 3, 4, 5,
-11, 12, 13, 14, 15, 16, 0, 1, 2, 6, 8, 9, 10,
-16, 0, 1, 2, 3, 4, 5, 6, 7, 11, 13, 14, 15,
-4, 5, 6, 7, 8, 9, 10, 11, 12, 16, 1, 2, 3,
-9, 10, 11, 12, 13, 14, 15, 16, 0, 4, 6, 7, 8,
-14, 15, 16, 0, 1, 2, 3, 4, 5, 9, 11, 12, 13,
-2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 16, 0, 1,
-7, 8, 9, 10, 11, 12, 13, 14, 15, 2, 4, 5, 6,
-12, 13, 14, 15, 16, 0, 1, 2, 3, 7, 9, 10, 11,
-
- };
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 14, 15, 16,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 2, 3, 4,
+ 10, 11, 12, 13, 14, 15, 16, 0, 1, 5, 7, 8, 9,
+ 15, 16, 0, 1, 2, 3, 4, 5, 6, 10, 12, 13, 14,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 0, 1, 2,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 3, 5, 6, 7,
+ 13, 14, 15, 16, 0, 1, 2, 3, 4, 8, 10, 11, 12,
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 15, 16, 0,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 1, 3, 4, 5,
+ 11, 12, 13, 14, 15, 16, 0, 1, 2, 6, 8, 9, 10,
+ 16, 0, 1, 2, 3, 4, 5, 6, 7, 11, 13, 14, 15,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 16, 1, 2, 3,
+ 9, 10, 11, 12, 13, 14, 15, 16, 0, 4, 6, 7, 8,
+ 14, 15, 16, 0, 1, 2, 3, 4, 5, 9, 11, 12, 13,
+ 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 16, 0, 1,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 2, 4, 5, 6,
+ 12, 13, 14, 15, 16, 0, 1, 2, 3, 7, 9, 10, 11 };
for(u32bit j = 0; j != 17; ++j)
{
@@ -125,6 +123,7 @@ void Turing::generate()
u32bit R2 = R[R_off[2]];
u32bit R3 = R[R_off[3]];
u32bit R4 = R[R_off[4]];
+
const u32bit R5 = R[R_off[5]];
const u32bit R6 = R[R_off[6]];
const u32bit R7 = R[R_off[7]];