Chapter3 Public-Key Cryptography and Message Authentication Henric - - PowerPoint PPT Presentation

chapter3
SMART_READER_LITE
LIVE PREVIEW

Chapter3 Public-Key Cryptography and Message Authentication Henric - - PowerPoint PPT Presentation

Chapter3 Public-Key Cryptography and Message Authentication Henric Johnson/jme 1 OUTLINE Approaches to Message Authentication Secure Hash Functions (SHA) and Keyed- Hash Message Authentication Code (HMAC) Public-Key Cryptography


slide-1
SLIDE 1

Henric Johnson/jme

Chapter3

Public-Key Cryptography and Message Authentication

1

slide-2
SLIDE 2

OUTLINE

Henric Johnson/jme 2

  • Approaches to Message Authentication
  • Secure Hash Functions (SHA) and Keyed-

Hash Message Authentication Code (HMAC)

  • Public-Key Cryptography Principles
  • Public-Key Cryptography Algorithms
  • Digital Signatures
  • Key Management
slide-3
SLIDE 3

Authentication

Henric Johnson/jme 3

  • 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)

slide-4
SLIDE 4

Approaches to Message Authentication

Henric Johnson/jme 4

  • Authentication Using Conventional Encryption

– Only the sender and receiver should share a key

  • Message Authentication without Message

Encryption

– An authentication tag is generated and appended to each message

  • Message Authentication Code

– Calculate the MAC as a function of the message and the key. MAC = F(K, M)

slide-5
SLIDE 5

Henric Johnson/jme 5

slide-6
SLIDE 6

Henric Johnson/jme

One-way HASH function

6

slide-7
SLIDE 7

One-way HASH function

  • Secret value is added before the hash

and removed before transmission.

Henric Johnson/jme 7

slide-8
SLIDE 8

Secure HASH Functions

Henric Johnson/jme 8

  • Purpose of the HASH function is to produce

a “fingerprint”

  • Used in message authentication and digital

signatures

  • Properties of a HASH function H :

– H can be applied to a block of data at any size – H produces a fixed length output – H(x) is easy to compute for any given x. – For any given block x, it is computationally infeasible to find x such that H(x) = h (one-way property) – For any given block x, it is computationally infeasible to find with H(y) = H(x). (weak collision resistance) – It is computationally infeasible to find any pair (x, y) such that H(x) = H(y) ( strong collsion resistance)

slide-9
SLIDE 9

Simple Hash Function

  • One-bit circular shift on the hash value

after each block is processed would improve

Henric Johnson/jme 9

slide-10
SLIDE 10

Secure Hash Algorithm

Henric Johnson/jme 10

slide-11
SLIDE 11

Message Digest Generation Using SHA-512

Henric Johnson/jme 11

slide-12
SLIDE 12

Single message Using SHA-512

Henric Johnson/jme 12

slide-13
SLIDE 13

SHA-512 Processing of single 1024-Bit Block

Henric Johnson/jme 13

slide-14
SLIDE 14

enric Johnson/jm 14

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 80 (4 64 (4 160 (5 steps rounds of rounds of paired 20) 16) rounds of 16) Maximum message size 264-1 bits

∞ ∞

H e

slide-15
SLIDE 15

HMAC

15

  • 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

Henric Johnson/jme

slide-16
SLIDE 16

Henric Johnson/jme

HMAC Structure

16

slide-17
SLIDE 17

Public-Key Cryptography Principles

Henric Johnson/jme 17

  • 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

slide-18
SLIDE 18

Encryption using Public-Key system

Henric Johnson/jme 18

slide-19
SLIDE 19

Authentication using Public- Key System

Henric Johnson/jme 19

slide-20
SLIDE 20

Applications for Public-Key Cryptosystems

Henric Johnson/jme 20

  • 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 echange: Two sides cooperate to exhange a session key.

slide-21
SLIDE 21

Requirements for Public- Key Cryptography

Henric Johnson/jme 21

  • 1. Computationally easy for a party B

to generate a pair (public key KUb, private key KRb)

  • 2. Easy for sender to generate

ciphertext:

  • 3. Easy for the receiver to decrypt

ciphertect using private key:

M = DKRb(C) = DKRb[EKUb(M )]

C = EKUb(M )

slide-22
SLIDE 22

Requirements for Public- Key Cryptography

Henric Johnson/jme 22

4. Computationally infeasible to determine private key (KRb) knowing public key (KUb) 5. Computationally infeasible to recover message M, knowing KUb and ciphertext C 6. Either of the two keys can be used for encryption, with the other used for decryption:

M = DKRb[EKUb(M )] = DKUb[EKRb(M )]

slide-23
SLIDE 23

Public-Key Cryptographic Algorithms

Henric Johnson/jme 23

  • RSA and Diffie-Hellman
  • RSA - Ron Rives, Adi Shamir and Len

Adleman at MIT, in 1977.

– RSA is a block cipher – The most widely implemented

  • Diffie-Hellman

– Echange a secret key securely – Compute discrete logarithms

slide-24
SLIDE 24

The RSA Algorithm – Key Generation, Encryption & Decryption

1. Select p,q 2. Calculate 3. Calculate 4. Select integer e 5. Calculate d 6. Public Key 7. Private key 8. Plaintext: M<n 9. Ciphertext: C

Henric Johnson/jme 24

p and q both prime n = p x q

Φ(n) = ( p −1)(q −1)

gcd( Φ (n), e) = 1;1 < e < Φ (n) d = e −1 mod Φ (n)

KU = {e,n} KR = {d,n} Ciphertext: C = Me (mod n) Plaintext: M = Cd (mod n)

slide-25
SLIDE 25

Example of RSA Algorithm

Henric Johnson/jme 25

slide-26
SLIDE 26

Diffie-Hellman Key Echange

Henric Johnson/jme 26

slide-27
SLIDE 27

Other Public-Key Cryptographic Algorithms

Henric Johnson/jme 27

  • Digital Signature Standard (DSS)

– Makes use of the SHA-1 – Not for encryption or key echange

  • Elliptic-Curve Cryptography (ECC)

– Good for smaller bit size – Low confidence level, compared with RSA – Very complex

slide-28
SLIDE 28

Henric Johnson/jme

Key Management Public-Key Certificate Use

28

slide-29
SLIDE 29

Henric Johnson/jme 29