Cryptography Made Easy. Stuart Reges Principal Lecturer University of Washington

Similar documents
1 Introduction to Cryptology

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

Cryptography. 2. decoding is extremely difficult (for protection against eavesdroppers);

Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography

MA 111, Topic 2: Cryptography

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

Related Ideas: DHM Key Mechanics

Public Key Cryptography Great Ideas in Theoretical Computer Science Saarland University, Summer 2014

The number theory behind cryptography

Cryptography, Number Theory, and RSA

Cryptography. Module in Autumn Term 2016 University of Birmingham. Lecturers: Mark D. Ryan and David Galindo

MA/CSSE 473 Day 9. The algorithm (modified) N 1

Fermat s little theorem. RSA.

CS70: Lecture 8. Outline.

Xor. Isomorphisms. CS70: Lecture 9. Outline. Is public key crypto possible? Cryptography... Public key crypography.

Diffie-Hellman key-exchange protocol

Public Key Encryption

Classical Cryptography

Math 1111 Math Exam Study Guide

Number Theory and Security in the Digital Age

Lecture 32. Handout or Document Camera or Class Exercise. Which of the following is equal to [53] [5] 1 in Z 7? (Do not use a calculator.

L29&30 - RSA Cryptography

Introduction to Cryptography

CPSC 467: Cryptography and Computer Security

#27: Number Theory, Part II: Modular Arithmetic and Cryptography May 1, 2009

Linear Congruences. The solutions to a linear congruence ax b (mod m) are all integers x that satisfy the congruence.

Drill Time: Remainders from Long Division

Final exam. Question Points Score. Total: 150

Math 1111 Math Exam Study Guide

CHAPTER 2. Modular Arithmetic

Number Theory and Public Key Cryptography Kathryn Sommers

Data security (Cryptography) exercise book

Public Key Cryptography

Historical cryptography 2. CSCI 470: Web Science Keith Vertanen

Solution: Alice tosses a coin and conveys the result to Bob. Problem: Alice can choose any result.

Algorithmic Number Theory and Cryptography (CS 303)

TMA4155 Cryptography, Intro

A STENO HIDING USING CAMOUFLAGE BASED VISUAL CRYPTOGRAPHY SCHEME

A Brief History of Computer Science and Computing

Application: Public Key Cryptography. Public Key Cryptography

Cryptography Math 1580 Silverman First Hour Exam Mon Oct 2, 2017

MC215: MATHEMATICAL REASONING AND DISCRETE STRUCTURES

EE 418: Network Security and Cryptography

Block Ciphers Security of block ciphers. Symmetric Ciphers

Introduction. and Z r1 Z rn. This lecture aims to provide techniques. CRT during the decription process in RSA is explained.

Poker Hands. Christopher Hayes

Synthesis and Analysis of 32-Bit RSA Algorithm Using VHDL

DUBLIN CITY UNIVERSITY

DUBLIN CITY UNIVERSITY

Course Developer: Ranjan Bose, IIT Delhi

Introduction to Modular Arithmetic

La Storia dei Messaggi Segreti fino alle Macchine Crittografiche

Content Page. Odds about Card Distribution P Strategies in defending

Journal of Discrete Mathematical Sciences & Cryptography Vol. ( ), No., pp. 1 10

Math 319 Problem Set #7 Solution 18 April 2002

Lecture 1: Introduction

Cryptography s Application in Numbers Station

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Codes and Nomenclators

EE 418 Network Security and Cryptography Lecture #3

Alan Turing: Codebreaker

Introduction to Cryptography CS 355

Chapter 4 The Data Encryption Standard

Quantum Cryptography Kvantekryptering

Example Enemy agents are trying to invent a new type of cipher. They decide on the following encryption scheme: Plaintext converts to Ciphertext

Assignment 2. Due: Monday Oct. 15, :59pm

Cipher Machines From Antiquity to the Enigma Machine

Code Breakers: Uncovering German Messages. by Rena Korb. Scott Foresman Reading Street 4.4.4

Security Enhancement and Speed Monitoring of RSA Algorithm

Purple. Used by Japanese government. Not used for tactical military info. Used to send infamous 14-part message

Classical Cryptography

Colored Image Ciphering with Key Image

Discrete Mathematics and Probability Theory Spring 2018 Ayazifar and Rao Midterm 2 Solutions

Chinese Remainder. Discrete Mathematics Andrei Bulatov

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

Computer Science as a Discipline

Understanding Cryptography: A Textbook For Students And Practitioners PDF

PART2. Theinsecurityofamonoalphabeticcodeisduetothefactthateachtimeagivenletteroccursintheoriginalmessage,itisencodedusingthesameletterintheencrypted

p 1 MAX(a,b) + MIN(a,b) = a+b n m means that m is a an integer multiple of n. Greatest Common Divisor: We say that n divides m.

Pseudorandom Number Generation and Stream Ciphers

o Broken by using frequency analysis o XOR is a polyalphabetic cipher in binary

To consider critically the societal implications created by recent advances in this field.

MODERN MARVELS: CODES NETWORK: THE HISTORY CHANNEL Writer/Producer/Director: Adrian Maher Date: April 6, 2001 TEASE

Free Downloads Introduction To Cryptography With Coding Theory

Dealing with some maths

Unit 8: In the Clouds

A Balanced Introduction to Computer Science, 3/E

Random Bit Generation and Stream Ciphers

V.Sorge/E.Ritter, Handout 2

Algorithmic Number Theory and Cryptography (CS 303)

Software Security. Encryption. Encryption. Encryption. Encryption. Encryption. Week 5 Part 1. Masking Data from Unwelcome eyes

The Chinese Remainder Theorem

6. Find an inverse of a modulo m for each of these pairs of relatively prime integers using the method

ENHANCED SECURITY SYSTEM FOR REAL TIME APPLICATIONS USING VISUAL CRYPTOGRAPHY

Example Enemy agents are trying to invent a new type of cipher. They decide on the following encryption scheme: Plaintext converts to Ciphertext

Mathemagic with a Deck of Cards

Number Theory/Cryptography (part 1 of CSC 282)

Syllabus Math 133 Dr. R. Beezer Spring 2013

The Chinese Remainder Theorem

Secret Communication Using Image Steganography

Transcription:

Cryptography Made Easy Stuart Reges Principal Lecturer University of Washington

Why Study Cryptography? Secrets are intrinsically interesting So much real-life drama: Mary Queen of Scots executed for treason primary evidence was an encoded letter they tricked the conspirators with a forgery Students enjoy puzzles Real world application of mathematics

Some basic terminology Alice wants to send a secret message to Bob Eve is eavesdropping Cryptographers tell Alice and Bob how to encode their messages Cryptanalysts help Eve to break the code Historic battle between the cryptographers and the cryptanalysts that continues today

Start with an Algorithm The Spartans used a scytale in the fifth century BC (transposition cipher) Card trick Caesar cipher (substitution cipher): ABCDEFGHIJKLMNOPQRSTUVWXYZ GHIJKLMNOPQRSTUVWXYZABCDEF

Then add a secret key Both parties know that the secret word is "victory": ABCDEFGHIJKLMNOPQRSTUVWXYZ VICTORYABDEFGHJKLMNPQSUWXZ "state of the art" for hundreds of years Gave birth to cryptanalysis first in the Muslim world, later in Europe

Cryptographers vs Cryptanalysts A battle that continues today Cryptographers try to devise more clever algorithms and keys Cryptanalysts search for vulnerabilities Early cryptanalysts were linguists: frequency analysis properties of letters

Vigenère Square (polyalphabetic)

Vigenère Cipher More secure than simple substitution Confederate cipher disk shown (replica) Based on a secret keyword or phrase Broken by Charles Babbage

Cipher Machines: Enigma Germans thought it was unbreakable Highly complex plugboard to swap arbitrary letters multiple scrambler disks reflector for symmetry Broken by the British in WW II (Alan Turing)

Public Key Encryption Proposed by Diffie, Hellman, Merkle First big idea: use a function that cannot be reversed (a humpty dumpty function): Alice tells Bob a function to apply using a public key, and Eve can t compute the inverse Second big idea: use asymmetric keys (sender and receiver use different keys): Alice has a private key to compute the inverse Key benefit: doesn't require the sharing of a secret key

RSA Encryption Named for Ron Rivest, Adi Shamir, and Leonard Adleman Invented in 1977, still the premier approach Based on Fermat's Little Theorem: a p-1 1 (mod p) for prime p, gcd(a, p) = 1 Slight variation: a (p-1)(q-1) 1 (mod pq) for distinct primes p and q, gcd(a,pq) = 1 Requires large primes (100+ digit primes)

Example of RSA Pick two primes p and q, compute n = p q Pick two numbers e and d, such that: e d = k(p-1)(q-1) + 1 (for some k) Publish n and e (public key), encode with: (original message) e mod n Keep d, p and q secret (private key), decode with: (encoded message) d mod n

Why does it work? Original message is carried to the e power, then to the d power: (msg e ) d = msg ed Remember how we picked e and d: msg ed = msg k(p-1)(q-1) + 1 Apply some simple algebra: msg ed = (msg (p-1)(q-1) ) k msg 1 Applying Fermat's Little Theorem: msg ed = (1) k msg 1 = msg

Politics of Cryptography British actually discovered RSA first but kept it secret Phil Zimmerman tried to bring cryptography to the masses with PGP and ended up being investigated as an arms dealer by the FBI and a grand jury The NSA hires more mathematicians than any other organization

Exploring further Simon Singh, The Code Book RSA Factoring Challenge (unfortunately the prizes have been withdrawn) Shor's algorithm would break RSA if only we had a quantum computer Java's BigInteger: isprobableprime, nextprobableprime, modpow Collection of useful links: http://www.cs.washington.edu/homes/reges/cryptography

Card Trick Solution Given 5 cards, at least 2 will be of the same suit (pigeon hole principle) Pick 2 such cards: one will be hidden, the other will be the first card First card tells you the suit Hide the card that has a rank that is no more than 6 higher than the other (using modular wrap-around of king to ace) Arrange other cards to encode 1 through 6

Encoding 1 through 6 Figure out the low, middle, and high cards rank (ace < 2 < 3... < 10 < jack < queen < king) if ranks are the same, use the name of the suit (clubs < diamonds < hearts < spades) Some rule for the 6 arrangements, as in: 1: low/mid/hi 3: mid/low/hi 5: hi/low/mid 2: low/hi/mid 4: mid/hi/low 6: hi/mid/low