Cryptography Hyunsung Kim, PhD University of Malawi, Chancellor College Kyungil University February, 2016.

Slides:



Advertisements
Similar presentations
Hash Functions A hash function takes data of arbitrary size and returns a value in a fixed range. If you compute the hash of the same data at different.
Advertisements

MAC Raushan. DES simple fiestel network 3131 PlainText Blocks 2*4=8bits 31 f f =0011 xor 0011=0000 = 0 f(r,k)=(2*r+k^2)%8 f(1,5)=(2*1+5^2)%8=3 xor 3 3.
Encipherment Using Modern Symmetric-Key Ciphers. 8.2 Objectives ❏ To show how modern standard ciphers, such as DES or AES, can be used to encipher long.
Modern Symmetric-Key Ciphers
Computer Science CSC 474By Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.1 Introduction to Cryptography.
Digital Signatures and Hash Functions. Digital Signatures.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
1 Chapter 5 Hashes and Message Digests Instructor: 孫宏民 Room: EECS 6402, Tel: , Fax :
Block Ciphers 1 Block Ciphers Block Ciphers 2 Block Ciphers  Modern version of a codebook cipher  In effect, a block cipher algorithm yields a huge.
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
Announcements: 1. HW6 due now 2. HW7 posted Questions? This week: Discrete Logs, Diffie-Hellman, ElGamal Discrete Logs, Diffie-Hellman, ElGamal Hash Functions.
Secure Hashing and DSS Sultan Almuhammadi ICS 454 Principles of Cryptography.
ITIS 3200: Introduction to Information Security and Privacy Dr. Weichao Wang.
Csci5233 Computer Security & Integrity 1 Cryptography: Basics (2)
Hash Functions Nathanael Paul Oct. 9, Hash Functions: Introduction Cryptographic hash functions –Input – any length –Output – fixed length –H(x)
CS526Topic 5: Hash Functions and Message Authentication 1 Computer Security CS 526 Topic 5 Cryptography: Cryptographic Hash Functions And Message Authentication.
ELECTRONIC PAYMENT SYSTEMSFALL 2001COPYRIGHT © 2001 MICHAEL I. SHAMOS Electronic Payment Systems Lecture 6 Epayment Security II.
Cryptography1 CPSC 3730 Cryptography Chapter 11, 12 Message Authentication and Hash Functions.
Computer Science CSC 774Dr. Peng Ning1 CSC 774 Advanced Network Security Topic 2. Review of Cryptographic Techniques.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Practical Techniques for Searches on Encrypted Data Yongdae Kim Written by Song, Wagner, Perrig.
Chapter 31 Network Security
Lecture 15 Lecture’s outline Public algorithms (usually) that are each other’s inverse.
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.
Cryptography Wei Wu. Internet Threat Model Client Network Not trusted!!
Professional Encryption Software FINECRYPT 8.1. Contents Introduction Introduction Features Features Installation Installation Tests Tests Results Results.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
CSCI 172/283 Fall 2010 Hash Functions, HMACs, and Digital Signatures.
1.1 Chapter 8 Encipherment Using Modern Symmetric-Key Ciphers Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Slide 1 EJ Jung Hash Functions. Integrity checks.
Cryptographic Hash Functions and Protocol Analysis
Lecture 2: Introduction to Cryptography
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Modern Cryptography.
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Authentication. Goal: Bob wants Alice to “prove” her identity to him Protocol ap1.0: Alice says “I am Alice” Failure scenario?? “I am Alice”
14-1 Last time Internet Application Security and Privacy Basics of cryptography Symmetric-key encryption.
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.
CS426Fall 2010/Lecture 51 Computer Security CS 426 Lecture 5 Cryptography: Cryptographic Hash Function.
IT 221: Introduction to Information Security Principles Lecture 5: Message Authentications, Hash Functions and Hash/Mac Algorithms For Educational Purposes.
Part 1  Cryptography 1 Integrity Part 1  Cryptography 2 Data Integrity  Integrity  detect unauthorized writing (i.e., modification of data)  Example:
Introduction to Cryptography Hyunsung Kim, PhD University of Malawi, Chancellor College Kyungil University February, 2016.
Data Integrity / Data Authentication. Definition Authentication (Signature) algorithm - A Verification algorithm - V Authentication key – k Verification.
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.
CHAPTER 4 TJADEN plus Chapters 13 & 14 Crytography Decrypted Hashing Functions, Message Digests, Message Authentication Codes (MACs) Dr. Suzanne Buchele.
IT443 – Network Security Administration Instructor: Bo Sheng
Cryptographic Hash Functions
Cryptographic Hash Function
Basic Network Encryption
Cryptography.
Cryptographic Hash Functions
MAC: Message Authentication Code
ICS 454 Principles of Cryptography
ICS 454 Principles of Cryptography
Hash Functions Motivation Hash Functions: collision, pre-images SHA-1
Chapter 3 - Public-Key Cryptography & Authentication
Basic Network Encryption
One Way Functions Motivation Complexity Theory Review, Motivation
Hashing Hash are the auxiliary values that are used in cryptography.
Review of Cryptography: Symmetric and Asymmetric Crypto Advanced Network Security Peter Reiher August, 2014.
Presentation transcript:

Cryptography Hyunsung Kim, PhD University of Malawi, Chancellor College Kyungil University February, 2016

2/13 Contents 13. Hash Functions and Message Authentication Codes 13.1 Hash Functions 13.2 MD5

Hash Functions  A hash is a relatively short record of a message used to ensure you got message correctly  A hash function f(x) sends m+t bit strings to t bit strings and should have three properties  A hash algorithm H(x) is built up from a hash function and sends strings of arbitrary length to t bit strings  A hash algorithm H(x) is said to have the one-way property if given an output y it is difficult to find any input x such that H(x)=y 3/13

Hash Functions  Example  Lets say that the hashes of passwords are stored on a server  When you log in, it computes the hash of your password and compares it with the stored hash  If Eve can solve the one-way problem, she could find your password 4/13

Hash Functions 5/13  A hash algorithm is said to have the weakly collision free property if, given input x, it is difficult to find any x  x such that H(x)=H(x)  It is said to have the strongly collision free property if it is difficult to find any x and x with x  x such that H(x)=H(x)  Lets say that you have a program available for download and you also make its hash available  That way people can download the software, hash it, and confirm that they got the proper software and not something dangerous  It can be shown (under reasonable assumptions) that strongly collision free implies weakly collision free which implies one-way

Hash Functions  To create a hash algorithm from a hash function one normally uses a hash function with two inputs  An m-bit string a  A t-bit string b  So f(a, b) outputs a t-bit string  Lets extend a hash function f to a hash algorithm H  Assume that the M has more than m bits  Break M into m-bit blocks, padding the last block if necessary with 0s  Initially we take b to be a given, known t-bit initialization vector (perhaps all 0s)  If a hash algorithm depends on a secret key, it is called a MAC, which replace the known IV with a secret key 6/13

128 bits Hash Functions (Example)  f is AES, so t=m=128. Break the message into 128 bit blocks  If the message length is not a multiple of 128 bits, add 0s to the end (padding)  The key for the first AES is the IV. The key for the second AES is the output of the first AES and so on  The final output is the hash of the message  This is not a secure hash function but its OK as a MAC 7/13

Hash Functions (Example)  Alice and Bob used public key cryptography to agree on two AES keys, k 1 and k 2  Alice sends Bob (in ECB mode, for simplicity) a message encrypted with AES  She breaks the message into n blocks: PT 1, …, PT n  She encrypts each PT i with AES and using k 1 to get the corresponding ciphertexts CT 1, …, CT n  Then Alice computes the MAC of PT 1, …, PT n using k 2 and sends the (unencrypted) MAC to Bob 8/13

Hash Functions (Example)  Bob receives and decrypts them using k 1  Now Bob has the PT i s. Then Bob MACs those PT i s with k 2 and finds the MAC  Then Bob checks to see if this MAC agrees with the one that Alice sent him  If it does, he can be sure that no one tampered with the CT i s during transmission  This is called message integrity  Without the MAC, Eve could intercept CT 1, …, CT n along the way and tamper with it (though it probably wouldn’t decrypt to something sensible since EVE doesn’t know the key)  If Eve tampers with it, she can’t create a MAC that will agree with hers 9/13

MD5  One of the most popular hash algorithms at the moment is MD5  The hash algorithms SHA1 and SHA2 are also popular and very similar  SHA stands for Secure Hash Algorithm  MD5 is more efficient than the hash algorithm described before using AES  It is based on the following hash function f  The function f takes two inputs : a 128 bit string and a 512 bit strings and its output is a 128 bit strings 10/13

MD5 11/13

MD5 12/13

MD5 13/13