Cryptography and Network Security Digital Signature



Similar documents
Authentication requirement Authentication function MAC Hash function Security of

CS549: Cryptography and Network Security

Message authentication and. digital signatures

Overview of Cryptographic Tools for Data Security. Murat Kantarcioglu

Computer Security: Principles and Practice

Chapter 4. Authentication Applications. COSC 490 Network Security Annie Lu 1

Cryptography and Network Security

Public Key Cryptography Overview

Digital Signature. Raj Jain. Washington University in St. Louis

Final Exam. IT 4823 Information Security Administration. Rescheduling Final Exams. Kerberos. Idea. Ticket

Chapter 15 User Authentication

Message Authentication

Outline. Computer Science 418. Digital Signatures: Observations. Digital Signatures: Definition. Definition 1 (Digital signature) Digital Signatures

Introduction to Cryptography CS 355

IT Networks & Security CERT Luncheon Series: Cryptography

Overview of Public-Key Cryptography

CIS 6930 Emerging Topics in Network Security. Topic 2. Network Security Primitives

Digital signatures. Informal properties

Digital Signatures. Murat Kantarcioglu. Based on Prof. Li s Slides. Digital Signatures: The Problem

Authentication Applications

Authentication Applications

Authentication, digital signatures, PRNG

2. Cryptography 2.4 Digital Signatures

Crittografia e sicurezza delle reti. Digital signatures- DSA

Network Security. Gaurav Naik Gus Anderson. College of Engineering. Drexel University, Philadelphia, PA. Drexel University. College of Engineering

Network Security. Computer Networking Lecture 08. March 19, HKU SPACE Community College. HKU SPACE CC CN Lecture 08 1/23

CS 392/681 - Computer Security

Public Key (asymmetric) Cryptography

Cryptography and Network Security Chapter 12

CSC Network Security. User Authentication Basics. Authentication and Identity. What is identity? Authentication: verify a user s identity

Network Security. Security Attacks. Normal flow: Interruption: 孫 宏 民 Phone: 國 立 清 華 大 學 資 訊 工 程 系 資 訊 安 全 實 驗 室

Message Authentication Codes

Cryptography and Network Security Chapter 11. Fourth Edition by William Stallings

Authentication Application

Part I. Universität Klagenfurt - IWAS Multimedia Kommunikation (VK) M. Euchner; Mai Siemens AG 2001, ICN M NT

SECURITY IN NETWORKS

CSE/EE 461 Lecture 23

Network Security [2] Plain text Encryption algorithm Public and private key pair Cipher text Decryption algorithm. See next slide

Authentication Types. Password-based Authentication. Off-Line Password Guessing

Cryptographic hash functions and MACs Solved Exercises for Cryptographic Hash Functions and MACs

EXAM questions for the course TTM Information Security May Part 1

Lecture 9: Application of Cryptography

Chapter 14. Key management and Distribution. Symmetric Key Distribution Using Symmetric Encryption

Chapter 9 Key Management 9.1 Distribution of Public Keys Public Announcement of Public Keys Publicly Available Directory

Computer Networks. Network Security 1. Professor Richard Harris School of Engineering and Advanced Technology

Hash Functions. Integrity checks

2.4: Authentication Authentication types Authentication schemes: RSA, Lamport s Hash Mutual Authentication Session Keys Trusted Intermediaries

Key Management. CSC 490 Special Topics Computer and Network Security. Dr. Xiao Qin. Auburn University

How To Use Kerberos

Outline. CSc 466/566. Computer Security. 8 : Cryptography Digital Signatures. Digital Signatures. Digital Signatures... Christian Collberg

Digital Signatures. (Note that authentication of sender is also achieved by MACs.) Scan your handwritten signature and append it to the document?

CSC474/574 - Information Systems Security: Homework1 Solutions Sketch

Client Server Registration Protocol

CS 356 Lecture 28 Internet Authentication. Spring 2013

Chapter 7: Network security

Part 2 D(E(M, K),K ) E(M, K) E(M, K) Plaintext M. Plaintext M. Decrypt with private key. Encrypt with public key. Ciphertext

Implementation and Comparison of Various Digital Signature Algorithms. -Nazia Sarang Boise State University

Cryptographic Hash Functions Message Authentication Digital Signatures

CSCE 465 Computer & Network Security

Signature Schemes. CSG 252 Fall Riccardo Pucella

CS 758: Cryptography / Network Security

: Network Security. Name of Staff: Anusha Linda Kostka Department : MSc SE/CT/IT

Principles of Public Key Cryptography. Applications of Public Key Cryptography. Security in Public Key Algorithms

Table of Contents. Bibliografische Informationen digitalisiert durch

Public Key Cryptography and RSA. Review: Number Theory Basics

Cryptography and Key Management Basics

Recommendation for Cryptographic Key Generation

ARCHIVED PUBLICATION

Cryptography and network security CNET4523

Kerberos: An Authentication Service for Computer Networks by Clifford Neuman and Theodore Ts o. Presented by: Smitha Sundareswaran Chi Tsong Su

Cryptography Lecture 8. Digital signatures, hash functions

Security. Contents. S Wireless Personal, Local, Metropolitan, and Wide Area Networks 1

Principles of Network Security

CRYPTOGRAPHY IN NETWORK SECURITY

Security. Friends and Enemies. Overview Plaintext Cryptography functions. Secret Key (DES) Symmetric Key

Message Authentication Codes. Lecture Outline

Chapter 16: Authentication in Distributed System

Chapter 10. Network Security

Chapter 11 Security+ Guide to Network Security Fundamentals, Third Edition Basic Cryptography

Digital Signatures. Meka N.L.Sneha. Indiana State University. October 2015

Seminar report Digital Signature Submitted in partial fulfillment of the requirement for the award of degree Of Computer Science

CS 348: Computer Networks. - Security; 30 th - 31 st Oct Instructor: Sridhar Iyer IIT Bombay

CUNSHENG DING HKUST, Hong Kong. Computer Security. Computer Security. Cunsheng DING, HKUST COMP4631

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

Network Security Technology Network Management

Authentication applications Kerberos X.509 Authentication services E mail security IP security Web security

Chapter 6 Electronic Mail Security

Secure Sockets Layer

Security Policy for Oracle Advanced Security Option Cryptographic Module

Cryptography and Network Security Chapter 14. Key Distribution. Key Management and Distribution. Key Distribution Task 4/19/2010

Practice Questions. CS161 Computer Security, Fall 2008

Introduction to Cryptography

Forward Secrecy: How to Secure SSL from Attacks by Government Agencies

Network Security (2) CPSC 441 Department of Computer Science University of Calgary

Capture Resilient ElGamal Signature Protocols

Module 8. Network Security. Version 2 CSE IIT, Kharagpur

The application of prime numbers to RSA encryption

Transcription:

Cryptography and Network Security Digital Signature Xiang-Yang Li

Message Authentication Digital Signature Authentication Authentication requirements Authentication functions Mechanisms MAC: message authentication code Hash functions, security in hash functions Hash and MAC algorithms MD5, SHA, RIPEMD-160, HMAC Digital signatures

Message Attacks Possible attacks Disclosure Traffic analysis Masquerade Content modification Sequence modification Time modification Repudiation Denial of the receipt of message by the destination or Denial of the transmitting by the source

Authentication Enables receiver to verify message authenticity Using some lower level functions as primitive Three types of functions Message encryption Message authentication code Hash function

Message Encryption Conventional Encryption Authentication provided due to the secret key But the message need to be meaningful What happened it message is not readable? How to determine intelligible automatically? Approach Checksum or frame check sequence(fcs) to message Encrypt the message and the appending FCS Receiver decrypt the ciphertext Computes FCS of message, compare with received one

Public Key Encryption Direct encryption by receiver s public key Only confidentiality, no authentication For authentication Encrypt using sender s private key Assume the message is intelligible No confidentiality: everyone can decrypt Confidentiality and authentication Encrypt by sender s, then receiver s public key But too time-consuming: 4 rounds RSA on large data

Message Authentication Code Assume both uses share secret key k Procedure Sender computes MAC=C k (M) for M Sent M and MAC of it to receiver Receiver computes the MAC on received M Compare it with received MAC If match, then accepts the message MAC is similar to encryption, but not need be reversible!

MAC with Confidentiality Two options Using another key to encrypt M and MAC Using another key to encrypt M only Requirements of MAC Size of MAC: n Size of key: k Need 2 n computations of MAC and n/k pairs of M i and MAC i

Why not Conventional Encrypt Possible situations Broadcast a message (one destination can verify) Authentication is done selectively Authentication of computer program Authentication may be important than secrecy Architecture flexibility Authentication lasts longer than secret protection

MAC Requirements Computationally infeasible to construct M such that C k (M )=C k (M) C k (M) uniformly distributed

Data Authentication Algorithm ANSI standard X9.17 Based on DES Using Cipher Block Chaining mode Data is grouped into 64 bits blocks Padding 0 s if necessary Output i =E k (D i? Output i-1 ) 0<i, and Output 0 =0 s The data authentication code DAC consists of the leftmost m bits of the last output, m?16

Hash Function Map a message to a smaller value Requirements Be applied to a block of data of any size Produced a fixed length output H(x) is easy to compute (by hardware, software) One-way: given code h, it is computationally infeasible to find x: H(x)=h Weak collision resistance: given x, computationally infeasible to find y so H(x)=H(y) Strong collision resistance: Computationally infeasible to find x, y so H(x)=H(y)

Basic Uses of Hash Function Six basics usages E k (M H(M)) Confidentiality and authentication M E k (H(M)) Authentication M E KRa (H(M)) Authentication and digital signature E k (M E KRa (H(M))) Authentication, digital signature and confidentiality M H(M S) Authentication (S shared by both sides) E k (M H(M S)) Confidentiality and authentication

Birthday Attacks If 64-bits hash code is used On average, how many messages need to try to find one match the intercepted hash code? Birthday paradox A will sign a message appended with m-bits hash code Attacker generates some variations of fraud message, also variations of good message Find pair of message each from the two sets messages Such that they have the same hash code Give good message to A to get signature Replace good message with fraud message

Analysis Using birthday attack, given 64-bits hash code How many message variations needed so the success probability is large, say 90%?

Examples Simple hash functions XOR of the input message H(M)=X 1? X 2?? X m-1? X m But not secure Y m =H(M)? Y 1? Y 2?? Y m-1 has same hash value as (X 1 X 2 X m-1 X m ), where Y i is any value

Cont. Based on DES, block chaining technique Rabin, 1978 Divide message M into fix-sized blocks M i Assume total n data blocks H 0 =initial value H i =Em i [H i-1 ] H n is the hash value Birthday attack still applies If still 64-bits code used

More Attacks Birthday attack applied if chosen plaintext Meet in the middle attack if known plaintext Known signed hash code G Construct n-2 desired message block Q i Compute H i =EQ i [H i-1 ] Generate 2 m/2 random blocks X For each X, Compute H n-1 =EX[H n-2 ] Generate 2 m/2 random blocks Y For each Y, Compute H n-1 =D Y [G] Find X, Y such that H n-1 = H n-1 Then Q 1, Q 2, Q n-2, X,Y is a fraud message

Security The size of hash code determines security 128bits is not secure Currently, most use 160 bits hash code Attack MAC Object find valid (x, C k (x)) pair Attack the key space: roughly 2 k, k =key size Attack the MAC value

More Hash Algorithms Algorithms Message Digest:MD5 (was mostly widely used) Secure Hash Algorithm: SHA-1 (from MD4) RIPEMD-160 HMAC

Digital Signatures Authentication Protects two parties from the third party But not protect against each other Digital signature Verification of the message source Protects the authority from anyone

Requirements Requirement lists Signature depends on the message Signature uses information unique to the signer Relatively easy to sign Relatively easy to recognize and verify it Computationally infeasible to forge signature New messages using old signature Create signature for a given message Practical to retain a copy of the signature for later verfication

Digital Signature Standard FIPS PUB 186 by NIST It uses Secure Hashing Algorithm (SHA) for hashing Digital Signature Algorithm (DSA) for signature The hash code is set as input of DSA The signature consists of two numbers DSA Based on the difficulty of discrete logarithm Based on Elgamal and Schnorr system

DSA Global public components Prime number p with 512-1024 bits Prime divisor q of (p-1) with 160 bits Integer g=h (p-1)/q mod p Users private key Random integer x less than q Users public key Integer y=g x mod p

DSA Signature For each message M, generates random k Computes r=(g k mod p) mod q Computes s=k -1 (H(M)+xr) mod q Signature is (r,s) Verifying Computes w=s -1 mod q, u 1 =H(M)w mod q Computes u 2 =rw mod q,v=(g u 1y u 2 mod p) mod q Test if v=r

Proof of Correctness Notice that v=(g u 1y u 2 mod p) mod q =(g H(M)w mod q y rw mod q mod p) mod q =(g H(M)w mod q g xrw mod q mod p) mod q =(g H(M)w +xrw mod q mod p) mod q =(g (H(M)+xr)w mod q mod p) mod q =(g (H(M)+xr)k(H(M)+xr) -1 mod q mod p) mod q =(g k mod p) mod q =r

ElGamal Signature Global public components Prime number p with 512-1024 bits Primitive element g in Z p Users private key Random integer x less than p Users public key Integer y=g x mod p

Elgamal Signature For each message M, generates random k Computes r=g k mod p Computes s=k -1 (H(M)-xr) mod (p-1) Signature is (r,s) Verifying Computes v 1 =g H(M) mod p Computes v 2 =y r r s mod p Test if v 1 = v 2

Proof of Correctness Computes v 2 =y r r s mod q So v 2 =y r r s mod q =g xr g ks mod p = g xr+k k -1(H(M)-xr) mod (p-1) mod p =g H(M) mod p=v 1 Notice that here it uses Fermat theorem to show That g (H(M)-xr) mod (p-1) mod p = g (H(M)-xr) mod p

Non-deterministic Non-determined signatures For each message, many valid signatures exist DSA, Elgamal Deterministic signatures For each message, one valid signature exists RSA

Comparisons Speed DSS has faster signing than verifying RSA could have faster verifying than signing Message be signed once, but verified many times This prefers the faster verification But the signer may have limited computing power Example: smart card This prefers the faster siging

Authentication Protocols Central issues Confidentiality: prevent masqueraded and compromised Timeliness: prevent replay attacks Simple replay, repetition within timestamp, replay arrives but not the true messages,backward replay attack to the sender Mutual authentication One-way authentication

Coping with Replay Time stamps Party A accepts a message only if has valid timestamp within a valid time Need synchronized clock How to set the synchronized clock? Network delay consideration? Challenge/response Party A, (receiver), sends B a nonce (challenge) and requires the subsequent message contains it

Challenge-Response To ensure a password is never sent in the clear. Given a client and a server share a key server sends a random challenge vector client encrypts it with private key and returns this server verifies response with copy of private key can repeat protocol in other direction to authenticate server to client (2-way authentication) Secret key management physically distributed before secure communications keys are stored in a central trusted key server

Conventional Encryption App. Each user shares a secret master key with KDC (Key Distribution Center) Kerberos is an example Needham-Schroeder protocol Party A KDC Ida Idb Na KDC A A B B A A B E ka (Ks Idb Na E kb (Ks Ida)) E kb (Ks Ida) E ks (Nb) E ks (f(nb))

Weakness Step 4 and 5 prevent the replay of step 3 Assume that Ks is not compromised If Ks is compromised Vulnerable to replay attack Attacker can replay step 3 Unless B remembers all previous session keys with A, it can not tell that it is a replay!

Denning Protocol Denning Protocol Party A KDC Ida Idb KDC A A B B A A B E ka (Ks Idb T E kb (Ks Ida T)) E kb (Ks Ida T) E ks (Nb) E ks (f(nb)) Here T is timestamp assures the freshness of the key Ks Rely on synchronized clock

Public-key Encryption App. The simple one proposed by Denning AS: authentication server A AS Ida Idb AS A E kras (KUa Ida T) E kras (Kub Idb T) A B E kras (KUa Ida T) E kras (Kub Idb T) E kub (E kra (Ks T)) It needs clock synchronization

Cont. Protocol by Woo and Lam, using nonce A KDC Ida Idb KDC A E KRau (Idb KUb) A B E KUb (Na Ida) B KDC Idb Ida E KUau (Na) KDC B E KRau (Ida KUa) E KUb (E krau (Na Ks Ida Idb)) B A E KUa (E krau (Na Ks Ida Idb) Nb) A B E ks (Nb)

One-way Authentication Using Public Key approach If confidentiality is main concern A B: E KUb (Ks) E ks (M) If authentication is main concern A B: M E KRa (H(M)) This can not avoid the interception and replay attack Sign the message then E KUb (M E KRa (H(M)) ) Or E KUb (Ks) E ks (M E KRa (H(M)) ) Also A can sends the digital certificate E KRau (T Ida KUa)

Kerberos Trusted key server system developed by MIT Provides centralized third-party authentication in a distributed network access control may be provided for each computing resource in either a local or remote network (realm) A Key Distribution Centre (KDC), containing database: principles (customers and services) encryption keys KDC provides non-corruptible authentication credentials (tickets or tokens)

Basic Model

Kerberos Initial User Authentication User requests an initial ticket from KDC used as basis for all remote access requests

Kerberos Request for a Remote Service User requests access to a remote service Obtains a ticket from KDC protected with remote key Sends ticket with request to remote server

Kerberos Two Kerberos versions 4 : restricted to a single realm 5 : allows inter-realm authentication, in beta test Kerberos v5 is an Internet standard specified in RFC1510 To use Kerberos need to have a KDC on your network need to have Kerberised applications running on all participating systems US export restrictions Cannot be directly distributed outside US in source format Crypto libraries must be re-implemented locally

X.509 Authentication Service Public key certificate associated with user The certificates are created by Trusted Authority Then placed in the directory by TA or user Itself is not responsible for creating certificate It includes Version, serial number, signature algorithm identifier, Issuer name, issuer identifier, validity period, the user, user identifier, user s public key, extensions, signature by TA The signature by TA guarantees the authority Certificates can be used to certify other Tas Y<<X>>: certificate of user X issued by TA Y

Certificate Revocation Need the private key together with the certificate to revoke it The revocation is recorded at the directory Each time a certificate is arrived, check the directory to see if it is revoked

Identification Identification: user authentication convince system of your identity before it can act on your behalf sometimes also require that the computer verify its identity with the user Based on three methods what you know what you have what you are Verification Validation of information supplied against a table of possible values based on users claimed identity

What you Know Passwords or Pass-phrases prompt user for a login name and password verify identity by checking that password is correct on some (older) systems, password was stored clear more often use a one-way function, whose output cannot easily be used to find the input value either takes a fixed sized input (eg 8 chars) or based on a hash function to accept a variable sized input to create the value important that passwords are selected with care to reduce risk of exhaustive search

Weakness Traditional password scheme is vulnerable to eavesdropping over an insecure network

Solutions? One-time password these are passwords used once only future values cannot be predicted from older values Password generation either generate a printed list, and keep matching list on system to be accessed or use an algorithm based on a one-way function f (eg MD5) to generate previous values in series (eg SKey) start with a secret password s, and number N, p 0 = f N (s) ith password in series is p i = f N-i (s) must reset password after N uses

What you Have Magnetic Card, Magnetic Key possess item with required code value encoded Smart Card or Calculator may interact with system may require information from user could be used to actively calculate: a time dependent password a one-shot password a challenge-response verification public-key based verification

What you Are Verify identity based on your physical characteristics, known as biometrics Characteristics used include: Signature (usually dynamic) Fingerprint, hand geometry face or body profile Speech, retina pattern Tradeoff between false rejection (type I error) false acceptance (type II error)