Chapter3 Chapter3 Public-Key Cryptography and Public-Key - - PowerPoint PPT Presentation

chapter3 chapter3
SMART_READER_LITE
LIVE PREVIEW

Chapter3 Chapter3 Public-Key Cryptography and Public-Key - - PowerPoint PPT Presentation

Chapter3 Chapter3 Public-Key Cryptography and Public-Key Cryptography and Message Authentication Message Authentication Henric Johnson Blekinge Institute of Technology, Sweden http://www.its.bth.se/staff/hjo/ henric.johnson@bth.se Henric


slide-1
SLIDE 1

Henric Johnson 1

Chapter3 Chapter3

Public-Key Cryptography and Public-Key Cryptography and Message Authentication Message Authentication

Henric Johnson Blekinge Institute of Technology, Sweden http://www.its.bth.se/staff/hjo/ henric.johnson@bth.se

slide-2
SLIDE 2

Henric Johnson 2

OUTLINE OUTLINE

  • Approaches to Message Authentication
  • Secure Hash Functions and HMAC
  • Public-Key Cryptography Principles
  • Public-Key Cryptography Algorithms
  • Digital Signatures
  • Key Management
slide-3
SLIDE 3

Henric Johnson 3

Authentication Authentication

  • Requirements - must be able to verify that:
  • 1. Message came from apparent source
  • r

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

Henric Johnson 4

Approaches to Message Approaches to Message Authentication Authentication

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

slide-6
SLIDE 6

Henric Johnson 6

One-way HASH function One-way HASH function

slide-7
SLIDE 7

Henric Johnson 7

One-way HASH function One-way HASH function

  • Secret value is added before the hash and removed

before transmission.

slide-8
SLIDE 8

Henric Johnson 8

Secure HASH Functions 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 at any size 2. H produces a fixed length output 3. H(x) is easy to compute for any given x. 4. For any given block x, it is computationally infeasible to find x such that H(x) = h 5. For any given block x, it is computationally infeasible to find with H(y) = H(x). 6. It is computationally infeasible to find any pair (x, y) such that H(x) = H(y)

x y ≠

slide-9
SLIDE 9

Henric Johnson 9

Simple Hash Function Simple Hash Function

  • One-bit circular shift on the hash value after each block is

processed would improve

slide-10
SLIDE 10

Henric Johnson 10

Message Digest Generation Using Message Digest Generation Using SHA-1 SHA-1

slide-11
SLIDE 11

Henric Johnson 11

SHA-1 Processing of single 512-Bit SHA-1 Processing of single 512-Bit Block Block

slide-12
SLIDE 12

Henric Johnson 12

Other Secure HASH functions Other Secure HASH functions

160 (5 paired rounds of 16) 64 (4 rounds

  • f 16)

80 (4 rounds of 20) Number of steps 264-1 bits Maximum message size 512 bits 512 bits 512 bits Basic unit of processing 160 bits 128 bits 160 bits Digest length RIPEMD-160 MD5 SHA-1

∞ ∞

slide-13
SLIDE 13

Henric Johnson 13

HMAC 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

slide-14
SLIDE 14

Henric Johnson 14

HMAC Structure HMAC Structure

slide-15
SLIDE 15

Henric Johnson 15

Public-Key Cryptography Principles 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

slide-16
SLIDE 16

Henric Johnson 16

Encryption using Public-Key system Encryption using Public-Key system

slide-17
SLIDE 17

Henric Johnson 17

Authentication using Authentication using Public-Key Public-Key System System

slide-18
SLIDE 18

Henric Johnson 18

Applications for Public-Key Applications for Public-Key Cryptosystems 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 echange: Two sides cooperate two exhange a session key.

slide-19
SLIDE 19

Henric Johnson 19

Requirements for Public-Key Requirements for Public-Key Cryptography Cryptography

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 E C

KUb

=

)] ( [ ) ( M E D C D M

KUb KRb KRb

= =

slide-20
SLIDE 20

Henric Johnson 20

Requirements for Public-Key Requirements for Public-Key Cryptography Cryptography

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

)] ( [ )] ( [ M E D M E D M

KRb KUb KUb KRb

= =

slide-21
SLIDE 21

Henric Johnson 21

Public-Key Cryptographic Algorithms Public-Key Cryptographic Algorithms

  • 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-22
SLIDE 22

Henric Johnson 22

The RSA Algorithm – Key The RSA Algorithm – Key Generation Generation

1. Select p,q p and q both prime 2. Calculate n = p x q 3. Calculate 4. Select integer e 5. Calculate d 6. Public Key KU = {e,n} 7. Private key KR = {d,n}

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

) ( 1 ; 1 ) ), ( g cd ( n e e n Φ < < = Φ

) ( m

  • d

1

n e d Φ =

slide-23
SLIDE 23

Henric Johnson 23

Example of RSA Algorithm Example of RSA Algorithm

slide-24
SLIDE 24

Henric Johnson 24

The RSA Algorithm - Encryption The RSA Algorithm - Encryption

  • Plaintext:

M<n

  • Ciphertext:

C = Me (mod n)

slide-25
SLIDE 25

Henric Johnson 25

The RSA Algorithm - Decryption The RSA Algorithm - Decryption

  • Ciphertext:

C

  • Plaintext:

M = Cd (mod n)

slide-26
SLIDE 26

Henric Johnson 26

Diffie-Hellman Key Echange Diffie-Hellman Key Echange

slide-27
SLIDE 27

Henric Johnson 27

Other Public-Key Cryptographic Other Public-Key Cryptographic Algorithms Algorithms

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

Key Management Key Management Public-Key Certificate Use Public-Key Certificate Use