Talk:DES supplementary material

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject United States / Government (Rated Start-class, Low-importance)
WikiProject icon This article is within the scope of WikiProject United States, a collaborative effort to improve the coverage of topics relating to the United States of America on Wikipedia. If you would like to participate, please visit the project page, where you can join the ongoing discussions.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 Low  This article has been rated as Low-importance on the project's importance scale.
Taskforce icon
This article is supported by WikiProject U.S. Government (marked as Low-importance).

Origin of data[edit]

The data in this article was derived from an HTML version of FIPS 46-2 (a PD document). Presuming it to be correct, I haven't double-checked it against another source. — Matt 04:06, 4 Aug 2004 (UTC)

Wow... If/when wikireader cryptography gets printed out, the picture of the initial permutation gets my vote for the cover page :) Arvindn 07:29, 4 Aug 2004 (UTC)

how to get vector graphics[edit]

For the graphs used in this article it's supposed to use vecor graphics rather than raster images as currently used. I hacked a small perl script that creates a simple dot file to draw those graphs with graphviz. It doesn't look as nice as the original images so some graphviz hacker might need to tune it. I'm none tough, just getting an eye for what's possible with graphviz :)

So here it is:

$graph = 'graph des { rankdir=LR; splines=false; overlap=true; ranksep=0;';
$node = 'node [shape=circle, style=filled, color=blue, fontcolor=white, fontsize=14, height=0.28, fixedsize=true];';
$fakeedge = 'edge [color=transparent];';
$realedge = 'edge [constraint=false, color=black];';
$fakes = "u1";
@edges = <>;
for $i (0..$#edges) {
    $nodes .= "u".($i+1)." [label=\"".($i+1)."\"];";
    $fakes .= " -- u".($i+1);
    $edges .= "l".(($i+1).' -- u'.@edges[$i]).";";
print $graph."\n";
print $node."\n";
print $nodes."\n";
$nodes =~ s/u/l/g;
print $nodes."\n";
print $fakeedge."\n";
print $fakes.";"."\n";
$fakes =~ s/u/l/g;
print $fakes.";"."\n";
print $realedge."\n";
print $edges."\n}";

You probably wanna call it like this:

cat des.raw | sed 's/\t/\n/g'| perl | dot -Tsvg > des.svg

Where the tabular data is pasted into the file des.raw —Preceding unsigned comment added by (talk) 19:28, 5 February 2008 (UTC)

Little or Big Endian?[edit]

Am I right to assume that the bits and bytes in this articles are supposed to be generally little endian? That is for example in the "Permuted Choice 1" section that the left half is less significiant than the right and that the 57th - that is 8th most signifiant - bit of the original 64 bit code block is to become the least signifiant bit in the left half? Could anyone clarify that? -- (talk) 18:55, 13 April 2008 (UTC)

And if so, does that mean you'd have to use the right shift operator ">>" to implement the left rotations for the key schedule in a C like language (since a single left shift in C is multiplying the number with two, but meant is dividing the number by two and pushing the lost bit back in)? -- (talk) 19:19, 13 April 2008 (UTC)

Alright, I managed to answer that myself. According to the referenced document it is _Big_ Endian. The author translates hexadecimal M = 0123456789ABCDEF to bonary M = 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 and then says "we read from left to right". That implies big endian.-- (talk) 19:51, 13 April 2008 (UTC)

IP and IP-inv pictures swapped?[edit]

Am I the only one that thinks the (nice looking) pictures of the two permutations IP and its inverse seem to have been mistakenly swapped? I.e. the picture that is said to represent the initial permutation IP actually represent IP inverse, and vice versa? —Preceding unsigned comment added by MEngan (talkcontribs) 14:05, 8 October 2009 (UTC)