diff options
author | Niels Möller <nisse@lysator.liu.se> | 2011-06-21 13:00:08 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2011-06-21 13:00:08 +0200 |
commit | d542150ae92d9bd7380ff4185a8c7692441f4b5e (patch) | |
tree | d1f51796262b1fd212ac0b83a37bca1a9e6fe99d /misc | |
parent | 3bf5be5353647dd9951e32e31b4e2bca3e42cb80 (diff) | |
download | nettle-d542150ae92d9bd7380ff4185a8c7692441f4b5e.tar.gz |
*** empty log message ***
Rev: nettle/misc/Makefile:1.3
Rev: nettle/misc/serpent-sbox0i.dot:1.1
Rev: nettle/misc/serpent-sbox1i.dot:1.1
Rev: nettle/misc/serpent-sbox2i.dot:1.1
Rev: nettle/misc/serpent-sbox3i.dot:1.1
Rev: nettle/misc/serpent-sbox4i.dot:1.1
Rev: nettle/misc/serpent-sbox5i.dot:1.1
Diffstat (limited to 'misc')
-rw-r--r-- | misc/Makefile | 4 | ||||
-rw-r--r-- | misc/serpent-sbox0i.dot | 46 | ||||
-rw-r--r-- | misc/serpent-sbox1i.dot | 46 | ||||
-rw-r--r-- | misc/serpent-sbox2i.dot | 44 | ||||
-rw-r--r-- | misc/serpent-sbox3i.dot | 42 | ||||
-rw-r--r-- | misc/serpent-sbox4i.dot | 42 | ||||
-rw-r--r-- | misc/serpent-sbox5i.dot | 42 |
7 files changed, 265 insertions, 1 deletions
diff --git a/misc/Makefile b/misc/Makefile index c598ad4e..7ec86982 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -1,7 +1,9 @@ # Nothing here is built or distributed by default. all: serpent-sbox3.pdf serpent-sbox4.pdf serpent-sbox5.pdf \ - serpent-sbox6.pdf serpent-sbox7.pdf + serpent-sbox6.pdf serpent-sbox7.pdf \ + serpent-sbox0i.pdf serpent-sbox1i.pdf serpent-sbox2i.pdf \ + serpent-sbox3i.pdf serpent-sbox4i.pdf serpent-sbox5i.pdf %.pdf: %.dot dot -Tpdf $< -o $@ diff --git a/misc/serpent-sbox0i.dot b/misc/serpent-sbox0i.dot new file mode 100644 index 00000000..26225aa7 --- /dev/null +++ b/misc/serpent-sbox0i.dot @@ -0,0 +1,46 @@ +strict digraph sbox0i { + x0 [shape=box, label="\N"]; + x1 [shape=box, label="\N"]; + x2 [shape=box, label="\N"]; + x3 [shape=box, label="\N"]; + + t15 [label="\N\ny0\n1"]; + t02 [label="\N\ny2\n2"]; + t01 [label="\N\ny1\n3"]; + t05 [label="\N\ny2\n4"]; + t04 [label="\N\ny1\n5"]; + t03 [label="\N\nx2\n6"]; + t08 [label="\N\nx1\n7"]; + t06 [label="\N\ny1\n8"]; + t09 [label="\N\nx1\n9"]; + y1 [label="\N\n10", shape=box]; + t12 [label="\N\nx0\n11"]; + t13 [label="\N\nx0\n12"]; + t17 [label="\N\nx1\n13"]; + y2 [label="\N\n14", shape=box]; + t10 [label="\N\nx3\n15"]; + t14 [label="\N\nx3\n16"]; + y3 [label="\N\n17", shape=box]; + t18 [label="\N\nx1\n18"]; + y0 [label="\N\n19", shape=box]; + + x2 -> t01; x3 -> t01; // t01 = x2 ^ x3; + x0 -> t02; x1 -> t02; // t02 = x0 | x1; + x1 -> t03; x2 -> t03; // t03 = x1 | x2; + x2 -> t04; t01 -> t04; // t04 = x2 & t01; + t01 -> t05; t02 -> t05; // t05 = t02 ^ t01; + x0 -> t06; t04 -> t06; // t06 = x0 | t04; + t05 -> y2; // y2 = ~ t05; + x1 -> t08; x3 -> t08; // t08 = x1 ^ x3; + t03 -> t09; t08 -> t09; // t09 = t03 & t08; + x3 -> t10; y2 -> t10; // t10 = x3 | y2; + t06 -> y1; t09 -> y1; // y1 = t09 ^ t06; + x0 -> t12; t05 -> t12; // t12 = x0 | t05; + y1 -> t13; t12 -> t13; // t13 = y1 ^ t12; + t03 -> t14; t10 -> t14; // t14 = t03 ^ t10; + x0 -> t15; x2 -> t15; // t15 = x0 ^ x2; + t13 -> y3; t14 -> y3; // y3 = t14 ^ t13; + t05 -> t17; t13 -> t17; // t17 = t05 & t13; + t14 -> t18; t17 -> t18; // t18 = t14 | t17; + t15 -> y0; t18 -> y0; // y0 = t15 ^ t18; +} diff --git a/misc/serpent-sbox1i.dot b/misc/serpent-sbox1i.dot new file mode 100644 index 00000000..b04cf75f --- /dev/null +++ b/misc/serpent-sbox1i.dot @@ -0,0 +1,46 @@ +strict digraph sbox1i { + x0 [shape=box, label="\N"]; + x1 [shape=box, label="\N"]; + x2 [shape=box, label="\N"]; + x3 [shape=box, label="\N"]; + + // First get shortest path to t08 + t02 [label="\N\ny1\n1"]; + t04 [label="\N\ny1\n2"]; + t01 [label="\N\ny3\n3"]; + t05 [label="\N\ny0\n4"]; + t06 [label="\N\ny0\n5"]; + t08 [label="\N\nx1\n6"]; + + y3 [label="\N\n7", shape=box]; + t11 [label="\N\nx1\n8"]; + t03 [label="\N\ny2\n9"]; + t10 [label="\N\ny1\n10"]; + t07 [label="\N\ny2\n11"]; + t09 [label="\N\ny2\n12"]; + y2 [label="\N\n13", shape=box]; + y1 [label="\N\n14", shape=box]; + t15 [label="\N\ny0\n15"]; + t17 [label="\N\ny0\n16"]; + t14 [label="\N\nx0\n17"]; + y0 [label="\N\n18", shape=box]; + + x0 -> t01; x1 -> t01; // t01 = x0 ^ x1; + x1 -> t02; x3 -> t02; // t02 = x1 | x3; + x0 -> t03; x2 -> t03; // t03 = x0 & x2; + x2 -> t04; t02 -> t04; // t04 = x2 ^ t02; + x0 -> t05; t04 -> t05; // t05 = x0 | t04; + t01 -> t06; t05 -> t06; // t06 = t01 & t05; + x3 -> t07; t03 -> t07; // t07 = x3 | t03; + x1 -> t08; t06 -> t08; // t08 = x1 ^ t06; + t07 -> t09; t06 -> t09; // t09 = t07 ^ t06; + t04 -> t10; t03 -> t10; // t10 = t04 | t03; + x3 -> t11; t08 -> t11; // t11 = x3 & t08; + t09 -> y2; // y2 = ~ t09; + t10 -> y1; t11 -> y1; // y1 = t10 ^ t11; + x0 -> t14; y2 -> t14; // t14 = x0 | y2; + t06 -> t15; y1 -> t15; // t15 = t06 ^ y1; + t01 -> y3; t04 -> y3; // y3 = t01 ^ t04; + x2 -> t17; t15 -> t17; // t17 = x2 ^ t15; + t14 -> y0; t17 -> y0; // y0 = t14 ^ t17; +} diff --git a/misc/serpent-sbox2i.dot b/misc/serpent-sbox2i.dot new file mode 100644 index 00000000..afeb2a39 --- /dev/null +++ b/misc/serpent-sbox2i.dot @@ -0,0 +1,44 @@ +strict digraph sbox2i { + x0 [shape=box, label="\N"]; + x1 [shape=box, label="\N"]; + x2 [shape=box, label="\N"]; + x3 [shape=box, label="\N"]; + + t01 [label="\N\ny0\n1"]; + t02 [label="\N\ny2\n2"]; + t04 [label="\N\ny1\n3"]; + y0 [label="\N\n4", shape=box]; + t07 [label="\N\ny1\n5"]; + t11 [label="\N\ny1\n6"]; + t08 [label="\N\nx3\n7"]; + t06 [label="\N\ny3\n8"]; + t12 [label="\N\ny2\n9"]; + y1 [label="\N\n10", shape=box]; + t09 [label="\N\ny3\n11"]; + t03 [label="\N\nx0\n12"]; + t10 [label="\N\nx0\n13"]; + y3 [label="\N\n14", shape=box]; + t15 [label="\N\nx2\n15"]; + t17 [label="\N\nx2\n16"]; + t16 [label="\N\ny2\n17"]; + y2 [label="\N\n18", shape=box]; + + x0 -> t01; x3 -> t01; // t01 = x0 ^ x3; + x2 -> t02; x3 -> t02; // t02 = x2 ^ x3; + x0 -> t03; x2 -> t03; // t03 = x0 & x2; + x1 -> t04; t02 -> t04; // t04 = x1 | t02; + t01 -> y0; t04 -> y0; // y0 = t01 ^ t04; + x0 -> t06; x2 -> t06; // t06 = x0 | x2; + x3 -> t07; y0 -> t07; // t07 = x3 | y0; + x3 -> t08; // t08 = ~ x3; + x1 -> t09; t06 -> t09; // t09 = x1 & t06; + t03 -> t10; t08 -> t10; // t10 = t08 | t03; + x1 -> t11; t07 -> t11; // t11 = x1 & t07; + t02 -> t12; t06 -> t12; // t12 = t06 & t02; + t09 -> y3; t10 -> y3; // y3 = t09 ^ t10; + t11 -> y1; t12 -> y1; // y1 = t12 ^ t11; + x2 -> t15; y3 -> t15; // t15 = x2 & y3; + y0 -> t16; y1 -> t16; // t16 = y0 ^ y1; + t10 -> t17; t15 -> t17; // t17 = t10 ^ t15; + t16 -> y2; t17 -> y2; // y2 = t16 ^ t17; +} diff --git a/misc/serpent-sbox3i.dot b/misc/serpent-sbox3i.dot new file mode 100644 index 00000000..7e236c3f --- /dev/null +++ b/misc/serpent-sbox3i.dot @@ -0,0 +1,42 @@ +strict digraph sbox3i { + x0 [shape=box, label="\N"]; + x1 [shape=box, label="\N"]; + x2 [shape=box, label="\N"]; + x3 [shape=box, label="\N"]; + + t01 [label="\N\ny3\n1"]; + t07 [label="\N\ny0\n2"]; + t02 [label="\N\ny2\n3"]; + t03 [label="\N\ny1\n4"]; + y0 [label="\N\n5", shape=box]; + t05 [label="\N\nx3\n6"]; + t14 [label="\N\ny3\n7"]; + t04 [label="\N\ny2\n8"]; + t06 [label="\N\ny2\n9"]; + y2 [label="\N\n10", shape=box]; + t09 [label="\N\ny1\n11"]; + t11 [label="\N\nx3\n12"]; + t12 [label="\N\ny1\n13"]; + y1 [label="\N\n14", shape=box]; + t13 [label="\N\nx0\n15"]; + t16 [label="\N\nx0\n16"]; + y3 [label="\N\n17", shape=box]; + + x2 -> t01; x3 -> t01; // t01 = x2 | x3; + x0 -> t02; x3 -> t02; // t02 = x0 | x3; + x2 -> t03; t02 -> t03; // t03 = x2 ^ t02; + x1 -> t04; t02 -> t04; // t04 = x1 ^ t02; + x0 -> t05; x3 -> t05; // t05 = x0 ^ x3; + t04 -> t06; t03 -> t06; // t06 = t04 & t03; + x1 -> t07; t01 -> t07; // t07 = x1 & t01; + t05 -> y2; t06 -> y2; // y2 = t05 ^ t06; + x0 -> t09; t03 -> t09; // t09 = x0 ^ t03; + t07 -> y0; t03 -> y0; // y0 = t07 ^ t03; + y0 -> t11; t05 -> t11; // t11 = y0 | t05; + t09 -> t12; t11 -> t12; // t12 = t09 & t11; + x0 -> t13; y2 -> t13; // t13 = x0 & y2; + t01 -> t14; t05 -> t14; // t14 = t01 ^ t05; + x1 -> y1; t12 -> y1; // y1 = x1 ^ t12; + x1 -> t16; t13 -> t16; // t16 = x1 | t13; + t14 -> y3; t16 -> y3; // y3 = t14 ^ t16; +} diff --git a/misc/serpent-sbox4i.dot b/misc/serpent-sbox4i.dot new file mode 100644 index 00000000..19c55986 --- /dev/null +++ b/misc/serpent-sbox4i.dot @@ -0,0 +1,42 @@ +strict digraph sbox4i { + x0 [shape=box, label="\N"]; + x1 [shape=box, label="\N"]; + x2 [shape=box, label="\N"]; + x3 [shape=box, label="\N"]; + + t05 [label="\N\ny1\n1"]; + t02 [label="\N\ny2\n2"]; + t04 [label="\N\ny2\n3"]; + t01 [label="\N\nx1\n4"]; + t15 [label="\N\ny0\n5"]; + t12 [label="\N\nx3\n6"]; + t07 [label="\N\ny2\n7"]; + y1 [label="\N\n8", shape=box]; + t10 [label="\N\ny2\n9"]; + t13 [label="\N\ny2\n10"]; + t03 [label="\N\nx0\n11"]; + y3 [label="\N\n12", shape=box]; + t06 [label="\N\nx0\n13"]; + t09 [label="\N\nx0\n14"]; + y0 [label="\N\n15", shape=box]; + t11 [label="\N\nx0\n16"]; + y2 [label="\N\n17", shape=box]; + + x1 -> t01; x3 -> t01; // t01 = x1 | x3; + x2 -> t02; x3 -> t02; // t02 = x2 | x3; + x0 -> t03; t01 -> t03; // t03 = x0 & t01; + x1 -> t04; t02 -> t04; // t04 = x1 ^ t02; + x2 -> t05; x3 -> t05; // t05 = x2 ^ x3; + t03 -> t06; t03 -> t06; // t06 = ~ t03; + x0 -> t07; t04 -> t07; // t07 = x0 & t04; + t05 -> y1; t07 -> y1; // y1 = t05 ^ t07; + y1 -> t09; t06 -> t09; // t09 = y1 | t06; + x0 -> t10; t07 -> t10; // t10 = x0 ^ t07; + t01 -> t11; t09 -> t11; // t11 = t01 ^ t09; + x3 -> t12; t04 -> t12; // t12 = x3 ^ t04; + x2 -> t13; t10 -> t13; // t13 = x2 | t10; + t03 -> y3; t12 -> y3; // y3 = t03 ^ t12; + x0 -> t15; t04 -> t15; // t15 = x0 ^ t04; + t11 -> y2; t13 -> y2; // y2 = t11 ^ t13; + t15 -> y0; t09 -> y0; // y0 = t15 ^ t09; +} diff --git a/misc/serpent-sbox5i.dot b/misc/serpent-sbox5i.dot new file mode 100644 index 00000000..40671543 --- /dev/null +++ b/misc/serpent-sbox5i.dot @@ -0,0 +1,42 @@ +strict digraph sbox5i { + x0 [shape=box, label="\N"]; + x1 [shape=box, label="\N"]; + x2 [shape=box, label="\N"]; + x3 [shape=box, label="\N"]; + + t01 [label="\N\ny1\n1"]; + t02 [label="\N\ny3\n2"]; + t04 [label="\N\ny0\n3"]; + t03 [label="\N\ny2\n4"]; + t16 [label="\N\nx3\n5"]; + y0 [label="\N\n6", shape=box]; + t05 [label="\N\nx2\n7"]; + t07 [label="\N\nx0\n8"]; + t09 [label="\N\nx2\n9"]; + t08 [label="\N\ny1\n10"]; + y1 [label="\N\n11", shape=box]; + t13 [label="\N\ny2\n12"]; + t15 [label="\N\ny2\n13"]; + y2 [label="\N\n14", shape=box]; + t10 [label="\N\nx1\n15"]; + t12 [label="\N\nx1\n16"]; + y3 [label="\N\n17", shape=box]; + + x0->t01; x3->t01;// t01 = x0 & x3; + x2->t02; t01->t02;// t02 = x2 ^ t01; + x0->t03; x3->t03;// t03 = x0 ^ x3; + x1->t04; t02->t04;// t04 = x1 & t02; + x0->t05; x2->t05;// t05 = x0 & x2; + t03->y0; t04->y0;// y0 = t03 ^ t04; + x0->t07; y0->t07;// t07 = x0 & y0; + t01->t08; y0->t08;// t08 = t01 ^ y0; + x1->t09; t05->t09;// t09 = x1 | t05; + x1 -> t10// t10 = ~ x1; + t08->y1; t09->y1;// y1 = t08 ^ t09; + t10->t12; t07->t12;// t12 = t10 | t07; + y0->t13; y1->t13;// t13 = y0 | y1; + t02->y3; t12->y3;// y3 = t02 ^ t12; + t02->t15; t13->t15;// t15 = t02 ^ t13; + x1->t16; x3->t16;// t16 = x1 ^ x3; + t16->y2; t15->y2;// y2 = t16 ^ t15; +} |