R R R CSE870: Advanced Software Engineering: Cheng1 Encryption A Brief Overview.

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 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.
Making “Good” Encryption Algorithms
Cryptology  Terminology  plaintext - text that is not encrypted.  ciphertext - the output of the encryption process.  key - the information required.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering.
EEC 688/788 Secure and Dependable Computing Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Elementary Cryptography Steven Bogaerts. Goal of Cryptography ● Ensure security of communication over insecure medium  Privacy (secrecy, confidentiality)
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
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.
Chapter 3 Encryption Algorithms & Systems (Part B)
8: Network Security8-1 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key: K r e.g., key is knowing substitution.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
Chapter 13: Electronic Commerce and Information Security Invitation to Computer Science, C++ Version, Fourth Edition SP09: Contains security section (13.4)
IT 221: Classical and Modern Encryption Techniques Lecture 2: Classical and Modern Encryption Techniques For Educational Purposes Only Revised: September.
Cryptography Week-6.
A Cryptography Education Tool Anna Yu Department of Computer Science College of Engineering North Carolina A&T State University June 18, 2009.
Chapter 2 Basic Encryption and Decryption. csci5233 computer security & integrity 2 Encryption / Decryption encrypted transmission AB plaintext ciphertext.
Lecture 2 Overview.
Security in Computing Cryptography (Introduction) Derived from Greek words: ‘Kruptos’ (hidden) and ‘graphein’ (writing.
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.
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.
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 &
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.
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.
R R R CSE870: Advanced Software Engineering: Cheng (Sp 2003)1 Outline Brief review Mainstream crypto-algorithms –Symmetric encryption algorithms DES –Asymmetric.
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.
CRYPTOGRAPHY PRESENTED BY : NILAY JAYSWAL BRANCH : COMPUTER SCIENCE & ENGINEERING ENTRY NO. : 14BCS033 1.
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
EEC 688/788 Secure and Dependable Computing Lecture 3 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
Encryption and Encryption and Decryption Speaker:Tsung Ray Wang Advisor:Prof.Li-Chun Wang.
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.
1 Introduction to Cryptography Chapter-4. Definitions  Cryptography = the science (art) of encryption  Cryptanalysis = the science (art) of breaking.
CRYPTOGRAPHY G REEK WORD MEANING “ SECRET WRITING ”
Substitution Ciphers.
CSE565: Computer Security Lecture 2 Basic Encryption & Decryption
Chapter 2 Basic Encryption and Decryption
Cryptography.
EEC 688/788 Secure and Dependable Computing
PART VII Security.
Presentation transcript:

R R R CSE870: Advanced Software Engineering: Cheng1 Encryption A Brief Overview

R R R CSE870: Advanced Software Engineering: Cheng2 Encryption Encryption: –Definition: mechanisms to disguise the message so that if the information is intercepted/diverted, the content of the message will not be understood. –Impact: foundational building block to security-based computing

R R R CSE870: Advanced Software Engineering: Cheng3 Terminology Scenario: –S wants to send the message T to R, where an outsider, O, wants the message and tries to access it. –S: Sender –R: Receiver –T: Transmission Medium –O: Interceptor or Intruder. 4 ways O might try to access message. –Block it: prevent T from reaching R (availability) –Intercept it: read or listen to message (secrecy) –Modify it: obtaining message and changing it –Fabricate: generate an authentic-looking message to be delivered to R appearing to come from S

R R R CSE870: Advanced Software Engineering: Cheng4 Terminology Encryption: process of encoding a message so that its meaning is not obvious Decryption: transforming encrypted message back to its normal form Encode/decode: translating phrases to other words or phrases Encipher/decipher: translating letters or symbols individually. Plaintext: original form of message: P = (p1,p2,…, pn) Ciphertext: encrypted form of message: C = (c1,c2,…, cn) Encryption/decryption relationships: –C = E(P); P = D(C); P = D(E(P))

R R R CSE870: Advanced Software Engineering: Cheng5 Encryption Algorithms Some encryption algs use a key K –C = E(K,P) –E is a SET of encryption algs –Key K selects specific one Symmetric Encryption: P = D(K,E(K,P)) –encryption/decryption keys are the same Asymmetric Encryption: P = D(K D,E(K E,P))

R R R CSE870: Advanced Software Engineering: Cheng6 Pictorial Representation Key PlaintextCiphertext Original Plaintext EncryptionDecryption Encryption Key PlaintextCiphertext Original Plaintext EncryptionDecryption Decryption Key KDKD KEKE Symmetric Encryption: Asymmetric Encryption:

R R R CSE870: Advanced Software Engineering: Cheng7 More Terms Cryptography: (hidden writing) –Practice of using encryption to conceal text Cryptanalyst: –Person who studies encryption and encrypted messages –Intent: find hidden meaning Cryptographer and Cryptanalyst: –Both attempt to translate coded material to original form –Cryptographer: works on behalf of legitimate sender or receiver. –Cryptanalyst: Works on behalf of unauthorized interceptor Cryptology: research/study into encryption/decryption –Includes cryptography and cryptanalysis.

R R R CSE870: Advanced Software Engineering: Cheng8 Cryptanalysis Objective: Break an encryption –Deduce the meaning of a ciphertext mesg –Determine decrypting algorithm that matches an encrypting algorithm Possible techniques: –break single message –Recognize patterns in encrypted msgs break subsequent msgs with straightforward decryption alg –Find general weaknesses in encryption alg Without necessarily intercepting any msgs Tools: –Encrypted msgs, known encryption algs, intercepted plaintext, data elements known/suspected of being in ciphertext, mathematical/statistical techniques, props of languages, computers, and luck

R R R CSE870: Advanced Software Engineering: Cheng9 Breakable Encryption Encryption algorithm is BREAKABLE: –Given enough time/data, an analyst could determine alg. –Practicality is issue –For given cipher scheme, may have possible decipherments Select one from –Current technology: perform ops/sec Require secs == years Reality Check: –Cryptanalyst won’t just try the “hard” ways Ex: more clever approach, might only take ops –10 10 ops/sec, ops will take about one day –Breakability estimates are based on CURRENT technology

R R R CSE870: Advanced Software Engineering: Cheng10 Character Representations Study ways to encrypt any computer material: –ASCII/EBCDIC chars –Binary data or Object code –Control stream ABCDEFGHIJKLM NOPQRSTUVWXYZ

R R R CSE870: Advanced Software Engineering: Cheng11 Substitution-based Encryption Monoalphabetic Ciphers –Caesar Cipher: c i = E(p i ) = p i + 3 wuhdwb lpsrvvleoh, wklv phvvdjh lv qrw wrr kdug wr euhdn Easy to perform in field (no written instructions) –Permutation: reordering of the elements c i = a  (p i ) ;  –Use a key: –Weakness: study frequency distribution ABCDEFGHIJKLMNOPQRSTUVWXYZ KEY ABCDEFGHIJKLMNOPQRSTUVWX SPE CTAULRBDFGHIJKNNOQVWXYZ

R R R CSE870: Advanced Software Engineering: Cheng12 Polyalphabetic Substitution Ciphers Desire flat distribution Combine distributions that are high with low ones –Encipher T as a and sometimes as b –Also encipher X as a and sometimes as b Use two separate encryption alphabets –Tables for odd and even positions    mod 26    mod 26 TREAT YIMPO SSIBL E Fumnf dyvtf czysh h

R R R CSE870: Advanced Software Engineering: Cheng13 Substitution Discussion Major weakness: –frequency distribution (index of coincidence: measure of variation between frequencies in a distribution) –Some letters are just used more frequently than others –Numerous enciphering techniques still can make it difficult to hide these patterns –Kasiski Method: find number of alphabets used Identify repeated patterns of 3 or more chars For each pattern, write down position at which each instance of pattern begins Compute difference between start points of success instances Determine all factors of each difference If polyalphabetic subst used, key length will be one of the factors that appears often in previous step.

R R R CSE870: Advanced Software Engineering: Cheng14 Transpositions (Permutations) Definition: encryption where letters are rearranged. Goal: diffusion, spread info from message or key out widely across the ciphertext. Try to break established patterns.

R R R CSE870: Advanced Software Engineering: Cheng15 Transposition Techniques Columnar Transpositions: –Rearrangement of chars of plaintext into cols C1C2C3C4C5 C6C7C8C9C10 C11C12Etc. THISI SAMES SAGET OSHOW HOWAC OLUMN ARTRA NSPOS ITION WORKS tssoh oaniw haaso lrsto imghw utpir seeoa mrook istwc nasns

R R R CSE870: Advanced Software Engineering: Cheng16 Transpositions Digram: patterns of adjacent letters. –Study 2 and 3 letter combinations of adj letters Double Transposition Alg: –Involves 2 columnar transpositions –With different number of columns, applied sequentially. Fractionated Morse: – keyed monoalphabetic cipher –Result is subsequently blocked (clustered) –Morse code is used as its basis

R R R CSE870: Advanced Software Engineering: Cheng17 Secure Encryption Systems Previous algs could be completed manually, although tedious –Decryption could also be done manually New technology requires more “hard” encryption algs to hinder cryptanalysts Review 3 key, important encryption algs Look at recent developments.

R R R CSE870: Advanced Software Engineering: Cheng18 Important Encryption Algs Merkle-Hellman knapsack: –Alg based on “hard” problems (NP-complete) Rivest-Shamir-Adelman (RSA): –More resilient to attacks than Merkle alg Data Encryption Standard (DES): –Developed with support from NIST –Provide secure encryption for commerical applications Clipper program: –Skipjack: cryptographic alg – maintain secrecy

R R R CSE870: Advanced Software Engineering: Cheng19 Some “Hard” theories NP-complete: –Encryption algs that would require NP-complete alg to decrypt Number theory: –Inverses –Primes –Modular Arithmetic –Euclidean alg: procedure for computing gcd of 2 numbers.

R R R CSE870: Advanced Software Engineering: Cheng20 Public Key Encryption Traditional key system: –Need a key for every pair of users –N*(N-1)/2 keys, grows exponentially with users –Each user has to keep track of many keys Public key (asymmetric encryption system) –Each user has 2 keys: public and private key –May publish the public key freely, inverses –P=D(k PRIV,E(k PUB,P)) –Only 2 keys are needed per user –B, C, and D can ally encrypt mesgs for A with A’s public key

R R R CSE870: Advanced Software Engineering: Cheng21 Merkle-Hellman Knapsacks Knapsack problem: –Set of positive integers –Target sum –Find subset of integers that equal the target –NP-complete alg. Encode binary mesg as soln to knapsack problem –Reduce ciphertext to target sum –By adding terms corresponding to 1s in plaintext –Convert blocks of plaintext to knapsack sum by adding into sum the terms that match with 1 bits in plaintext.

R R R CSE870: Advanced Software Engineering: Cheng22 Superincreasing Knapsack Superincreasing sequence: –Each integer is greater than sum of all preceding integers –a k >  j=1 k-1  a j –Solution of superincreasing knapsack (e.g., simple knapsack) is easy to find Convert simple knapsack into Hard knapsack –Pick superincreasing sequence S of m integers S = [s 1, s 2,.., s m ] Choose multiplier w and modulus n, n >  j=1 m-1  s i Choose n to be prime Replace every s j in simple knapsack with term: h i = w* s i mod n –Hard knapsack: H = [h 1, h 2,.., h m ]

R R R CSE870: Advanced Software Engineering: Cheng23 Merkle-Hellman (cont’d) Merkle-Hellman is Public key cryptosystem –Each user has public key: Set of integers of a (simple) knapsack problem – Each user has private key Set of integers for corresponding superincreasing knapsack Contribution: design of technique to convert superincreasing knapsack into a regular one. –Change numbers in nonobvious, reversible way.

R R R CSE870: Advanced Software Engineering: Cheng24 Merkle-Hellman (cont’d) Encryption alg starts with binary message –P = [p 1, p 2,.., p k ] Divide message into blocks of m bits, –P 0 = [p 1, p 2,.., p m ], P 1 = [p 1, p 2,.., p 2m ], –Value of m is number of terms in simple or hard knapsack Encipherment of message P is sequence of targets –Each target is sum of some of the terms of the hard knapsack H –Terms selected correspond to 1 bits in P i, –P i serves as selection vector for elts of H –Each term of ciphertext is P i * H

R R R CSE870: Advanced Software Engineering: Cheng25 Merkle-Hellman (cont’d) Decryption: –Legitimate recipient knows simple knapsack and values of w and n H = w * S mod n C = H * P – w* S* P mod n To decipher, multiply C by w -1 w -1 * C = w -1 * H * P = w -1 * w * S * P = S * P mod n Weaknesses: –How easy is it to determine w or n from H?

R R R CSE870: Advanced Software Engineering: Cheng26 Example S= [1,2,4,9]; H= [15,13,9,16], w= 15, n= 17, m = 4; h i = w* s i mod n P = Encode with H as follows: –P = –[0,1,0,0] * [15,13,9,16] = 13 –[1,0,1,1] * [15,13,9,16] = 40 –[1,0,1,0] * [15,13,9,16] = 24 –[0,1,0,1] * [15,13,9,16] = 29 Encrypted message as integers: 13,40,24,29, –Public knapsack H = [15,13,9,16]

R R R CSE870: Advanced Software Engineering: Cheng27 RSA: Rivest-Shamir-Adelman Superficially looks similar to Merkle-Hellman: Exploits number theory and finding prime factors of a target: –C = P e mod n; P = C d mod n Symmetry in modular arithmetic –encryption/decryption are mutual inverses and commutative. –P = C d mod n = (P e ) d mod n = (P d ) e mod n Choosing keys: (e, n) and (d,n) –Select value for n should be quite large: a product of two large primes p and q (100 digits ea) –Select value for e: relatively prime to (p –1) * (q-1) E has no common factors with above product. Choose e as prime larger than both (p-1) and (q-1) –Select value for d: e * d = 1 mod (p-1) * (q-1) How to use: user distributes e and n, keeps d secret To encrypt, need to find large prime numbers.

R R R CSE870: Advanced Software Engineering: Cheng28 DES: Data Encryption Standard Developed for US govt for general public use. Repeats 16 cycles of substitution and transposition –Shannon’s theory of information secrecy Confusion: info is changed so that output bits have no obvious relation to input bits Diffusion: spread the effect of one plaintext bits to other ciphertext bits. –Splits data block into 2 pieces: Scrambles each half independently Combines key with one half –(key is transformed during each cycle) Swap 2 halves Repeat 16 times.

R R R CSE870: Advanced Software Engineering: Cheng29 One Cycle in DES Left HalfRight Half New Left Half (Old Right Half) New Right Half + + Key shifted Permuted Key Permuted Data [Pfleeger97]