Cryptography Reference
In-Depth Information
106
min = delta;
107
key[off] = m;
108
}
109
}
110
if(trust > trust1) trust = trust1;
111
}
112
/* print result */
printf("trust value: %.2f \ n", trust);
113
printf("key dump (%d characters): \ n", period);
114
115
for(n=0; n < period;)
116
{
117
c = key[n];
118
if(c == ' ')
printf("
");
119
else if(c == ' \ n')
printf(" \\ n ");
120
else if(c == ' \ r \ )
printf(" \\ r ");
121
else if(c == ' \ t')
printf(" \\ t ");
122
else if(isprint(c)) printf("%c
", c);
123
else if(iscntrl(c)) printf("^%c ", c);
124
else
printf("%02x ", c);
if(!(++n%15)) putchar(' \ n');
125
126
}
printf(" \ n \ nPROPOSED KEY: ");
127
for(p=key; *p != ' \ 0 \ ; ++p)
128
129
if(*p < ' ') printf("^%c", *p+'@');
130
else putchar(*p);
printf(" \ n");
131
132
return 0;
133
}
Figure 3.13: ( continued )
texts, word processor files, etc.). Passwords can be up to 64 characters long
(this limit is totally arbitrary).
There's no universal cryptanalysis, not even for the Vigenere method. We
first need to know something about the statistical properties of the plaintext
Search WWH ::




Custom Search