1 CSCD434/539 Winter 2013 Lecture 11 Cryptography - Basics.

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.
Cryptography encryption authentication digital signatures
PUBLIC KEY CRYPTOSYSTEMS Symmetric Cryptosystems 6/05/2014 | pag. 2.
Using Cryptography to Secure Information. Overview Introduction to Cryptography Using Symmetric Encryption Using Hash Functions Using Public Key Encryption.
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.
Lesson 2 - Encryption ITD2323 Lecture by: IZWAN SUHADAK ISHAK Assistant Lecturer Universiti Industri Selangor.
30.1 Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Making “Good” Encryption Algorithms
Computer Science CSC 474By Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.1 Introduction to Cryptography.
1 Codes, Ciphers, and Cryptography-Ch 2.1 Michael A. Karls Ball State University.
CS 555Topic 11 Cryptography CS 555 Topic 1: Overview of the Course & Introduction to Encryption.
EEC 688/788 Secure and Dependable Computing Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
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.
1 Day 04- Cryptography Acknowledgements to Dr. Ola Flygt of Växjö University, Sweden for providing the original slides.
Chapter 2 Basic Encryption and Decryption (part B)
CS426Fall 2010/Lecture 21 Computer Security CS 426 Lecture 2 Cryptography: Terminology & Classic Ciphers.
Lecture 1 Overview.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
Chapter 2 – Classical Encryption Techniques
Encryption. Introduction Computer security is the prevention of or protection against –access to information by unauthorized recipients –intentional but.
3.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3 Traditional Symmetric-Key Ciphers.
Chapter 12 Cryptography (slides edited by Erin Chambers)
Cryptography Week-6.
Chapter 2 Basic Encryption and Decryption. csci5233 computer security & integrity 2 Encryption / Decryption encrypted transmission AB plaintext ciphertext.
Lecture 2 Overview.
Cryptography Programming Lab
Security in Computing Cryptography (Introduction) Derived from Greek words: ‘Kruptos’ (hidden) and ‘graphein’ (writing.
A Technical Seminar Presentation CLASSICAL CRYPTOGRAPHY
Week 2 - Wednesday.  What did we talk about last time?  Encryption  Shift ciphers  Transposition ciphers.
Computer System Security CSE 5339/7339
Chapter 2 – Elementary Cryptography  Concepts of encryption  Cryptanalysis  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public.
Elementary Cryptography
Topic 21 Cryptography CS 555 Topic 2: Evolution of Classical Cryptography CS555.
Cryptography and Network Security (CS435) Part Two (Classic Encryption Techniques)
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.
ITMS – 3153 Information Systems Security
1 Chapter 2-1 Conventional Encryption Message Confidentiality.
Symmetric-Key Cryptography
An Introduction to Cryptography. What is cryptography? noun \krip- ˈ tä-grə-fē\ : the process of writing or reading secret messages or codes “Encryption”:
Module :MA3036NI Cryptography and Number Theory Lecture Week 3 Symmetric Encryption-2.
9/03/15UB Fall 2015 CSE565: S. Upadhyaya Lec 2.1 CSE565: Computer Security Lecture 2 Basic Encryption & Decryption Shambhu Upadhyaya Computer Science &
Polyalphabetic CIPHERS Linguistics 484. Summary The idea How to recognize: index of coincidence How many alphabets: Kasiski.
R R R CSE870: Advanced Software Engineering: Cheng (Sp 2003)1 Encryption A Brief Overview.
Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)
Lecture 3 Page 1 Advanced Network Security Review of Cryptography Advanced Network Security Peter Reiher August, 2014.
Traditional Symmetric-Key Ciphers
Computer Security Cryptography. Cryptography Now and Before  In the past – mainly used for confidentiality  Today –Still used for confidentiality –Data.
Data Security and Encryption (CSE348) 1. Lecture # 3 2.
Computer Science and Engineering Computer System Security CSE 5339/7339 Lecture 3 August 26, 2004.
K. Salah1 Cryptography Module I. K. Salah2 Cryptographic Protocols  Messages should be transmitted to destination  Only the recipient should see it.
Network Security Lecture 13 Presented by: Dr. Munam Ali Shah.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
Lecture 2 Overview. Cryptography Secret writing – Disguised data cannot be read, modified, or fabricated easily – Feasibility of complexity for communicating.
1 Classical Encryption Techniques. 2 Symmetric cipher model –Cryptography –Cryptanalysis Substitution techniques –Caesar cipher –Monoalphabetic cipher.
Lecture 2 Classical Cipher System SIMPLE SUBSTITUTION CIPHERS By: NOOR DHIA AL- SHAKARCHY
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 G REEK WORD MEANING “ SECRET WRITING ”
Chapter 2 Basic Encryption and Decryption
By: Mohsin Tahir waqas Akram Numan-Ul-Haq Ali Asghar Rao Arslan
Cryptography.
PART VII Security.
CSCD 303 Fall 2018 Lecture 18 Cryptography - Basics.
CSCD434 Spring 2019 Lecture 12 Cryptography - Basics.
Presentation transcript:

1 CSCD434/539 Winter 2013 Lecture 11 Cryptography - Basics

2 Cryptography Introduction – Cryptography is a science For exchanging information between intended recipients – Has been used for over 4000 years – What is the main use of Crytography today? – Today, Cryptography used Insure data integrity Verify identity

3 Cryptography History Cryptography has long history dates from Egyptians about 4000 years ago A ncient Egyptians enciphered some of their hieroglyphic writing on monuments Ancient Hebrews enciphered certain words in their scriptures One of the most famous uses comes from Roman times More on this later.... Egyptian Crypto

4 Cryptography History Continued... Blaise de Vignere 1300's, Geoffrey Chaucer included several ciphers in his works... father of English Literature, famous poet 1460's, Leon Alberti devised a cipher wheel, and described the principles of frequency analysis 1585, Blaise de Vigenère published a book on cryptology and described polyalphabetic substitution cipher This cipher is used to this day...

5 Cryptography Background A complete non-technical account of cryptography from its beginning through early 1960's is D. Kahn, The Codebreakers, Macmillan Publishing Company, – Relates historical aspects which were most significant to development of modern cryptography Simon Singh, The Code Book: The Science of Secrecy from Ancient Egypt to Quantum Cryptography, Anchor, 2011 Summary of important developments in 1970's and their relation to cryptography today see: A. Menezes, P. van Oorschot, and S. Vanstone, Handbook of Applied Cryptography, CRC Press,

6 Cryptography Definitions Terms – Encryption Process of encoding message so that its meaning is not obvious – Decryption Reversal process transform message back to original form – Plaintext Original message – Ciphertext Encrypted form of original message Sir, we have intercepted an advanced human encryption device

7 Cryptography Definitions Terms – Cryptanalyst Studies encryption and encrypted messages Works for unauthorized interceptor – Cryptographer Works on behalf of a legitimate sender or receiver Cryptography guards against what security problems?

8 Cryptography Definitions Formal Notation C = E(P) and P = D(C)‏ where C represents ciphertext E is encryption rule D is decryption rule Cryptosystem is where P = D(E(P))‏ want to convert a message but also want to be able to get it back again

9 Cryptography Concepts In cryptosystems idea of key is extremely important A key is used to both encrypt and decrypt messages May be different keys depending upon the crypto algorithm Key length is also important in determining a crypto system’s strength

10 Cryptosystem A Cryptosystem is set of rules for how to encrypt plaintext and how to decrypt ciphertext Process is similar to using mass produced house locks... An aside... Defcon looks at lock insecurity – Few well-known companies produce standard locks that differ according to the physical key – You and neighbour have same lock model – But your key will only open your lock So, have a few well-examined encryption algorithms that everyone uses – People using algorithm have different keys

11 Cryptosystem How Secure is it? – Unconditionally secure if Can't be broken even with infinite resources Implies cryptanalysis is impossible even if every key were tried Still couldn't determine the correct key

12 Cryptosystem How Secure is it? – Computationally secure if Possible to break encryption but practically infeasible to do so Time and resources are > value of encrypted info Measured in 10's or 1000's of years Most modern crypto systems are in that category

13 Definitions What is Symmetric Encryption and how does it differ from Asymmetric Encryption?

14 Cryptography – Types Symmetric – When encryption and decryption keys are the same D and E are mirror images of each other – P = D (K, E(K,P))‏ Asymmetric – When the encryption and decryption keys are different – P = D(K D E (K E,P))‏

15 Cryptography – Types Symmetric EncryptionDecryption Key Plaintext Ciphertext Original Plaintext

16 Cryptography – Types Asymmetric EncryptionDecryption Plaintext Ciphertext Original Plaintext Encyption Key K E Decyption Key K D

17 Crypto Analysis Cryptanalyst’s job is to break an encryption – Deduce original message from ciphertext – If actual decryption algorithm can be deduced, can break encryption of all messages sent by sending party – How do you break an algorithm? Use a variety of information – Encrypted messages, – Known encryption algorithms, – Intercepted plaintext, math or statistical tools, ingenuity and luck!

18 Breakable Encryption Breakable Algorithm – Given enough time and data, analyst can determine algorithm Yet, may be impractical to try to break Example – 25 character message – just uppercase letters – So, possibilities – If computer can perform operations/sec then finding correct decipherment would take years – What to do? Cryptanalyst will reduce search space

19 Encryption Techniques Two types of Encryption Techniques 1. A transposition cipher an encoding process that does not change any letters of original message, but changes position of letters One simple transposition cipher reverses order of letters For example, message –THE GAME IS AFOOT becomes EHT EMAG SI TOOFA Easy to recognize and decode Analogy, transposition ciphers are like jigsaw puzzles – All pieces are present, just matter of putting them in correct order

20 Encryption Techniques 2. A substitution cipher, process that maintains order of letters but changes their identity –Each letter is replaced by another letter or symbol –Ex., Morse Code is substitution cipher, each letter is replaced by specific set of dots and dashes –Many substitution ciphers use only one alphabet, and are called monoalphabetic –Substitute one and only one letter for a particular letter in message

21 Substitution cipher –For example, every T in message is replaced by the same substitute letter or symbol –What's the problem with that? Cipher scheme easy to remember, but also vulnerable to "cracking" using frequency analysis - letter counting Sufficiently large encoded message derived using monoalphabetic substitution, can be "cracked" by comparing frequency of letter occurrences in coded message with frequency of letter occurrences in language used for message

22 Substitution cipher – What was first recorded use of Substitution Cipher? Caesar Cipher Julius Caesar was first to use this crypto scheme –Also called a shift cipher –A key number, k is agreed upon by sender and receiver –Then standard alphabet is shifted k positions so that the kth letter is substituted for letter A, the k+1st for B, etc and the alphabet is wrapped to maintain a one-to-one correspondence

23 Substitution cipher Example Caesar Cipher Caesar used a shift of 3 places, so a plaintext letter, pi was enciphered as a ciphertext letter, ci by the rule: Ci = E(pi) = pi + 3 Example – T R E A T Y I M P O S S I B L E – w u h d w b l p s r v v l e o h 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 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

24 Early Ciphers Needed to be easy Not written down Very easy to break – Secure encryption shouldn’t allow an interceptor to use small piece of ciphertext to predict entire pattern

25 Analysis of Caesar Cipher Many clues from the ciphertext a) Breaks between words are preserved b) Double letters are preserved = SS = vv c) Letters always map to the same substituted letter T I E -> w l h

26 Key Substitution Cipher Other Substitution Ciphers Permutation is reordering of elements of a sequence One way to scramble letters of an alphabet is to use a key, A word that controls permutation If key is an actual word, sender or receiver first writes alphabet and then writes key under it

27 Key Substitution Cipher Use: word as the key 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 w o r d a b c e f g h u j k l m n p q s t u v x y z Key is short so most plaintext letters are one or two positions off Longer keywords – distance is greater and less predictable Use: professional as key 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 p r o f e s i n a l b c d g h j k m q t u v w x y z

28 Other Substitution Schemes To make substitution ciphers more secure, use more than one alphabet Such ciphers are called polyalphabetic, - Same letter can be represented by different letters when encoded – One-to-many correspondence makes frequency analysis much more difficult in order to crack code One such cipher named for Blaise de Vigenere, a 16th century Frenchman –The Vigenere cipher

29 Vigenere cipher... is a polyalphabetic cipher based on using successively shifted alphabets –A different shifted alphabet for each of 26 English letters Based on table shown in next slide plus use of keyword – Letters of keyword determine shifted alphabets used in encoding process

30 Vigenère Tableau ABCDEFGHIJKLMNOPQRSTUVWXYZ BCDEFGHIJKLMNOPQRSTUVWXYZA CDEFGHIJKLMNOPQRSTUVWXYZAB DEFGHIJKLMNOPQRSTUVWXYZABC EFGHIJKLMNOPQRSTUVWXYZABCD FGHIJKLMNOPQRSTUVWXYZABCDE GHIJKLMNOPQRSTUVWXYZABCDEF HIJKLMNOPQRSTUVWXYZABCDEFG IJKLMNOPQRSTUVWXYZABCDEFGH JKLMNOPQRSTUVWXYZABCDEFGHI KLMNOPQRSTUVWXYZABCDEFGHIJ LMNOPQRSTUVWXYZABCDEFGHIJK MNOPQRSTUVWXYZABCDEFGHIJKL NOPQRSTUVWXYZABCDEFGHIJKLM OPQRSTUVWXYZABCDEFGHIJKLMN PQRSTUVWXYZABCDEFGHIJKLMNO QRSTUVWXYZABCDEFGHIJKLMNOP RSTUVWXYZABCDEFGHIJKLMNOPQ STUVWXYZABCDEFGHIJKLMNOPQR TUVWXYZABCDEFGHIJKLMNOPQRS UVWXYZABCDEFGHIJKLMNOPQRST VWXYZABCDEFGHIJKLMNOPQRSTU WXYZABCDEFGHIJKLMNOPQRSTUV XYZABCDEFGHIJKLMNOPQRSTUVW YZABCDEFGHIJKLMNOPQRSTUVWX ZABCDEFGHIJKLMNOPQRSTUVWXY Historical Note Standard Vigenere was main cryptographic system used by Confederated States during American Civil War, following four key phrases used by Confederates have survived to this day : IN GOD WE TRUST COMPLETE VICTORY MANCHESTER BLUFF and, as the war-luck turned: COME RETRIBUTION

31 Vigenere Cipher For example, suppose we wish to encipher the plaintext message: TO BE OR NOT TO BE THAT IS THE QUESTION Keyword = RELATIONS We begin by writing keyword, repeated as many times as necessary, above plaintext message. To derive ciphertext using tableau, for each letter in plaintext, find intersection of row given by corresponding keyword letter and column given by plaintext letter to get ciphertext letter

32 Vigenere Cipher Keyword:RELAT IONSR ELATI ONSRE LATIO NSREL Plaintext:TOBEO RNOTT OBETH ATIST HEQUE STION Ciphertext:KSMEH ZBBLK SMEMP OGAJX SEJCS FLZSY Decipherment of an encrypted message is equally straightforward. One writes the keyword repeatedly above message: Keyword:RELAT IONSR ELATI ONSRE LATIO NSREL Ciphertext:KSMEH ZBBLK SMEMP OGAJX SEJCS FLZSY Plaintext:TOBEO RNOTT OBETH ATIST HEQUE STION Use keyword letter to pick a column of table and then trace down column to row containing ciphertext letter. The index of that row is plaintext letter

33 Vigenere Cipher The strength of Vigenere cipher against frequency analysis can be seen in previous example Note there are 7 'T's in plaintext message - T's encrypted by 'H,' 'L,' 'K,' 'M,' 'G,' 'X,' and 'L' This successfully masks frequency characteristics of English 'T' Thus, any message encrypted by a Vigenere cipher is a collection of as many simple substitution ciphers as there are letters in the keyword

34 Cracking the Vigenere Cipher For 300 years Vigenere cipher was considered to be practically unbreakable Then in 1863 Prussian military officer devised method to determine length of keyword and then divide message into simpler forms to which letter frequency analysis could be applied For further information see URLs Applet that shows how it can be broken Vigenere.html Another Analysis vigenere_cracking.html

35 One-time Pad Supposed to be in theory perfect cipher Name comes from method – Large, non-repeating set of keys written to pads of paper by women in DOD!! If keys are 20 characters long, one key per page and had to send a message of 300 characters.... Then, would use next 15 pages of keys Sender would write keys one at a time above plain text and encipher plaintext with Vigenère Tableau chart Sender then destroys keys Describes how this was used

36 One-time Pad – For encryption to work, receiver needs same pad as sender – Then, takes correct number of keys and deciphers message as if it were a plain substitution with a long key Problem with this method? One-time pad has some problems – Need to synchronize between sender and receiver – Need for unlimited number of keys – Key generation is not hard but » Distribution, storing and accounting for keys is hard … ongoing problem Example:

37 One-time Pad – Random Numbers – Close approximation of a one-time pad is random-number generator  Computer random numbers are not absolutely random  Really sequence with a long period If wanted to use random number generator to send a message, -Generate 300 random numbers and scale them to be between 0 and 25 -Use one number to encipher each character

38 Book Ciphers Another way to generate “random numbers” is to use books, music or other objects with structure Sender and receiver need access to same object Example – Sender and receiver agree to use same phone book and start on page 35 – Use two middle digits of each 7 digit phone number (ddd – DDdd) mod 26 as key letter for substitution cipher Use Vigenère Tableau chart

39 Book Ciphers Passage from Descarte’s Meditation: – I am, I exist, that is certain. Example message: Machines cannot think Plaintext: MAC H I NESCA NNOTT HIN K – Key: i a m i e x i s t t h a t i s c e r t – Then use a table, like Vignere tableau Cipher: u a o p m k m k v t u n h b l j m e d

40 Book Ciphers How to Break it? – Neither original message or key text is evenly distributed – Cluster around high frequency letters 50% of all letters, A E O T N I Compute probability of both being one of 6 is.5 X.5 =.25 or 1 in 4 chance that both letters are in message and key Otherwise need to consider possible encodings

41 Character Frequencies In most languages letters are not equally common In English e is by far most common letter – Have tables of single double & triple letter frequencies – These are different for different languages

42 Frequency of Letters in English

43 Encryption Techniques Transposition – Rearranging letters of message – Want diffusion – wide spreading of information across ciphertext – Try to break established pattern – Column transpositions c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 etc.

44 Encryption Techniques Transposition – Form ciphertext by reading from columns This is message to show how a columnar transposition works Thisi sames saget oshow howac olumn artra nspos ition works tssoh oaniw hasso lrsto imghw utpir seeoa mrook lstwc nasns Length of message just happens to be a multiple of 5 If message length is not equal length of a row use some infrequent letters to fill in gaps

45 Encryption Techniques Combination Approach – Substitution and Transposition – Cipher building blocks – Combination of two ciphers Product Cipher – ciphers are performed one right after another E 2 (E 1 (P, K 1 ) K 2 )‏ Just because you apply two ciphers doesn’t mean result is stronger than each individual cipher

46 Encryption Techniques Properties of Trustworthy Encryption Systems – Commercial users have requirements must be satisfied when using encryption Encryption is commercial grade if it meets these requirements: – Based on sound mathematics – derived from solid principles – Analysed by experts, found to be sound review by critical outside experts is essential – Stood Test of Time – new algorithm gains popularity, people continue to review it both for math foundations and way it builds upon those foundations Flaws of algorithms are discovered soon after their release

47 Encryption Techniques Three Popular Algorithms – DES – Data Encryption Standard – RSA – Rivest – Shamir – Adelman – AES – Advanced Encryption Standard DES and RSA – meet above criteria AES – new – meets first two and is starting to achieve widespread adoption

48 The End Read Basic Crypto, Textbook – Chapter 11 Suggested Reading for Next time.. Public Key Crypto Reading: Some reading here, public key for now Textbook – Chapter 12 Lab: See Pre-lab prep for Wardriving!