CMPE 471 BASIC ENCRYPTION AND DECRYPTION. TERMINOLOGY & BACKGROUND S R S T RT O O Suppose S (Sender) wants to send a message to R (Reciever). S entrusts.

Slides:



Advertisements
Similar presentations
CLASSICAL ENCRYPTION TECHNIQUES
Advertisements

Cryptography encryption authentication digital signatures
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.
Making “Good” Encryption Algorithms
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering.
Chap 2: Elementary Cryptography.  Concepts of encryption  Cryptanalysis: how encryption systems are “broken”  Symmetric (secret key) encryption and.
EEC 688/788 Secure and Dependable Computing Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
EEC 688/788 Secure and Dependable Computing Lecture 3 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Network Management and Security
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 5 Wenbing Zhao Department of Electrical and Computer Engineering.
Chapter 2 Basic Encryption and Decryption (part B)
Lecture 23 Symmetric Encryption
Lecture 1 Overview.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
IT 221: Classical and Modern Encryption Techniques Lecture 2: Classical and Modern Encryption Techniques For Educational Purposes Only Revised: September.
Chapter 2 – Classical Encryption Techniques
3.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3 Traditional Symmetric-Key Ciphers.
Cryptography Week-6.
History and Background Part 1: Basic Concepts and Monoalphabetic Substitution CSCI 5857: Encoding and Encryption.
Section 3.6: An Introduction to Cryptography
Chapter 2 Basic Encryption and Decryption. csci5233 computer security & integrity 2 Encryption / Decryption encrypted transmission AB plaintext ciphertext.
Lecture 2 Overview.
3.1 SERVICES AND MECHANISMS SERVICES AND MECHANISMS The International Telecommunication Union- Telecommunication Standardization Section (ITU-T) provides.
Security in Computing Cryptography (Introduction) Derived from Greek words: ‘Kruptos’ (hidden) and ‘graphein’ (writing.
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
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.
Chapter 20 Symmetric Encryption and Message Confidentiality.
Lec. 5 : History of Cryptologic Research II
Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:
ITMS – 3153 Information Systems Security
1 Chapter 2-1 Conventional Encryption Message Confidentiality.
Network Security Lecture 11 Presented by: Dr. Munam Ali Shah.
Symmetric-Key Cryptography
9/03/15UB Fall 2015 CSE565: S. Upadhyaya Lec 2.1 CSE565: Computer Security Lecture 2 Basic Encryption & Decryption Shambhu Upadhyaya Computer Science &
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.
Lecture 23 Symmetric Encryption
Computer Science and Engineering Computer System Security CSE 5339/7339 Lecture 3 August 26, 2004.
TOTURIAL CRYPTOGRAPHY Ver :1. Things to learn about  Concepts of encryption  Cryptanalysis  Symmetric encryption  Asymmetric encryption  Protocols.
K. Salah1 Cryptography Module I. K. Salah2 Cryptographic Protocols  Messages should be transmitted to destination  Only the recipient should see it.
Intro to Cryptography Lesson Introduction
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
Lecture 4 Page 1 CS 236 Online Basic Encryption Methods Substitutions –Monoalphabetic –Polyalphabetic Permutations.
R R R CSE870: Advanced Software Engineering: Cheng1 Encryption A Brief Overview.
EEC 688/788 Secure and Dependable Computing Lecture 3 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
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.
Chapter Two: Classic Cryptography
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.
COMPUTER AND NETWORK SECURITY First of all, an introduction to the field of computer security and some of relevant issues are presented. Then, a background.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 4. Traditional and Modern.
CRYPTOGRAPHY G REEK WORD MEANING “ SECRET WRITING ”
Substitution Ciphers.
CSE565: Computer Security Lecture 2 Basic Encryption & Decryption
Chapter 2 Basic Encryption and Decryption
Cryptography.
Hide It in Plain Sight CS 490 Bob Orr
Cryptography II Jagdish S. Gangolly School of Business
Classical Cryptography II
Presentation transcript:

CMPE 471 BASIC ENCRYPTION AND DECRYPTION

TERMINOLOGY & BACKGROUND S R S T RT O O Suppose S (Sender) wants to send a message to R (Reciever). S entrusts the message to T, who will deliver it to R; T then becomes the transmission medium. If an outsider, O, wants the message and tries to access it, we will call O an interceptor or intruder.

TERMINOLOGY & BACKGROUND S T OAny time after S transmits via T, the message is exposed, so O might try to access the message: R –Block it, by preventing it to reach to R: availability –Intercept it, by reading or listening to the message: secrecy –Modify it, by seizing the message and changing it: integrity S –Fabricate an authentic looking message, arranging as if it came from S: integrity.

TERMINOLOGY & BACKGROUND Encryption (encode/ encipher):Encryption (encode/ encipher): –Process of encoding a message so that its meaning is not so obvious. Decryption (decode/ decipher):Decryption (decode/ decipher): –Is the reverse process: transforming an encrypted message back into its normal form. Cryptosystem:Cryptosystem: –A system for encryption and decryption Plaintext:Plaintext: –The original form of the message Ciphertext:Ciphertext: –The encrypted form of the message.

TERMINOLOGY & BACKGROUND Encryption Algorithms:Encryption Algorithms: Some encryption algorithms use a key K, so that the ciphertext message depends on both the original plaintext message and the key value C = E(K,P) E is a set of encryption algorithms, and the key K selects one specific algorithm. Sometimes the encryption and decryption keys are the same; P = D(K, E(K,P)). This is called symmetric encryption since D and E are mirror-image processes. Other times encryption and decryption keys come in pairs. Then a decryption key K inverts the encryption of key K so that P = D(K, E(K,P)). Encryption algorithms of this form are called asymmetric, because converting C back to P is not just reversing the steps of E. D EDE

ENCRYPTION ALGORITHMS Plaintext Encryption Ciphertext Decryption Original Plaintext ENCRYPTION

ENCRYPTION ALGORITHMS Plaintext Encryption Ciphertext Decryption Original Plaintext Key Symmetric Cryptosystem Plaintext Encryption Ciphertext Decryption Original Plaintext Encryption Key K E Encryption Key K D Asymmetric Cryptosystem

ENCRYPTION ALGORITHMS Cryptograpghy:Cryptograpghy: –Hidden writing, the practice of using encryption to conceal text. Cryptanalyst:Cryptanalyst: –Studies encryption and encrypted messages, with the goal of finding the hidden meanings of the messages. Cryptology:Cryptology: –Is the research into and study of encryption and decryption; it includes both cryptography and cryptanalysis.

ENCRYPTION ALGORITHMS Substitution:Substitution: –One letter is exchanged for another Transposition:Transposition: –The order of the letters is rearranged

MONOALPHABETIC CIPHERS (SUBSTITUTIONS) The Caesar Cipher:The Caesar Cipher: –Named after Julius Caeser. Each letter is translated to the letter a fixed number of letters after it in the alphabet. Caesar used to shift 3, so that plaintext letter p was enciphered as ciphertext letter c by the rule c = E(p ) = p +3 Plaintext A B C D E F G H I J K L M N O P Q R S T U V W Y Z Chiphertext d e f g h i j k l m n o p q r s t u v w y z a b c i i iii

MONOALPHABETIC CIPHERS (SUBSTITUTIONS) Using this encryption encode the below message TREATY IMPOSSIBLE Would be encoded as TREATY IMPOSSIBLE wu hd wb l p s r vv le o h

MONOALPHABETIC CIPHERS (SUBSTITUTIONS) The pattern p + 3 is easy to memorise and it is a simple cipher. That obvious pattern is also the major weakness of the Ceasar cipher. A secure encryption should not allow an interceptor to use a little piece to predict the entire pattern of the encryption. i

EXERCISE I Please decipher the following: dh ey vdedk duded wdpluflvlqh jlwwlp vrqud eludc jhcphbh jlwwlp zh rnyod jhoglp eyudgd ghuvlp zdu

ANSWER ben bu sabah araba tamircisine gittim sonra biraz gezmeye gittim ve okula geldim burada dersim var

EXERCISE II Please make the cryptanalysis of Caesar chipher.

ANSWER Suppose you were trying to break the following ciphertext message: Wklv phvvdjh lv qrw wrr kdug wr euhdn The message has been enciphered with a 27- symbol alphabet –Worst of all the blank has been translated to itself –It shows which are the small words –In encryption spaces between words often are deleted under the assumption that a legitimate reciever can breakmostmessagesintowordsfairlyeasily.

ANSWER English has relatively few small words such as am, is, to, be, he, we, and, are, you, she... One attack is to substitute known short words at appropriate places in the ciphertext and try to substituting for matching characters other places in the ciphertext. A stronger clue is the repeated R in the word wrr: see, too, add, odd, off

ANSWER The cryptanalysis here is ad hoc –Uses deduction based on guesses instead of solid principles. Another approach is to consider which letters commonly start words, which letters commonly end words, and which prefixes and suffixes are common.

Polyalphabetic Substitution Ciphers The weakness of monoalphabetic ciphers is that their frequency distribution reflects the distribution of the underlying alphabet. A cipher that is more cryptographicaly secure would display a rather flat distribution, which gives no information to cryptanalyst. One way to flatten the distribution is to combine distributions that are high with ones that are low: –If T is enciphered as a and b, and if X is also enciphered as a and b, the high frequency of T mixes with the low frequency of X to produce a more moderate distribution for a and b.

Polyalphabetic Substitution Ciphers We can combine two distributions by using two separate encryption alphabets –All charaters in odd positions of the plaintext message –All characters in even positions 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 a d g j m p s v y b e h k n q t w z c f i l o r u x 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 n s x c h m r w b g l q v a f k p u z e j o t y d i Table for odd positions Table for even positions

Polyalphabetic Substitution Ciphers The first table uses the permutation ∏ı(λ) = (3*λ) mod 26 The second uses the permutation ∏ 2 (λ) = ((5*λ) + 13) mod 26 Encryption with these tables would be TREATY IMPOSSIBLE f u m nf dyvtf czysh h

Polyalphabetic Substitution Ciphers Notice that the double S becomes cz and that the two Es are enciphered as m and h Polyalphabetic encryption flattens the frequency distribution of the plaintext considerably.

EXERCISE 3 Please make the cryptanalysis of polyalphabetic substitutions

ANSWER With a little help from frequency distributions and letter patterns you can break monoalphabetic substitution by hand With the aid of computer programs and with an adequate amount of ciphertext, a good cryptanalyst can break such a cipher in an hour. In some applications the prospect of one day’s effort may not make sense and it may be enough to protect the message. There are two tools that can decrypt messages written even with a large number of alphabets –The Kasiski method for repeated patterns: the method relies on the regularity of English. If a message is encoded with n alphabets in cyclic rotation, and if a particular word or letter group apperas k times in a plaintext message, it should be encoded approximately k/n times from the same alphabet. –Index of Coincidence: to rate how well a particular distribution matches the distribution of letters in English. The index of coincidence is a measure of the variation between frequencies in a distribution.

Summary of Substitutions Substitutions are effective cryptographic devices used in diplomatic communications and appeared in the mysteries of –Arthur Conan Doyle, Allan Poe, Agatha Cristie... The presentation of substitution ciphers has also introduced several cryptoanalytic tools: –Frequency distribution –Index of coincidence –Consideration of highly likely letters and probable words –Repeated pattern analysis and the Kasiski approach –Persistence, organisation, ingenuity, and luck

Transpositions (Permutations) The goal of substitution is confusion, an attempt to make it difficult to determine how a message and key were transformed into ciphertext. A transposition is an encryption in which the letters of the message are rearranged. –The goal is diffusion, spreading the information from the message or the key out widely across the ciphertext: permutation.

Transpositions (Permutations) CıCıC2C2 C3C3 C4C4 C5C5 C6C6 C7C7 C8C8 C9C9 C 10 C 11 C 12 etc. CıCıC2C2 C3C3 C4C4 C5C5 C6C6 C7C7 C8C8 C9C9 C 10 C 11 C 12 etc. THISI SAMES SAGET OSHOW HOWAC OLUMN ARTRA NSPOS ITION WORKS five-column transposition Plaintext message Ciphertext is formed by traversing the columns

Transpositions (Permutations) The resulting ciphertext would then be read as tssoh oaniw haaso lrsto imghw utpir seeoa mrook istwc nasns The length of this message happened to be a multiple of five, so all columns came out the same length If the message length is not a multiple of the length of a row, the last columns will be a letter short.

Transpositions (Permutations) Encipherment/ Decipherment Complexity Involves no additional work beyond arranging the letters and reading them off again. The algorithm is constant in the amount of work per character, and the time for the algorithm is proportional to the length of the message This algorithm requires storage for all characters of the message, so the space required is not constant but depends directly on the length of the message. Because of the storage space and the delay involved, it is not appropriate for long messages.

Transpositions (Permutations) Diagrams:Diagrams: –Characteristic patterns of pairs of adjacent letters. –Such as –re, -th, -en, -ed, -on, -in, -an... Trigrams:Trigrams: –Groups of three letters in English –Such as –ent, -ion, -ing, -ive, -for, -one...

EXERCISE 4 Please make the cryptanalysis of transpositions

ANSWER The basic attack on columnar transpositions is not as precise as the attack on substitution ciphers. Transpositions look less secure since they leave the plaintext letters intact, the work for cryptanalyst is more exhausting, because it relies on a human judgement of what ‘looks right’. The process involves exhaustive comparison of strings of ciphertext. –Compares a block of ciphertext characters against characters successively farther away in the ciphertext.

Fractionated Morse Morse Code: –Means of representing letters as sequences of dots and dashes, used with telegraphs, and flashing lights. A.-H....O---U..- B-...I..P.--.V...- C-.-.J.---Q--.-W.-- D-..K-.-R.-.X-..- E.L.-..S...Y-.-- F..-.M--T-Z--.. G--.N-.

Stream Ciphers They convert one symbol of plaintext immediately into a symbol of ciphertext (columnar transposition is the exception). The transformation depends only on the symbol, the key, and control information of the encipherment algorithm. Y Plaintext ISSOPMI Ciphertext wdhuw... Key (Optional) Encryption Stream Encryption

Stream Ciphers Advantages:Advantages: –Speed of transformation: each symbol is encrypted without regard for any other plaintext symbols, each symbol can be encrypted as soon as it is read. Thus the time to encrypt each symbol depends only on the encryption algorithm itself, not on the time it takes to receive more plaintext. –Low error propogation: since each symbol is separately encoded, an error in the encryption process affects only that character.

Stream Ciphers Disadvantages:Disadvantages: –Low diffusion:each symbol is separately enciphered. Therefore, all the information of that symbol is contained in one symbol of the ciphertext. A cryptanalyst can attempt to break it by analaysing the characteristics of all individual symbols of the ciphertext, using tools such as frequency distribution counts, Kasiski method, etc. –Susceptibility to malicious insertions and modifications: because each symbol is separately encipherde, an active interceptor who has broken the code can splice together pieces of previous messages and transmit a spurious new message that may look authentic.

Block Ciphers Encrypt a group of plaintext symbols as one block. Columnar transpositions and other transpositions are examples of block ciphers. Key (Optional) IH PlaintextCiphertext Encryption XN OI TP YR CN ES ba qc kd em mc po Block Cipher Systems

Block Ciphers Advantages:Advantages: –Diffusion: information from plaintext is diffused into several ciphertext symbols. One ciphertext block may depend on several plaintext letters. –Immunity to insertions: because blocks of symbols are enciphered, it is impossible to insert a single symbol into one block. The length of the block would then be incorrect, and the decipherment would quickly reveal the insertion.

Block Ciphers Disadvantages:Disadvantages: –Slowness of encryption: block ciphers must wait until an entire block of plaintext symbols has been received before starting the encryption process. –Error propagation: an error will affect the transformation of all characters in the same block.

Good Ciphers Shannon Characteristics:Shannon Characteristics: –The amount of secrecy needed should determine the amount of labour appropriate for the encryption and decryption –The set of keys and the enciphering algorithm should be free from complexity –The implementation of the process should be as simple as possible –Errors in ciphering should not propogate and cause corruption of further information in the message –The size of the enciphered text should be no longer than the text of the original message.