 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.

Slides:



Advertisements
Similar presentations
Lecture 7 Overview. Advanced Encryption Standard 10, 12, 14 rounds for 128, 192, 256 bit keys – Regular Rounds (9, 11, 13) – Final Round is different.
Advertisements

CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
1 CIS 5371 Cryptography 5b. Pseudorandom Objects in Practice Block Ciphers.
Computer Science CSC 405By Dr. Peng Ning1 CSC 405 Introduction to Computer Security Topic 2. Basic Cryptography (Part II)
Web Security for Network and System Administrators1 Chapter 4 Encryption.
PIITMadhumita Chatterjee Security 1 Hashes and Message Digests.
Advanced Encryption Standard
1 Chapter 5 Hashes and Message Digests Instructor: 孫宏民 Room: EECS 6402, Tel: , Fax :
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.
Announcements: 1. HW7 due next Tuesday. 2. Inauguration today! Questions? This week: Discrete Logs, Diffie-Hellman, ElGamal Discrete Logs, Diffie-Hellman,
Hash functions a hash function produces a fingerprint of some file/message/data h = H(M)  condenses a variable-length message M  to a fixed-sized fingerprint.
Announcements:Questions? This week: Discrete Logs, Diffie-Hellman, ElGamal Discrete Logs, Diffie-Hellman, ElGamal Hash Functions and SHA-1 Hash Functions.
J. Wang. Computer Network Security Theory and Practice. Springer 2008 Chapter 2 Data Encryption algorithms Part II.
Chapter 4  Hash Functions 1 Overview  Cryptographic hash functions are functions that: o Map an arbitrary-length (but finite) input to a fixed-size output.
Information Security and Management 11
Kemal AkkayaWireless & Network Security 1 Department of Computer Science Southern Illinois University Carbondale CS 591 – Wireless & Network Security Lecture.
Secure Hashing and DSS Sultan Almuhammadi ICS 454 Principles of Cryptography.
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
1 Pertemuan 09 Hash and Message Digest Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
ICS 454 Principles of Cryptography Advanced Encryption Standard (AES) (AES) Sultan Almuhammadi.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
Cryptography and Network Security Chapter 11 Fourth Edition by William Stallings Lecture slides by Lawrie Brown/Mod. & S. Kondakci.
Lecture 23 Symmetric Encryption
Cryptography1 CPSC 3730 Cryptography Chapter 11, 12 Message Authentication and Hash Functions.
1 Cryptography and Network Security (Various Hash Algorithms) Fourth Edition by William Stallings Lecture slides by Lawrie Brown (Changed by Somesh Jha)
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.
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
CN8816: Network Security1 Confidentiality, Integrity & Authentication Confidentiality - Symmetric Key Encryption Data Integrity – MD-5, SHA and HMAC Public/Private.
1 Chapter 4 Encryption. 2 Objectives In this chapter, you will: Learn the basics of encryption technology Recognize popular symmetric encryption algorithms.
 Introduction  Requirements for RSA  Ingredients for RSA  RSA Algorithm  RSA Example  Problems on RSA.
Chapter 12 Cryptography (slides edited by Erin Chambers)
Cryptography. What We Will Learn Basic cryptographic primitives Attacks on cryptography When to use which cipher If you want to learn more about this.
Cryptography.
Lecture 15 Lecture’s outline Public algorithms (usually) that are each other’s inverse.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Network Security (A Very Brief Introduction)
Cryptography and Network Security
HASH Functions.
Summary from the last class
1 Chapter 3 Ciphers Mechanism that decides the process of encryption/decryption Stream Cipher: Bit-by-bit encryption / decryption Block Cipher: Block-by-block.
Advance Encryption Standard. Topics  Origin of AES  Basic AES  Inside Algorithm  Final Notes.
AES Background and Mathematics CSCI 5857: Encoding and Encryption.
Chapter 20 Symmetric Encryption and Message Confidentiality.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Chapter 20 Symmetric Encryption and Message Confidentiality.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
1 Hashes and Message Digests. 2 Hash Also known as –Message digest –One-way function Function: input message -> output One-way: d=h(m), but not h’(d)
Module 3 – Cryptography Cryptography basics Ciphers Symmetric Key Algorithms Public Key Algorithms Message Digests Digital Signatures.
Hashing Algorithms: Basic Concepts and SHA-2 CSCI 5857: Encoding and Encryption.
Hash and MAC Functions CS427 – Computer Security
Part 9, Basic Cryptography 1. Introduction A cryptosystem is a tuple: ( M,K,C, E,D) where M is the set of plaintexts K the set of keys C the set of ciphertexts.
RSA and its Mathematics Behind July Topics  Modular Arithmetic  Greatest Common Divisor  Euler’s Identity  RSA algorithm  Security in RSA.
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.
Lecture 23 Symmetric Encryption
Fifth Edition by William Stallings
Cryptography and Network Security (CS435) Part Nine (Message Authentication)
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
Hash Functions Ramki Thurimella. 2 What is a hash function? Also known as message digest or fingerprint Compression: A function that maps arbitrarily.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Network Security. Three tools Hash Function Block Cipher Public Key / Private Key.
The Advanced Encryption Standard Part 2: Mathematical Background
Information Security and Management 11. Cryptographic Hash Functions Chih-Hung Wang Fall
Advanced Encryption Standard (Symmetric key Algorithm)
PART VII Security.
ADVANCED ENCRYPTION STANDARDADVANCED ENCRYPTION STANDARD
Presentation transcript:

 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 and self-synchronizing o Linear congruential generators o LFSRs  Block ciphers o Multiple rounds of substitution and transposition o Modes: ECB, CBC, CFB, OFB

 Everyone has two keys: o Public key K1 that everyone knows o Private key K2 that only he knows o Encryption algorithm and key properties ensure that

 Galois Field GF(n) o All operations are on numbers 0,…n-1  Observe all operations in Galois Field GF(n) o a  = b mod n if  k, a= k*n + b e.g. 26 mod 16 = 10 so 26  = 10 mod 16 o Modulo operation (modular reduction) can be performed at any point, e.g.

 How many operations are needed to calculate a x ?  Exponentiation can be performed very efficiently (addition chaining): o We want to calculate a x mod n o Write x as a binary number, result=1 o Traverse x from left to right  If digit is 1, result=result 2 *a  If digit is 0, result=result 2  Perform modular reduction often to keep result small. This is cheap if n =2 m

 A number n is prime if it is only divisible by 1 and itself  Numbers x and y are relatively prime if they share no factors greater than 1  E.g. 7 and 15 are relatively prime, 9 and 15 are not because they have 3 as common factor

 Multiplicative inverse y for x is a number that satisfies:  In GF(n) inverse y for x modulo n is a number that satisfies:  Inverse y in GF(n) can be found uniquely if x and n are relatively prime, otherwise it cannot be found  If n is prime then it is relatively prime to all numbers {0, n-1} and each number has its inverse in GF(n)

 How to find an inverse y for x mod n  Extended Euclidean algorithm will find y and k given x and n

 x=13, n=225, y=? aqxy

 a i-2 /a i-1 = q i-1 and the remainder a i aqxy

 225/13 = 17 remainder 4 aqxy

 13/4 = 3 remainder 1 aqxy

 4/1 = 4 remainder 0 aqxy stop, remainder is 0

 x i+1 = x i-1 - q i * x i aqxy

 1-17*0 =1 aqxy

 0-3*1 =-3 = 222 aqxy

 y i+1 = y i-1 - q i * y i aqxy

 0- 17*1=-17=208 aqxy

 1- (3*208 mod 225)=-173=52 aqxy is inverse for 13 mod *13 mod 225 = 1

 We have seen that exponentiation in GF(n) can be performed efficiently  On the other hand, it is hard to factor large numbers o Computationally intensive, must use brute-force search  Generally factoring time of a large number n increases exponentially with each binary digit added to n

 Created by Ron Rivest, Adi Shamir, sand Leonard Adleman  Choose two prime numbers p and q of equal length  Compute n=p*q, and Euler Totient function  (n)=(p-1)*(q-1)  Choose public key e relatively prime to  (n)

 Using extended Euclidean algorithm calculate d which is inverse of e mod  (n)  Publish e and n, remember d  Encryption:  Decryption:  There are proofs that the last equation holds

 We can easily perform exponentiation in GF in linear time  We can calculate d out of e and n in polynomial time using extended Euclidean algorithm (because we know p and q, we can calculate  (n)=(p-1)*(q-1))  Attacker must factor large number n to learn p and q which is expensive (exponentially with number of bits in n)

 Provide data integrity o Can it be done with symmetric systems?  Verification requires shared key  Doesn’t provide non-repudiation  Need proof of provenance o Hash the data, encrypt with private key o Verification uses public key to decrypt hash o Provides non-repudiation  Why?

 RSA can be used  DSA: Digital Signature Algorithm o Variant of ElGamal signature o Adopted as part of DSS by NIST in 1994 o Key size ranges from 512 to 1024 bits o Royalty-free

 Take a variable-length input M and produce fixed-length output (hash value or message digest or message integrity code)  The idea is to fingerprint M o Given M easy to compute h o Given h very hard to compute M o One-bit change in M changes on the average half of the bits in h o Good one-way hash function is collision-free: given M it is very hard to find M such that H(M)=H(M) o One-way hash function is public

 Sometimes what we also need is collision resistance: it is hard to find two random messages M 1 and M 2 such that H(M 1 )=H(M 2 )  For a hash function that produces m bit hash, it takes 2 m/2 trials to find any two messages that hash to the same value o We need large m, currently

 Divide M into blocks, generate hash value iteratively  Hash value of the whole message is obtained in the last step H MiMi h i-1 hihi

 Divide M into 512-bit blocks o Pad M with string of 1 and many zeros so that it is 64 bit short of multiple of 512 o Concatenate original length in bits as 64-bit number  Blocks are processed sequentially  Last result is hash value for the whole message and is 128-bit long

 For each message block (512 bits): o Variables A, B, C, D are initialized (for first block they are constant values)  Each is 32 bits o Go through 4 rounds; each round repeats the following operation 16 times:  Performs non-linear function on three variables  Sums the result, the fourth variable, message subblock (32-bits) and a constant K i (i  [1,16])  Rotates the result to the left, adds it to one of the variables and replaces this variable  Output is concatenation of A, B, C, D

Round1Round2Round3Round4 A B C D A B C D

Source: Wikipedia Non-linear functions (in each round one is chosen for the green square): F(X,Y,Z) = XY OR NOT(X) Z G(X,Y,Z) = XZ OR Y NOT(Z) H(X,Y,Z) = X XOR Y XOR Z I(X,Y,Z) = Y XOR (X OR NOT(Z)) Addition mod 2 32 Shift left by S bits, S varies for each operation Constant, varies for each operation Message subblock (32 bits)

 Security of MD5 is severely compromised o Multiple known attacks  Secure Hash Algorithm (SHA)  Similar to MD5 but: o Has 20 operations per round o Operations are different than in MD5 but along similar lines o Each message block (16*32=512 bits) is expanded into (80*32 bits) o Produces 160-bit hash value  SHA-1 is an improved version of SHA

 Data Encryption Standard (used to be)  Block cipher, symmetric  Works with 64-bit blocks of plaintext and 56-bit key (weak) o Superseded by AES

Source: Wikipedia Encryption Feistel function Subkey generation Substitution based on a table Permutation

 Fixes the key length problem by applying DES three times o With two or three different keys o E(K1)D(K2)E(K3) o Designed to be backward compatible with DES  Slow, since encryption/decryption is now performed three times

 Fixes the key length problem by using a longer key whose portions are XOR-ed with plaintext o 64-bits XOR-ed prior to DES o 64-bits XOR-ed with DES output o Key bits long  Same speed as DES but higher security

 Advanced Encryption Standard  Block cipher, symmetric  Works with 128-bit blocks of plaintext and 128, 192 or 256-bit key  Operates on 4x4 matrix of bytes called state, all operations over GF(2 8 )  Algorithm o Key expansion – derive round keys (4x4) o AddRoundKey – XOR state with round key o Rounds – SubBytes (substitution), ShiftRows (transposition), MixColumns, AddRoundKey o Final round – SubBytes, ShiftRows, AddRoundKey

Substitution box Multiplication by a known matrix