cryptology and mathematics

25
lzxcvbnmqwertyuiopasdfghjkl zxcvbnmqwertyuiopasdfghjklz xcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxc vbnmqwertyuiopasdfghjklzxcv bnmqwertyuiopasdfghjklzxcvb nmqwertyuiopasdfghjklzxcvbn mqwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnmq wertyuiopasdfghjklzxcvbnmqw ertyuiopasdfghjklzxcvbnmrty uiopasdfghjklzxcvbnmqwertyu iopasdfghjklzxcvbnmqwertyui opasdfghjklzxcvbnmqwertyuio pasdfghjklzxcvbnmqwertyuiop asdfghjklzxcvbnmqwertyuiopa Cryptology and Mathematics An Exploration in Substitution Ciphers UNC-Charlotte Senior project by Colin Garth Utley And Under the Direction of John Russell Taylor, Ph.D.

Upload: butest

Post on 01-Dec-2014

1.057 views

Category:

Documents


3 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Cryptology and Mathematics

lzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmrtyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmrtyuiopasdf

Cryptology and Mathematics

An Exploration in Substitution Ciphers

UNC-Charlotte Senior projectby

Colin Garth UtleyAnd

Under the Direction of

John Russell Taylor, Ph.D.

Page 2: Cryptology and Mathematics

When Julius Caesar learned Quintus Cicero was besieged in the land of the Nervii, he

wanted to communicate with him but was unable to do so in person. So Caesar used a method

that was simple and efficient; a cipher. He created a message by substituting Greek letters in the

place of Roman letters and sent it to Cicero by messenger. When the messenger was unable to

reach Cicero, he tied the message to a spear and threw it into Cicero’s camp. A few days later,

when the spear was noticed lodged in the side of a tower, it was brought down and the message

was read; “Veni, Vidi, Vici,” “I came, I saw, I conquered.”1 This is the first time a substitution

cipher was used for a military purpose in documented history.

To begin our discussion on cryptology, ciphers, encryption, decryption, and code theory

we should begin by defining the terms which will be used. Cryptology also known as

cryptography is “the study or analysis of codes and coding methods.”5 A cipher is “a written

code in which the letters of a text are replaced with others according to a system.”5 A code is “a

system of letters, numbers, or symbols into which normal language is converted to allow

information to be communicated secretly, briefly, or electronically.”5 To encrypt is “to convert a

text into code or cipher.”5 And, as one might expect, to decrypt/decode is “to transform an

encoded message into an understandable form.”5

To prepare a solid foundation for discussion of the General Substitution Cipher and the

Caesar Cipher, a special case of the General Substitution Cipher, we will begin with a brief

review of Modern Algebra and Modular Arithmetic. To begin we will remind ourselves of

several important definitions. The first definition is what it means to divide in Modern Algebra.

“let a and b be integers with b ≠ 0. We say that b divides a if a = bc for some integer

c.”(Hungerford, 7) Next we need to be reminded of congruence. “Let a, b, n be integers with n >

0. Then a is congruent to b modulo n, provided that n divides a - b.” (Hungerford, 24) And

Page 3: Cryptology and Mathematics

finally, “the congruence class of a(modulo n), denoted [a], is the set of all those integers that are

congruent to a(modulo n), that is, [a] = [b] implies b ≡ a(mod n).” (Hungerford, 26). The next

topic we need to cover in order to discuss our ciphers is Ring Structure. There are several

different types of structures that fall into the Ring category; regular Rings, Commutative Rings,

Commutative Rings with Identity, a Commutative Ring with Identity that has no Zero-Divisors

which is also known as an Integral Domain, and finally Fields. All of these different types of

rings have the same basic substructure in that they all fit the definition of a regular Ring. So

what is a ring?

A ring R is a nonempty set equipped with two operations, addition and multiplication,

that satisfy the following axioms for every a, b, c є R:

1) If a, b є R then a + b є R

2) If a + (b + c) є R then (a + b) + c є R

3) a + b = b + a

4) There exists 0R є R such that a + 0R = a = 0R + a for every a є R

5) For every a є R the equation a + x = 0R has a solution in R

6) If a, b є R; then ab є R

7) a(bc) = (ab)c

8) If a(b + c) = ab + ac; then (a + b)c = ac + bc.

Thus if all of the above properties are met we can safely say that a nonempty set is a ring R.

To go one step further a Commutative Ring is a ring such that given a ring R and a, b є

R; (ab) = (ba). To refine the ring yet another step; a Commutative Ring with Identity is a

Commutative Ring with an element, 1R є R such that given a є R, a(1R) = a = (1R)a. Before

giving the definition for an Integral Domain we should know what it means to be a Zero-Divisor.

Page 4: Cryptology and Mathematics

An element a in a ring R is a Zero Divisor if a ≠ 0R and there exists a nonzero element b of R

such that either ab = 0R or ba = 0R. Now, an Integral domain is a Commutative Ring with

Identity that has no Zero-Divisors.

From an Integral Domain there is only one other refinement of the definition that results

in the strongest type of ring structure; a Field. A field is a ring with identity 1R ≠ 0R that satisfies

the property that for every a ≠ 0R, the equation ax =1R has a solution. Now we can analyze Z26 to

see how it fits into this structure. First of all we want to check Z26 to see if it fits the description

of a ring.

If we take any two elements of Z26 and add them by the definition of Z26 the sum of those

two elements is in Z26; hence the set Z26 is closed under addition and the first property of a ring is

met. Now if we take any three elements of Z26 and add them such that a + (b + c) is an element

of Z26 then (a + b) + c is also an element of Z26 and the set is associative under addition; which

means it meets the second property of a ring. Now given a and b are elements of Z26, since the

set is closed under addition a + b is an element of Z26 and we can see by the structure of Z26 that

b + a is also in the set. Hence, Z26 is commutative under addition which meets the third

requirement of the definition of a ring.

Also there is an element 0R of Z26 such that for any a in Z26, a + 0R = a = 0R + a. Thus the

zero element exists in the set and the fourth requirement for a ring is met. Next we notice that

for every a that is an element of Z26 there exists an x in Z26 such that the equation a + x = 0R has

a solution which means the fifth requirement of the definition of a ring is met. Now, given a and

b in Z26 the product ab is also in Z26. Hence Z26 is closed under multiplication. Also, given any

a, b, and c in Z26 the product a(bc) is in Z26 and the product (ab)c is also in Z26, thus we see that

Page 5: Cryptology and Mathematics

Z26 is associative under multiplication as well and hence the seventh property of a ring is

fulfilled.

Now if we take elements a, b, and c of Z26 and given a(b + c) = ab + ac, with ab + ac an

element of Z26 then (a + b)c = ac + bc is an element of Z26 and since the set is closed under

multiplication ac and bc are elements of Z26. And as the set is also closed under addition, ac +

bc is also an element of Z26. Hence, since Z26 fills all the above requirements, Z26 is a ring. Now

we want to see if Z26 is more than just a regular ring.

Indeed it is. Given a and b are elements of Z26 and ab is an element of Z26 by the closure

property under multiplication, we can analyze the commutative product ba and see that it is also

an element of Z26. Hence, Z26 is a Commutative Ring. Also, since there is an element 1R in Z26

such that for every a in Z26 a1R = a = 1Ra; Z26 is a Commutative Ring with Identity. Now, on the

other hand, there are non-zero elements of Z26 which when multiplied return a zero value. Thus

the set Z26 is not an Integral Domain. Therefore, Z26 is a Commutative Ring with Identity.

Now with these definitions fresh in our mind we can begin to discuss the General

Substitution Cipher. The General Substitution Cipher is a cipher in which any letter of the

alphabet can be interchanged with any other letter of the alphabet. This means that basically any

cipher in which letters are exchanged for other letters falls under the category of the General

Substitution Cipher; no over-riding structure for substitution need be applied for the General

Substitution Cipher. But, on the other hand, ciphers with a specific structure to their

substitutions are also members of the General Substitution Cipher. As an example the Caesar

Cipher is a member of the class of General Substitution Ciphers.

Mathematically the General Substitution Cipher can be represented by the equation

Page 6: Cryptology and Mathematics

y = (a + x)(mod n), unless it is a random type of substitution; then there exists no equation to

represent the substitution. In the equation for the General Substitution Cipher a represents the

shift involved to encrypt a letter, x represents the letter to be encrypted, and n represents the

number of characters in the alphabet. In the case of English and other languages using the same

alphabet; n = 26. There are two good examples of General Substitution Ciphers; the Caesar

Cipher and the Vigenere Cipher.

The Caesar Cipher is a simple substitution cipher obtained by shifting the letters of the

alphabet n spaces to the left. The shift that Julius Caesar used was 3 spaces so that A becomes

D, B becomes E, and so on such that the cipher alphabet would relate to the normal alphabet as

below;

Normal Alphabet: a-b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-t-u-v-w-x-y-z

Cipher Alphabet: d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-t-u-v-w-x-y-z-a-b-c

To relate the Caesar Cipher to the above equation for the General Substitution Cipher we

can assign each letter in the alphabet an integer value between zero and 25 such that A→0,

B→1, etc. Then the alphabet would relate to the set Z26, the set of integers zero through 25 as in

the table below;

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z0 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

Next we let a = 3, and let n = 26. Then the equation of the General Substitution Cipher that

results in the Caesar Cipher is; y = (3 + x)(mod 26). Now if we consult the table for modular

addition of Z26 below and look at the row for the addition of 3 we see that it gives the same

relation of the normal alphabet to the cipher alphabet as above; where D=3, E=4, etc.

Page 7: Cryptology and Mathematics

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 250 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 251 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 02 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 13 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 24 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 35 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 46 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 57 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 68 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 79 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8

10 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 911 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 1012 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 1113 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 1214 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 1315 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 1416 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1517 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1618 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1719 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1820 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1921 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2022 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2123 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2224 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

Z26 (+)

So if we let the value of x = 0, and let 3 be the value assigned to a, the equation becomes; y = (3

+ 0)(mod 26). Now from the table for Z26 we see that (3 + 0)(mod 26) = 3, which means that the

letter A has been mapped to the letter D as expected. Therefore, y = (3 + x)(mod 26) is the

mathematical representation of the Caesar Cipher.

The next example of a General Substitution Cipher is the Vigenere Cipher. The Vigenere

Cipher is basically a General Substitution Cipher that changes cipher-alphabets for each letter to

be enciphered. Hence if we were to represent the Vigenere Cipher as an equation it would be the

same as with the General Substitution Cipher, only the value of a would change each time a new

letter was entered; thus a different row of the table for Z26 would be used for each new letter. In

this way, using 26 different alphabets, the Vigenere Cipher is much stronger than the Caesar

Cipher.

The manner of determining the system of rows would have to be agreed upon by both the

party writing the message and the party receiving the message. One way to choose the row

would be to choose a key word with which to encipher the message; which would be known as a

repeated key. To encipher a message using a repeated key one would write the key over and

over above or below the corresponding message. Then the key would be converted to a system

Page 8: Cryptology and Mathematics

of repeating numbers by assigning an integer value to each letter in the same manner as with

assigning the alphabet to Z26. Then all one would have to do is take each letter to be enciphered

and convert it to its corresponding integer in Z26, add the corresponding key integer, find its

congruence class in Z26, convert the value of the congruence class back to its associated letter,

and move on to the next letter. Below is an example of this process.

Example

Plain-text: T H I S I S A S E C R E T M E S S A G E F O R Y O U R E Y E S O N L YRepeated Key: R E P E A T E D K E Y R E P E A T E D K E Y R E P E A T E D K E Y R ECipher-text: K L X W I L E V O G P V X B I S L E J O J M I C D V R X C H C S L C C

Plain-text: 19 7 8 18 8 18 0 18 4 2 17 4 19 12 4 18 18 0 6 4 5 14 17 24 14 20 17 4 24 4 18 14 13 11 24Repeated Key: 17 4 15 4 0 19 4 3 10 4 24 17 4 15 4 0 19 4 3 10 4 24 17 4 15 4 0 19 4 3 10 4 24 17 4Plain Sum: 36 11 23 22 8 37 4 21 14 6 41 21 23 27 8 18 37 4 9 14 9 38 34 28 29 24 17 23 28 7 28 18 37 28 28Modular Sum: 10 11 23 22 8 11 4 21 14 6 15 21 23 1 8 18 11 4 9 14 9 12 8 2 3 21 17 23 2 7 2 18 11 2 2

Another way to choose the row to use in order to encipher a message is to use a running

key. A running key is simply a key that continues for at least as long as the message. An

example of a running key could be any story of correct length from your typical English

Textbook. For example one could use Dracula by Bram Stoker, ignoring punctuation, as a

running key as is shown below.

Example

Plain-text: T H I S I S A S E C R E T M E S S A G E F O R Y O U R E Y E S O N L YRunning Key: J O N A T H A N H A R K E R S J O U R N A L K E P T I N S H O R T H ACipher-text: C V V S B Z A F L C I O X D W B G U X R F Z B C D N Z R Q L G F G S Y

Plain-text: 19 7 8 18 8 18 0 18 4 2 17 4 19 12 4 18 18 0 6 4 5 14 17 24 14 20 17 4 24 4 18 14 13 11 24Running Key: 9 14 13 0 19 7 0 13 7 0 17 10 4 17 18 9 14 20 17 13 0 11 10 4 15 19 8 13 18 7 14 17 19 7 0Plain Sum: 28 21 21 18 27 25 0 31 11 2 34 14 23 29 22 27 32 20 23 17 5 25 27 28 29 39 25 17 42 11 32 31 32 18 24Modular Sum: 2 21 21 18 1 25 0 5 11 2 8 14 23 3 22 1 6 20 23 17 5 25 1 2 3 13 25 17 16 11 6 5 6 18 24

Page 9: Cryptology and Mathematics

As you can see the Vigenere Cipher is a much better cipher as far as the security of the

message goes; whether the key is repeating or running. The Vigenere Cipher is also found in

electro-mechanical form; the Enigma.

The Enigma machine first appeared shortly after the end of WW I. The invention and

production of the Enigma is credited to Hugo Alexander Koch and Arthur Scherbius. The

Enigma machine was invented to help businesses communicate over public lines while still being

able to maintain trade secrets. During the 1920’s the Enigma shows up all over Europe in use by

businesses and, toward the end of the decade, by the German military. During this time Enigma

was advertised as “portable and easy to use yet statistically highly secure” (source) with 15x1012

substitutions possible for every letter.

In essence the Enigma is nothing more than an electro-mechanical version of the

Vigenere Cipher. Enigma works in exactly the same manner as the Vigenere Cipher, substituting

one letter for another, but with multiple cipher-alphabets, hence multiple permutations of the

letter to be enciphered, used for each letter enciphered. Basically we can view the Enigma cipher

as a multi-dimensional Vigenere Cipher.

The Enigma is made up of 9 basic components; a keyboard, plugboard, 3 rotors, a

reflector, a lampboard, and the wiring to connect it all. Encrypting a message using the Enigma

machine was relatively simple. The operator would press the key corresponding to the letter he

wished to encipher to begin encryption by closing an electrical circuit. From the keyboard the

current would run into the plugboard. The current would then exit the plugboard to the input

side of the first rotor. Once inside the first rotor the letter would be permuted by the nearly

random wiring of the rotor into another letter. This new letter would then exit the first rotor and

enter the second rotor. In the second rotor the same process would occur and a new letter than

Page 10: Cryptology and Mathematics

entered would exit to enter the third rotor. Again, another permutation of the letter would occur

inside the third rotor before the letter entered the reflector. The reflector performed another

permutation of the letter and then sent the letter back through the rotor column again. Finally

after its trip through the rotor column to the reflector then back through the rotor column the

current would travel through the plugboard once more before lighting a letter on the lampboard.

This lighted letter would be the final substitution for the letter pressed on the keyboard.

Figure 1 (Colossus, 17)

At this point one might ask; just how many substitutions were possible for each letter

enciphered using the Enigma machine? Well, in order to answer this question we make a few

observations and then use those observations to make our calculations. First of all we must look

at the way in which the messages enciphered by Enigma were transmitted. Once a message was

enciphered by Enigma it was sent over the air as a message broken up into 4-letter blocks.

Secondly, we must take note of the manner in which our calculations must be done.

In the matter of the plugboard there were 26 jacks and 6 cables; which gives us a chance

to interchange 12 letters of the alphabet. Now we must decide whether the order in which these

Page 11: Cryptology and Mathematics

cables were plugged into the plugboard would cause any change in the overall outcome of the

operation because this fact will determine the difference between a combination and a

permutation. To review, a permutation of n symbols is an arrangement of those symbols in a

definite order while a combination is “the number of distinct subsets, each of size r, that can be

constructed from a set with n elements.” Here we will assume that the order in which the jacks,

which corresponded to letters, were chosen mattered because if, for example, the letter A was

chosen as the first jack and W was chosen as the second; those letter could not be used anymore

during later choices. By this assumption we are able to see that the plugboard settings are in fact

a permutation which gives us our method for calculating the number of arrangements possible.

Given there were 26 jacks and 6 double ended cables we can now calculate our number

for the plugboard. We know we are going to chose first one jack and then another, and then

another; so on and so forth, until our cables are used up and we can make no more connections.

For our first connection there are 26 possibilities from which to choose. For the second there

will be 25, the third 24; etc. Therefore, we end up with;

26*25*24*23*22*21*20*19*18*17*16*15=4.62605375232*1015 for the number of possible

permutations in the plugboard. Now we can move along to our calculation of the rotor and

reflector permutations.

In each of the rotors there was a permanent wiring which was handmade to look as

random as possible. Therefore, in each rotor there are 26 possible letters that any one letter can

map to. Now, since there were three of these rotors and the reflector takes the input from the

third rotor and puts it back through the entire rotor column; we can calculate the number of

possible permutations of any letter as being 266=308,915,776. Since for any letter the reflector

will act as another rotor we can count it as an extra run through a rotor and recalculate the

Page 12: Cryptology and Mathematics

number of possible substitutions from two runs through the rotor column and a pass through the

reflector as 267 = 8,031,810,176.

Now, if we assign variables to each of the components of the Enigma machine

letting P represent the plugboard, R1 represent the first rotor, R2 represent the second rotor, R3

represent the third rotor, and R* represent the reflector we can come up with the equation

T=PR1R2R3R*R3R2R1P, where T is the total number of substitutions possible for the entire

enciphering process of the Enigma machine. Then substituting the appropriate numbers for the

variable we obtain the following equation; T=(4.62605375232*1015)(26)(26)(26)(26)(26)(26)

(26)(4.62605375232*1015). Simplifying this equation gives; T=(4.62605375232*1015)2(26)7, and

simplifying even more gives T=3.71555856062*1025 for the total number of possible

substitutions for any letter. Now given that message encrypted with the Enigma machine were

sent in 4-letter blocks we can calculate the total number of possibilities for a 4-letter block as;

B=(3.7155585606225)4 which gives B=1.90588390342*10102. As you can see there were an

astronomical number of possibilities for every four letter block of each message sent in the

Enigma cipher.

Now that we have covered the encryption of messages we can move on to the other side

of the coin; decryption. When one starts to think of decryption; one must think first of the

number of ways to attack the problem. In the case of the Caesar Cipher, there are only 25

different possibilities for each letter in the cipher-text. So, all one has to do is replace every

letter of the message at most 25 times to find the original message. Although this method of

deciphering a message of any length may be time consuming it is no way difficult.

However, when a different sort of substitution cipher, such as the Vigenere Cipher, is

used; the number of possible ways to encrypt a letter increases. For each letter of the cipher-text

Page 13: Cryptology and Mathematics

in the Vigenere cipher there are 26 different cipher alphabets from which to choose. This simple

fact raises the security of the cipher incredibly. Now, instead of just being able to replace each

letter individually to find the alphabet for the entire message, one must try each of the 26

possible alphabets for each letter. So, assuming that the key does not consist of just one repeated

letter, because that would turn the cipher into a mere one-alphabet shift-cipher, and there is no

repetition of any letter in the key; for a message only five letters long one must try

26*25*24*23*22 = 7,893,600 possible combinations in order to decipher the message.

On the other hand, one must keep in mind that with substitution ciphers, in general, a

letter changes only in face value. It still keeps its normal characteristics as far as its interaction

with the rest of the alphabet. For instance, in the English language the letter U is always found

after each and every Q. Therefore, when one finds a Q while deciphering a message one knows

exactly which letter will be next; U.

Also, by applying frequency analysis to the cipher-text the number of possibilities for

each letter drops; leading the analyst to the correct cipher-alphabet more quickly. Frequency

analysis is the practice of analyzing the frequency of use of each individual letter of the alphabet

in the language of encryption in order to know the normal amount of use of those letters. The

frequencies for the letters of the alphabet used in English are in the table below;

Letter Frequencies of the English LanguageLetter Percent Letter Percent Letter Percent Letter Percent

A 8.167 I 6.966 Q 0.095 Y 1.974 B 1.492 J 0.153 R 5.987 Z 0.074 C 2.782 K 0.772 S 6.327 D 4.253 L 4.025 T 9.056 E 12.702 M 2.406 U 2.758 F 2.228 N 6.749 V 0.978 G 2.015 O 7.507 W 2.360

Page 14: Cryptology and Mathematics

As you can see the letter E is the most used letter in the English language with a

frequency of 12.702%. Thus, when analyzing an enciphered message if you found a letter in the

text with a frequency greater than 10%; the letter E would be a good guess for the actual letter

intended. Going back to the previous examples; we will put this method of analysis to the test.

From the first example, the one with the repeated key, the cipher-text was:

KLXWILEVOGPVXBISLEJOJMICDVRXCHCSLCC. Below is a table with the frequencies of

the letters in the cipher-text.

Letter Frequencies from Repeated Key ExampleLetter Percent Letter Percent Letter Percent Letter Percent

A - I 8.571 Q - Y - B 2.858 J 5.714 R 2.857 Z - C 14.286 K 2.857 S 5.714 D 2.857 L 11.429 T - E 5.714 M 2.857 U o F - N - V 8.571 G 2.857 O 5.714 W 2.857

As you can see frequency analysis, at least in this manner, is not much help when dealing with a

short message. Also the use of several different cipher-alphabets by the Vigenere Cipher

removes the ability of frequency analysis to return reliable values for the frequencies by a blunt-

force attack alone. Instead, when trying to use frequency analysis to solve the Vigenere Cipher

one has to try and figure out the length of the key. Once one has found the length of the key, one

can better apply frequency analysis to the message.

The way to find the length of this key is to look for repeated strings of letters in the

cipher-text; then find the distance between those repeated strings. Once the distances between

all repeated strings are known one can then find all common divisors of the distances and make a

guess as to the length of the key using the Greatest Common Divisor. Of course, this guess gets

Page 15: Cryptology and Mathematics

more reliable if there are several different repeated strings of letters and there are several

occurrences of each of these strings.

Another method used to make that decryption of enciphered messages easier is the use of

a crib. Like the blunt-force attacks of before this method of analyzing an encrypted message can

also be tedious and time consuming but can lead to an answer faster that just attacking the

problem without a structured method. A crib, as mentioned earlier, is a selection of letters from

the cipher-text for which the true meaning is guessed. The crib is then compared to the cipher-

text by taking bits of the cipher-text and subtracting the guessed meaning of the crib. This

process will give strings of letters as long as the crib. These strings of letters can then be

analyzed and those strings that make logical sense can be kept while those that are illogical can

be discarded. Now with those strings of letters that make sense one could think of a set of words

that include these letters and further analyze the cipher-text as a whole.

As far as the decryption of the Enigma Cipher goes, there were many different methods

used to break the code. Some of those methods involved complex machines that could run

through blunt-force attacks at a much higher speed than a human; others relied on the capture of

Enigma machines and the code books. After some time the actual protocols of operating the

machine were known and the key could be captured along with the message. Then all one had to

know was the initial setup for that particular day to use a captured machine to decrypt the

message. The actual processes of decrypting the Enigma cipher are far too complex for this

particular paper but follow along closely to those described above.

As you can see there is much involved in the protection of information. The methods for

encrypting and decrypting messages mentioned in this paper are only a few of those available;

Page 16: Cryptology and Mathematics

and new ways are being developed everyday. With the world as it is today one can rest assured

that the art and science of cryptology will continue to change throughout the foreseeable future.

Page 17: Cryptology and Mathematics

References Cited:

1. Copeland, B. Jack. Colossus: The Secrets of Bletchley Park’s Codebreaking Computers. New York: Oxford, 2006.

2. Hungerford, Thomas W. Abstract Algebra: An Introduction. U.S.: Thomson Learning, 1997.

3. Loepp, Susan, and William K. Wooters. Protecting Information: From Classical Error Correction to Quantum Cryptography. New York: Cambridge University Press, 2006.

4. Ratcliff, Rebecca Ann. Delusions of Intelligence. New York: Cambridge University Press, 2006.

5. Dictionary-MSN Encarta. MSN Encarta. MSN. 03-15-2008. <http://encarta.msn.com/encnet/features/dictionary/dictionaryhome.aspx>.

6. Gallic Revolts-Caesar’s Gallic Wars Gallic Revolts. About.com. 05-02-2008. <http://ancienthistory.about.com/od/gallicwars/a/GallicRevolts.htm>.