Algebra for Cryptology

Similar documents
Cristina Nita-Rotaru. CS355: Cryptography. Lecture 4: Enigma.

1/18 2/16 3/20 4/17 5/6 6/9 7/14 % Please do not write in the spaces above.

Facts & Myths of Enigma

17.1 Binary Codes Normal numbers we use are in base 10, which are called decimal numbers. Each digit can be 10 possible numbers: 0, 1, 2, 9.

Historical cryptography. cryptography encryption main applications: military and diplomacy

Cryptography. P. Danziger. Transmit...Bob...

Lecture Notes. Advanced Discrete Structures COT S

Public Key Cryptography

CRYPTOGRAPHY AND NUMBER THEORY

University of Regina Department of Mathematics & Statistics Final Examination (April 21, 2009)

Cryptography: A Fairy Tale for Mathematicians and Starring Mathematicians!

Cryptography. The Making and Breaking of Secret Codes. 5/29/2009 John C. Polking, Rice University 1

1999 version 2001 simplified version

Number theory (Chapter 4)

CPSC 467b: Cryptography and Computer Security

CRYPTOGRAPHY AND LARGE PRIMES *

Ciphers: Making and Breaking

MEETING 6 - MODULAR ARITHMETIC AND INTRODUCTORY CRYPTOGRAPHY

Cryptography and Number Theory

An Introduction to Cryptography

QUANTUM CRYPTOGRAPHY. BCS, Plymouth University, December 1, Professor Kurt Langfeld Centre for Mathematical Sciences, Plymouth University

6.080/6.089 GITCS April 8, Lecture 15

MATH3302 Cryptography Problem Set 2

The Hill Cipher A Linear Algebra Perspective

Final Exam Math 105: Topics in Mathematics Cryptology, the Science of Secret Writing Rhodes College Tuesday, 30 April :30 11:00 a.m.

CODING AND CRYPTOLOGY III CRYPTOLOGY EXERCISES. The questions with a * are extension questions, and will not be included in the assignment.

CPE 776:DATA SECURITY & CRYPTOGRAPHY. Some Number Theory and Classical Crypto Systems

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya

MODULAR ARITHMETIC KEITH CONRAD

Theme : Cryptography. Instructor : Prof. C Pandu Rangan. Speaker : Arun Moorthy CS

Lecture Notes. Advanced Discrete Structures COT S

Week 7 An Application to Cryptography

Great Theoretical Ideas in Computer Science

Cryptography CS 555. Topic 2: Evolution of Classical Cryptography CS555. Topic 2 1

Clock Arithmetic and Euclid s Algorithm

Notes 10: Public-key cryptography

NUMBER THEORY AND CRYPTOGRAPHY

Classical Cryptography

Number Theory: Applications. Number Theory Applications. Hash Functions II. Hash Functions III. Pseudorandom Numbers

8 Elliptic Curve Cryptography

Quantum Cryptography

Simple Math: Cryptography

The Field: Introduction to complex numbers

Ma/CS 6a Class 1. Course Details

CS 282A/MATH 209A: Foundations of Cryptography Prof. Rafail Ostrosky. Lecture 4

Definition: For a positive integer n, if 0<a<n and gcd(a,n)=1, a is relatively prime to n. Ahmet Burak Can Hacettepe University

Eindhoven University of Technology MASTER. Kleptography cryptography with backdoors. Antheunisse, M. Award date: 2015

My brief introduction to cryptography

Cryptography. pieces from work by Gordon Royle

RSA RSA public key cryptosystem

Logic gates. Quantum logic gates. α β 0 1 X = 1 0. Quantum NOT gate (X gate) Classical NOT gate NOT A. Matrix form representation

19. Coding for Secrecy

Security Implications of Quantum Technologies

Discrete Mathematics GCD, LCM, RSA Algorithm

Lecture 1: Introduction to Public key cryptography

NOI 2009 Solutions to Contest Tasks

Lecture 19: Public-key Cryptography (Diffie-Hellman Key Exchange & ElGamal Encryption) Public-key Cryptography

5. Classical Cryptographic Techniques from modular arithmetic perspective

Introduction to Modern Cryptography. Benny Chor

Notes 4: Stream ciphers, continued. Recall from the last part the definition of a stream cipher:

Candidates must show on each answer book the type of calculator used. Only calculators permitted under UEA Regulations may be used.

Cryptography A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering. Apr Cryptography Slide 1

NUMBER THEORY AND CRYPTOGRAPHY

CPSC 467: Cryptography and Computer Security

Chapter 2 Classical Cryptosystems

10 Modular Arithmetic and Cryptography

Notes. Number Theory: Applications. Notes. Number Theory: Applications. Notes. Hash Functions I

( c ) E p s t e i n, C a r t e r a n d B o l l i n g e r C h a p t e r 1 7 : I n f o r m a t i o n S c i e n c e P a g e 1

Classical Cryptography

... Assignment 3 - Cryptography. Information & Communication Security (WS 2018/19) Abtin Shahkarami, M.Sc.

The Vigenère cipher is a stronger version of the Caesar cipher The encryption key is a word/sentence/random text ( and )

Cryptography Based on the Matrices. Key Words: Matrices, Conjugate Problem, Exchange of Keys, Cryptosystem. Contents.

Cryptosystem. Traditional Cryptosystems: The two parties agree on a secret (one to one) function f. To send a message M, thesendersendsthemessage

Circuit Complexity. Circuit complexity is based on boolean circuits instead of Turing machines.

Univ.-Prof. Dr. rer. nat. Rudolf Mathar. Written Examination. Cryptography. Tuesday, August 29, 2017, 01:30 p.m.

Jay Daigle Occidental College Math 401: Cryptology

Simple Codes MTH 440

Hans Delfs & Helmut Knebl: Kryptographie und Informationssicherheit WS 2008/2009. References. References

ENEE 457: Computer Systems Security 10/3/16. Lecture 9 RSA Encryption and Diffie-Helmann Key Exchange

Number Theory in Cryptography

Discrete Logarithm Problem

Know the meaning of the basic concepts: ring, field, characteristic of a ring, the ring of polynomials R[x].

Encryption: The RSA Public Key Cipher

Elliptic Curves and an Application in Cryptography

MATH 158 FINAL EXAM 20 DECEMBER 2016

secretsaremadetobefoundoutwithtime UGETGVUCTGOCFGVQDGHQWPFQWVYKVJVKOG Breaking the Code

Exam Security January 19, :30 11:30

Notes for Lecture 17

Secret Sharing Schemes

Review. CS311H: Discrete Mathematics. Number Theory. Computing GCDs. Insight Behind Euclid s Algorithm. Using this Theorem. Euclidian Algorithm

Points of High Order on Elliptic Curves ECDSA

19 Lorenz Cipher Machine

Introduction to Cryptography

Math 412: Number Theory Lecture 13 Applications of

PERFECT SECRECY AND ADVERSARIAL INDISTINGUISHABILITY

ASSIGNMENT Use mathematical induction to show that the sum of the cubes of three consecutive non-negative integers is divisible by 9.

Introduction to Modern Cryptography. Benny Chor

Enigma Marian Rejewski, Jerzy Róz ycki, Henryk Zygalski

Mathematical Foundations of Public-Key Cryptography

Specialized Cryptanalytic Machines: Two examples, 60 years apart. Patrick Schaumont ECE Department Virginia Tech

Transcription:

Algebra for Cryptology Arkadii Slinko Department of Mathematics The University of Auckland Auckland, 6 April, 2013

What is cryptology? Cryptology is about communication in the presence of adversaries or potential adversaries. It addresses the following problems in particular: secrecy; privacy; authentication: passwords; digital signitures; friend-or-foe identification digital money. It is now an integral part of a modern society.

Cryptology in Aincient History 1 One of the oldest cyphers known is Atbash. It appears in the Hebrew Scriptures of the Bible. Any letter of the alphabet is replaced by the symmetric letter.

Cryptology in Aincient History 1 One of the oldest cyphers known is Atbash. It appears in the Hebrew Scriptures of the Bible. Any letter of the alphabet is replaced by the symmetric letter.

Cryptology in Aincient History 1 One of the oldest cyphers known is Atbash. It appears in the Hebrew Scriptures of the Bible. Any letter of the alphabet is replaced by the symmetric letter. Example for Latin alphabet: MATH NZGS.

Cryptology in Aincient History 2 Caesar is also a very old cypher used by Gaius Julius Caesar (130 BC - 87 BC). Letters are simply replaced by letters three steps further down the alphabet. Example: MATH PDWK.

Cryptology in Aincient History 2 Caesar is also a very old cypher used by Gaius Julius Caesar (130 BC - 87 BC). Letters are simply replaced by letters three steps further down the alphabet. Example: MATH PDWK. These two cyphers are examples of the so-called substitution methods.

One-time pad 1 The one-time pad is a nearly perfect cryptographic solution. It was invented in 1917 by Gilbert Vernam for use in telegraphy with International Morse Code.

The simplest algebra The set Z 2 = {0, 1} admits the following algebraic operations: with the binary addition 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, 1 + 1 = 0, and the binary multiplication 0 0 = 0, 0 1 = 0, 1 0 = 0, 1 1 = 1, The binary 0 and 1 represent parities, so that 0 stands for even and 1 stands for odd. Having this in mind it is not surprising that 1 + 1 = 0, because it simply means that odd + odd = even.

One-time pad 2 Suppose that parties share a very long string k of randomly chosen 0 s and 1 s (the key). If Alice wishes to send a message, which is a string of zeros and ones m = m 1 m 2... m n, she takes the first n numbers from k, that is k = k 1 k 2... k n and add these two strings component-wise mod 2 to get the encrypted message c = m + k := c 1 c 2... c n, where c i = m i + k i. Then Alice destroys the first n numbers of the key.

The code book In the past spies would be regularly caught with code books It is absolutely crucial that the key represents random noise.

Another useful algebra The set Z 26 = {0, 1, 2,..., 25} can be made an algebra by redefining the addition a + b := a + b mod 26 and multiplication ab := ab mod 26.

Another useful algebra The set Z 26 = {0, 1, 2,..., 25} can be made an algebra by redefining the addition a + b := a + b mod 26 and multiplication ab := ab mod 26. We can define the subtraction defining: 0 := 0 and a := 26 a for a 0.

Another useful algebra The set Z 26 = {0, 1, 2,..., 25} can be made an algebra by redefining the addition a + b := a + b mod 26 and multiplication ab := ab mod 26. We can define the subtraction defining: 0 := 0 and a := 26 a for a 0. This algebra has interesting properties which are fun to explore. A new phenomenon is divisors of zero: 2 13 = 4 13 =... = 24 13 = 0.

One-time pad 4 For written communication it was modified by giving the letters of the alphabet numerical encodings: A B C D E F G H I J K L M 0 1 2 3 4 5 6 7 8 9 10 11 12 N O P Q R S T U V W X Y Z 13 14 15 16 17 18 19 20 21 22 23 24 25 The key is a secret book from the library. For example, The Complete Poems of Emily Dickinson. Suppose that the first unused poem from the book is Best Witchcraft is Geometry To the magician s mind - His ordinary acts are feats To thinking of mankind. Then you add this poem to your message mod 26.

One-Time Pad 5 Suppose we need to send a message BUY TELECOM SHARES. We calculate B U Y T E L E C O M S H A R E S 1 20 24 19 4 11 4 2 14 12 18 7 0 17 4 18 and the first 16 letters from the poem will be B E S T W I T C H C R A F T I S 1 4 18 19 22 8 19 2 7 2 17 0 5 19 8 18 Adding these two messages mod 26 we get 2 24 16 12 0 19 23 4 21 14 9 7 5 10 12 10 C Y Q M A T X E V O J H F K M K and send CYQMATXEVOJHFKMK.

Doing algebra in Z 26 Division is possible only a number relatively prime with 26, e.g., 3 1 = 9, 5 1 = 21, 7 1 = 15.

Doing algebra in Z 26 Division is possible only a number relatively prime with 26, e.g., 3 1 = 9, 5 1 = 21, 7 1 = 15. Corresponding linear equations have unique solutions: 3x = 8 = x = 3 1 8 = 9 8 = 20.

Doing algebra in Z 26 Division is possible only a number relatively prime with 26, e.g., 3 1 = 9, 5 1 = 21, 7 1 = 15. Corresponding linear equations have unique solutions: 3x = 8 = x = 3 1 8 = 9 8 = 20. On the other hand, 2 1 does not exist and 2 is a divisor of zero. and 2x = 3 = has no solution. 2x = 4 = has solutions x = 2 and x = 15.

Doing algebra in Z 26 Division is possible only a number relatively prime with 26, e.g., 3 1 = 9, 5 1 = 21, 7 1 = 15. Corresponding linear equations have unique solutions: 3x = 8 = x = 3 1 8 = 9 8 = 20. On the other hand, 2 1 does not exist and 2 is a divisor of zero. and 2x = 3 = has no solution. 2x = 4 = has solutions x = 2 and x = 15. The set of invertible numbers is denoted Z 26.

An affine cryptosystem This is a substitution cypher which is also based on modular arithmetic. The key to this cryptosystem is a pair k = (a, b) of numbers a Z 26, b Z 26. Under this system a number in Z 26 is assigned to every letter of the alphabet as before. Each letter is encoded into the corresponding number x and then into the letter which numerical encoding is ax + b. For instance, if a = 3 and b = 5, The message will be encrypted into H 7 3 7 + 5 = 0 A. BUY TELECOM SHARES INZKRMRLVPHAFERH

Matrix algebra over Z 26 Matrices can be added and multiplied as usual. Division is again slightly different, for example, the usual formula works [ M 1 a b = c d ] 1 = 1 [ ] d b det M c a but det M must be invertible in Z 26. Let Then K = [ 3 3 2 5 ] K 1 = 9 1 [ 5 23 24 3 with det K = 3 5 3 2 = 9. ] [ 5 23 = 3 24 3 ] = [ 15 17 20 9 ].

Hill s cryptosystem The whole message is divided into such m-tuples and each m-tuple is encrypted separately. The key for this cryptosystem is an invertible m m matrix over Z 26. We will consider the case m = 2 and therefore pairs of letters and 2 2 matrices. Let the key-matrix be [ ] a b K =. c d The encryption of a pair of letters (P 1, P 2 ) is carried out by [ ] [ ] [ ] x1 x1 y1 (P 1, P 2 ) K = (C 1, C 2 ), x 2 where x 1, x 2 are the numerical codes for P 1, P 2 and y 1, y 2 are the numerical codes for C 1, C 2. x 2 y 2

Let Hill s cryptosystem. Example K = [ 3 3 2 5 ]. The matrix K is invertible, hence an inverse K 1 exists such that [ ] KK 1 = K 1 1 0 K =. 0 1 We know that It follows that [ ] K 1 y1 = K 1 K y 2 K 1 = [ x1 x 2 [ 15 17 20 9 ] = which makes decryption is possible. ]. [ 1 0 0 1 ] [ x1 x 2 ] = [ x1 x 2 ],

Hill s cryptosystem. Example 2 and the plaintext message be HELP. Then this plaintext is represented by two pairs [ ] [ ] [ ] [ ] H L 7 11 HELP,,. E P 4 15 Then we compute using K : [ ] [ ] [ ] 3 3 7 7 =, 2 5 4 8 [ 3 3 2 5 ] [ 11 15 ] = [ 0 19 ] and continue encryption as follows: [ ] [ ] [ 7 0 H, 8 19 I ], [ A T ] HIAT

Hill s cryptosystem. Example 3 Let us see how we can decrypt the cyphertext HIAT: [ ] [ ] [ ] [ ] H A 7 0 HIAT,,. I T 8 19 Then we compute using K 1 : [ ] [ ] [ ] 15 17 7 7 =, 20 9 8 4 [ 15 17 20 9 ] [ 0 19 ] = [ 11 15 ] and continue decryption as follows: [ ] [ ] [ ] [ 7 11 H L,, 4 15 E P ] HELP.

Enigma An Enigma machine is an electro-mechanical rotor cipher machine perfected at the end of World War I.

Wheels of Enigma The mechanical parts act in such a way as to form a varying electrical circuit.

Enigma The cryptographic key was an Enigma machine s initial state which had several changeable aspects: Wheel order - the choice of rotors and the order in which they are fitted. Initial position of the rotors. Ring settings - the position of the alphabet ring relative to the rotor wiring. Plug connections - the connections of the plugs in the plugboard. The military Enigma has 158,962,555,217,826,360,000 (158 quintillion) different settings. In use, the Enigma required a list of daily key settings, normally transmitted by radio.

Enigmas A selection of seven Enigma machines exhibited at the USA s National Cryptologic Museum. From left to right, the models are: 1) Commercial Enigma; 2) Enigma T; 3) Enigma G; 4) Unidentified; 5) Luftwaffe (Air Force) Enigma; 6) Heer (Army) Enigma; 7) Kriegsmarine (Naval) Enigma.

Enigma. Breaking the code The Polish Cipher Bureau first broke Germany s military Enigma ciphers in December 1932. Marian Rejewski (on the photo), Jerzy Rozycki and Henryk Zygalski, the three mathematicians broke the code using the algebra of permutation groups. From 1938 onwards, additional complexity was repeatedly added to the Enigma, making the initial decryption techniques unsuccessful.

Enigma. Breaking the code 2 The Polish breakthrough was a basis for the later British effort. During the war, British codebreakers were able to decrypt a vast number of messages enciphered by the Enigma in a secret project in Bletchley Park.

Alan Turing (1912-1954) The team at Bletchly Park was led by Alan Turing. Turing formalised the concepts of "algorithm" and "computation" with the Turing machine. Widely considered to be the father of computer science and artificial intelligence.

Thomas "Tommy" Harold Flowers (1905-1998) Was a British engineer working at Bletchly Park. Flowers designed Colossus, the world s first programmable electronic computer, to help solve encrypted German messages.

Colossus Rebuild Colossus has been rebuild by enthusiasts and outperformed a modern (1994) computer.

The Role of Cryptographers in WW II The exact influence of Ultra 1 on the course of the war is debated. However Winston Churchill told the United Kingdom s King George VI after World War II: "It was thanks to Ultra that we won the war." 1 this was the code for intelligence obtained from Bletchley Park.

Fun problem 1 1. Which one of the two functions E 1 (x) = 13x + 15 mod 26, E 2 (x) = 15x + 13 mod 26, is suitable to be an encryption function in affine cryptosystem? Find the decryption function for it. 2. Using the encryption and decryption functions from (a) encrypt FRIGATE IS IN THE GULF and decrypt XBCLNIDAVONXXBAH.

Fun problem 2 Suppose Alice and Bob use the affine cryptosystem for private communications. Eve knows that Bob always concludes his letters to Alice with the abbreviation XU. 1. Show that she can then decrypt the following message that Bob sent to Alice NQRHSUNBZMJAYJ 2. Show how Eve, pretending to be Alice, can encode and send to Bob the message to Bob. STUIPID

Fun problem 3 Eve eavesdrops on the correspondence of Ark, Pip and Tom who use Hill s cryptosystem to communicate. She discovered that they split messages into segments which are three letters long and that the names (signatures) are encoded as ARK, PIP and TOM GCB, APM and BWZ, respectively. Find the matrix K which is used as the key.