Computer Science CSC 405By Dr. Peng Ning1 CSC 405 Introduction to Computer Security Topic 2. Basic Cryptography (Part II)

Slides:



Advertisements
Similar presentations
ONE WAY FUNCTIONS SECURITY PROTOCOLS CLASS PRESENTATION.
Advertisements

Public Key Encryption Algorithm
 Stream ciphers o Encrypt chars/bits one at a time o Assume XOR w the key, need long key to be secure  Keystream generators (pseudo-random key) o Synchronous.
Dr. Lo’ai Tawalbeh Summer 2007 Chapter 9 – Public Key Cryptography and RSA Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus INCS.
Announcement Homework 1 out, due 1/18 11:59pm If you purchased the textbooks, but it hasn’t arrived, please see TA for copies of the questions, Project.
Review Overview of Cryptography Classical Symmetric Cipher
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Cryptography and Network Security Chapter 9. Chapter 9 – Public Key Cryptography and RSA Every Egyptian received two names, which were known respectively.
Public Key Cryptography and the RSA Algorithm
Cryptography & Number Theory
Cryptography1 CPSC 3730 Cryptography Chapter 9 Public Key Cryptography and RSA.
Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender and receiver if this key is disclosed communications.
The School of Electrical Engineering and Computer Science (EECS) CS/ECE Network Security Dr. Attila Altay Yavuz Topic 5 Essential Public Key Crypto Methods.
Dr.Saleem Al_Zoubi1 Cryptography and Network Security Third Edition by William Stallings Public Key Cryptography and RSA.
Public Key Algorithms 4/17/2017 M. Chatterjee.
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.
Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.5 Public Key Algorithms.
Encryption Schemes Second Pass Brice Toth 21 November 2001.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
ASYMMETRIC CIPHERS.
Public Key Model 8. Cryptography part 2.
 Introduction  Requirements for RSA  Ingredients for RSA  RSA Algorithm  RSA Example  Problems on RSA.
Chapter 12 Cryptography (slides edited by Erin Chambers)
Lecture 15 Lecture’s outline Public algorithms (usually) that are each other’s inverse.
Prime Numbers Prime numbers only have divisors of 1 and self
Network and Communications Network Security Department of Computer Science Virginia Commonwealth University.
RSA and its Mathematics Behind
RSA Ramki Thurimella.
10/1/2015 9:38:06 AM1AIIS. OUTLINE Introduction Goals In Cryptography Secrete Key Cryptography Public Key Cryptograpgy Digital Signatures 2 10/1/2015.
Chapter 20 Symmetric Encryption and Message Confidentiality.
1 Lecture 9 Public Key Cryptography Public Key Algorithms CIS CIS 5357 Network Security.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Midterm Review Cryptography & Network Security
Chapter 20 Symmetric Encryption and Message Confidentiality.
Module 3 – Cryptography Cryptography basics Ciphers Symmetric Key Algorithms Public Key Algorithms Message Digests Digital Signatures.
Day 37 8: Network Security8-1. 8: Network Security8-2 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key:
Cryptography Wei Wu. Internet Threat Model Client Network Not trusted!!
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
Public-Key Encryption
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
1 Public-Key Cryptography and Message Authentication.
Cryptography and Network Security Chapter 9 - Public-Key Cryptography
The RSA Algorithm. Content Review of Encryption RSA An RSA example.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
RSA and its Mathematics Behind July Topics  Modular Arithmetic  Greatest Common Divisor  Euler’s Identity  RSA algorithm  Security in RSA.
15-499Page :Algorithms and Applications Cryptography I – Introduction – Terminology – Some primitives – Some protocols.
Scott CH Huang COM 5336 Cryptography Lecture 6 Public Key Cryptography & RSA Scott CH Huang COM 5336 Cryptography Lecture 6.
Advanced Encryption Standard. Origins NIST issued a new version of DES in 1999 (FIPS PUB 46-3) DES should only be used in legacy systems 3DES will be.
Chapter 9 Public Key Cryptography and RSA. Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender.
Fall 2002CS 395: Computer Security1 Chapter 9: Public Key Cryptography.
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
PUBLIC-KEY CRYPTOGRAPHY AND RSA – Chapter 9 PUBLIC-KEY CRYPTOGRAPHY AND RSA – Chapter 9 Principles Applications Requirements RSA Algorithm Description.
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
CS 4803 Fall 04 Public Key Algorithms. Modular Arithmetic n Public key algorithms are based on modular arithmetic. n Modular addition. n Modular multiplication.
Computer Security Lecture 5 Ch.9 Public-Key Cryptography And RSA Prepared by Dr. Lamiaa Elshenawy.
Computer Science and Engineering Computer System Security CSE 5339/7339 Lecture 10 September 21, 2004.
1 Introduction to Computer Security Topic 2. Basic Cryptography (Part II)
Lecture 3 (Chapter 9) Public-Key Cryptography and RSA Prepared by Dr. Lamiaa M. Elshenawy 1.
RSA Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Chapter 9 – Public Key Cryptography and RSA Every Egyptian received two names, which were known respectively as the true name and the good name, or the.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
CSEN 1001 Computer and Network Security Amr El Mougy Mouaz ElAbsawi.
Cryptography services Lecturer: Dr. Peter Soreanu Students: Raed Awad Ahmad Abdalhalim
Public Key Cryptography. Asymmetric encryption is a form of cryptosystem in which Encryption and decryption are performed using the different keys—one.
Public Key Cryptography
Lecture 6 Overview.
The RSA Public-Key Encryption Algorithm
Presentation transcript:

Computer Science CSC 405By Dr. Peng Ning1 CSC 405 Introduction to Computer Security Topic 2. Basic Cryptography (Part II)

Computer Science CSC 405By Dr. Peng Ning2 AES (Advanced Encryption Standard) January 1997: NIST called for AES contest –Requirements Unclassified Publicly disclosed Available royalty-free for use worldwide Symmetric block cipher, for blocks of 128 bits Usable with key sizes of 128, 192, and 256 bits August 1998: 15 candidates submitted August 1999: 5 finalists Winning algorithm: Rijndael –Inventors: Vincent Rijmen and Joan Daemen (Dutch cryptographers) –The other four candidates are all security –Selection based on efficiency and implementation characteristics December 2001: AES adopted for use in the US government

Computer Science CSC 405By Dr. Peng Ning3 Overview of AES Has a strong mathematical foundation Primarily use –Substitution, transposition, shift, XOR, and addition operations Use repeat rounds –9 rounds for keys of 128 bits –11 rounds for keys of 192 bits –13 rounds for keys of 256 bits Rijndael can use any key length that is the multiple of 64 –AES only recognizes 128, 192, and 256 Rijndael is defined for blocks of 128, 192, and 256 bits –AES specifies 128 bit blocks

Computer Science CSC 405By Dr. Peng Ning4 AES Each round consists of –Byte substitution –Shift row –Mix column –Add subkey

Computer Science CSC 405By Dr. Peng Ning5 AES (Cont’d) Representation –128 bits  16 bytes  matrix s[0,0]..s[3,3] Byte substitution –Input b –Take the multiplicative inverse of b in GF(2 8 ) defined by P=x 8 +x 4 +x 3 +x+1 Ensure each value appears exactly once –XOR the result with 0x63 ( ) Help break up patterns

Computer Science CSC 405By Dr. Peng Ning6 AES (Cont’d) Shift row –Row i is rotated left (i  1) bytes Rijndael 256 bit blocks –Rows 3 and 4 are shifted an extra byte

Computer Science CSC 405By Dr. Peng Ning7 AES (Cont’d) Mix column –Each column is multiplied by a matrix –Arithmetic operations performed in GF(2 8 ) Add subkey –XOR a variation of the key with the result so far

Computer Science CSC 405By Dr. Peng Ning8 AES (Cont’d) Subkey generation –128 bit key represented as four 32-bit words w 1 w 2 w 3 w 4 –Transformation of w1 into w 1 ’ w 1 rotate one byte left Byte substitution XOR with a constant –The rest of the words are produced by XOR of the original word with w 1 ’ First key is the original key Each later variation is generated from the previous one

Computer Science CSC 405By Dr. Peng Ning9 Strength of AES Backed up by sound mathematical foundation Undergone extensive cryptanalysis by independent cryptographers –No flaw found

Computer Science CSC 405By Dr. Peng Ning10 Public Key Cryptography (PKC) Requirements for Public-Key Algorithms –It is computationally easy to generate a pair of public key and private key –It is computationally easy to generate a ciphertext using the public key –It is computationally easy to decrypt the ciphertext using the private key –It is computationally infeasible to determine the private key from the public key –It is computationally infeasible to recover the message from the ciphertext and the public key

Computer Science CSC 405By Dr. Peng Ning11 Trapdoor One-Way Function Essential requirement: Trapdoor one-way function. One-way function f –One-to-one mapping –Y=f(X): easy –X=f  1 (Y): infeasible Trapdoor one-way function –One-to-one mapping –Y=f k (X): easy if k and X are known –X=f  1 k (Y): easy if k and Y are known – X=f  1 k (Y): infeasible if Y is known but k is unknown. Designing public-key algorithm is to find appropriate trapdoor one-way function

Computer Science CSC 405By Dr. Peng Ning12 Public-Key Cryptanalysis Brute-force attack –Try all possible keys Derivation of private key from public key –Try to find the relationship between the public key and the private key and compute the private key from the public one Probable-message attack –The public key is known –Encrypt all possible messages –Try to find a match between the ciphertext and one of the above encrypted messages

Computer Science CSC 405By Dr. Peng Ning13 RSA (Rivest, Shamir, Adleman) The most popular one Support both public key encryption and digital signature Assumption/theoretical basis: –Factorization of large integers is hard Variable key length (usually 1024 bits) Variable plaintext block size –Plaintext must be “smaller” than the key –Ciphertext block size is the same as the key length

Computer Science CSC 405By Dr. Peng Ning14 Modulo Operator Given any positive integer n and any integer a, we have a = qn+r, where 0  r<n and q=  a/n  –We write r = a mod n –The remainder r is often referred to as a residue –Example: 2 = 12 mod 5 Two integer a and b are said to be congruent modulo n if a mod n = b mod n –We write a  b mod n –Example: 7  12 mod 5

Computer Science CSC 405By Dr. Peng Ning15 Modulo Operator (Cont’d) Properties of modulo operator –a  b mod n if n|(a – b) –(a mod n) = (b mod n) implies a  b mod n. –a  b mod n implies b  a mod n. –a  b mod n and b  c mod n imply a  c mod n.

Computer Science CSC 405By Dr. Peng Ning16 Modular Arithmetic Observation: –The (mod n) operator maps all integers into the set of integers{0, 1, 2, …, (n-1)} Modular addition –[(a mod n) + (b mod n)] mod n = (a+b) mod n Modular subtraction –[(a mod n) – (b mod n)] mod n = (a – b) mod n Modular multiplication –[(a mod n)  (b mod n)] mod n = (a  b) mod n

Computer Science CSC 405By Dr. Peng Ning17 Totient Function Totient function ø(n): number of integers less than n and relatively prime to n –If p is prime, ø(p)=p-1 –If n=p  q, and p, q are primes, ø(n)=(p-1)(q-1) Examples: –ø(7)=____ –ø(21)=____

Computer Science CSC 405By Dr. Peng Ning18 Euler’s Theorem For relatively prime numbers a and n, –a ø(n)  1 mod n Examples –a=3, n=10, ø(10)= ____, 3 ø(10) mod 10 = ____ –a=2, n=11, ø(11)=____, 2 ø(11) mod 11=____.

Computer Science CSC 405By Dr. Peng Ning19 RSA Algorithm To generate key pair: –Pick large primes p and q –Let n = p*q, keep p and q to yourself! –For public key, choose e that is relatively prime to ø(n) =(p-1)(q-1) Let pub = –For private key, find d that is the multiplicative inverse of e mod ø(n), i.e., e*d = 1 mod ø(n) Let pri =

Computer Science CSC 405By Dr. Peng Ning20 How Does RSA Work? Given pub = and priv = –encryption: c = m e mod n, m < n –decryption: m = c d mod n –signature: s = m d mod n, m < n –verification: m = s e mod n

Computer Science CSC 405By Dr. Peng Ning21 An Example Choose p = 7 and q = 17. Compute n = p*q=____. Compute  (n)=(p-1)(q-1)=____. Select e = 5, which is relatively prime to  (n). Compute d = _77_such that e*d=1 mod  (n). Public key: Private key: Encryption: 19 5 mod 119 = 66 Decryption: mod 119 = 19.

Computer Science CSC 405By Dr. Peng Ning22 Why Does RSA Work? Given pub = and priv = –n =p*q, ø(n) =(p-1)(q-1) –e*d = 1 mod ø(n) –x e*d = x mod n –encryption: c = m e mod n –decryption: m = c d mod n = m e*d mod n = m mod n = m (since m < n) –digital signature (similar)

Computer Science CSC 405By Dr. Peng Ning23 The Security of RSA Attacks against RSA –Brute force: Try all possible private keys Can be defeated by using a large key space –Mathematical attacks Factor n into n=p*q. Determine ø(n) directly: equivalent to factoring n. Determine d directly: at least as difficult as factoring n. –Timing attacks Recover the private key according to the running time of the decryption algorithm.

Computer Science CSC 405By Dr. Peng Ning24 Using PKC for Key Exchange Alice (Pub-A, Pri-A)Bob (Pub-B, Pri-B) Goal: Use PKC to establish a shared symmetric key E (Pub-B, K) Problem?

Computer Science CSC 405By Dr. Peng Ning25 Using PKC for Key Exchange (Cont’d) Alice (Pub-A, Pri-A)Bob (Pub-B, Pri-B) Sign (Pub-A, K) Problem?

Computer Science CSC 405By Dr. Peng Ning26 Using PKC for Key Exchange (Cont’d) Alice (Pub-A, Pri-A)Bob (Pub-B, Pri-B) E (Pub-B, K, Sig (Pub-A, K)) Problem?

Computer Science CSC 405By Dr. Peng Ning27 Using PKC for Key Exchange (Cont’d) Alice (Pub-A, Pri-A)Bob (Pub-B, Pri-B) E (Pub-B, K), Sig (Pub-A, E (Pub-B, K))

Computer Science CSC 405By Dr. Peng Ning28 Public Key Certificates Use known public key to establish unknown ones (Assume Edward’s public key is known.)

Computer Science CSC 405By Dr. Peng Ning29 Hierarchy of Certificates

Computer Science CSC 405By Dr. Peng Ning30 Certificate Authority (CA) A CA is a trusted node that maintains the public keys for all nodes Example –Edward on the previous slide CA’s public key is well known A CA is involved in authenticating users’ public keys by generating certificates