serpent-sbox3i.dot 1.41 KB
Newer Older
Niels Möller's avatar
Niels Möller committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 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;
}