MODULAR ARITHMETIC. Suppose I told you it was 10:00 a.m. What time is it 6 hours from now?

Size: px
Start display at page:

Download "MODULAR ARITHMETIC. Suppose I told you it was 10:00 a.m. What time is it 6 hours from now?"

Transcription

1 MODULAR ARITHMETIC. Suppose I told you it was 10:00 a.m. What time is it 6 hours from now? The time you use everyday is a cycle of 12 hours, divided up into a cycle of 60 minutes. For every time you pass 12, you start over with 1 again. This is "mod 12" arithmetic. Let's set up a picture. You put 0 through 11 in a circle. Then to figure out what the answer to a modular math question, you begin at 0 and count around the clock a certain amount of times. The number you end up on is the answer. Example: We want to calculate 32 (mod 12). We start at 0 and go all the way back to 0. This uses up 12 of the hours. We have =20 left. We go around again. We have = 8 left. Therefore 32 (mod 12) is equal to 8 or 32 8 (mod 12) What is 27 (mod 12)? What is 38 (mod 12)? What is -7 (mod 12)? What about 155 mod 12? QUESTION: Why do you think we label the clock 0 through 11, instead of 1-12? Okay, now try 155 mod 12 again.

2 Classwork: 1. It would be mod if we did minutes instead of hours. 2. Where would the minute hand be 342 minutes from 10:00? 3. What time would it be (including the hour) for problem 2? 4. If it is 10:50 now, what time will it be in 268 minutes? 5. What month would it be 43 months from now? 6. If it is 1:00 right now, what time was it 76 hours ago? 7. Today is March 17, 2005, which is also known as St. Patrick s Day. Which day of the week will St. Patrick s Day fall on NEXT YEAR? 8. Try to figure out which day of the week you were born on? Remember that there are 365 days in most years and 366 days in leap years (.,1992, 1996, 2000, 2004,.).

3 CRYPTOGRAPHY We hope you understood the modular arithmetic lesson. This kind of mathematics is used in defending the United States and other countries during wars and other times when there is information that has to be kept confidential. It was used during the Civil War in the 1860's and even thousands of years ago during Caesar's Roman Empire. People who wanted to communicate with allies but not their enemies would send encrypted messages back and forth. An encrypted message takes the letters and numbers of a message and transforms them into a different series of letters and numbers that do not make sense unless you know the code to unscramble them. If you know the code, then you can read the message. Amazingly complex scrambling procedures can stump highly trained people and even computers. We will talk about simple ciphers. A cipher is the method by which you encrypt a message. Before we begin, we must first create a numerical alphabet by assigning numbers, beginning with zero, to each letter of the 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 Most ciphers use modular arithmetic during some steps of the encryption and decryption process. We have used the numbers 0 through 25 to represent English letters, so we will use mod 26 in all our cipher examples.

4 SHIFT CIPHER We will encipher the message BRIAN IS A SPY using a shift cipher of 7, or a shift key of 7. Step 1: We translate our message into our numerical alphabet. B R I A N I S A S P Y Step 2: We now shift our cipher by adding our shift value (7) to each of the numbers from our codewords. B: I: S: R: S: P: I: Y: A: A: N: Step 3: We now translate the numbers back into our letters using our numerical alphabet. So BRIAN IS A SPY becomes To make life harder for spies, most encrypters remove punctuation and group the letters in "words" that are usually five letters long. Therefore BRIAN IS A SPY, with a shift key of 7, is really written: Another Example: Encipher the message Shamrock Shake using a shift key of 20. DECIPHERING AN ENCODED MESSAGE. Suppose you know the shift key is 10. Decrypt the following message. (What would you need to do to each letter to get your original letter back?) MBIZD YQBKZ RI

5 Using Frequency of Letters to help us out, if we are using a shift cipher Table 1: Frequency of occurrence of the 26 Letters in a random sample of 100 characters Letter Frequency Letter Frequency A N B O C P D Q E R F S G T H U I V J W K X L Y M Z Suppose we have the following ciphertext, which has been enciphered using the shift cipher: DPYOT YCPTY QZCNP XPYED TXXPO TLEPW J 1. What is the most frequent letter used in this ciphertext? 2. If is e, then our key is. If is e, then our key is 3. Decode the message using the cheat sheet handout for each of the possible keys.

6 0 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 1 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 A 2 C 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 P 3 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 l 4 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 D a 5 F G H I J K L M N O P Q R S T U V W X Y Z A B C D E i 6 G H I J K L M N O P Q R S T U V W X Y Z A B C D E F n 7 H I J K L M N O P Q R S T U V W X Y Z A B C D E F G t 8 I J K L M N O P Q R S T U V W X Y Z A B C D E F G H e 9 J K L M N O P Q R S T U V W X Y Z A B C D E F G H I x 10 K L M N O P Q R S T U V W X Y Z A B C D E F G H I J t 11 L M N O P Q R S T U V W X Y Z A B C D E F G H I J K 12 M N O P Q R S T U V W X Y Z A B C D E F G H I J K L 13 N O P Q R S T U V W X Y Z A B C D E F G H I J K L M 14 O P Q R S T U V W X Y Z A B C D E F G H I J K L M N 15 P Q R S T U V W X Y Z A B C D E F G H I J K L M N O 16 Q R S T U V W X Y Z A B C D E F G H I J K L M N O P 17 R S T U V W X Y Z A B C D E F G H I J K L M N O P Q 18 S T U V W X Y Z A B C D E F G H I J K L M N O P Q R 19 T U V W X Y Z A B C D E F G H I J K L M N O P Q R S 20 U V W X Y Z A B C D E F G H I J K L M N O P Q R S T 21 V W X Y Z A B C D E F G H I J K L M N O P Q R S T U 22 W X Y Z A B C D E F G H I J K L M N O P Q R S T U V 23 X Y Z A B C D E F G H I J K L M N O P Q R S T U V W 24 Y Z A B C D E F G H I J K L M N O P Q R S T U V W X 25 Z 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

7 MULTIPLICATION CIPHER This is similar to the shift cipher, except that you multiply and divide instead of add and subtract. We'll start with a simple example. Let's work with the word SIMPLE SIMPLE in the numeric alphabet is 1) We will use the "multiplier" 7. Multiply the numeric alphabet numbers each by the "multiplier" and do (mod 26). S becomes I becomes M becomes P becomes L becomes E becomes 2) Use the multiplier 10 and encrypt the word FANS. (F =5, A = 0, N = 13, S = 18) 3) Does this seem right to you? Why do you think this happened? 4) Which multipliers will be okay when doing (mod 26)? Decrypting a multiplier cipher How do we decrypt a message using the multiplication cipher? We already know that SIMPLE encrypted with multiplier 7 is WEGBZC. How do we get back to SIMPLE from WEGBZC? Before we answer this question, let s first go back to something we already know how to do. If we wanted to solve 7x=33, we multiply 7 by its multiplicative inverse 1/7. This gives us 1 on the left hand side. Decipher WEGBZC: we need to multiply each number by the inverse of 7 in modular arithmetic. The inverse of 7 (mod 26) is a number N so that 7*N is equal to 1 (mod 26). 5) What is the inverse of 7 (mod 26)? 6) Now multiply each letter in WEGBZC by your answer to get back to SIMPLE

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.

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. ( c ) E p s t e i n, C a r t e r, B o l l i n g e r, A u r i s p a C h a p t e r 17: I n f o r m a t i o n S c i e n c e P a g e 1 CHAPTER 17: Information Science 17.1 Binary Codes Normal numbers we use

More information

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

Cryptography. P. Danziger. Transmit...Bob... 10.4 Cryptography P. Danziger 1 Cipher Schemes A cryptographic scheme is an example of a code. The special requirement is that the encoded message be difficult to retrieve without some special piece of

More information

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

The Vigenère cipher is a stronger version of the Caesar cipher The encryption key is a word/sentence/random text ( and ) A Better Cipher The Vigenère cipher is a stronger version of the Caesar cipher The encryption key is a word/sentence/random text ( and ) To the first letter, add 1 To the second letter, add 14 To the third

More information

( 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

( 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 ( 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 2 0 1 6 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 CHAPTER 17: Information Science In this chapter, we learn how data can

More information

Public Key Cryptography

Public Key Cryptography Public Key Cryptography Spotlight on Science J. Robert Buchanan Department of Mathematics 2011 What is Cryptography? cryptography: study of methods for sending messages in a form that only be understood

More information

Powers in Modular Arithmetic, and RSA Public Key Cryptography

Powers in Modular Arithmetic, and RSA Public Key Cryptography 1 Powers in Modular Arithmetic, and RSA Public Key Cryptography Lecture notes for Access 2006, by Nick Korevaar. It was a long time from Mary Queen of Scotts and substitution ciphers until the end of the

More information

Clock Arithmetic and Euclid s Algorithm

Clock Arithmetic and Euclid s Algorithm Clock Arithmetic and Euclid s Algorithm Lecture notes for Access 2008 by Erin Chamberlain. Earlier we discussed Caesar Shifts and other substitution ciphers, and we saw how easy it was to break these ciphers

More information

Cryptography and Number Theory

Cryptography and Number Theory Chapter 2 Cryptography and Number Theory 2.1 Cryptography and Modular Arithmetic 2.1.1 Introduction to Cryptography For thousands of years people have searched for ways to send messages in secret. For

More information

Week 7 An Application to Cryptography

Week 7 An Application to Cryptography SECTION 9. EULER S GENERALIZATION OF FERMAT S THEOREM 55 Week 7 An Application to Cryptography Cryptography the study of the design and analysis of mathematical techniques that ensure secure communications

More information

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

Final Exam Math 105: Topics in Mathematics Cryptology, the Science of Secret Writing Rhodes College Tuesday, 30 April :30 11:00 a.m. Final Exam Math 10: Topics in Mathematics Cryptology, the Science of Secret Writing Rhodes College Tuesday, 0 April 2002 :0 11:00 a.m. Instructions: Please be as neat as possible (use a pencil), and show

More information

secretsaremadetobefoundoutwithtime UGETGVUCTGOCFGVQDGHQWPFQWVYKVJVKOG Breaking the Code

secretsaremadetobefoundoutwithtime UGETGVUCTGOCFGVQDGHQWPFQWVYKVJVKOG Breaking the Code Breaking the Code To keep your secret is wisdom; but to expect others to keep it is folly. Samuel Johnson Secrets are made to be found out with time Charles Sanford Codes have been used by the military

More information

Chapter 2 Classical Cryptosystems

Chapter 2 Classical Cryptosystems Chapter 2 Classical Cryptosystems Note We will use the convention that plaintext will be lowercase and ciphertext will be in all capitals. 2.1 Shift Ciphers The idea of the Caesar cipher: To encrypt, shift

More information

Fall 2017 September 20, Written Homework 02

Fall 2017 September 20, Written Homework 02 CS1800 Discrete Structures Profs. Aslam, Gold, & Pavlu Fall 2017 September 20, 2017 Assigned: Wed 20 Sep 2017 Due: Fri 06 Oct 2017 Instructions: Written Homework 02 The assignment has to be uploaded to

More information

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

CPE 776:DATA SECURITY & CRYPTOGRAPHY. Some Number Theory and Classical Crypto Systems CPE 776:DATA SECURITY & CRYPTOGRAPHY Some Number Theory and Classical Crypto Systems Dr. Lo ai Tawalbeh Computer Engineering Department Jordan University of Science and Technology Jordan Some Number Theory

More information

Homework 4 for Modular Arithmetic: The RSA Cipher

Homework 4 for Modular Arithmetic: The RSA Cipher Homework 4 for Modular Arithmetic: The RSA Cipher Gregory V. Bard April 25, 2018 This is a practice workbook for the RSA cipher. It is not suitable for learning the RSA cipher from scratch. However, there

More information

Introduction. What is RSA. A Guide To RSA by Robert Yates. Topics

Introduction. What is RSA. A Guide To RSA by Robert Yates. Topics A Guide To RSA by Robert Yates. Topics Introduction...01/09 What is RSA...01/09 Mod-Exponentiation...02/09 Euler's Theorem...03/09 RSA Algorithm...08/09 RSA Security...09/09 Introduction Welcome to my

More information

10 Modular Arithmetic and Cryptography

10 Modular Arithmetic and Cryptography 10 Modular Arithmetic and Cryptography 10.1 Encryption and Decryption Encryption is used to send messages secretly. The sender has a message or plaintext. Encryption by the sender takes the plaintext and

More information

5. Classical Cryptographic Techniques from modular arithmetic perspective

5. Classical Cryptographic Techniques from modular arithmetic perspective . Classical Cryptographic Techniques from modular arithmetic perspective By classical cryptography we mean methods of encipherment that have been used from antiquity through the middle of the twentieth

More information

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

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Module No. # 01 Lecture No. # 08 Shannon s Theory (Contd.)

More information

For your quiz in recitation this week, refer to these exercise generators:

For your quiz in recitation this week, refer to these exercise generators: Monday, Oct 29 Today we will talk about inverses in modular arithmetic, and the use of inverses to solve linear congruences. For your quiz in recitation this week, refer to these exercise generators: GCD

More information

An Introduction to Cryptography

An Introduction to Cryptography An Introduction to Cryptography Spotlight on Science J. Robert Buchanan Department of Mathematics Spring 2008 What is Cryptography? cryptography: study of methods for sending messages in a form that only

More information

COMM1003. Information Theory. Dr. Wassim Alexan Spring Lecture 5

COMM1003. Information Theory. Dr. Wassim Alexan Spring Lecture 5 COMM1003 Information Theory Dr. Wassim Alexan Spring 2018 Lecture 5 The Baconian Cipher A mono alphabetic cipher invented by Sir Francis Bacon In this cipher, each letter is replaced by a sequence of five

More information

CSCI3381-Cryptography

CSCI3381-Cryptography CSCI3381-Cryptography Lecture 2: Classical Cryptosystems September 3, 2014 This describes some cryptographic systems in use before the advent of computers. All of these methods are quite insecure, from

More information

MODULAR ARITHMETIC KEITH CONRAD

MODULAR ARITHMETIC KEITH CONRAD MODULAR ARITHMETIC KEITH CONRAD. Introduction We will define the notion of congruent integers (with respect to a modulus) and develop some basic ideas of modular arithmetic. Applications of modular arithmetic

More information

Implementation Tutorial on RSA

Implementation Tutorial on RSA Implementation Tutorial on Maciek Adamczyk; m adamczyk@umail.ucsb.edu Marianne Magnussen; mariannemagnussen@umail.ucsb.edu Adamczyk and Magnussen Spring 2018 1 / 13 Overview Implementation Tutorial Introduction

More information

MONOALPHABETIC CIPHERS AND THEIR MATHEMATICS. CIS 400/628 Spring 2005 Introduction to Cryptography

MONOALPHABETIC CIPHERS AND THEIR MATHEMATICS. CIS 400/628 Spring 2005 Introduction to Cryptography MONOALPHABETIC CIPHERS AND THEIR MATHEMATICS CIS 400/628 Spring 2005 Introduction to Cryptography This is based on Chapter 1 of Lewand and Chapter 1 of Garrett. MONOALPHABETIC SUBSTITUTION CIPHERS These

More information

The Hill Cipher A Linear Algebra Perspective

The Hill Cipher A Linear Algebra Perspective The Hill Cipher A Linear Algebra Perspective Contents 1 Introduction to Classical Cryptography 3 1.1 Alice, Bob & Eve................................. 3 1.2 Types of Attacks.................................

More information

Number Theory in Cryptography

Number Theory in Cryptography Number Theory in Cryptography Introduction September 20, 2006 Universidad de los Andes 1 Guessing Numbers 2 Guessing Numbers (person x) (last 6 digits of phone number of x) 3 Guessing Numbers (person x)

More information

Notes 10: Public-key cryptography

Notes 10: Public-key cryptography MTH6115 Cryptography Notes 10: Public-key cryptography In this section we look at two other schemes that have been proposed for publickey ciphers. The first is interesting because it was the earliest such

More information

The RSA public encryption scheme: How I learned to stop worrying and love buying stuff online

The RSA public encryption scheme: How I learned to stop worrying and love buying stuff online The RSA public encryption scheme: How I learned to stop worrying and love buying stuff online Anthony Várilly-Alvarado Rice University Mathematics Leadership Institute, June 2010 Our Goal Today I will

More information

Using Matrices for Cryptography

Using Matrices for Cryptography Using Matrices for Cryptography In the newspaper, usually on the comics page, there will be a puzzle that looks similar to this: BRJDJ WT X BWUJ AHD PJYXDBODJ JQJV ZRJV GRJDJ T VH EJDBXWV YSXEJ BH FH 1

More information

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

Candidates must show on each answer book the type of calculator used. Only calculators permitted under UEA Regulations may be used. UNIVERSITY OF EAST ANGLIA School of Mathematics May/June UG Examination 2010 2011 CRYPTOGRAPHY Time allowed: 2 hours Attempt THREE questions. Candidates must show on each answer book the type of calculator

More information

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

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Module No. # 01 Lecture No. # 33 The Diffie-Hellman Problem

More information

Math Circles Cryptography

Math Circles Cryptography Math Circles Cryptography Nickolas Rollick nrollick@uwaterloo.ca March 7, 2018 Introduction Last time, we talked about public key cryptography, an idea from the 1970s that opened the door for encryption

More information

Sol: First, calculate the number of integers which are relative prime with = (1 1 7 ) (1 1 3 ) = = 2268

Sol: First, calculate the number of integers which are relative prime with = (1 1 7 ) (1 1 3 ) = = 2268 ò{çd@àt ø 2005.0.3. Suppose the plaintext alphabets include a z, A Z, 0 9, and the space character, therefore, we work on 63 instead of 26 for an affine cipher. How many keys are possible? What if we add

More information

Mathematics: Modeling Our World Unit 2: SECRET CODES SUPPLEMENTAL ACTIVITY THE GOLD BUG S2.1

Mathematics: Modeling Our World Unit 2: SECRET CODES SUPPLEMENTAL ACTIVITY THE GOLD BUG S2.1 Mathematics: Modeling Our World Unit 2: SECRET CODES SUPPLEMENTAL ACTIVITY THE GOLD BUG S2.1 In The Gold Bug by Edgar Allan Poe, the character William Legrand stumbles across what appears to be a coded

More information

Number theory (Chapter 4)

Number theory (Chapter 4) EECS 203 Spring 2016 Lecture 12 Page 1 of 8 Number theory (Chapter 4) Review Compute 6 11 mod 13 in an efficient way What is the prime factorization of 100? 138? What is gcd(100, 138)? What is lcm(100,138)?

More information

Math 412: Number Theory Lecture 13 Applications of

Math 412: Number Theory Lecture 13 Applications of Math 412: Number Theory Lecture 13 Applications of Gexin Yu gyu@wm.edu College of William and Mary Partition of integers A partition λ of the positive integer n is a non increasing sequence of positive

More information

My brief introduction to cryptography

My brief introduction to cryptography My brief introduction to cryptography David Thomson dthomson@math.carleton.ca Carleton University September 7, 2013 introduction to cryptography September 7, 2013 1 / 28 Outline 1 The general framework

More information

ECE 646 Lecture 5. Mathematical Background: Modular Arithmetic

ECE 646 Lecture 5. Mathematical Background: Modular Arithmetic ECE 646 Lecture 5 Mathematical Background: Modular Arithmetic Motivation: Public-key ciphers RSA as a trap-door one-way function PUBLIC KEY message ciphertext M C = f(m) = M e mod N C M = f -1 (C) = C

More information

Introduction to Cryptology Dr. Sugata Gangopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Roorkee

Introduction to Cryptology Dr. Sugata Gangopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Roorkee Introduction to Cryptology Dr. Sugata Gangopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Roorkee Lecture 05 Problem discussion on Affine cipher and perfect secrecy

More information

Modular Arithmetic Instructor: Marizza Bailey Name:

Modular Arithmetic Instructor: Marizza Bailey Name: Modular Arithmetic Instructor: Marizza Bailey Name: 1. Introduction to Modular Arithmetic If someone asks you what day it is 145 days from now, what would you answer? Would you count 145 days, or find

More information

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

Univ.-Prof. Dr. rer. nat. Rudolf Mathar. Written Examination. Cryptography. Tuesday, August 29, 2017, 01:30 p.m. Cryptography Univ.-Prof. Dr. rer. nat. Rudolf Mathar 1 2 3 4 15 15 15 15 60 Written Examination Cryptography Tuesday, August 29, 2017, 01:30 p.m. Name: Matr.-No.: Field of study: Please pay attention to

More information

CHAPTER 12 CRYPTOGRAPHY OF A GRAY LEVEL IMAGE USING A MODIFIED HILL CIPHER

CHAPTER 12 CRYPTOGRAPHY OF A GRAY LEVEL IMAGE USING A MODIFIED HILL CIPHER 177 CHAPTER 12 CRYPTOGRAPHY OF A GRAY LEVEL IMAGE USING A MODIFIED HILL CIPHER 178 12.1 Introduction The study of cryptography of gray level images [110, 112, 118] by using block ciphers has gained considerable

More information

CRYPTOGRAPHY AND LARGE PRIMES *

CRYPTOGRAPHY AND LARGE PRIMES * CRYPTOGRAPHY AND LARGE PRIMES * B. Hartley University of Manchester, England, and National University of Singapore The word "cryptography" derives from Greek and means "secret writing". Since ancient times,

More information

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

Cristina Nita-Rotaru. CS355: Cryptography. Lecture 4: Enigma. CS355: Cryptography Lecture 4: Enigma. Towards cryptographic engines } How to move from pencil and paper to more automatic ways of encrypting and decrypting? } How to design more secure ciphers } Alberti

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 3 January 22, 2013 CPSC 467b, Lecture 3 1/35 Perfect secrecy Caesar cipher Loss of perfection Classical ciphers One-time pad Affine

More information

You separate binary numbers into columns in a similar fashion. 2 5 = 32

You separate binary numbers into columns in a similar fashion. 2 5 = 32 RSA Encryption 2 At the end of Part I of this article, we stated that RSA encryption works because it s impractical to factor n, which determines P 1 and P 2, which determines our private key, d, which

More information

6.080/6.089 GITCS April 8, Lecture 15

6.080/6.089 GITCS April 8, Lecture 15 6.080/6.089 GITCS April 8, 2008 Lecturer: Scott Aaronson Lecture 15 Scribe: Tiffany Wang 1 Administrivia Midterms have been graded and the class average was 67. Grades will be normalized so that the average

More information

Math 1350 (FALL 2008) Prelim 1 (10/6/2008) 1. Solution. For the Atbash cipher for the Roman alphabet we have

Math 1350 (FALL 2008) Prelim 1 (10/6/2008) 1. Solution. For the Atbash cipher for the Roman alphabet we have Math 1350 (FALL 2008) Prelim 1 (10/6/2008) 1 1. (8 pts) Decrypt the following message, which was enciphered using the Atbash cipher. GSVYZ WMVDH RHGRN VUORV HGSVT LLWMV DHRHB LFIVG SVKRO LG Solution. For

More information

A Birthday is No Ordinary Day PP STEM K-2

A Birthday is No Ordinary Day PP STEM K-2 A Birthday is No Ordinary Day PP STEM K-2 Lesson Objectives Science and Engineering Practices Analyzing and Interpreting Data Using Mathematics and Computational Thinking Disciplinary Core Ideas ESS1.B

More information

NHMZK LWOGM PLMXG OBMLE LLOXA RURRJ MIZKL OGYHM KL

NHMZK LWOGM PLMXG OBMLE LLOXA RURRJ MIZKL OGYHM KL Math 139 Solution Final Exam May 2003 1. Decrypt the following, which has been enchipered using a shift cipher. CQNCA XDKUN FRCQC QNAJC AJLNR BCQJC NENWR OHXDF RWHXD ANBCR UUJAJ C Solution: Here s a frequency

More information

Cosc 412: Cryptography and complexity Lecture 7 (22/8/2018) Knapsacks and attacks

Cosc 412: Cryptography and complexity Lecture 7 (22/8/2018) Knapsacks and attacks 1 Cosc 412: Cryptography and complexity Lecture 7 (22/8/2018) Knapsacks and attacks Michael Albert michael.albert@cs.otago.ac.nz 2 This week Arithmetic Knapsack cryptosystems Attacks on knapsacks Some

More information

Simple Math: Cryptography

Simple Math: Cryptography 1 Introduction Simple Math: Cryptography This section develops some mathematics before getting to the application. The mathematics that I use involves simple facts from number theory. Number theory is

More information

Overview. Background / Context. CSC 580 Cryptography and Computer Security. March 21, 2017

Overview. Background / Context. CSC 580 Cryptography and Computer Security. March 21, 2017 CSC 580 Cryptography and Computer Security Math for Public Key Crypto, RSA, and Diffie-Hellman (Sections 2.4-2.6, 2.8, 9.2, 10.1-10.2) March 21, 2017 Overview Today: Math needed for basic public-key crypto

More information

Great Theoretical Ideas in Computer Science

Great Theoretical Ideas in Computer Science 15-251 Great Theoretical Ideas in Computer Science Lecture 22: Cryptography November 12th, 2015 What is cryptography about? Adversary Eavesdropper I will cut your throat I will cut your throat What is

More information

1 Modular Arithmetic Grade Level/Prerequisites: Time: Materials: Preparation: Objectives: Navajo Nation Math Circle Connection

1 Modular Arithmetic Grade Level/Prerequisites: Time: Materials: Preparation: Objectives: Navajo Nation Math Circle Connection 1 Modular Arithmetic Students will explore a type of arithmetic that results from arranging numbers in circles instead of on a number line. Students make and prove conjectures about patterns relating to

More information

Math 299 Supplement: Modular Arithmetic Nov 8, 2013

Math 299 Supplement: Modular Arithmetic Nov 8, 2013 Math 299 Supplement: Modular Arithmetic Nov 8, 2013 Numbers modulo n. We have previously seen examples of clock arithmetic, an algebraic system with only finitely many numbers. In this lecture, we make

More information

Lecture 6: Introducing Complexity

Lecture 6: Introducing Complexity COMP26120: Algorithms and Imperative Programming Lecture 6: Introducing Complexity Ian Pratt-Hartmann Room KB2.38: email: ipratt@cs.man.ac.uk 2015 16 You need this book: Make sure you use the up-to-date

More information

Numbers and symbols WHOLE NUMBERS: 1, 2, 3, 4, 5, 6, 7, 8, 9... INTEGERS: -4, -3, -2, -1, 0, 1, 2, 3, 4...

Numbers and symbols WHOLE NUMBERS: 1, 2, 3, 4, 5, 6, 7, 8, 9... INTEGERS: -4, -3, -2, -1, 0, 1, 2, 3, 4... Numbers and symbols The expression of numerical quantities is something we tend to take for granted. This is both a good and a bad thing in the study of electronics. It is good, in that we're accustomed

More information

MATH 135 Algebra, Solutions to Assignment 10

MATH 135 Algebra, Solutions to Assignment 10 MATH 135 Algebra, Solutions to Assignment 10 1: (a) The name of a mathematician was encoded using a Caesar cypher to give the cyphertext below. Decrypt the cyphertext. ZPXGDY Solution: We list all 6 possibilities.

More information

19 Lorenz Cipher Machine

19 Lorenz Cipher Machine 9 Lorenz Cipher Machine During the Second World War, the codebreakers at Bletchley Park devised a variety of techniques that enabled the Allies to break the major codes used by the Germans. Not only was

More information

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

1/16 2/17 3/17 4/7 5/10 6/14 7/19 % Please do not write in the spaces above. 1/16 2/17 3/17 4/7 5/10 6/14 7/19 % Please do not write in the spaces above. Directions: You have 75 minutes in which to complete this exam. Please make sure that you read through this entire exam before

More information

Cryptography. pieces from work by Gordon Royle

Cryptography. pieces from work by Gordon Royle Cryptography pieces from work by Gordon Royle The set-up Cryptography is the mathematics of devising secure communication systems, whereas cryptanalysis is the mathematics of breaking such systems. We

More information

Constrained and Unconstrained Optimization Prof. Adrijit Goswami Department of Mathematics Indian Institute of Technology, Kharagpur

Constrained and Unconstrained Optimization Prof. Adrijit Goswami Department of Mathematics Indian Institute of Technology, Kharagpur Constrained and Unconstrained Optimization Prof. Adrijit Goswami Department of Mathematics Indian Institute of Technology, Kharagpur Lecture - 01 Introduction to Optimization Today, we will start the constrained

More information

Jay Daigle Occidental College Math 401: Cryptology

Jay Daigle Occidental College Math 401: Cryptology 3 Block Ciphers Every encryption method we ve studied so far has been a substitution cipher: that is, each letter is replaced by exactly one other letter. In fact, we ve studied stream ciphers, which produce

More information

NUMBER THEORY AND CRYPTOGRAPHY

NUMBER THEORY AND CRYPTOGRAPHY NUMBER THEORY AND CRYPTOGRAPHY KEITH CONRAD 1. Introduction Cryptography is the study of secret messages. For most of human history, cryptography was important primarily for military or diplomatic purposes

More information

A Taste of Pi: Clocks, Set, and the Secret Math of Spies

A Taste of Pi: Clocks, Set, and the Secret Math of Spies A Taste of Pi: Clocks, Set, and the Secret Math of Spies Katherine E. Stange SFU / PIMS-UBC October 16, 2010 The Math of Clocks Here is a picture of a clock. The Math of Clocks Here is a picture of a clock.

More information

Simple Codes MTH 440

Simple Codes MTH 440 Simple Codes MTH 440 Not all codes are for the purpose of secrecy Morse Code ASCII Zip codes Area codes Library book codes Credit Cards ASCII Code Steganography: Hidden in plain sight (example from http://www.bbc.co.uk/news/10

More information

Note: This essay is extracted from a Lesson from the forthcoming textbook Mathematics: Building on Foundations.

Note: This essay is extracted from a Lesson from the forthcoming textbook Mathematics: Building on Foundations. One of the pleasant memories of childhood is playing hide and seek or making up secret codes so that only you and your closest friend can communicate in complete privacy. Maybe some of you tried something

More information

History of Maths andx

History of Maths andx History of Maths andx where x Cryptography Substitution ciphers: Ancient - Renaissance A talk at the University of Nottingham by Peter Rowlett "The history of codes and ciphers is the story of the centuries-old

More information

Grade 7 and 8 Math Circles March 19th/20th/21st. Crytography

Grade 7 and 8 Math Circles March 19th/20th/21st. Crytography Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Grade 7 and 8 Math Circles March 19th/20th/21st Crytography Introduction Before we begin, it s important

More information

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

University of Regina Department of Mathematics & Statistics Final Examination (April 21, 2009) Make sure that this examination has 10 numbered pages University of Regina Department of Mathematics & Statistics Final Examination 200910 (April 21, 2009) Mathematics 124 The Art and Science of Secret

More information

Classical Cryptography

Classical Cryptography Classical Cryptography CSG 252 Fall 2006 Riccardo Pucella Goals of Cryptography Alice wants to send message X to Bob Oscar is on the wire, listening to communications Alice and Bob share a key K Alice

More information

Algebra 1B notes and problems March 12, 2009 Factoring page 1

Algebra 1B notes and problems March 12, 2009 Factoring page 1 March 12, 2009 Factoring page 1 Factoring Last class, you worked on a set of problems where you had to do multiplication table calculations in reverse. For example, given the answer x 2 + 4x + 2x + 8,

More information

Clock Arithmetic. 1. If it is 9 o clock and you get out of school in 4 hours, when do you get out of school?

Clock Arithmetic. 1. If it is 9 o clock and you get out of school in 4 hours, when do you get out of school? Clock Arithmetic We are going to learn all about clock addition and the relationship to remainders when you divide numbers. 1 Standard Clock Addition 1. If it is 9 o clock and you get out of school in

More information

CLASSICAL ENCRYPTION. Mihir Bellare UCSD 1

CLASSICAL ENCRYPTION. Mihir Bellare UCSD 1 CLASSICAL ENCRYPTION Mihir Bellare UCSD 1 Syntax A symmetric encryption scheme SE = (K, E, D) consists of three algorithms: (Adversary) Mihir Bellare UCSD 2 Correct decryption requirement For all K, M

More information

Quantum Entanglement and Cryptography. Deepthi Gopal, Caltech

Quantum Entanglement and Cryptography. Deepthi Gopal, Caltech + Quantum Entanglement and Cryptography Deepthi Gopal, Caltech + Cryptography Concisely: to make information unreadable by anyone other than the intended recipient. The sender of a message scrambles/encrypts

More information

ECE 646 Lecture 5. Motivation: Mathematical Background: Modular Arithmetic. Public-key ciphers. RSA keys. RSA as a trap-door one-way function

ECE 646 Lecture 5. Motivation: Mathematical Background: Modular Arithmetic. Public-key ciphers. RSA keys. RSA as a trap-door one-way function ECE Lecture 5 Mathematical Background: Modular Arithmetic Motivation: Public-key ciphers RSA as a trap-door one-way function PUBLIC KEY message ciphertext M C = f(m) = M e mod N C RSA keys PUBLIC KEY PRIVATE

More information

Introduction to Cryptography for the Mathematically Challenged

Introduction to Cryptography for the Mathematically Challenged Introduction to Cryptography for the Mathematically Challenged Leo Liberti Centre for Process Systems Engineering Imperial College of Science, Technology and Medicine October 31, 2000 1 Introduction The

More information

Introduction to Cryptography

Introduction to Cryptography T H E U N I V E R S I T Y O F B R I T I S H C O L U M B I A Introduction to Cryptography EECE 412 1 Module Outline Historical background Classic ciphers One-time pad The Random Oracle model Random functions:

More information

Introduction to Cryptography

Introduction to Cryptography Introduction to Cryptography Hong-Jian Lai West Virginia University, Morgantown, WV 26506-6310 Version 2007 March 2, 2007 TABLE OF CONTENTS I. Divisibility.............................................................................

More information

Daily Start Monday TT 2015.notebook. November 30, 2015

Daily Start Monday TT 2015.notebook. November 30, 2015 1 EVERYDAY MATH LESSON 4.1 Created by: Brian Salco Rocky River City Schools 2015 2 For today's lesson you will need: * Dry erase board * Dry erase marker & eraser * Math Journal 1 * Pencil * Toolkit Clocks

More information

Encryption: The RSA Public Key Cipher

Encryption: The RSA Public Key Cipher Encryption: The RSA Public Key Cipher Michael Brockway March 5, 2018 Overview Transport-layer security employs an asymmetric public cryptosystem to allow two parties (usually a client application and a

More information

What is Cryptography? by Amit Konar, Dept. of Math and CS, UMSL

What is Cryptography? by Amit Konar, Dept. of Math and CS, UMSL What is Cryptography? by Amit Konar, Dept. of Math and CS, UMSL Definition: Cryptosystem Cryptography means secret writing and it is the art of concealing meaning. A Cryptosystem is a 5-tuple(E, D,M,K,C),

More information

Zero. Grade Level: 1-3

Zero. Grade Level: 1-3 Zero Grade Level: 1-3 Teacher Guidelines pages 1 2 Instructional Pages pages 3 5 Activity Page pages 6 Practice Page page 7 Homework Page page 8 Answer Key page 9 Classroom Procedure: Approximate Grade

More information

COMP6053 lecture: Sampling and the central limit theorem. Jason Noble,

COMP6053 lecture: Sampling and the central limit theorem. Jason Noble, COMP6053 lecture: Sampling and the central limit theorem Jason Noble, jn2@ecs.soton.ac.uk Populations: long-run distributions Two kinds of distributions: populations and samples. A population is the set

More information

Algebra: Linear UNIT 16 Equations Lesson Plan 1

Algebra: Linear UNIT 16 Equations Lesson Plan 1 1A UNIT 16 Equations Lesson Plan 1 Introduction to coding T: Today we're going to code and decode letters and numbers. OS 16.1 T: What can you see on the OHP? (A circle with letters in it) T: How is it

More information

and its Extension to Authenticity

and its Extension to Authenticity EWSCS 06 almse, Estonia 5-10 March 2006 Lecture 1: Shannon s Theory of Secrecy and its Extension to Authenticity James L. Massey rof.-em. ETH Zürich, Adjunct rof., Lund Univ., Sweden, and Tech. Univ. of

More information

International Journal of Pure and Applied Mathematics Volume 5 No , A PUBLIC-KEY CRYPTOSYSTEM BASED ON DIOPHANTINE EQUATIONS

International Journal of Pure and Applied Mathematics Volume 5 No , A PUBLIC-KEY CRYPTOSYSTEM BASED ON DIOPHANTINE EQUATIONS International Journal of Pure and Applied Mathematics Volume 5 No. 2 2003, 135-140 A PUBLIC-KEY CRYPTOSYSTEM BASED ON DIOPHANTINE EQUATIONS Mohammad Bagheri 1, Nader Dastranj 2, Gholamreza Jandaghi 1 1

More information

Innovation and Cryptoventures. Cryptology. Campbell R. Harvey. Duke University, NBER and Investment Strategy Advisor, Man Group, plc.

Innovation and Cryptoventures. Cryptology. Campbell R. Harvey. Duke University, NBER and Investment Strategy Advisor, Man Group, plc. Innovation and Cryptoventures Cryptology Campbell R. Harvey Duke University, NBER and Investment Strategy Advisor, Man Group, plc January 20, 2017 Overview Cryptology Cryptography Cryptanalysis Symmetric

More information

What is proof? Lesson 1

What is proof? Lesson 1 What is proof? Lesson The topic for this Math Explorer Club is mathematical proof. In this post we will go over what was covered in the first session. The word proof is a normal English word that you might

More information

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors Math.3336: Discrete Mathematics Primes and Greatest Common Divisors Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu

More information

Lecture (04) Classical Encryption Techniques (III)

Lecture (04) Classical Encryption Techniques (III) Lecture (04) Classical Encryption Techniques (III) Dr. Ahmed M. ElShafee ١ Playfair Cipher one approach to improve security was to encrypt multiple letters the Playfair Cipher is an example invented by

More information

one approach to improve security was to encrypt multiple letters invented by Charles Wheatstone in 1854, but named after his

one approach to improve security was to encrypt multiple letters invented by Charles Wheatstone in 1854, but named after his Lecture (04) Classical Encryption Techniques (III) Dr. Ahmed M. ElShafee ١ The rules for filling in this 5x5 matrix are: L to R, top to bottom, first with keyword after duplicate letters have been removed,

More information

1 Recommended Reading 1. 2 Public Key/Private Key Cryptography Overview RSA Algorithm... 2

1 Recommended Reading 1. 2 Public Key/Private Key Cryptography Overview RSA Algorithm... 2 Contents 1 Recommended Reading 1 2 Public Key/Private Key Cryptography 1 2.1 Overview............................................. 1 2.2 RSA Algorithm.......................................... 2 3 A Number

More information

Chapter Three. Deciphering the Code. Understanding Notation

Chapter Three. Deciphering the Code. Understanding Notation Chapter Three Deciphering the Code Mathematics has its own vocabulary. In addition to words, mathematics uses its own notation, symbols that stand for more complicated ideas. Some of these elements are

More information

THE RSA CRYPTOSYSTEM

THE RSA CRYPTOSYSTEM THE RSA CRYPTOSYSTEM SILVIA ROBLES Abstract. This paper explores the history and mathematics behind the RSA cryptosystem, including the idea of public key cryptosystems and number theory. It outlines the

More information

Mathematical Foundations of Cryptography

Mathematical Foundations of Cryptography Mathematical Foundations of Cryptography Cryptography is based on mathematics In this chapter we study finite fields, the basis of the Advanced Encryption Standard (AES) and elliptical curve cryptography

More information

Security of Networks (12) Exercises

Security of Networks (12) Exercises (12) Exercises 1.1 Below are given four examples of ciphertext, one obtained from a Substitution Cipher, one from a Vigenere Cipher, one from an Affine Cipher, and one unspecified. In each case, the task

More information