home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-386-Vol-2of3.iso
/
c
/
cryptaid.zip
/
HELP
< prev
next >
Wrap
Text File
|
1992-02-05
|
10KB
|
175 lines
CRYPTAID
This program is designed to aid in the decoding of simple substitution
aristocrat ciphers, i.e. each letter in the original message is replaced
throughout by a unique cipher letter code, while punctuation and spaces are
unchanged. An excellent introduction to cryptanalysis in general and
aristocrats in particular, can be found in CRYPTANALYSIS FOR MICROCOMPUTERS
by Caxton C. Foster, (Hayden Book Co., 1982, Chapters 7 and 8, about $15).
However, the programs mentioned there are not the ones presented here.
The main screen is divided into four sections.
The top section initially contains the upper case alphabet corresponding to
the CIPHER text, with a blank line corresponding to the PLAIN text translation
table below it. Below that there is a lower case alphabet corresponding to the
PLAIN text, followed by a blank line for the CIPHER code table. When a guess
is made these blank lines will automatically display the translation table.
Displaying the two way translation table is particularly useful if the
code-maker has used a keyword as the basis of the cipher. The convention
adopted here, upper case for CIPHER text, and lower case for PLAIN text (the
translation) is used throughout.
The second section displays up to six lines, 468 characters, of the file
MESSAGE, in upper case. Below each line is another line of characters,
initially blank, which holds the translation of the letter directly above
it. It will be in lower case. Word wrap is in effect, so a word will not be
split between two lines.
The third section gives the title of the cipher file and the choice of
commands, while the fourth is the message area, which initially awaits you
command.
Let's discuss these commands.
(A)ll Letters
The first table is the frequency count of the total letters in the cipher
text. It displays the letters of the cipher text in alphabetical order
together with the number of times the letter occurs in the text. The number
is also presented as a percentage of the total letters.
The second table is the same as the first, but sorted in descending order
of frequency. The Brown Corpus frequency order of letters is also displayed
alongside. This therefore represents another set of suggestions. However,
if two or more letters of the cipher text have the same frequency count the
order within that group is not significant, nor therefore is the specific
suggestion. Consequently the wise way to use this and subsequent tables is
to look at all text letters in the vicinity of the suggested letter, rather
than to treat the suggestion as absolute.
(C)aesar Ciphers
Perhaps the simplest aristocrat cipher is one in which the cipher
alphabet is a simple block movement of the text alphabet. For example "a"
might be "B", "b" would then be "C", and "z" would be "A". This is called a
Caesar. The "Caesar" option steps through, and displays, successive Caesar
and reverse Caesar translations.
(D)ata
This displays a screen full of useful data: the most common two and three
letter words and the frequency of the occurrences of successive vowels.
For example, if a word contains successive vowels, the combination "AI"
occurs 6.8% of the time compared to "IA"s 3.4%.
(F)irst Letters
(L)ast Letters
(O)ne Letter Words
If "First", is selected, this shows a table based on the frequency count
of the first letters of each word.
It displays the letters of the cipher text, sorted in descending order of
frequency, together with the number of times the letter occurs in the text.
The number is also presented as a percentage of the total letters. The Brown
Corpus frequency order of first letters is also displayed alongside.
This therefore represents another set of suggestions. However, if two or
more letters of the cipher text have the same frequency count the order
within that group is not significant, nor therefore is the specific suggestion.
Consequently the wise way to use this, and other tables, is to
look at all text letters in the vicinity of the suggested letter, rather than
to treat the suggestion as absolute.
If "Last" is selected, a table similar to the described above, but based on
the frequency count of the last letters of each word, is shown.
If "One" is selected, a table similar to the described above, but based on
the frequency count of the one letter words, is shown.
(I)deas
This will display a table of suggestions for the translation table.
If a cipher letter has already been translated, an asterisk (*) appears
below it, and no suggestion is made.
If a letter from the plain text has been chosen it will be absent from
the table. This table is based entirely on the frequency count of total
letters in the text. According to the Brown Corpus (see Foster, page 257)
the letter "E" occurs most frequently, and occurs 1250 times in every 10000
letters, i.e. it has a 12.5% frequency. There is a table of frequency counts
for all letters, with "Z" occurring the least (10 times in 10000, i.e. O.1%).
All letters whose frequency in the cipher text are within 1% of the Brown
Corpus frequency, are the ones suggested for translation when the option
"Ideas" is selected. Thus all letters in the cipher text which have a
frequency count in the interval 11.5% - 13.5% would be suggested as an "E".
A letter with a frequency count greater than 13.5% would have no suggestion
under it.
(N)umber
This counts the number of words in the various dictionaries. This is
useful to know in deciding which words to search for by pattern matching,
word matching, or multiple word matching.
(P)attern Matching
(W)ord Matching
(M)ultiple Word Matching
As part of this package, files named 02P.DCT, 02N.DCT, 03P.DCT, 03N.DCT,
..., 18N.DCT are included. These are dictionaries (DCT) of two, three, ...,
and eighteen letter words, divided into those words with patterns (P), and
those with no patterns (N). Thus, the file 10P.DCT would contain ten letter
words containing a pattern. A word with a pattern is one which has repeated
letters, while words with no repeated letters have no pattern. The word "good"
has a pattern, while "last" does not.
When you select the "Word" option, you are asked to enter the number of the
word in the CIPHER text you want to match. The program works out the length of
that word, and whether or not it has a pattern, and then goes to the
appropriate dictionary, and starts searching through it for matches which are
consistent with the pattern of the word, and any letters already selected. If
it finds a match, it displays the translation automatically on the screen. If
you want to accept the choice, type "a". To reject and continue looking press
the space-bar. Pressing "e" ends the search process.
When you select the "Multiple" option, you are asked to enter the numbers
of the two of the words in the CIPHER text you want to match. The program
works out the length of each of the words, and whether or not they have
patterns, and then goes to the appropriate dictionaries, and starts searching
through them for matches which are consistent with the pattern of the words,
and any letters already selected. If it finds a match of the first word, it
displays the translation automatically on the screen, and starts searching for
a match of the second word. If a second match is found, you are given the
option of accepting, continuing, or ending the search.
When you select the "Pattern" option, you are asked to type in the CIPHER
text of the word you want to match. The program works out the length of that
word, and whether or not it has a pattern, and then goes to the appropriate
dictionary, and starts searching through it for matches which are consistent
with the pattern of the word, and any letters already selected. If it finds
a match, it displays the translation automatically on the screen. If you want
to accept the choice, type "a". To reject and continue looking press the
space-bar. Pressing "e" ends the search process.
These are very useful aids, but they can be slow.
(R)estart
This eliminates all the previous attempts at translating. Only use this if
you want to restart deciphering.
(S)ave
When you have solved the cipher, this will save the translated version of
the first 6 lines of your cipher text, as an ASCII text file under the name
SOLUTION.SLN. Actually it will append the new message to any other message
already there. There is no provision for reloading this saved text back into
CRYPTAID.
(T)ranslate
This is the choice which allows you to select an individual letter's
translation, and is the main feature of the package. It will not allow you
to select the same plain text letter for two different cipher text letters.
To deselect an incorrect choice, assign the space bar to the cipher letter
you want to erase.
(V)owels and Consonants
This displays the result of the so-called consonant line analysis
described on pages 125 to 130 of the book CRYPTANALYSIS FOR MICROCOMPUTERS by
Caxton C. Foster, (Hayden Book Company, 1982). This offers suggestions for
vowels and consonants.
An excellent way to build up a feeling for the interpretation and
reliability of these (and other) suggestions is to have CRYPTAID read in a
plain text message, which has not been coded in any way, and see how good the
correlation is!
Although this package is designed to help solve aristocrats, it can also be
used to create them. Enter the plain text as though it were a cipher, and the
encode it by selecting the translation, finally saving the encoded message in
the SOLUTION.SLN file.