PART SIX

Analysis of Code Systems

CHAPTER 14

TYPES OF CODE SYSTEMS




The Nature of Code Systems
14-1.
As explained in Chapter 1, the key feature that distinguishes a code from a substitu-
tion cipher is that a code will substitute for words as well as characters.

a. Codes range in size from small charts or lists on a single sheet of paper to books as
large as an unabridged dictionary.
b. Plaintext values are replaced by code groups or code words. A code group or word
may replace anything from a single character to a whole sentence.

c. Since codes can compress whole sentences into a small code group, not all codes are
used for security purposes. Some are used for economy instead, by replacing com-
mon sentences and phrases with a single group. For example, radio operators use
Q and Z signals as a brevity code. Q and Z signals are three letter code groups
beginning with Q or Z that stand for common communications procedures. A single
code Q or Z signal replaces sentences or phrases such as QSA, My signal strength is
. . . and ZNN, I have nothing now. Operators memorize the Q and Z signals that they
commonly use and the result is quicker, more economical communications.

d. Some codes are used for prearranged messages only. Limited in size and purpose, a
single code group may be transmitted as a signal to begin a preplanned attack, for
example. Prearranged message codes are sometimes referred to as pamcodes.
Prearranged message codes may also take the form of innocent communications, so
that an apparently harmless message contains a secret meaning. The message, Les
sanglots longs des violons de l˜automne, a harmless sentence in French, signaled the
French underground in World War II that the Allied invasion of France was to begin
soon. Codes with an innocent appearance but a secret meaning are known as open
codes.



14-0
e. Prearranged message codes can only be used for limited, preplanned purposes.
General purpose codes which can be used for any communications are more com-
mon. All general purpose codes must include within them, a provision for spelling
words that are not included in their vocabulary. Even when very large book codes
are used, proper names will sometimes need to be encoded that are not in the code™s
vocabulary. General purpose codes thus share some of the characteristics of sub-
stitution ciphers.

f. Codes are at their weakest when they are used to spell words. Most codes are broken
into through spelling. Large codes attempt to defeat this weakness by providing
many variants for letters and common syllables. The letter E might be encoded by
10 different code groups in a large code, for example. Other code groups would repre-
sent common syllables with E in them like RE, ER, EN, and ENT. In this respect,
codes are similar to syllabary squares, and the initial approach to analysis can be
similar between syllabary squares and codes.
g. When a high degree of security is required using codes, there are two approaches to
increasing the security of codes. One is to use very large book codes, since the larger
the code, the more secure it is. The other is to further encipher the code to produce
an enciphered code. Any of the cipher procedures discussed earlier in this manual
can be used, but the most common is to use polyalphabetic encipherment.
Repeating keys and long-running keys may be used. It is one way to combine the
advantages of brevity with the added security of polyalphabetics, although such
procedures are time-consuming to use. They cannot be used practically in rapidly
changing combat situations, for example, when speed of communications is impor-
tant. Large codes and enciphered codes were common earlier in this century when a
high degree of security was desired. Today, with advances in electronics, cipher
machine and computer based systems are more common when a high degree of
security is required.




14-2. Book Codes
Codes too large to be printed on just one or two pages are called book codes. They may
range from small pamphlets to large bound books.

a. The code values in book codes may consist of letters, numbers, or a combination of
letters and numbers. Usually, the code groups are a constant length, but there are
occasional exceptions. Code values used primarily for voice communications will
sometimes consist of pronounceable words rather than regular length groupings of
characters. We will refer to only code groups in the rest of this chapter and the next,
but you should understand that comments about code groups also apply to code
words.



14-1
b. The simplest book codes consist of a single orderly listing of code groups and their
meanings. The code groups are listed in the book in alphabetical or numerical
order, and their meanings are also in a logical order. This single listing is used for
encoding and decoding, and is called a one-part code. The plaintext values may be
strictly alphabetical in arrangement or may be separated into separate sections for
words, letters and syllables, and numbers. Occasionally, they will be arranged
topically with such things as units in one section, weapons systems in another,
place-names in another, and so on. The key feature of one-part codes is that when
the code groups are listed in order, their plaintext meanings will also be in a logical
order. A sample portion of a one-part code is shown below.




c. The orderly structure of one-part codes makes them easy to use, but greatly reduces
their security. The analyst can use the structure to narrow down possible meanings
for code groups. More secure codes are randomly arranged, and are necessarily
printed in two parts. One section lists the code groups in order, and it is used for
decoding. The other section, containing exactly the same information, lists the
plaintext values in order, and is used for encoding. This type of code is called a two-
part code. Portions of the encoding and decoding sections of a two-part code are
shown below. Note that one group occurs in common between the two parts.




Matrix Codes and Code Charts
14-3.
Small codes can be conveniently printed in the form of a small coordinate matrix
system.
a. Typically 10 by 10 or larger, matrix codes, also known as code charts, can contain
letters, syllables, numbers, and a small vocabulary of words. They are very easy to



14-2
use, and communicators can be trained in their use quickly and easily. They also of-
fer more security than most simple ciphers.

b. Code charts are easily changed from one cryptoperiod to the next by simply chang-
ing the coordinates, while retaining the same matrix.

c. They are a very close relative to the syllabary square cipher. If the syllabary square
shown in Chapter 5 contained some words as well as letters, syllables, and numbers,
it would be a code instead of a cipher.
d. One type of code chart places two plaintext values in each cell”an upper value and
a lower value. The lower values are all words. The upper values are all numbers,
letters, or syllables. Two of the cells are set aside as shift values to indicate whether
to read the upper values or lower values in the code groups that follow. A sample
chart of this type is shown in Figure 14-1. This example uses letters for coordinates,
and has variants on each row and column. The word ARTILLERY, for example,
could be encoded as TF, TI, QF, or QI. The cells MU and UU are begin and end
spell indicators. The bottom values in each cell are used until a begin spell group is
sent. Then the top values are used until the end spell group is used to shift back to
the lower values.




14-3