1 Codes, Ciphers, and Cryptography-Ch 1 Michael A. Karls Ball State University.

Slides:



Advertisements
Similar presentations
CLASSICAL ENCRYPTION TECHNIQUES
Advertisements

Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesThe Mighty Mod.
Using Matrices in Real Life
Chapter 1 The Study of Body Function Image PowerPoint
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Cryptography encryption authentication digital signatures
Using Cryptography to Secure Information. Overview Introduction to Cryptography Using Symmetric Encryption Using Hash Functions Using Public Key Encryption.
Block Cipher Modes of Operation and Stream Ciphers
Classical Encryption Techniques Week 6-wend. One-Time Pad if a truly random key as long as the message is used, the cipher will be secure called a One-Time.
ABC Technology Project
25 seconds left…...
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
PSSA Preparation.
Math for Liberal Studies.  When we studied ID numbers, we found that many of these systems use remainders to compute the check digits  Remainders have.
30.1 Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
390 Codes, Ciphers, and Cryptography
Computer Science 101 Data Encryption And Computer Networks.
Cryptology Terminology and Early History. Cryptology Terms Cryptology –The science of concealing the meaning of messages and the discovery of the meaning.
 Caesar used to encrypt his messages using a very simple algorithm, which could be easily decrypted if you know the key.  He would take each letter.
The Evolution of Secret Writing 楊子陞 B 李柏勳 B 馬天祥 B 陳孟彙 B
Secure communication Informatics for economists II Jan Přichystal
Creating Secret Messages. 2 Why do we need to keep things secret? Historically, secret messages were used in wars and battles For example, the Enigma.
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
1 Codes, Ciphers, and Cryptography-Ch 3.1 Michael A. Karls Ball State University.
Chapter 2 – Classical Encryption Techniques
1 Introduction to Codes, Ciphers, and Cryptography Michael A. Karls Ball State University.
1 The Mathematics of Star Trek Lecture 9: Cryptography.
Section 3.6: An Introduction to Cryptography
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
Chapter 2 Basic Encryption and Decryption. csci5233 computer security & integrity 2 Encryption / Decryption encrypted transmission AB plaintext ciphertext.
Classical Encryption Techniques
Cryptography Programming Lab
Section 2.2: Affine Ciphers; More Modular Arithmetic Practice HW (not to hand in) From Barr Textbook p. 80 # 2a, 3e, 3f, 4, 5a, 7, 8 9, 10 (Use affinecipherbreaker.
3.1 SERVICES AND MECHANISMS SERVICES AND MECHANISMS The International Telecommunication Union- Telecommunication Standardization Section (ITU-T) provides.
A Technical Seminar Presentation CLASSICAL CRYPTOGRAPHY
MAT 1000 Mathematics in Today's World Winter 2015.
Chapter 2 – Elementary Cryptography  Concepts of encryption  Cryptanalysis  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public.
10/1/2015 9:38:06 AM1AIIS. OUTLINE Introduction Goals In Cryptography Secrete Key Cryptography Public Key Cryptograpgy Digital Signatures 2 10/1/2015.
Section 2.1: Shift Ciphers and Modular Arithmetic The purpose of this section is to learn about modular arithmetic, which is one of the fundamental mathematical.
a connection between language and mathematics
Hill Cipher Developed by the mathematician Lester Hill in The encryption algorithm takes m successive plain text and substitute for them m cipher.
Cryptology By Greg Buss Pat Shields Barry Burke. What is Cryptology? Cryptology is the study of “secret writing.” Modern cryptology combines the studies.
Cryptography, Authentication and Digital Signatures
Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:
Section 2.1: Shift Ciphers and Modular Arithmetic Practice HW from Barr Textbook (not to hand in) p.66 # 1, 2, 3-6, 9-12, 13, 15.
1 Chapter 2-1 Conventional Encryption Message Confidentiality.
Public Key Encryption CS432 – Security in Computing Copyright © 2005, 2008 by Scott Orr and the Trustees of Indiana University.
Symmetric-Key Cryptography
Module :MA3036NI Cryptography and Number Theory Lecture Week 3 Symmetric Encryption-2.
THE SCIENCE, MATHEMATICS, AND ART OF PRIVACY BASIC STUFF 1 CRYPTOGRAPHY.
Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)
Traditional Symmetric-Key Ciphers
Computer Security Cryptography. Cryptography Now and Before  In the past – mainly used for confidentiality  Today –Still used for confidentiality –Data.
CSCI 391: Practical Cryptology Substitution Monoalphabetic Ciphers.
Invitation to Computer Science 5 th Edition Chapter 8 Information Security.
CSCI-235 Micro-Computers in Science Privacy & Security.
Computer Security By Rubel Biswas. Introduction History Terms & Definitions Symmetric and Asymmetric Attacks on Cryptosystems Outline.
Department of Computer Science Chapter 5 Introduction to Cryptography Semester 1.
CRYPTOGRAPHY Cryptography is art or science of transforming intelligible message to unintelligible and again transforming that message back to the original.
CRYPTOGRAPHY G REEK WORD MEANING “ SECRET WRITING ”
Substitution Ciphers.
Chapter 2 Basic Encryption and Decryption
Chapter-2 Classical Encryption Techniques.
Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Cryptography.
A Technical Seminar Presentation CLASSICAL CRYPTOGRAPHY
Presentation transcript:

1 Codes, Ciphers, and Cryptography-Ch 1 Michael A. Karls Ball State University

2 Introduction Throughout history, people have had the need to send messages to other people in secret! Methods have been developed to disguise and break secret messages.

3 Introduction (cont.) Simon Singh has written The Code Book with two goals:  Chart the evolution of codes throughout history—just like an organism, codes evolve, with new ones being developed as old ones are broken! (Think of bacteria and antibiotics!)  Show the relevance of cryptography in the world today— the world relies on secure transmission of data to run smoothly ( , phone, cable TV, internet, online shopping, banking, military communication, law enforcement, intelligence gathering, etc.).

4 Introduction (cont.) In this course we will read and discuss Chapters 1-8 of Singh’s book and look at some of the mathematics related to cryptography, codes and ciphers! Let’s start with some terminology.

5 Definitions and Terminology A code is a form of secret communication in which a word or phrase is replaced with a word, number, or symbol. Example 1: A simple code for an army.  “Attack at dawn”  Jupiter.  “The coast is clear”  Tippy-toe.  Each commander and soldier would have a copy of the codes in some sort of codebook.

6 Definitions and Terminology (cont.) A cipher is a form of secret communication in which letters are replaced with a letter, number, or symbol. Example 2: One example of a cipher is to replace each letter using the following scheme:  Plaintext:“attack at dawn”  Ciphertext:“ZGGZXP ZG WZDM  Send ciphertext as ZGG ZXP ZGW ZDM.  Recipient would need to know how message was created. Plaintextabcdefghijklmnopqrstuvwxyz CiphertextZYXWVUTSRQPONMLKJIHGFEDCBA

7 Definitions and Terminology (cont.) Cryptography is the science of concealing the meaning of a message. It is also used to mean the science of anything connected with ciphers—an alternative to cryptology, which is the science of secret writing. To encrypt a message, one conceals the meaning of the message via a code or cipher. Similar definitions hold for encode and encipher. To decrypt a message, one turns an ecrypted message back into the original message. Similar definitions hold for decode and decipher.

8 Definitions and Terminology (cont.) Remark: The words “cryptography” and “cryptology” come from the Greek words   (kryptos)  “hidden”   (logos)  “word” or “reason”   (graphia)  “writing”

9 Definitions and Terminology (cont.) Steganography is the science of hiding the existence of a message. “Steganography” also comes from Greek:   (steganos)  “covered” Both steganography and cryptography were developed in parallel—examples of both have been found in the 5 th century B.C.

10 Examples of Steganography Invisible ink (1 st century A.D. – present):  Use organic fluid such as lemon juice or milk to write a message on paper.  Heat the paper and the writing will turn brown. Hard-boiled eggs (16 th century Italy):  Mix alum and vinegar to make ink.  Write on hard-boiled egg.  Writing will penetrate shell and leave message on hardened egg white surface!

11 Examples of Steganography (cont.) Square grid (grille) method (16 th century Italy – 20 th century)  Invented by Girolamo Cardano.  Text is placed on a grid.  Add in random letters to fill grid.  To read message, put cover with correct openings onto the grid.  Variant: Use words instead of letters and add in random words to fill in grid.  See Edgar Allen Poe’s article “A Few Words on Secret Writing’, Graham’s Magazine, July 1841, pp me s s a ge rcme wsto skpa bgea rcme wsto skpa bgea

12 Examples of Steganography (cont.) Computer files (20 th century – present)  Add data to a file, such as a JPEG image (picture).  Send via or post to the internet on a web page.  Message undetectable without appropriate software.  Related idea: Watermarking is the addition of identifying information into items such as checks.  Digital watermarking is used to embed copyright information into video, music, and text data. Note: Steganography is a great way to send a message in secret—provided it is not found—then anyone can read the message!

13 Cryptography! We now look at cryptography—the main topic of Singh’s book (and of this course)! Cryptography can be split into two branches— transposition ciphers and substitution ciphers. A transposition cipher is a system of encryption in which the letters in a message are rearranged. A substitution cipher is a system of encryption in which letters in a message are replaced with other letters or symbols.

14 Examples of Transposition Ciphers Scytale (“SITalee) (Sparta – 5 th century) Sender and receiver have batons of equal circumference. Wrap a strip of leather around baton and write message along length of the baton. Unroll the strip and carry! Question: How would one decipher an intercepted scytale message?

15 Examples of Transposition Ciphers (cont.) Turning Grille Method (Variant of Cardano’s method above—used by German intelligence in South America in WWII).  Put text in an 8 x 8 grid, with 16 openings cut in an overlay grid.  When rotated 90 o, 180 o, 270 o, all 64 spaces will be exposed exactly once.  Example from article by Stephen Fratini, Mathematics Magazine, Volume 75, #5, December 2002, pp (Handout).

16 Examples of Substitution Ciphers Caesar Cipher (1 st Century B.C. – used by Julius Caesar to encrypt letters sent to Cicero).  Basic Idea: The cipher alphabet is the plain alphabet shifted n spaces right.  For example, if we take n = 14, we get:  Plaintext:“attack at dawn”  Ciphertext:“OHHOQY OH ROKB” Plaintextabcdefghijklmnopqrstuvwxyz CiphertextOPQRSTUVWXYZABCDEFGHIJKLMN

17 Examples of Substitution Ciphers (cont.) Keyword Cipher  Use a keyword or phrase as the basis of the encryption scheme.  For example, let MATHEMATICS be the keyword.  Remove repeated letters in the keyword and add in remaining letters of alphabet in order.  MATHEMATICS  MATHEICS Plaintextabcdefghijklmnopqrstuvwxyz CiphertextMATHEICSBDFGJKLNOPQRUVWXYZ

18 Examples of Substitution Ciphers (cont.) Rearrangement Cipher  Rearrange letters of alphabet in any order.  Thus, the Caesar and keyword ciphers are special cases of the rearrangement cipher!  Question: How many different rearrangement ciphers are there?  To answer this question, we need the Fundamental Principle of Counting!

19 Examples of Substitution Ciphers (cont.) Fundamental Principle of Counting (FPC):  If there are  n 1 choices for item 1  n 2 choices for item 2 ……  n m choices for item m  then the number of ways to choose one of each item is n1 x n2 x... x n m.

20 Examples of Substitution Ciphers (cont.) Example 3: How many outfits can I make with 4 shirts, 3 pairs of pants, and 5 pairs of shoes?  # shirt choices:4  # pants choices:3  # shoe choices:5  FPC => 4 x 3 x 5 = 60 outfits

21 Examples of Substitution Ciphers (cont.) To figure out how many different rearrangement ciphers there are, we can use FPC:  # choices for ciphertext letter for a:26  # choices for ciphertext letter for b:25 ……  # choices for ciphertext letter for y:2  # choices for ciphertext letter for z:1  FPC => 26 x 25 x … x 2 x 1 = 26!, or about 4.03 x different ciphers

22 Examples of Substitution Ciphers (cont.) Additive Cipher  Using the idea of modular arithmetic, we can create a cipher! For any non-negative integers a and n, we define a mod n to be the remainder when a is divided by n. Example 4:  18 mod 5 = 3, since 18 = 3 x  4 mod 7 = 4, since 4 = 0 x  28 mod 26 = 2, since 28 = 1 x  26 mod 13 = 0, since 26 = 2 x

23 Examples of Substitution Ciphers (cont.) We can add and multiply numbers mod n too! Example 5: Find (27+15) mod 26 and (27 x 15) mod 26.  = 42 and 42 mod 26 = 16,  so (27+15) mod 26 = 16  or  27 mod 26 = 1 and 15 mod 26 = 15,  so (27+15) mod 26 = (1+15) mod 26 = 16 mod 26 = 16  27 x 15 = 405 and 405 mod 26 = 15,  so (27 x 15) mod 26 = 15  or  (27 x 15) mod 26 = (1 x 15) mod 26 = 15 mod 26 = 15

24 Examples of Substitution Ciphers (cont.) To find (a+b) mod n:  Add a to b, then find the resulting sum mod n,  Or find a mod n, find b mod n, and add the results mod n.  Multiplication works in a similar fashion! Now we are ready to make an additive cipher!

25 Examples of Substitution Ciphers (cont.) First, assign 1, 2, …, 26 mod 26 to a, b, …, z. Next, choose a fixed integer m between 0 and 25. To get the ciphertext y from plaintext x, add m mod 26, i.e., y = (x+m) mod 26. As an example, here is the additive cipher alphabet for m=14. Plaintextabcdefghijklm Plaintext # Ciphertext # CiphertextOPQRSTUVWXYZA Plaintextnopqrstuvwxyz Plaintext # Ciphertext # CiphertextBCDEFGHIJKLMN

26 Examples of Substitution Ciphers (cont.) Continuing the additive cipher example with m = 14, to encipher the plaintext letter e, we do the following:  e  5  (5+14) mod 26 = 19 mod 26 = 19  19  S  Thus, plaintext e is enciphered as ciphertext S. To decipher ciphertext S, we add the additive inverse of 14 mod 26, which is 12:  S  19  (19+12) mod 26 = 5  5  e  Thus, ciphertext S is deciphered as plaintext e. Question: What does the additive cipher look like? Answer: Caesar cipher! (The Caesar cipher is also called the additive cipher!)

27 Notes on Ciphers For any cipher there is an algorithm, which is a general encrypting method, and a key which specifies the exact details of the algorithm. Example 6: For the Caesar cipher,  Algorithm—shift the alphabet,  Key—how many places to shift!  Thus, there are 26 keys for this cipher.

28 Notes on Ciphers (cont.) The key must remain secure!  If the key is found, the code will be broken.  If the algorithm is known, the code can still be secure!  For a code or cipher, the greater the number of keys, the greater the security!

29 Notes on Ciphers (cont.) The examples of substitution ciphers we’ve seen are called monoalphabetic substitution ciphers. The systems we’ve seen are symmetric because sender and receiver must both know (have) the key.