Modern Cryptography Activity 1: Caesar Ciphers

Similar documents
A nice outline of the RSA algorithm and implementation can be found at:

Public Key Cryptography and the RSA Cryptosystem

Cryptography Worksheet

Cryptography Symmetric Cryptography Asymmetric Cryptography Internet Communication. Telling Secrets. Secret Writing Through the Ages.

Lecture 02: Historical Encryption Schemes. Lecture 02: Historical Encryption Schemes

Math236 Discrete Maths with Applications

Encryption à la Mod Name

Cryptography Lesson Plan

Introduction. CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell

Cryptography (DES+RSA) by Amit Konar Dept. of Math and CS, UMSL

LAB: Public-Key Encryption

Introduction to Cryptology. Lecture 2

Cryptography I ALFE APRTGHAL KAP BQQQ ADCQTPEMY KSANG A KGA-ETAM MFLK FQRUQY

ENGR/CS 101 CS Session Lecture 5

Cryptographic Techniques. Information Technologies for IPR Protections 2003/11/12 R107, CSIE Building

CRYPTOLOGY KEY MANAGEMENT CRYPTOGRAPHY CRYPTANALYSIS. Cryptanalytic. Brute-Force. Ciphertext-only Known-plaintext Chosen-plaintext Chosen-ciphertext

NUMB3RS Activity: Creating Codes. Episode: Backscatter

2/7/2013. CS 472 Network and System Security. Mohammad Almalag Lecture 2 January 22, Introduction To Cryptography

Cryptography. What is Cryptography?

Quantum Encryption Keys

Lecture IV : Cryptography, Fundamentals

Introduction to Cryptography and Security Mechanisms. Abdul Hameed

Cryptography. Intercepting Information Scenario 1. Tuesday, December 9, December 9, Wireless broadcasts information using radio signals

Worksheet - Reading Guide for Keys and Passwords

Recap. Definition (Encryption: Caesar Cipher)

IMPORTANCE OF NUMBER THEORY IN CRYPTOGRAPHY

Cryptanalysis. Ed Crowley

Cryptography ThreeB. Ed Crowley. Fall 08

Classical Cryptography

LECTURE NOTES ON PUBLIC- KEY CRYPTOGRAPHY. (One-Way Functions and ElGamal System)

Cryptography. How to Protect Your Data

JNTU World JNTU World. JNTU World. Cryptography and Network Security. Downloaded From JNTU World ( )( )JNTU World

Introduction to cryptography

Classical Cryptography. Thierry Sans

CS61A Lecture #39: Cryptography

Information Systems Security

RSA (material drawn from Avi Kak Lecture 12, Lecture Notes on "Computer and Network Security" Used in asymmetric crypto.

Algebraic Solutions of Caesar and Multiplicative Ciphers

CSC 580 Cryptography and Computer Security

The Hill Cipher. In 1929 Lester Hill, a professor at Hunter College, published an article in the American

Cryptography. Historical Encoding. Encryption Media. Intro to Encryption 8/24/2010. COMP620 Information Privacy & Security 1

Substitution Ciphers, continued. 3. Polyalphabetic: Use multiple maps from the plaintext alphabet to the ciphertext alphabet.

CSCE 813 Internet Security Symmetric Cryptography

2.3 SUBTITUTION CIPHERS.

Shared Secret = Trust

1-7 Attacks on Cryptosystems

B) Symmetric Ciphers. B.a) Fundamentals B.b) Block Ciphers B.c) Stream Ciphers

Senior Math Circles Cryptography and Number Theory Week 1

A Tour of Classical and Modern Cryptography

CS 332 Computer Networks Security

For decimal numbers we have 10 digits available (0, 1, 2, 3, 9) 10,

The Caesar Cipher Informatics 1 Functional Programming: Tutorial 3

Great Theoretical Ideas in Computer Science. Lecture 27: Cryptography

Topics. Number Theory Review. Public Key Cryptography

Cryptography. Cryptography is much more than. What is Cryptography, exactly? Why Cryptography? (cont d) Straight encoding and decoding

Lecture 6: Overview of Public-Key Cryptography and RSA

Security: Cryptography

Basic Concepts and Definitions. CSC/ECE 574 Computer and Network Security. Outline

Some Stuff About Crypto

Encryption Providing Perfect Secrecy COPYRIGHT 2001 NON-ELEPHANT ENCRYPTION SYSTEMS INC.

Public Key Cryptography

EEC-484/584 Computer Networks

CPSC 467b: Cryptography and Computer Security

CRYPTOGRAPHY. BY, Ayesha Farhin

Cryptography Intro and RSA

Cryptography Basics. IT443 Network Security Administration Slides courtesy of Bo Sheng

Introduction to Cryptography in Blockchain Technology. December 23, 2018

Nature Sunday Academy Lesson Plan

CPSC 467: Cryptography and Computer Security

LECTURE 4: Cryptography

9/30/2016. Cryptography Basics. Outline. Encryption/Decryption. Cryptanalysis. Caesar Cipher. Mono-Alphabetic Ciphers

Cryptosystems. Truong Tuan Anh CSE-HCMUT

ISA 562: Information Security, Theory and Practice. Lecture 1

COMP4109 : Applied Cryptography

OVE EDFORS ELECTRICAL AND INFORMATION TECHNOLOGY

Computers and Security

CSCI 454/554 Computer and Network Security. Topic 2. Introduction to Cryptography

6. Symmetric Block Cipher BLOWFISH Performance. Memory space. 3. Simplicity The length of the key. The length of the data block is 64.

Channel Coding and Cryptography Part II: Introduction to Cryptography

CSC 474/574 Information Systems Security

Classical Encryption Techniques. CSS 322 Security and Cryptography

Chapter 30 Cryptography 30.1

Cryptographic Concepts

Chapter 3 Traditional Symmetric-Key Ciphers 3.1

18-642: Cryptography

Outline. Cryptography. Encryption/Decryption. Basic Concepts and Definitions. Cryptography vs. Steganography. Cryptography: the art of secret writing

Lecture 6 - Cryptography

Math From Scratch Lesson 22: The RSA Encryption Algorithm

Cryptography. Submitted to:- Ms Poonam Sharma Faculty, ABS,Manesar. Submitted by:- Hardeep Gaurav Jain

ICT 6541 Applied Cryptography. Hossen Asiful Mustafa

CS 161 Computer Security

CHAPTER 17 INFORMATION SCIENCE. Binary and decimal numbers a short review: For decimal numbers we have 10 digits available (0, 1, 2, 3, 9) 4731 =

Cryptography (Overview)

Lecture 1: Perfect Security

S. Erfani, ECE Dept., University of Windsor Network Security. 2.3-Cipher Block Modes of operation

2

Introduction to Cryptography and Security Mechanisms: Unit 5. Public-Key Encryption

Encryption Algorithms

C = E(p) = (p + k) mod (n) p = D(C) = (C k) mod (n)

Modular arithme.c and cryptography

Transcription:

Activity 1: Caesar Ciphers Preliminaries: The Caesar cipher is one of the oldest codes in existence. It is an example of a substitution cipher, where each letter in the alphabet is replaced by another letter. In the Caesar cipher, the alphabet is shifted uniformly by some fixed number n. This integer becomes the key for both encoding and decoding messages. It is known as the Caesar cipher because Julius Caesar used this code (with a shift of 3) to encrypt his private notes. Instructions: Select a short message to send to your partner and also select a letter to represent the shift amount. Using the cipher wheel, line up the letter A on the interior circle with the letter that you selected on the exterior circle. Encipher your message one letter at a time by finding the appropriate letter on the interior wheel and writing down the corresponding letter from the exterior wheel. For example, the picture below shows the case where the shift letter is n. Under this shift, the letter P is sent to c. When you have finished encoding your message, pass the encoded message and the letter you selected to your partner. Using the key you receive from your partner, rotate the cipher wheel until it matches up with their key. Then, use the wheel to decode their message one letter at a time, this time reading from the outside wheel onto the inside wheel. In the example below g would decode to T. Discussion: This method of encoding was used for more than 1,000 years before it was broken by an Arabic mathemtician who formalized the notion of frequency analysis. The second table on page 4 shows the frequency that each letter in the English alphabet occurs in the Oxford dictionary. Think about the problems you see with this encryption method and why it is a poor choice for modern cryptography. What could be done differently to fix some of those problems? 1

2 Activity 2: Public Key Cryptography Preliminaries: The purpose of this activity is to gain some intuition for the idea of public key cryptography. Although we generally think of public key cryptography in terms of mass internet communications, the same principles can be applied in many situations. A familiar example is a public mailbox slot, where anyone can deposit a letter, but only the owner has a key to take open the box and remove the letters. In this activity we will explore a more colorful interpretation. Instructions: You have been provided with a blue pen and a black pen, as well as a blue piece of cellophane. The blue pen is your public key and the cellophane is your private key. Using the black pen, write a short message to your partner on an index card. Then, scribble lightly over the text with your black pen. Exchange public keys (colored pens) with your partner. In order to encipher your message, scribble lightly over the index card with the red pen you obtained from your partner (their public key). Exchange encoded messages with your partner. Using the blue cellophane (your private key) try to decipher the message that you have received. More examples will be displayed on the projector and blackboard. Discussion: Note that if a third party intercepts your message they will be unable to read it, even if they possess another copy of the public key (red pen) that was used to encode the message. Similarly, you are the only one that can read messages that have been encrypted with your public key (blue pen). No matter how many blue pens a cryptanalyst has, they will be unable to read your message. This is the key idea of public cryptography; that providing access to the message and public key does not compromise the security of the encryption. How does this idea address the concerns that we considered after the first activity?

Activity 3: RSA Algorithm Preliminaries: The purpose of this activity is to gain experience encoding and decoding messages with the RSA algorithm. These examples use very simplified choices of p, q, and r in order to make the computations feasible in our setting. 3 Setup: Your private key consists of the primes p = 5 and q = 5, so the number 5 5 = 25 will be the first part of your public key. Since ϕ(25) = 4 5 = 20, we can choose r = 3. Since 3 7 = 21 1 (mod 20), we have that x = 7. Thus your public key consists of (25, 3). Write your public key on an index card and exchange keys with your partner. Instructions: Select a message to send to your partner from the list below, The number to the right of the message is the plaintext that you will encrypt and send. Math is fun!! 2 π is my favorite number. 3 e 2πi = 1 4 Cryptography is neat!! 6 Using your partner s public key, compute the ciphertext that corresponds to your message by raising the code number to the appropriate power modulo 25. Notice that since 4 25 = 100 we know that 100 0 (mod 25). This means that only the last two digits of the exponential that you compute are important. For example, 14 6 = 75, 529, 536 36 9 (mod 25). This should make your computation simpler. Write the ciphertext that you have computed on an index card and give it to your partner. Now it is time to decode the message that you have just received. Using your private key (x = 7), compute the original plaintext. This resulting number corresponds to the message that your partner sent. More Decoding: Alice has sent you the following ciphertext message: {7, 9, 1,, 4, 9,, 16, 11, 19} The empty entries in the message represent spaces. Decode the message using your public key and the alphabet conversion table included on the next page.

4 Useful Tables Alphabet Conversion Table Letter Number Letter Number A 1 N 14 B 2 O 15 C 3 P 16 D 4 Q 17 E 5 R 18 F 6 S 19 G 7 T 20 H 8 U 21 I 9 V 22 J 10 W 23 K 11 X 24 L 12 Y 25 M 13 Z 26 English Frequency Analysis Letter Percentage e 12.7% t 9.1% a 8.1% o 7.5% i 7.0% n 6.7% s 6.3% h 6.1% r 6.0% d 4.2% l 4.0% c 2.8% u 2.8% m 2.4% w 2.4% f 2.2% g 2.0% y 2.0% p 1.9% b 1.5% v 1.0% k 0.8% j.2% x.2% q.1% z.1%

5 Activity 3 : RSA Algorithm The purpose of this activity is to gain experience encoding and decoding messages with the RSA algorithm. Setup: Your private key consists of the primes p = 5 and q = 7, so the number 5 7 = 35 will be the first part of your public key. Since ϕ(35) = 4 6 = 24, we can choose r = 5. Since 5 5 = 25 1 (mod 24), we have that x = 5. Thus your public key consists of (35, 5). Instructions: Choose a five letter word to be your secret message. Using the table provided, convert each letter to its numeric counterpart and enter it in the table below. Write your public key on an index card and exchange cards with your partner. Encode your letters one at a time using your partner s public key and give the encrypted message to your partner. Use your private key to decode the message that you receive. Enter the results in the table below and convert the message back to letters. Outgoing Message Letter Number Encoded Number Incoming Message Encoded Number Decoded Number Letter Example Encoding: Example Decoding: Outgoing Message (using partner s public key) Letter Number Encoded Number D 4 4 5 10 (mod 39) Incoming Message (using your private key) Encoded Number Number Letter 12 12 5 17 (mod 35) Q

6 Activity 3 : RSA Algorithm The purpose of this activity is to practice using the RSA public key algorithm. The goal is to succesfully encode a message for your partners using their public keys and succesfully decode the messages that you receive using your private key. (1) Choose a 5 letter word: (2) convert each letter to a number using the provided chart: (3) Your primes are 7 and 13. Notice that 7 13 = 91 and that ϕ(91) = 6 12 = 84 = 3 2 2 3. This lets us choose r = 5 and we can find x = 17 since 5 17 = 85 1 (mod 84). (4) Write your public key: (91, 5) on an index card and reveal it to your partners. (5) Copy your partner s public key here pq = r = (6) Using your partner s public key encrypt your message one letter at a time. For example if their public key is (15, 7) and your first letter is b 2 compute 2 7 = 128 8 (mod 15) and write 2 8. (7) Write the encoded numbers on an index card and hand them to your partner. (8) Write the five encoded numbers you received: (9) One at a time, decode these numbers using your private key. For example, if you recieve the number 4, compute 11 17 = 17179869184 23 (mod 91). (10) Finally, using the provided chart transform the deciphered message back to letters: