IS 302: Information Security and Trust Week 5: Integrity 2012.

Slides:



Advertisements
Similar presentations
Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
Advertisements

Digital Signatures and Hash Functions. Digital Signatures.
1 Counter-measures Threat Monitoring Cryptography as a security tool Encryption Digital Signature Key distribution.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
Lesson Title: Introduction to Cryptography Dale R. Thompson Computer Science and Computer Engineering Dept. University of Arkansas
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 6 Wenbing Zhao Department of Electrical and Computer Engineering.
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.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
BY MUKTADIUR RAHMAN MAY 06, 2010 INTERODUCTION TO CRYPTOGRAPHY.
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.
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.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Hash Functions Nathanael Paul Oct. 9, Hash Functions: Introduction Cryptographic hash functions –Input – any length –Output – fixed length –H(x)
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.
Cryptography1 CPSC 3730 Cryptography Chapter 11, 12 Message Authentication and Hash Functions.
Announcements: 1. Late HW7’s now. Questions? This week: Birthday attacks, Digital signatures, DSA Birthday attacks, Digital signatures, DSA DTTF/NB479:
Network Security. Contents Security Requirements and Attacks Confidentiality with Conventional Encryption Message Authentication and Hash Functions Public-Key.
Lecture 4 Cryptographic Tools (cont) modified from slides of Lawrie Brown.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
Introduction to Public Key Cryptography
Sorting Out Digital Certificates Bill blog.codingoutloud.com ··· Boston Azure ··· 13·Dec·2012 ···
Chapter 31 Network Security
Information Security and Management 13. Digital Signatures and Authentication Protocols Chih-Hung Wang Fall
CS5204 – Fall Cryptographic Security Presenter: Hamid Al-Hamadi October 13, 2009.
Lecture 15 Lecture’s outline Public algorithms (usually) that are each other’s inverse.
Lecture slides prepared for “Computer Security: Principles and Practice”, 2/e, by William Stallings and Lawrie Brown, Chapter 21 “Public-Key Cryptography.
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
Message Authentication  message authentication is concerned with: protecting the integrity of a message protecting the integrity of a message validating.
© 2006 Cisco Systems, Inc. All rights reserved. Network Security 2 Module 3: VPN and Encryption Technology.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Security: An Overview of Cryptographic Techniques /440 With slides from: Debabrata Dash, Nick Feamster, Gregory Kesden, Vyas Sekar and others.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
EE515/IS523 Think Like an Adversary Lecture 4 Crypto in a Nutshell Yongdae Kim.
Message Authentication Code July Message Authentication Problem  Message Authentication is concerned with:  protecting the integrity of a message.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
4 th lecture.  Message to be encrypted: HELLO  Key: XMCKL H E L L O message 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message + 23 (X) 12 (M) 2 (C) 10 (K) 11.
Module 3 – Cryptography Cryptography basics Ciphers Symmetric Key Algorithms Public Key Algorithms Message Digests Digital Signatures.
Basic Cryptography 1. What is cryptography? Cryptography is a mathematical method of protecting information –Cryptography is part of, but not equal to,
Cryptography Wei Wu. Internet Threat Model Client Network Not trusted!!
Chapter 21 Public-Key Cryptography and Message Authentication.
Network Security David Lazăr.
CSCI 172/283 Fall 2010 Hash Functions, HMACs, and Digital Signatures.
Cryptography Chapter 7 Part 3 Pages 812 to 833. Symmetric Cryptography Security Services – Only confidentiality, not authentication or non- repudiation.
Chapter 2 Advanced Cryptography (Part C)
Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
1 Number Theory and Advanced Cryptography 6. Digital Signature Chih-Hung Wang Sept Part I: Introduction to Number Theory Part II: Advanced Cryptography.
Cryptographic Hash Functions and Protocol Analysis
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Modern Cryptography.
Class 4 Asymmetric Cryptography and Trusting Internal Components CIS 755: Advanced Computer Security Spring 2014 Eugene Vasserman
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
Cryptographic Hash Functions Prepared by Dr. Lamiaa Elshenawy
Cryptography and Network Security (CS435) Part Nine (Message Authentication)
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.
Hashes Lesson Introduction ●The birthday paradox and length of hash ●Secure hash function ●HMAC.
EE 122: Lecture 24 (Security) Ion Stoica December 4, 2001.
IT 221: Introduction to Information Security Principles Lecture 5: Message Authentications, Hash Functions and Hash/Mac Algorithms For Educational Purposes.
Security. Security Needs Computers and data are used by the authorized persons Computers and their accessories, data, and information are available to.
Cryptographic Hash Function. A hash function H accepts a variable-length block of data as input and produces a fixed-size hash value h = H(M). The principal.
@Yuan Xue 285: Network Security CS 285 Network Security Hash Algorithm Yuan Xue Fall 2012.
NET 311 Information Security
ICS 454 Principles of Cryptography
Introduction to Symmetric-key and Public-key Cryptography
ICS 454 Principles of Cryptography
Presentation transcript:

IS 302: Information Security and Trust Week 5: Integrity 2012

© Yingjiu Li Review RSA –Key generation –Security (key size) –Encryption and decryption with random padding Envelop encryption –RSA+AES

Adversary Passive adversary –Eavesdropping: threat to message confidentiality –Solution with encryption (AES, RSA…): an adversary is not able to understand the message Active adversary –Unauthorized modification: threat to message integrity –Solution: if an adversary modifies the message, it can always be detected! © Yingjiu Li 20073

4 Question Assume that Mallory is an active adversary Does encryption provide message integrity? Bob Alice Mallory Please transfer $1M to account A…

© Yingjiu Li Solution Send a small piece of information as proof of message integrity Bob Alice Mallory Please transfer $1M to account A…, E7582D9C71D5DA EF23FCD

© Yingjiu Li Proof of Message Integrity Symmetric proof –Message authentication code (MAC) Asymmetric proof –RSA signature Both MAC and RSA signature are based on hash

© Yingjiu Li Hash Hash function h=H(M) –One-way easy to compute but hard to inverse –Collision resistant hard to find M  M’ such that H(M)=H(M’) –Fixed length variable-length M  fixed-length h

© Yingjiu Li Cryptool Indiv. procedures  hash –MD5 –SHA1 –Sensitivity to change

© Yingjiu Li Attacks to Hash Pre-image attack (against one-way feature) –Given h=H(M), find M’ such that H(M’)=h Collision attack (against collision resistant feature) –Given H(), find M’ and M’’ such that H(M’)=H(M’’)

© Yingjiu Li Hash for Integrity Check Can hash value h=H(M) be used as integrity proof for M? –Send h together with M over public channel? –Send h separately over secure channel? Bob Alice Mallory M: Please transfer $1M to account A…,

© Yingjiu Li Hash for Integrity Check Can hash value h=H(M) be used as integrity proof for M? –Send h together with M over public channel (No!) –Send h separately over secure channel (Yes!) Bob Alice Mallory M: Please transfer $1M to account A…, h: E7582D9C71D5DA EF23FCD

© Yingjiu Li Standard Hash: MD5 MD5 –Output: 128 bits (32 Hex digits, 16 bytes) –internet standard, commonly used to check integrity of files –1991: designed by Rivest –1996: a flaw was discovered –2004: more serious flaws –2007: people can create a pair of files that share the same MD5 hash value

© Yingjiu Li Standard Hash: SHA1 SHA1 –160 bits (40 hex’s, 20 bytes), NIST standard –1995: NSA, replaced SHA0 (1993) –2005: potential weakness was found Collision attack: 2^80  2^39 for SHA0, 2^63 for SHA1 –2010: last year to use as suggested by NIST SHA2 SHA224, SHA256, SHA384, SHA512 SHA3 2 Nov 2007 – 31 Oct 2008: NIST call for competition 2012: winner and new standard will be announced

© Yingjiu Li A little bit more detail on SHA1 –Input: 0~2^64 -1 bits (2^20~1M, 2^30~1G) –Output: 160 bits (5*32) –Block size: 512 bits (16*32) –Rounds: 80

© Yingjiu Li MAC Message authentication code (MAC) –MAC=H(K,M), where K is secret key (MAC key) –Alice sends MAC together with message M –Bob verifies M with K to see whether MAC=H(K,M) Bob (k) Alice (k) Mallory Please transfer $1M to account A, MAC Message & MAC

© Yingjiu Li Attack to MAC –Pre-image attack to the key –MAC key should be long enough against brute force attack

© Yingjiu Li HMAC HMAC = H(K,H(K,M)) –H can be any hash function H=MD5  HMAC-MD5 (128 bits) H=SHA-1  HMAC-SHA-1 (160 bits) –Key size JCE: HMAC key = 64 bytes (512 bits) If key > 64 bytes, key  H(key) Recommended key > output size of hash function

© Yingjiu Li Encryption-Based MAC DES-MAC –DES encryption E(M,K)  blk1, blk2,…blkn –MAC = blk1 blk2 …blkn –K is a DES key (56 bits)  weak security –DES-MAC is 64 bits AES-MAC –What is the key size? –How long is the AES-MAC?

© Yingjiu Li Cryptool Indiv. procedures  hash  HMAC –SHA-256 –Double hashing

© Yingjiu Li Repudiation Problem with MAC If Alice denies sending message to Bob, Bob cannot prove to any third-party authority that Alice’s lying Bob (k) Alice (k) Mallory Please transfer $1M to account A, MAC Message & MAC Secret channel

© Yingjiu Li Solution: RSA Signature Alice with RSA public key (n,e) and private key d –Compute digital signature sig=H(M) d mod n (only Alice can generate this signature with her private RSA key d) –Send (M, sig) to Bob Bob : –Compute H(M) –Verify sig by comparing if H(M) = sig e mod n (anyone can verify the signature with Alice’s public RSA key e,n) Bob Alice public channel d d: Alice’s private key n,e: Alice’s public key (M, sig = H(M) d mod n) n,e

© Yingjiu Li Discussion –What is difference between RSA encryption and RSA signature? –What is the size of an RSA-1024 signature with SHA-256? –What is the size of HMAC with SHA-256? –In what scenarios should you choose RSA signature or MAC?

© Yingjiu Li Demo in CrypTool Digital signatures/PKI  –Sign document (SHA1+RSA-512) –Verify signature

© Yingjiu Li Security of some crypto-algorithms Cryptographic strength Symmetric (key length) Asymmetric (modulus length) Hashing/MACs (hash value length) weakDES 40-bit RC4 40-bit RSA 256-bit mediumDES 56-bit CAST 64-bit RSA 512-bit D-H 512-bit DSA 512-bit ANSI X9.9 MAC 32-bit strongTriple DES 112-bit AES 128-bit IDEA 128-bit RC4 128-bit RSA 1024-bit D-H 1024-bit DSA 1024-bit MD4/MD5 128-bit ? SHA bit ? Very strongAES 192-bit AES 256-bit RSA 2048-bit ECC 300-bit SHA224,SHA-256 SHA-384 SHA-512

© Yingjiu Li Hands-on Exercise Download week5.zip into your IS302 directory Unzip it (extract to week5 directory) Follow the instructions in Lab.doc –2.1 HMAC in JCE –2.2 RSA signature in JCE

© Yingjiu Li Review How long is an RSA-1024 with SHA1 signature 1) 128 bits 2) 160 bits 3) 1024 bits Alice sends a message with an RSA signature to Bob. Which key should be used to generate the signature? 1) Alice’s private key 2) Alice’s public key 3) Bob’s public key How long is AES-MAC? 1) 128 bits 2) 160 bits 3) 1024 bits