Public-Key Cryptography and Message Authentication

Similar documents
Public Key Cryptography Overview

Computer Security: Principles and Practice

CRYPTOGRAPHY IN NETWORK SECURITY

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

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

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

Lecture Note 5 PUBLIC-KEY CRYPTOGRAPHY. Sourav Mukhopadhyay

Symmetric Key cryptosystem

CSCE 465 Computer & Network Security

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

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

Public Key (asymmetric) Cryptography

Lukasz Pater CMMS Administrator and Developer

SECURITY IN NETWORKS

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

Notes on Network Security Prof. Hemant K. Soni

The Mathematics of the RSA Public-Key Cryptosystem

Lecture 9: Application of Cryptography

2. Cryptography 2.4 Digital Signatures

Hash Functions. Integrity checks

Overview of Cryptographic Tools for Data Security. Murat Kantarcioglu

Authentication requirement Authentication function MAC Hash function Security of

An Introduction to Cryptography as Applied to the Smart Grid

Cryptography and Network Security Chapter 9

CSCI-E46: Applied Network Security. Class 1: Introduction Cryptography Primer 1/26/16 CSCI-E46: APPLIED NETWORK SECURITY, SPRING

Secure Network Communication Part II II Public Key Cryptography. Public Key Cryptography

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

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

7! Cryptographic Techniques! A Brief Introduction

IT Networks & Security CERT Luncheon Series: Cryptography

Cryptography and Network Security

Overview of Public-Key Cryptography

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

Network Security. HIT Shimrit Tzur-David

Security Sensor Network. Biswajit panja

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

Public Key Cryptography and RSA. Review: Number Theory Basics

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

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

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

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

Network Security. Chapter 2 Basics 2.2 Public Key Cryptography. Public Key Cryptography. Public Key Cryptography

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

CSC474/574 - Information Systems Security: Homework1 Solutions Sketch

Elements of Applied Cryptography Public key encryption

CS 758: Cryptography / Network Security

Chapter 7: Network security

Public Key Cryptography: RSA and Lots of Number Theory

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

Lecture 6 - Cryptography

Authentication, digital signatures, PRNG

Message Authentication Codes

Cryptography and Network Security

Cryptography and Network Security Chapter 10

Mathematics of Internet Security. Keeping Eve The Eavesdropper Away From Your Credit Card Information

Introduction to Computer Security

SECURITY IMPROVMENTS TO THE DIFFIE-HELLMAN SCHEMES

Network Security CS 5490/6490 Fall 2015 Lecture Notes 8/26/2015

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

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

Public Key Cryptography of Digital Signatures

Cryptography and Network Security Digital Signature

Principles of Network Security

Cryptosystems. Bob wants to send a message M to Alice. Symmetric ciphers: Bob and Alice both share a secret key, K.

CSE/EE 461 Lecture 23

EXAM questions for the course TTM Information Security June Part 1

Message Authentication

RSA Attacks. By Abdulaziz Alrasheed and Fatima

A New Efficient Digital Signature Scheme Algorithm based on Block cipher

Network Security Technology Network Management

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

Mathematical Model Based Total Security System with Qualitative and Quantitative Data of Human

Shor s algorithm and secret sharing

A Factoring and Discrete Logarithm based Cryptosystem

Software Implementation of Gong-Harn Public-key Cryptosystem and Analysis

SPC5-CRYP-LIB. SPC5 Software Cryptography Library. Description. Features. SHA-512 Random engine based on DRBG-AES-128

Cryptography & Digital Signatures

Practice Questions. CS161 Computer Security, Fall 2008

What is network security?

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

AN IMPLEMENTATION OF HYBRID ENCRYPTION-DECRYPTION (RSA WITH AES AND SHA256) FOR USE IN DATA EXCHANGE BETWEEN CLIENT APPLICATIONS AND WEB SERVICES

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ MEng. Nguyễn CaoĐạt

SFWR ENG 4C03 - Computer Networks & Computer Security

Public Key Cryptography. c Eli Biham - March 30, Public Key Cryptography

A SOFTWARE COMPARISON OF RSA AND ECC

Table of Contents. Bibliografische Informationen digitalisiert durch

Digital Signature For Text File

Network Security. Security. Security Services. Crytographic algorithms. privacy authenticity Message integrity. Public key (RSA) Message digest (MD5)

How encryption works to provide confidentiality. How hashing works to provide integrity. How digital signatures work to provide authenticity and

Secure File Transfer Using USB

How To Know If A Message Is From A Person Or A Machine

Application of Digital Signature for Securing Communication Using RSA Scheme based on MD5

Security in Computer Networks

Signature Schemes. CSG 252 Fall Riccardo Pucella

Applied Cryptography Public Key Algorithms

Network Security Concepts: Review

Symmetric Mechanisms for Authentication in IDRP

CERTIFICATE AUTHORITY SCHEMES USING ELLIPTIC CURVE CRYPTOGRAPHY, RSA AND THEIR VARIANTS- SIMULATION USING NS2

Network Security. Outline of the Tutorial

Savitribai Phule Pune University

Transcription:

Public-Key Cryptography and Message Authentication (Most of the slides were provided by: Henric Johnson, Blekinge Institute of Technology, Sweden) 1 OUTLINE Approaches to Message Authentication Secure Hash Functions and HMAC Public-Key Cryptography Principles Public-Key Cryptography Algorithms Digital Signatures Key Management 2

Authentication Requirements - must be able to verify that: 1. Message came from apparent source or author, 2. Contents have not been altered, 3. Sometimes, it was sent at a certain time or sequence. Protection against active attack (falsification of data and transactions) 3 Approaches to Message Authentication Authentication Using Conventional Encryption Only the sender and receiver should share a key Message Authentication Code Calculate the MAC as a function of the message M and the secret key K. MAC = F(K, M) is appended to message. 4

5 One-way HASH function 6

One-way HASH function Secret value is added before the hash and removed before transmission. 7 Secure HASH Functions Purpose of the HASH function is to produce a fingerprint. Properties of a HASH function H : 1. H can be applied to a block of data of any size 2. H produces a fixed length output 3. H(x) is easy to compute for any given x. 4. For any given code h, it is computationally infeasible to find x such that H(x) = h 5. For any given block x, it is computationally infeasible to find y x with H(y) = H(x). 6. It is computationally infeasible to find any pair (x, y) such that H(x) = H(y) (to withstand birthday attacks) 8

Simple Hash Function One-bit circular shift on the hash value after each block is processed would improve 9 Message Digest Generation Using SHA-1 10

SHA-1 Processing of single 512-Bit Block 11 Other Secure HASH functions SHA-1 MD5 RIPEMD- 160 Digest length 160 bits 128 bits 160 bits Basic unit of processing 512 bits 512 bits 512 bits Number of steps 80 (4 rounds of 20) 64 (4 rounds of 16) 160 (5 paired rounds of 16) Maximum message size 2 64-1 bits 12

HMAC Use a MAC derived from a cryptographic hash code, such as SHA-1. Motivations: Cryptographic hash functions executes faster in software than encryptoin algorithms such as DES Library code for cryptographic hash functions is widely available No export restrictions from the US 13 HMAC Structure 14

Public-Key Cryptography Principles The use of two keys has consequences in: key distribution, confidentiality and authentication. The scheme has six ingredients (see Figure 3.7) Plaintext Encryption algorithm Public and private key Ciphertext Decryption algorithm 15 Encryption using Public- Key system 16

Authentication using Public- Key System 17 Applications for Public-Key Cryptosystems Three categories: Encryption/decryption: The sender encrypts a message with the recipient s public key. Digital signature: The sender signs a message with its private key. Key exchange: Two sides cooperate to exhange a session key. 18

Requirements for Public- Key Cryptography 1. Computationally easy for a party B to generate a pair (public key KUb, private key KR b ) 2. Easy for sender to generate ciphertext: C = EKUb(M) 3. Easy for the receiver to decrypt ciphertect using private key: M = D ( C) D [ E ( M )] KRb = KRb KUb 19 Requirements for Public- Key Cryptography 4. Computationally infeasible to determine private key (KR b ) knowing public key (KU b ) 5. Computationally infeasible to recover message M, knowing KU b and ciphertext C 6. Desireable: Either of the two keys can be used for encryption, with the other used for decryption: M= D [ E ( M)] D [ E ( M)] KRb KUb = KUb KRb 20

Public-Key Cryptographic Algorithms RSA - Ron Rivest, Adi Shamir and Len Adleman at MIT, in 1977. RSA is a block cipher The most widely implemented Based on difficulty of factorising Diffie-Hellman Exchange a secret key securely Based on difficulty to compute discrete logarithms 21 Public key: (e,n) Private key: (d,n) RSA Encryption: Plaintext: M [0, n-1] (A long message has to be broken into a series of smaller messages) Ciphertext: C = M e (mod n) Decryption: Ciphertext: C Plaintext: M = C d (mod n) 22

RSA (cont.) Enciphering and deciphering functions are mutual inverses: M = C d mod n = ((M e ) d ) mod n = ((M d ) e ) mod n = (M ed ) mod n => RSA scheme can be used for secrecy and authenticity (digital signatures) 23 The RSA Algorithm Generation Key 1. Select p,q p and q both prime 2. Calculate n = p x q 3. Calculate Φ( n) = ( p 1)( q 1) 4. Select integer e gcd( Φ( n), e) = 1;1 < e < Φ( n) 5. Calculate d d * e modφ( n) = 1 6. Public Key KU = {e,n} 7. Private key KR = {d,n} 24

Example of RSA Algorithm 25 Example 2 -RSA Choosing keys: p = 5, q = 7 => n = 5*7 = 35, (p-1) * (q-1) = 24 Since gcd (11, 24) =1 => we can choose e=11 Since 11*11 mod 24 = 121 mod 24 =1 => d =11 26

Example 2 -RSA Encryption: m = 3, then C = m e mod n = 3 11 mod 35 = ( 3 5+5+1 mod 35) = (3 5 mod 35) 2 * 3 mod 35) = (( 3 2 mod 35) 2 * 3 mod 35) 2 * 3 mod 35 = 12 (Note: (a*b) mod n = ((a mod n) * (b mod n) ) mod n ) Decryption: C d mod n = 12 11 mod 35 = 3 = m 27 RSA - Crytanalysis Brute-force (not feasible for large keys) Factorising n into prime factors (sub-exponential effort exp(sqrt(ln(n) *ln(ln(n)))) ) 1024 bit key size currently considered as strong Risk: Fast factorising algorithm for quantum computers 28

Diffie-Hellman Key exchange Global Public Elements: q: prime number α: α < q and α is a primitive root of q [If α is a primitive root of prime number p, then the numbers: α mod p, α 2 mod p,, α p-1 mod p are distinct and are a permutation of {1..p-1}. For any integer b<p, primitive root α of prime number p, one can find unique exponent i (discrete logarithm), such that b= α i mod p, 0= i = (p-1) ] 29 Diffie-Hellmann (cont.) User A Key Generation: Select private X A X A < q Calculate public Y A Y A = α X A mod q 30

Diffie-Hellmann (cont.) User B Key Generation: Select private X B X B < q Calculate public Y B Y B = α X B mod q 31 Diffie-Hellmann (cont.) Generation of Secret Key by User A: K = (Y B ) X A mod q = (α X B) X A mod q= α X B* X A mod q Generation of Secret Key by User B: K = (Y A ) X B mod q = (α X A) X B mod q = α X A* X B mod q 32

Diffie-Hellman Key Exchange q: prime number, α: primitive root of q K = α X A X B mod q No authentication of partners, man-in-the-middle attack possible! 33 Other Public-Key Cryptographic Algorithms Digital Signature Standard (DSS) Makes use of the SHA-1 Not for encryption or key echange Elliptic-Curve Cryptography (ECC) Security for much smaller key size Low confidence level, compared with RSA Very complex 34

Key Management, Public-Key Certificate Use 35 Hybrid Encryption Scheme Bob wishes to communicate with Alice: 1. Prepare a message 2. Encrypt message using symmetric encryption and one-time session key 3. Encrypt session key with Alice s public key 4. Attach encrypted session key to the message and send it to Alice => Advantages: fast and secure symmetric encryption, key exchange with no risk of man in the middle attack 36