1 Information System Security AABFS-Jordan Summer 2006 Digital Signature and Hashing Functions Prepared by: Maher Abu Hamdeh & Adel Hamdan Supervised by:

Slides:



Advertisements
Similar presentations
Chapter 3 Public Key Cryptography and Message authentication.
Advertisements

Sri Lanka Institute of Information Technology
Cryptography and Network Security
Digital Signatures and Hash Functions. Digital Signatures.
Authentication and Digital Signatures CSCI 5857: Encoding and Encryption.
Cryptography and Network Security Chapter 13 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
1 Digital Signatures & Authentication Protocols. 2 Digital Signatures have looked at message authentication –but does not address issues of lack of trust.
1 Chapter 13 – Digital Signatures & Authentication Protocols Fourth Edition by William Stallings Lecture slides by Lawrie Brown (modified by Prof. M. Singhal,
ECOMMERCE TECHNOLOGY SUMMER 2002 COPYRIGHT © 2002 MICHAEL I. SHAMOS Cryptographic Security.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
CSE331: Introduction to Networks and Security Lecture 21 Fall 2002.
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
Information Security and Management 11
Digital Signature Algorithm (DSA) Kenan Gençol presented in the course BIL617 Cryptology instructed by Asst.Prof.Dr. Nuray AT Department of Computer Engineering,
Henric Johnson1 Chapter3 Public-Key Cryptography and Message Authentication Henric Johnson Blekinge Institute of Technology, Sweden
Secure Hashing and DSS Sultan Almuhammadi ICS 454 Principles of Cryptography.
Cryptography1 CPSC 3730 Cryptography Chapter 13 Digital Signature Standard (DSS)
Lecture 13 Message Signing
Cryptography1 CPSC 3730 Cryptography Chapter 11, 12 Message Authentication and Hash Functions.
CSE 597E Fall 2001 PennState University1 Digital Signature Schemes Presented By: Munaiza Matin.
CRYPTOGRAPHIC DATA INTEGRITY ALGORITHMS
Network Security Essentials Fifth Edition by William Stallings Fifth Edition by William Stallings.
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 13
Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Information Security and Management 13. Digital Signatures and Authentication Protocols Chih-Hung Wang Fall
1 Public-Key Cryptography and Message Authentication Ola Flygt Växjö University, Sweden
Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.
Bob can sign a message using a digital signature generation algorithm
MAC and HASH Functions Unit 5. AUTHENTICATION REQUIREMENTS In the context of communications across a network, the following attacks can be identified:
Lecture 15 Lecture’s outline Public algorithms (usually) that are each other’s inverse.
Information Security Principles Assistant Professor Dr. Sana’a Wafa Al-Sayegh 1 st Semester ITGD 2202 University of Palestine.
Message Authentication  message authentication is concerned with: protecting the integrity of a message protecting the integrity of a message validating.
Hash Functions A hash function H accepts a variable-length block of data M as input and produces a fixed-size hash value h = H(M) Principal object is.
IT 221: Introduction to Information Security Principles Lecture 6:Digital Signatures and Authentication Protocols For Educational Purposes Only Revised:
Security.  is one of the most widely used and regarded network services  currently message contents are not secure may be inspected either.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
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.
Message Authentication and Hash Functions Chapter 11.
Network Security Lecture 23 Presented by: Dr. Munam Ali Shah.
Chapter 21 Public-Key Cryptography and Message Authentication.
Cryptography and Network Security Chapter 13 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
11.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Message Integrity and Message Authentication.
Cryptography and Network Security Chapter 13 Fourth Edition by William Stallings.
Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
Prepared by Dr. Lamiaa Elshenawy
DIGITAL SIGNATURE. A digital signature is an authentication mechanism that enables the creator of a message to attach a code that acts as a signature.
Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.3 Hash Functions.
Cryptography and Network Security
Computer Science and Engineering Computer System Security CSE 5339/7339 Lecture 11 September 23, 2004.
Electronic Mail Security Prepared by Dr. Lamiaa Elshenawy
Digital Signature Standard (DSS) US Govt approved signature scheme designed by NIST & NSA in early 90's published as FIPS-186 in 1991 revised in 1993,
X. Digital Signatures and Authentication Protocols We begin this chapter with an overview of digital signatures, authentication protocol and Digital Signature.
IT 221: Introduction to Information Security Principles Lecture 5: Message Authentications, Hash Functions and Hash/Mac Algorithms For Educational Purposes.
ECE Prof. John A. Copeland fax Office: GCATT Bldg.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 13.Message Authentication.
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.
Fourth Edition by William Stallings Lecture slides by Lawrie Brown
Cryptographic Hash Functions & Digital Signatures
Cryptographic Hash Function
B. R. Chandavarkar CSE Dept., NITK Surathkal
NET 311 Information Security
Chapter -7 CRYPTOGRAPHIC HASH FUNCTIONS
Cryptography and Network Security Chapter 13
Chapter 3 - Public-Key Cryptography & Authentication
Digital Signature Standard (DSS)
Presentation transcript:

1 Information System Security AABFS-Jordan Summer 2006 Digital Signature and Hashing Functions Prepared by: Maher Abu Hamdeh & Adel Hamdan Supervised by: Dr. Lo’ai Tawallbeh

2 Digital signature and Hashing 11.1 Message authentication 11.2 Hash function 11.3 Message Authentication Code MAC 12.1 Secure hash algorithm –SHA Digital signature –Direct digital signature –Arbitrated digital signature 13.3 Digital signature standard DSS

3 Message authentication (ch11) Message authentication is a mechanism or service used to verify the integrity of a message. Message authentication assures that data received exactly as sent. The two most common cryptography techniques for message authentication are a message authentication code (MAC) and a secure hash function. A hash function maps a variable-length message into a fixed hash value, or message digest. For message authentication, a secure hash function must be combined in some fashion with a secret key.

4 Hash Functions (ch11) A hash function accepts a variable-size message M as input and produces a fixed- size output, referred to as a hash code. Unlike MAC, a hash code does not use a key but a function only of the input message. The hash code is also referred to as a message digest or hash value.

5 Hash Functions & Digital Signatures (ch11) Only the hash code is encrypted, using public key encryption and using the sender’s private key. This provide authentication. It also provides a digital signature, because only the sender could have produced the encrypted hash code. In fact, this is the essence of the digital signature technique turns variable-length message M into fixed-size block H(M) produces “fingerprint” of a file, “message digest” hash function is “one way”, does not use secret key various uses, e.g., integrity, digital signature

6 Hash function (ch11) The hash function takes an input message and partitions it into L fixed-sized blocks of b bits each. If necessary, the final block is padded to b bits. The final block also includes the value of the total length of the input to the hash function. The hash algorithm involves repeated use of a compression function, f, that takes two inputs( an n-bit input from the previous step, called the chaining variable, and a b-bit block) and produces an n-bit output. At the start of hashing, the chaining variable has an initial value that is specified as part of the algorithm

Message Authentication Code MAC Use of secret key to generate a small fixed size block of data, known as a cryptographic checksum or MAC that is appended to the message. This technique assumes that the two communicating parties, say A and B, share a common secret key K. When A has a message to send to B, it calculates the MAC as a function of the message and the key, where the message plus MAC are transmitted to the intended recipient. The recipient performs the same calculation on the received message, using the same secret key, to generate a new MAC. The received MAC is compared to the calculated MAC.

8 Message Authentication Code MAC=C(K,M) M: input message C: MAC Functionn K: shared secret key MAC: Message Authentication Code

secure hash algorithm SHA The Secure Hash Algorithm (SHA) was developed by the national institute of standards and technology (NIST) SHA- 512 logic –The algorithm takes as input a message with a maximum length of less than bits and produces as output a 512-bit message digest. –The input is processed in 1024-bit blocks

secure hash algorithm SHA Table Comparison of SHA Parameters SHA-1SHA-256SHA-384SHA-512 Message digest size Message size<2 64 <2 128 Block size Word size32 64 Number of steps806480

11 SHA-512 Overview 1.pad message so its length is 896 mod A block of 128 bits is appended to the message. This block is treated as an unsigned 128-bit integer (most significant byte first) and contain the length of the original message (before the padding) 3.initialize 512-bit buffer (see textbook for values) Intermediate hash value a = 6A09E667F3BCC908 b = BB67AE8584CAA73B c = 3C6EF372FE94F82B c = A54FF53A5F1D36F1 e = 510E527FADE682D1 f = 9B05688C2B3E6C1F g = 1F83D9ABFB41BD6B h = 5BE0CDI9137E2179 These values are stored in big-endian format, which is the most significant byte of a word in the low address byte position.

12 SHA-512 Overview 4- process message in 1024-bit blocks (128-word): –The heart of the algorithm is a module that consists of 80 rounds –Each round takes as input the 512-bit buffer value abcefgh, and updates the content of the buffer –At input to the first round, the buffer has the value of the intermediate hash value, H i-1 –expand 1024-bit block into 80 round, 64-bit blocks by mixing & shifting –use 80 rounds of 64-bit operations on message block & buffer –add output to input to form new buffer value 5- output hash value is the final buffer value

13 SHA-512 Overview

14 SHA-512 Compression Function

15 SHA-512 Single Round see textbook for details

16

Digital Signatures A digital signature is an authentication mechanism that enables the creator of a message to attach a code that acts as a signature. The signature is formed by taking the hash of the message and encrypting the message with the creator’s private key. The signature guarantees the source and integrity of the message

18 Direct Digital Signatures The direct digital signature involve only sender & receiver (source & destination) It is assumed that receiver has sender’s public- key digital signature may be formed by encrypting the entire message with the sender’s private key. or by encrypting a hash code of the message with the sender’s private key. security depends on sender’s private-key

19 Direct Digital Signatures

20 Direct Digital Signatures Weakness –The validity of the scheme depends on the security of the sender’s private key. If a sender later wishes to deny sending a particular message, the sender can claim that the private key lost or stolen. –Another threat is that some private key might actually be stolen from X at time T. the opponent can then send a message signed with X’s signature and stamped with a time before or equal to T.

21 Arbitrated Digital Signatures The problem associated with direct digital signature can be addressed by using an arbiter. Every signed message from a sender X to a receiver Y goes first to an arbiter A. who subjects the message and its signature to a number of tests to check its origin and content. The message is then dated and sent to Y with an indication that it has been verified to the satisfaction of the arbiter. The presence of A solves the problem faced by direct signature schemes: that X might disown the message requires suitable level of trust in arbiter can be implemented with either private or public-key algorithms arbiter may or may not see message

22 Arbitrated Digital Signatures Conventional encryption (table13.1) X  A : M || E ( K xa,[ ID x || H (M) ] ) A  Y : E( K ay,[ ID x || M || E (K xa,[ ID x ||H(M))] ) || T ]) –It is assumed that the sender X and the arbiter A share a secret key K xa and that A and Y share secret key K ay. X constructs a message M and computes its hash value H(m). Then X transmits the message plus a signature to A. the signature consists of an identifier ID x of X plus the hash value, all encrypted using K xa. –A decrypts the signature and checks the hash value to validate the message. Then A transmits a message to Y, encrypted with K ay. The message includes ID x, the original message from X, the signature, and a timestamp. –Arbiter sees message –Problem : the arbiter could form an alliance with sender to deny a signed message, or with the receiver to forge the sender’s signature.

23 Arbitrated Digital Signatures Public Key encryption (table 13.1) X  A : ID x ||E( PR x,[ ID x || E ( PU y, E( PR x, M))]) A  Y : E( PR a, [ ID x ||E (PU y, E (PR x, M))|| T] ) –X double encrypts a message M first with X’s private key,PR x, and then with Y’s public key,PU y. This is a signed, secret version of the message. This signed message, together with X’s identifier, is encrypted again with PR x and, together with ID x, is sent t A. the inner, double encrypted message is secure from the arbiter ( and everyone else except Y) –A can decrypt the outer encryption to assure that the message must have come from X( because only X has PR x ). Then A transmits a message to Y, encrypted with PR a. The message includes ID x, the double encrypted message, and a timestamp. –Arbiter does not see message

Digital signature standard DSS The DSS makes use of the secure hash algorithm (SHA). The DSS uses an algorithm that is designed to provide only the digital signature function. –RSA approach –DSS approach

25 RSA Approach...

26 RSA Approach The message to be signed is input to a hash function that produce a secure hash code of fixed length. This hash code is then encrypted using the sender’s private key to form the signature Both the message and the signature are then transmitted. The recipient takes the message and produces a hash code. If the calculated hash code matches the decrypted signature, the signature is accepted as valid.

27 DSS Approach PR a sender’s private key PU G global public key Signing r= (g k mod p) mod q s= [k -1 (H(M) + xr)] mod q Signature = (r, s) See algorithm 3 page 391

28 DSS Approach The DSS approach make use of a hash function. The hash code is provided as input to a signature function along with a random number k generated for this particular signature. The signature function also depends on the sender’s private key (PR a ) and a set of parameters known to a group of communicating principals. We can consider this set to constitute a global public key (Pu G ). have shared global public key values (p,q,g): The result is a signature consisting of two components, labeled s and r.

29 DSS Approach At the receiving end, the hash code of the incoming message is generated. This plus the signature is input to a verification function. The verification function also depends on the global public key as well the sender’s public key (PU a ), which is paired with sender’s private key. The output of the verification function is a value that is equal to the signature component r if the signature is valid

30 DSA Key Generation Global public key component: have shared global public key values (p,q,g): –p prime number where 2 L-1 < P < 2 L where L= 512 to 1024 bits and is a multiple of 64 –q prime divisor of p-1 where < q < –g = h (p-1) /q mod p where h is any integer with 1 < h < (p-1) Such that h (p-1)/q mod p > 1

31 DSA Signature Verification having received M & signature (r,s) to verify a signature, recipient computes: w = s’ -1 (mod q) u1= [H(M’).w]mod q u2= (r’.w)mod q v = [g u1.y u2 (mod p)] mod q if v=r then signature is verified see book web site for details.