An Introduction to Hill Ciphers Using Linear Algebra



Similar documents
Introduction to Hill cipher

Hill s Cipher: Linear Algebra in Cryptography

Solutions to Problem Set 1

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

K80TTQ1EP-??,VO.L,XU0H5BY,_71ZVPKOE678_X,N2Y-8HI4VS,,6Z28DDW5N7ADY013

Hill Ciphers and Modular Linear Algebra

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

8 Square matrices continued: Determinants

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

RSA Encryption. Tom Davis October 10, 2003

Lecture 2 Matrix Operations

Matrices 2. Solving Square Systems of Linear Equations; Inverse Matrices

Solving Systems of Linear Equations Using Matrices

Linear Algebra Notes for Marsden and Tromba Vector Calculus

Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

Name: Section Registered In:

Notes on Determinant

Linearly Independent Sets and Linearly Dependent Sets

Solving Linear Systems, Continued and The Inverse of a Matrix

Question 2: How do you solve a matrix equation using the matrix inverse?

8 Primes and Modular Arithmetic

Solving simultaneous equations using the inverse matrix

1. The RSA algorithm In this chapter, we ll learn how the RSA algorithm works.

SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89. by Joseph Collison

MATHEMATICS FOR ENGINEERS BASIC MATRIX THEORY TUTORIAL 2

Math 115A HW4 Solutions University of California, Los Angeles. 5 2i 6 + 4i. (5 2i)7i (6 + 4i)( 3 + i) = 35i + 14 ( 22 6i) = i.

Lecture 1: Systems of Linear Equations

= = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

Continued Fractions and the Euclidean Algorithm

MATH 304 Linear Algebra Lecture 18: Rank and nullity of a matrix.

HFCC Math Lab Beginning Algebra 13 TRANSLATING ENGLISH INTO ALGEBRA: WORDS, PHRASE, SENTENCES

MATH 537 (Number Theory) FALL 2016 TENTATIVE SYLLABUS

Typical Linear Equation Set and Corresponding Matrices

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

Some practice problems for midterm 2

Using row reduction to calculate the inverse and the determinant of a square matrix

Clock Arithmetic and Modular Systems Clock Arithmetic The introduction to Chapter 4 described a mathematical system

The Characteristic Polynomial

Factorizations: Searching for Factor Strings

ECE 842 Report Implementation of Elliptic Curve Cryptography

Sequences. A sequence is a list of numbers, or a pattern, which obeys a rule.

Linear Algebra Notes

CONTENTS. Please note:

2x + y = 3. Since the second equation is precisely the same as the first equation, it is enough to find x and y satisfying the system

8.2. Solution by Inverse Matrix Method. Introduction. Prerequisites. Learning Outcomes

Properties of Real Numbers

Solution to Exercise 2.2. Both m and n are divisible by d, som = dk and n = dk. Thus m ± n = dk ± dk = d(k ± k ),som + n and m n are divisible by d.

1.2 Solving a System of Linear Equations

V Quantitative Reasoning: Computers, Number Theory and Cryptography

Introduction To Security and Privacy Einführung in die IT-Sicherheit I

Direct Translation is the process of translating English words and phrases into numbers, mathematical symbols, expressions, and equations.

FAREY FRACTION BASED VECTOR PROCESSING FOR SECURE DATA TRANSMISSION

Operation Count; Numerical Linear Algebra

Part 1 Expressions, Equations, and Inequalities: Simplifying and Solving

Unit 18 Determinants

We can express this in decimal notation (in contrast to the underline notation we have been using) as follows: b + 90c = c + 10b

An Introduction to the RSA Encryption Method

Computing exponents modulo a number: Repeated squaring

Solution to Homework 2

THE NUMBER OF REPRESENTATIONS OF n OF THE FORM n = x 2 2 y, x > 0, y 0

Chapter 3. if 2 a i then location: = i. Page 40

Matrix Algebra. Some Basic Matrix Laws. Before reading the text or the following notes glance at the following list of basic matrix algebra laws.

Grade 6 Math Circles. Binary and Beyond

Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

Cryptography and Network Security. Prof. D. Mukhopadhyay. Department of Computer Science and Engineering. Indian Institute of Technology, Kharagpur

Abstract: We describe the beautiful LU factorization of a square matrix (or how to write Gaussian elimination in terms of matrix multiplication).

Abstract Algebra Cheat Sheet

Here are some examples of combining elements and the operations used:

University of Lille I PC first year list of exercises n 7. Review

Network Security. HIT Shimrit Tzur-David

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

1 Determinants and the Solvability of Linear Systems

26. Determinants I. 1. Prehistory

Solving Systems of Linear Equations

Factoring Algorithms

Introduction to Matrix Algebra

MAT 200, Midterm Exam Solution. a. (5 points) Compute the determinant of the matrix A =

Mathematics of Internet Security. Keeping Eve The Eavesdropper Away From Your Credit Card Information

Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any.

No Solution Equations Let s look at the following equation: 2 +3=2 +7

PYTHAGOREAN TRIPLES KEITH CONRAD

Data Mining: Algorithms and Applications Matrix Math Review

Linear Equations in One Variable

Grade 7/8 Math Circles Fall 2012 Factors and Primes

[1] Diagonal factorization

The application of prime numbers to RSA encryption

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan

Techniques of Asymmetric File Encryption. Alvin Li Thomas Jefferson High School For Science and Technology Computer Systems Lab

Content. Chapter 4 Functions Basic concepts on real functions 62. Credits 11

Use of Linear Algebra in Cryptography

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

Caesar Ciphers: An Introduction to Cryptography

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

Session 6 Number Theory

Math 319 Problem Set #3 Solution 21 February 2002

160 CHAPTER 4. VECTOR SPACES

POLYNOMIAL FUNCTIONS

Quotient Rings and Field Extensions

Linear Programming. March 14, 2014

Transcription:

An Introduction to Hill Ciphers Using inear Algebra Brian Worthington October 26, 2010 University of North Texas MATH 2700.002 1

Contents 1 Introduction 3 1.1 Substitution Ciphers......................... 3 1.2 Hill Ciphers.............................. 3 1.3 Alphabets............................... 6 2 Modular Arithmetic 7 2.1 Modulus................................ 7 2.2 Modular Inverses........................... 3 Matrices 3.1 Invertible Matrices.......................... 3.2 Adjugates............................... 9 4 Hill-2 Ciphers 10 4.1 Choosing Matrices.......................... 10 4.2 Encryption.............................. 4.3 Decryption.............................. 13 5 Hill-3 Ciphers 16 5.1 Choosing Matrices.......................... 16 5.2 Encryption.............................. 1 5.3 Decryption.............................. 21 6 Conclusion 23 7 References 24 2

1 Introduction Hill ciphers were invented by ester S. Hill in 1929. A Hill cipher is a type of polygraphic substitution cipher. A Hill cipher uses linear algebraic operations on an n n matrix to encrypt and decrypt messages. Hill ciphers were the rst polygraphic ciphers where it was practical to operate on more than three symbols at once. 1.1 Substitution Ciphers Substitution ciphers work by substituting one letter with another using a set of rules that can be reversed to decrypt an encrypted message. Simple substitution ciphers simply change one letter to another. You can see a simple substitution assignment table in Table I. Table I: etter to etter Substitution A B C D E F G H I J K M N O P Q R S T U V W X Y Z Q W E R T Y U I O P A S D F G H J K Z X C V B N M In order to encrypt the message HEO WORD, you simply replace each letter with the corresponding letter below it to get the message ITSSG VGKSR. The encrypted message may look like gibberish, but simple substitution ciphers are relatively easy to break using frequency analysis. Frequency analysis uses the fact that the letter E is more likely to appear in an English phrase than the letter X, etc. If you look at the encrypted message, the two 's in HEO appear as S's in ITSSG giving even more clues to someone trying to crack the code. A polygraphic cipher encrypts letters in larger groups, making frequency analysis more dicult. Encrypting HEO WORD using a polygraphic cipher might yield something like JVDNE ANAEZ. Note that the 's in HEO WORD no longer give an easy clue as to what the word might be. Polygraphic ciphers are not unbreakable and are still vulnerable to frequency analysis, but it takes a much larger sample of encrypted data to break the code than a simple substitution cipher. 1.2 Hill Ciphers Hill ciphers are a type of polygraphic substitution cipher. They use matrices and linear algebraic operations to encrypt and decrypt messages. Encrypting a message with a Hill cipher starts by assigning each letter in the alphabet a unique number between 0 and 25. You can see a typical assignment in Table II. 3

Table II: etter to Number Substitution A B C D E F G H I J K M N O P Q R S T U V W X Y Z 0 1 2 5 6 7 9 10 12 13 14 17 1 19 20 21 22 23 24 25 An n n matrix is chosen to encrypt the message. This n n matrix needs to have certain properties for an encrypted message to be able to be decrypted. These properties will be explained later on in this paper. For right now the 1 2 matrix A will be used. Once the encryption matrix has been chosen, the message to be encrypted needs to be broken into n 1 vectors. To encrypt HI CIPHER, using matrix A, break it into 2 x 1 vectors: H I C I P H E R Use Table II to convert each letter in the vectors to its representative number: H I 7 C I 2 P H 16 7 E R 4 17 4

Multiply each of these numeric vectors by the matrix A to get the encrypted vectors: 1 2 1 2 7 7 + 16 21 + 32 + 22 33 + 44 23 53 33 77 1 2 1 2 2 16 7 2 + 16 6 + 32 16 + 14 4 + 2 1 3 30 76 1 2 4 17 4 + 34 12 + 6 3 0 To get the encrypted message, you should be able to use Table II to change the encrypted message from numbers back to letters, but there is one more step. 23 If you look at the rst encrypted vector,, the rst number, 23, can be 53 changed to X using Table II, but there is no entry in Table II for 53. In order to use Table II, you need numbers between 0 and 25. If you take the Modulus 26 of 53, you will get 1, which is between 0 and 25 and can be translated to B using Table II. Modulus will be discussed later in this paper. 5

If you take the Modulus 26 of each of the encrypted vectors, you get: 23 53 33 77 1 3 30 76 Mod 26 Mod 26 Mod 26 Mod 26 23 1 7 25 1 12 4 24 3 0 12 Mod 26 2 Now you can take the encrypted vectors and get encrypted letter values from Table II to get the encrypted message XBRZSMEYMC. The example above is an example of a Hill-2 Cipher. The 2 comes from the number of columns in the encryption and decryption matrices. A Hill cipher using 4 4 matrices is known as a Hill-4 Cipher, etc. 1.3 Alphabets In the examples used in this paper Table II from section 1.2 will be used to convert letters into numbers and vice versa. This table uses the standard 26 character alphabet used in English. Because you have 26 characters that you will use to encrypt and decrypt, you need to make sure that everything can be converted into an actual letter. The letters are assigned numbers between 0 and 25 so that you can take advantage of Mod 26 arithmetic to convert any number into a number between 0 and 25. Hill ciphers do not have to use exactly 26 characters. Using Hill ciphers with non-english character sets can yield alphabets with more or less than 26 characters. You can also include space and punctuation characters. Also, the numbers do not need to be in order. It helps to start with 0 in your numbering to take advantage of modular arithmetic. Of course, if your alphabet uses more or less than 26 characters, make sure you use the appropriate Mod m instead of Mod 26. The key is that the same alphabet with the same letter to number designations need to be available for the encryptor and decryptor and that there are no gaps in the numbering. 6

2 Modular Arithmetic 2.1 Modulus A modulus of one number in terms of another number (a Mod b) for integers a and b basically means that you divide a by b and take the remainder as the answer. For example: therefore, also, 14 10 1 R 4 14 Mod 10 4 24 Mod 10 4 Here is a theorem for how to calculate modulus: THEOREM: For an integer a and modulus m, let R remainder of a m Then the residue r of a modulus m is given by: R if a 0 r m R if a < 0 and R 0 0 if a < 0 and R 0 When you are using Hill ciphers, you will use modulus (specically Mod 26 for the alphabet used in this paper) in every step to make sure that you are dealing with numbers between 0 and 25. Here are some examples: 1. 0 Mod 26 0 26 3 R 2 0 0 0 Mod 26 2 2. -0 Mod 26 3. -52 Mod 26 0 26 3 R 2-0 < 0 and 2 0-0 Mod 26 26-2 24 52 26 2 R 0-52 < 0 and 0 0-52 Mod 26 0 7

2.2 Modular Inverses In regular arithmetic, every non-zero number a has a reciprocal (or inverse) a 1 such that: a a 1 1 For example, the inverse of 23 is 1 23 because 23 1 23 1. In modular arithmetic, a number a has a modular inverse a 1 for a number m such that: (a a 1 ) Mod m 1 IMPORTANT NOTE: For modular inverses, a and m must not have any common prime factors in order for a 1 to exist. Example: Find the modular inverse of 9 for Mod 26. Solution: 9 3 27 27 Mod 26 1 3 is the modular inverse of 9 for Mod 26. In order to create matrices for Hill ciphers, you will need to know the modular inverses for Mod 26. Because 26 has only 2 prime factors (2 and 13), the numbers for which there is a modular inverse for Mod 26 include all the odd numbers between 1 and 25 except for 13. Table III shows all of the possible modular inverses for Mod 26. Table III: Modular Inverses for Mod 26 a 1 2 5 7 9 15 17 19 21 23 25 a 1 1 9 21 15 3 19 7 23 5 17 25 3 Matrices 3.1 Invertible Matrices In order for a matrix to be invertible, it must rst be a square n n matrix. It must also have a determinant 0. a b For a 2 2 matrix A, the determinant of A is ad - bc, written as c d det A ad - bc

For square matrices larger than 2 2 it gets a little more complicated: DEFINITION: For n 2, the determinant of an n n matrix A a ij is the sum of n terms of the form ±a 1j det A 1j, with plus and minus signs alternating, where the entries a, a 12,..., a 1n are from the rst row of A. In symbols det A a det A - a 12 det A 12 + + (-1) 1+n a 1n det A 1n a b c So, for a 3 3 matrix B d e f, g h i e f det B a det h i d f - b det g i d e + c g h det B a (ei - fh) - b (di - fg) + c (dh - eg) 3.2 Adjugates An adjugate of a square matrix can be used to generate an inverse of that matrix. You will need to use adjugates to calculate the modular inverse your encryption matrix to use in decryption. To create an adjugate of a square, n n invertible matrix A, take all of the cofactors of A, put them into a matrix B and then take the transpose of B, written as B T. a b For a 2 2 matrix A, the cofactors are: c d C + d C 12 - c C 21 - b C 22 + a d c The resulting matrix B b a d b and B T c a d b Therefore, adj A c a 9

4 Hill-2 Ciphers 4.1 Choosing Matrices A Hill-2 Cipher uses a 2 2 invertible matrix A to encrypt data and another 2 2 invertible matrix B to decrypt data. The relationship between A and B is that they need to be modular inverses of each other for Mod 26. This means you need to choose a matrix A where there exists a matrix B such that: (A B) Mod 26 I n where I n is the identity matrix for n n matrices. In order to create B, you must rst calculate the determinant of A. et A 2 1 det A (2 4) - (1 3) - 3 5 modular inverse of 5 for Mod 26 21 (from Table III) If det A did not have a modular inverse for Mod 26, you would NOT be able to use A to encrypt and decrypt Hill ciphers. IMPORTANT NOTE: In order for a n n matrix A to be modularly invertible for Mod m, det A MUST have a modular inverse for Mod m. a b You saw in section 3.2 that the adjudicate of a 2 2 matrix c d d b. Therefore c a adj A 4 1 3 2 To calculate B you need to multiply the adjucate of A by the modular inverse of det A for Mod m and then calculate Mod m for the entries in the resulting matrix. For example: B 21 4 1 3 2 4 21 62 B 4 21 62 Mod 26 6 5 10

6 5 Therefore 2 1 is the modular inverse of 6 5 for Mod 26. is the matrix you would use to decrypt a Hill cipher encrypted using To check that 2 1 6 5 6 5 is the modular inverse of 27 26 7 79 12 + 15 10 + 16 1 + 60 15 + 64 Mod 26 1 0 0 1 2 1 I 2 : 27 26 7 79 2 1. 4.2 Encryption Here is how to encrypt the phrase HEO WORD. You can use the matrix 2 1 to encrypt it because you know it has a modular inverse from the 6 5 previous section ( ). 1. Divide the phrase to encrypt into 2 1 vectors and assign them numbers using Table II. H E 7 4 O W O R 14 22 14 17 D 3

2 1 2. Multiply each of the numerical vectors by the encryption matrix,. 2 1 7 4 14 + 4 21 + 16 1 37 2 1 2 1 2 1 14 22 14 17 22 + 33 + 44 2 + 22 42 + 2 + 17 42 + 6 33 77 50 130 45 0 2 1 3 22 + 3 33 + 12 25 45 3. Convert each of the resulting numerical vectors to Mod 26. 1 37 33 77 Mod 26 Mod 26 1 7 25 50 130 45 0 24 Mod 26 0 Mod 26 19 6 25 45 Mod 26 25 19 12

4. Use Table II to convert each of the values in the resulting vectors back to letters. 1 S 7 25 H Z 24 0 Y A 19 6 T G 25 19 Z T 5. The encrypted message now reads SHZYATGZT. 4.3 Decryption The process to decrypt the phrase SHZYATGZT similar to encryption, except we need to use the modular inverse of the original encryption matrix, which is 6 5. 13

1. Divide the phrase to encrypt into 2 1 vectors and assign them numbers using Table II. S 1 H Z 7 25 Y A 24 0 T G 19 6 Z T 25 19 2. Multiply each of the numerical vectors by the decryption matrix, 6 5 6 5 1 7 25 10 + 55 270 + 176 42 + 125 105 + 400 163 446 167 505 6 5. 6 5 6 5 24 0 19 6 144 + 0 360 + 0 4 + 30 25 + 96 144 360 144 31 6 5 25 19 150 + 95 375 + 304 245 679 14

3. Convert each of the resulting numerical vectors to Mod 26. 163 446 167 505 144 360 144 31 7 Mod 26 4 Mod 26 Mod 26 Mod 26 14 22 14 17 245 679 Mod 26 3 4. Use Table II to convert each of the values in the resulting vectors back to letters. 7 H 4 E 14 22 14 17 O W O R 3 D 5. The decrypted message is now HEOWORD which can easily be deciphered as HEO WORD. 15

5 Hill-3 Ciphers 5.1 Choosing Matrices A Hill-3 Cipher uses a 3 3 invertible matrix A to encrypt data and another 3 x 3 invertible matrix B to decrypt data. You might choose a matrix A 3 2 1. 1 2 3 2 1 3 If you calculate the det A you get: 2 1 1 det 1 3 3 1-2 det 2 3 3 2 3 det 2 1 1 (6 + 1) 1 7 7-2 (-9-2) -2-22 3 (3-4) 3-1 -3 det A 7 + 22-3 26 Mod 26 0 If you look at Table III, there is no entry for 0, so there is no modular inverse. Because of this, matrix A won't work. While you could certainly encrypt messages with matrix A, there would be no way to decrypt them. If you modify matrix A to 3 1 1 det 1 2 2 1-2 det 3 2 2 3-2 det 3 1 1 2 2 2 3 1 3 1 2, here is the determinant: 1 (6 + 1) 1 7 7-2 (-4-3) -2-7 14-2 (2-9) -2-7 14 det A 7 + 14 + 14 35 Mod 26 9 16

If you look at Table III, you can see that the modular inverse of 9 3. To calculate B you need to multiply the adjucate of A (adj A) by the modular inverse of det A for Mod m and then calculate Mod m for the entries in the resulting matrix. To calculate adj A: 3 1 C + det 1 2 2 2 C 21 - det 1 2 2 2 C 31 + det 3 1 2 1 C 12 - det 3 2 1 2 C 22 + det 3 2 1 2 C 32 - det 2 1 2 3 C 13 + det 3 1 1 2 C 23 - det 3 1 1 2 C 33 + det 2 3 C (6 - (-1)) 7 C 12 -(-4-3) 7 C 13 (2-9) -7 C 21 -(4-2) -2 C 22 (2 - (-6)) C 23 -(-1-6) 7 C 31 (2 - (-6)) C 32 -(1-4) 3 C 33 (3 - (-4)) 7 You can take the results and put them into a new matrix C and now adj A C T. adj A 7 3 7 2 7 7 7 Now you can calculate the modular inverse of A: 7 2 21 6 24 B 3 7 3 21 24 9 7 7 7 21 21 21 B 21 6 24 21 24 9 21 21 21 Mod 26 21 20 24 Therefore 21 24 9 is the modular inverse of 5 21 21 21 20 24 Mod 26. 21 24 9 5 21 21 1 2 2 encrypted using 2 3 1. 3 1 2 21 20 24 21 24 9 5 21 21 7 7 7 2 7 3 7 1 2 2 2 3 1 3 1 2 for is the matrix you would use to decrypt a Hill cipher 17

To check that 21 20 24 21 24 9 5 21 21 2 3 1 1 2 2 3 1 2 is the modular inverse of 21 20 24 21 24 9 5 21 21 2 3 1 1 2 2 3 1 2 : 21 + 42 10 20 + 4 42 24 + 1 42 42 + 63 + 5 40 + 72 + 21 4 + 27 + 21 63 21 + 10 60 24 + 42 72 9 + 42 53 26 0 26 53 0 52 7 105 Mod 26 1 0 0 0 1 0 0 0 1 I 3 53 26 0 26 53 0 52 7 105 5.2 Encryption Here is how to encrypt thephrase HEO WORD using a Hill-3 Cipher. 1 2 2 The encryption matrix A 2 3 1 and the decryption matrix B 3 1 2 21 20 24 21 24 9. 5 21 21 1

1. Divide the phrase to encrypt into 3 1 vectors and assign them numbers using Table II. H E 7 4 O W 14 22 O R D X X 14 17 3 23 23 You will notice that there are not enough letters to completely ll out the last vector. One common solution is to just repeat the nal letter to ll out the nal vector. Another solution, the one used here, is to ll out the nal vector with uncommonly used letters, such as X. 2. Multiply each of the numerical vectors by the encryption matrix, 2 3 1 1 2 2 3 1 2 7 4 7 + 22 14 + 12 + 21 4 + 22 7 9 39 1 2 2 2 3 1 3 1 2. 1 2 2 2 3 1 3 1 2 14 22 + 2 44 22 + 42 + 22 33 14 + 44 5 42 63 1 2 2 2 3 1 3 1 2 2 3 1 1 2 2 3 1 2 14 17 3 23 23 14 + 34 + 22 2 + 51 + 42 17 + 22 3 + 46 46 6 + 69 + 23 9 23 + 46 26 34 47 3 6 32 19

3. Convert each of the resulting numerical vectors to Mod 26. 7 9 39 Mod 26 19 9 13 5 42 63 Mod 26 21 16 26 34 47 3 6 32 Mod 26 Mod 26 4. Use Table II to convert each of the values in the resulting vectors back to letters. 19 9 13 21 16 T J N V Q 0 21 3 6 0 21 A I V 3 6 5. The encrypted message now reads TJNVQAIVDIG. D I G 20

5.3 Decryption The process to decrypt the phrase TJNVQAIVDIG similar to encryption, except we need to use the modular inverse of the original encryption matrix, 21 20 24 which is 21 24 9. 5 21 21 1. Divide the phrase to encrypt into 2 1 vectors and assign them numbers using Table II. T J N V Q 19 9 13 21 16 A I V 0 21 D I G 3 6 21

2. Multiply each of the numerical vectors by the decryption matrix, 21 20 24 21 24 9 5 21 21 19 9 13 399 + 10 + 312 299 + 216 + 7 95 + 19 + 273 91 732 557 21 20 24 21 24 9 5 21 21. 21 20 24 21 24 9 5 21 21 21 16 441 + 320 + 264 441 + 34 + 99 105 + 336 + 231 1025 924 672 21 20 24 21 24 9 5 21 21 21 20 24 21 24 9 5 21 21 0 21 3 6 0 + 160 + 504 0 + 192 + 19 0 + 16 + 441 63 + 160 + 144 63 + 192 + 54 15 + 16 + 126 3. Convert each of the resulting numerical vectors to Mod 26. 91 732 557 Mod 26 7 4 664 31 609 367 309 309 1025 924 672 Mod 26 14 22 664 31 609 367 309 309 Mod 26 Mod 26 14 17 3 23 23 22

4. Use Table II to convert each of the values in the resulting vectors back to letters. 7 4 H E 14 22 O W 14 17 3 23 23 5. The decrypted message is now HEOWORDXX which can easily be deciphered as HEO WORD. O R D X X 6 Conclusion The most dicult part of creating Hill ciphers is determining the encryption and decryption matrices. Once you have a viable encryption matrix and its corresponding decryption matrix, it is relatively easy to encrypt and decrypt messages, if you have a working knowledge of matrix arithmetic and how modulus works. 23

7 References ester S. Hill, Cryptography in an Algebraic Alphabet, The American Mathematical Monthly Vol. 36, June-July 1929, pp. 306-312 ester S. Hill, Concerning Certain inear Transformation Apparatus of Cryptography, The American Mathematical Monthly Vol. 3, 1931, pp.135-154 Howard Anton, Chris Rorres, Elementary inear Algebra with Applications, John Wiley and Sons, Inc., New York, NY, pp. 719-732 David C. ay, inear Algebra and Its Applications, Pearson, Addison Wesley, Boston, Massachusetts, pp 121, 17, 203-204 http://online.redwoods.edu/instruct/darnold/aproj/fall2001/shinichi/cryptography.pdf http://www.apprendre-en-ligne.net/crypto/menu/index.html http://en.wikipedia.org/wiki/hill_cipher 24