Message Authentication Codes (MACs) Tung Chou Technische - - PowerPoint PPT Presentation

message authentication codes macs
SMART_READER_LITE
LIVE PREVIEW

Message Authentication Codes (MACs) Tung Chou Technische - - PowerPoint PPT Presentation

Message Authentication Codes (MACs) Tung Chou Technische Universiteit Eindhoven, The Netherlands October 8, 2015 1 / 22 About Me 2 / 22 About Me Tung Chou (Tony) 2 / 22 About Me Tung Chou (Tony) Ph.D. student of Daniel J. Bernstein


slide-1
SLIDE 1

Message Authentication Codes (MACs)

Tung Chou

Technische Universiteit Eindhoven, The Netherlands

October 8, 2015

1 / 22

slide-2
SLIDE 2

About Me

2 / 22

slide-3
SLIDE 3

About Me

Tung Chou (Tony)

2 / 22

slide-4
SLIDE 4

About Me

Tung Chou (Tony)

  • Ph.D. student of Daniel J. Bernstein & Tanja Lange

2 / 22

slide-5
SLIDE 5

About Me

Tung Chou (Tony)

  • Ph.D. student of Daniel J. Bernstein & Tanja Lange
  • Research topics: Post-quantum crypto, ECC, MAC design.

2 / 22

slide-6
SLIDE 6

About Me

Tung Chou (Tony)

  • Ph.D. student of Daniel J. Bernstein & Tanja Lange
  • Research topics: Post-quantum crypto, ECC, MAC design.
  • Email: t.chou@tue.nl

2 / 22

slide-7
SLIDE 7

Outline

3 / 22

slide-8
SLIDE 8

Outline

  • Introduction

3 / 22

slide-9
SLIDE 9

Outline

  • Introduction
  • HMAC

3 / 22

slide-10
SLIDE 10

Outline

  • Introduction
  • HMAC
  • Universal-hash based MACs
  • Poly1305
  • security issues
  • software implementation issues

3 / 22

slide-11
SLIDE 11

Outline

  • Introduction
  • HMAC
  • Universal-hash based MACs
  • Poly1305
  • security issues
  • software implementation issues
  • Diffie–Hellman key exchange

3 / 22

slide-12
SLIDE 12

What are MACs?

4 / 22

slide-13
SLIDE 13

What are MACs?

  • On Wikipedia:

“a message authentication code (often MAC) is a short piece of information used to authenticate a message and to provide integrity and authenticity assurances on the message. Integrity assurances detect accidental and intentional message changes, while authenticity assurances affirm the message’s

  • rigin”

4 / 22

slide-14
SLIDE 14

Digital Signatures

5 / 22

slide-15
SLIDE 15

Digital Signatures

  • Construction:

message (m) hash h TP signature (s) sk pk

5 / 22

slide-16
SLIDE 16

Digital Signatures

  • Construction:

message (m) hash h TP signature (s) sk pk

  • Usage:

5 / 22

slide-17
SLIDE 17

Digital Signatures

  • Construction:

message (m) hash h TP signature (s) sk pk

  • Usage:
  • S computes h and the SIGNsk(h).
  • S sends (m, s).

5 / 22

slide-18
SLIDE 18

Digital Signatures

  • Construction:

message (m) hash h TP signature (s) sk pk

  • Usage:
  • S computes h and the SIGNsk(h).
  • S sends (m, s).
  • V gets (m′, s′).

5 / 22

slide-19
SLIDE 19

Digital Signatures

  • Construction:

message (m) hash h TP signature (s) sk pk

  • Usage:
  • S computes h and the SIGNsk(h).
  • S sends (m, s).
  • V gets (m′, s′).
  • V computes and check hash(m′) = VERIFYpk(s′).

5 / 22

slide-20
SLIDE 20

Digital Signatures

  • Construction:

message (m) hash h TP signature (s) sk pk

  • Usage:
  • S computes h and the SIGNsk(h).
  • S sends (m, s).
  • V gets (m′, s′).
  • V computes and check hash(m′) = VERIFYpk(s′).
  • Security

5 / 22

slide-21
SLIDE 21

Digital Signatures

  • Construction:

message (m) hash h TP signature (s) sk pk

  • Usage:
  • S computes h and the SIGNsk(h).
  • S sends (m, s).
  • V gets (m′, s′).
  • V computes and check hash(m′) = VERIFYpk(s′).
  • Security
  • attacker should not be able to forge a valid (m, s) pair

5 / 22

slide-22
SLIDE 22

Digital Signatures

  • Construction:

message (m) hash h TP signature (s) sk pk

  • Usage:
  • S computes h and the SIGNsk(h).
  • S sends (m, s).
  • V gets (m′, s′).
  • V computes and check hash(m′) = VERIFYpk(s′).
  • Security
  • attacker should not be able to forge a valid (m, s) pair
  • attacker might have collected many (m, s) pairs

5 / 22

slide-23
SLIDE 23

Message Authentication Codes

6 / 22

slide-24
SLIDE 24

Message Authentication Codes

  • “Keyed hash function”:

message (m) shared secret key (r) MAC algorithm tag/authenticator (t)

6 / 22

slide-25
SLIDE 25

Message Authentication Codes

  • “Keyed hash function”:

message (m) shared secret key (r) MAC algorithm tag/authenticator (t)

  • Usage:

6 / 22

slide-26
SLIDE 26

Message Authentication Codes

  • “Keyed hash function”:

message (m) shared secret key (r) MAC algorithm tag/authenticator (t)

  • Usage:
  • S computes t = MACr(m) and sends (m, t).

6 / 22

slide-27
SLIDE 27

Message Authentication Codes

  • “Keyed hash function”:

message (m) shared secret key (r) MAC algorithm tag/authenticator (t)

  • Usage:
  • S computes t = MACr(m) and sends (m, t).
  • R gets (m′, t′).

6 / 22

slide-28
SLIDE 28

Message Authentication Codes

  • “Keyed hash function”:

message (m) shared secret key (r) MAC algorithm tag/authenticator (t)

  • Usage:
  • S computes t = MACr(m) and sends (m, t).
  • R gets (m′, t′).
  • R computes and checks MACr(m′) = t′.

6 / 22

slide-29
SLIDE 29

Message Authentication Codes

  • “Keyed hash function”:

message (m) shared secret key (r) MAC algorithm tag/authenticator (t)

  • Usage:
  • S computes t = MACr(m) and sends (m, t).
  • R gets (m′, t′).
  • R computes and checks MACr(m′) = t′.
  • Security

6 / 22

slide-30
SLIDE 30

Message Authentication Codes

  • “Keyed hash function”:

message (m) shared secret key (r) MAC algorithm tag/authenticator (t)

  • Usage:
  • S computes t = MACr(m) and sends (m, t).
  • R gets (m′, t′).
  • R computes and checks MACr(m′) = t′.
  • Security
  • attacker should not be able to forge a valid (m, t) pair

6 / 22

slide-31
SLIDE 31

Message Authentication Codes

  • “Keyed hash function”:

message (m) shared secret key (r) MAC algorithm tag/authenticator (t)

  • Usage:
  • S computes t = MACr(m) and sends (m, t).
  • R gets (m′, t′).
  • R computes and checks MACr(m′) = t′.
  • Security
  • attacker should not be able to forge a valid (m, t) pair
  • attacker might have collected many (m, t) pairs

6 / 22

slide-32
SLIDE 32

MACs vs Signatures

7 / 22

slide-33
SLIDE 33

MACs vs Signatures

MACs Signatures Integrity yes yes Authenticity yes yes Non-repudiation no yes Key secret-key public-key ✖

7 / 22

slide-34
SLIDE 34

MACs vs Signatures

MACs Signatures Integrity yes yes Authenticity yes yes Non-repudiation no yes Key secret-key public-key “Non-repudiation is about Alice showing to Bob a proof that some data really comes from Alice, such that not

  • nly Bob is convinced, but Bob also gets the assurance

that he could show the same proof to Charlie, and Charlie would be convinced, too” ✖

7 / 22

slide-35
SLIDE 35

MACs vs Signatures

MACs Signatures Integrity yes yes Authenticity yes yes Non-repudiation no yes Key secret-key public-key “Non-repudiation is about Alice showing to Bob a proof that some data really comes from Alice, such that not

  • nly Bob is convinced, but Bob also gets the assurance

that he could show the same proof to Charlie, and Charlie would be convinced, too” ✖ secret-key crypto is “fast”

7 / 22

slide-36
SLIDE 36

HMAC

8 / 22

slide-37
SLIDE 37

HMAC

  • Build MAC from hash functions

8 / 22

slide-38
SLIDE 38

HMAC

  • Build MAC from hash functions
  • A naive construction:

t = H(r || m)

8 / 22

slide-39
SLIDE 39

HMAC

  • Build MAC from hash functions
  • A naive construction:

t = H(r || m)

  • Merkle–Damg˚

ard construction based hashes (e.g., MD5, SHA1)

IV m1 m2 mℓ f f · · · f h

8 / 22

slide-40
SLIDE 40

HMAC

  • Build MAC from hash functions
  • A naive construction:

t = H(r || m)

  • Merkle–Damg˚

ard construction based hashes (e.g., MD5, SHA1)

IV m1 m2 mℓ f f · · · f h

  • Length extension attack: h′ = f(h, mℓ+1)

8 / 22

slide-41
SLIDE 41

HMAC (cont.)

9 / 22

slide-42
SLIDE 42

HMAC (cont.)

  • Another construction:

t = H(m || r) ✖

9 / 22

slide-43
SLIDE 43

HMAC (cont.)

  • Another construction:

t = H(m || r)

  • HMAC:

t = H ((r ⊕ po)||H((r ⊕ pi)||m)) ✖

9 / 22

slide-44
SLIDE 44

HMAC (cont.)

  • Another construction:

t = H(m || r)

  • HMAC:

t = H ((r ⊕ po)||H((r ⊕ pi)||m))

  • HMAC-SHA1

9 / 22

slide-45
SLIDE 45

HMAC (cont.)

  • Another construction:

t = H(m || r)

  • HMAC:

t = H ((r ⊕ po)||H((r ⊕ pi)||m))

  • HMAC-SHA1
  • widely used in Internet applications

9 / 22

slide-46
SLIDE 46

HMAC (cont.)

  • Another construction:

t = H(m || r)

  • HMAC:

t = H ((r ⊕ po)||H((r ⊕ pi)||m))

  • HMAC-SHA1
  • widely used in Internet applications
  • 5.18 Sandy Bridge cycles/byte

9 / 22

slide-47
SLIDE 47

HMAC (cont.)

  • Another construction:

t = H(m || r)

  • HMAC:

t = H ((r ⊕ po)||H((r ⊕ pi)||m))

  • HMAC-SHA1
  • widely used in Internet applications
  • 5.18 Sandy Bridge cycles/byte

✖ Reality: the most commonly used scheme might not be the best

9 / 22

slide-48
SLIDE 48

SHA3

The “Sponge” construction:

http://en.wikipedia.org/wiki/SHA-3

10 / 22

slide-49
SLIDE 49

The Wegman–Carter construction

11 / 22

slide-50
SLIDE 50

The Wegman–Carter construction

  • Why?

11 / 22

slide-51
SLIDE 51

The Wegman–Carter construction

  • Why?
  • provides information theoretic security

11 / 22

slide-52
SLIDE 52

The Wegman–Carter construction

  • Why?
  • provides information theoretic security
  • usually involves field/ring arithmetic

11 / 22

slide-53
SLIDE 53

The Wegman–Carter construction

  • Why?
  • provides information theoretic security
  • usually involves field/ring arithmetic
  • better performance than HMAC

11 / 22

slide-54
SLIDE 54

The Wegman–Carter construction

  • Why?
  • provides information theoretic security
  • usually involves field/ring arithmetic
  • better performance than HMAC

11 / 22

slide-55
SLIDE 55

The Wegman–Carter construction

  • Why?
  • provides information theoretic security
  • usually involves field/ring arithmetic
  • better performance than HMAC
  • Construction

11 / 22

slide-56
SLIDE 56

The Wegman–Carter construction

  • Why?
  • provides information theoretic security
  • usually involves field/ring arithmetic
  • better performance than HMAC
  • Construction
  • “universal” hash function + one-time pad:

hr(mn) ⊕ sn

11 / 22

slide-57
SLIDE 57

The Wegman–Carter construction

  • Why?
  • provides information theoretic security
  • usually involves field/ring arithmetic
  • better performance than HMAC
  • Construction
  • “universal” hash function + one-time pad:

hr(mn) ⊕ sn

  • universal hash: low differential probability

11 / 22

slide-58
SLIDE 58

The Wegman–Carter construction

  • Why?
  • provides information theoretic security
  • usually involves field/ring arithmetic
  • better performance than HMAC
  • Construction
  • “universal” hash function + one-time pad:

hr(mn) ⊕ sn

  • universal hash: low differential probability
  • one-time pad hides all information about the key

11 / 22

slide-59
SLIDE 59

Poly1305

12 / 22

slide-60
SLIDE 60

Poly1305

  • Construction:

t = (((m1rℓ+m2rℓ−1+· · ·+mℓr) mod 2130−5)+s) mod 2128

12 / 22

slide-61
SLIDE 61

Poly1305

  • Construction:

t = (((m1rℓ+m2rℓ−1+· · ·+mℓr) mod 2130−5)+s) mod 2128

  • 2130 − 5 is a prime
  • r, s are shared secret 128-bit values

12 / 22

slide-62
SLIDE 62

Poly1305

  • Construction:

t = (((m1rℓ+m2rℓ−1+· · ·+mℓr) mod 2130−5)+s) mod 2128

  • 2130 − 5 is a prime
  • r, s are shared secret 128-bit values
  • mi<ℓ is the ith 128-bit block of m padded by 1.
  • mℓ is the “remainder” of m padded by 1.

12 / 22

slide-63
SLIDE 63

Poly1305

  • Construction:

t = (((m1rℓ+m2rℓ−1+· · ·+mℓr) mod 2130−5)+s) mod 2128

  • 2130 − 5 is a prime
  • r, s are shared secret 128-bit values
  • mi<ℓ is the ith 128-bit block of m padded by 1.
  • mℓ is the “remainder” of m padded by 1.
  • Without proper padding?

12 / 22

slide-64
SLIDE 64

Poly1305

  • Construction:

t = (((m1rℓ+m2rℓ−1+· · ·+mℓr) mod 2130−5)+s) mod 2128

  • 2130 − 5 is a prime
  • r, s are shared secret 128-bit values
  • mi<ℓ is the ith 128-bit block of m padded by 1.
  • mℓ is the “remainder” of m padded by 1.
  • Without proper padding?
  • m = ’FF’, m′ = ’FF’,’00’
  • zero-pad the message obtain a 128-bit block

m1 = m′

1 = ’FF’, ’00’, ..., ’00’

12 / 22

slide-65
SLIDE 65

Poly1305

  • Construction:

t = (((m1rℓ+m2rℓ−1+· · ·+mℓr) mod 2130−5)+s) mod 2128

  • 2130 − 5 is a prime
  • r, s are shared secret 128-bit values
  • mi<ℓ is the ith 128-bit block of m padded by 1.
  • mℓ is the “remainder” of m padded by 1.
  • Without proper padding?
  • m = ’FF’, m′ = ’FF’,’00’
  • zero-pad the message obtain a 128-bit block

m1 = m′

1 = ’FF’, ’00’, ..., ’00’

  • Speed: 1.22 Sandy Bridge cycles/byte

12 / 22

slide-66
SLIDE 66

Poly1305: avoiding security issue

13 / 22

slide-67
SLIDE 67

Poly1305: avoiding security issue

  • What is wrong with “real” polynomial evaluation?

t = m1rℓ−1 + m2rℓ−2 + · · · + mℓ + s

13 / 22

slide-68
SLIDE 68

Poly1305: avoiding security issue

  • What is wrong with “real” polynomial evaluation?

t = m1rℓ−1 + m2rℓ−2 + · · · + mℓ + s

  • The attacker forges a valid message–tag pair easily:

t + ∆ = m1rℓ−1 + m2rℓ−2 + · · · + (mℓ + ∆) + s

13 / 22

slide-69
SLIDE 69

Poly1305: avoiding security issue

  • What is wrong with “real” polynomial evaluation?

t = m1rℓ−1 + m2rℓ−2 + · · · + mℓ + s

  • The attacker forges a valid message–tag pair easily:

t + ∆ = m1rℓ−1 + m2rℓ−2 + · · · + (mℓ + ∆) + s

  • This does not provide low differential probability

13 / 22

slide-70
SLIDE 70

Poly1305: avoiding security issue

14 / 22

slide-71
SLIDE 71

Poly1305: avoiding security issue

  • What is wrong with using the same pad twice?

t = m1rℓ + m2rℓ−1 + · · · + mℓr + s t′ = m′

1rℓ + m′ 2rℓ−1 + · · · + m′ ℓr + s

14 / 22

slide-72
SLIDE 72

Poly1305: avoiding security issue

  • What is wrong with using the same pad twice?

t = m1rℓ + m2rℓ−1 + · · · + mℓr + s t′ = m′

1rℓ + m′ 2rℓ−1 + · · · + m′ ℓr + s

  • The attacker gets information of r by finding roots of

t − t′ = (m1 − m′

1)rℓ + (m2 − m′ 2)rℓ−1 + · · · + (mℓ − m′ ℓ)r

14 / 22

slide-73
SLIDE 73

Poly1305: avoiding security issue

  • What is wrong with using the same pad twice?

t = m1rℓ + m2rℓ−1 + · · · + mℓr + s t′ = m′

1rℓ + m′ 2rℓ−1 + · · · + m′ ℓr + s

  • The attacker gets information of r by finding roots of

t − t′ = (m1 − m′

1)rℓ + (m2 − m′ 2)rℓ−1 + · · · + (mℓ − m′ ℓ)r

  • “nonce-misuse” issue

14 / 22

slide-74
SLIDE 74

Poly1305: avoiding security issue

  • What is wrong with using the same pad twice?

t = m1rℓ + m2rℓ−1 + · · · + mℓr + s t′ = m′

1rℓ + m′ 2rℓ−1 + · · · + m′ ℓr + s

  • The attacker gets information of r by finding roots of

t − t′ = (m1 − m′

1)rℓ + (m2 − m′ 2)rℓ−1 + · · · + (mℓ − m′ ℓ)r

  • “nonce-misuse” issue
  • In practice s is usually replaced by stream cipher output, e.g.,

AESk(n) for mn

14 / 22

slide-75
SLIDE 75

Poly1305: avoiding security issue

  • What is wrong with using the same pad twice?

t = m1rℓ + m2rℓ−1 + · · · + mℓr + s t′ = m′

1rℓ + m′ 2rℓ−1 + · · · + m′ ℓr + s

  • The attacker gets information of r by finding roots of

t − t′ = (m1 − m′

1)rℓ + (m2 − m′ 2)rℓ−1 + · · · + (mℓ − m′ ℓ)r

  • “nonce-misuse” issue
  • In practice s is usually replaced by stream cipher output, e.g.,

AESk(n) for mn

  • HMAC does not use nonce

14 / 22

slide-76
SLIDE 76

Poly1305: polynomial evaluation

15 / 22

slide-77
SLIDE 77

Poly1305: polynomial evaluation

Consider m1r8 + m2r7 + · · · + m8r

15 / 22

slide-78
SLIDE 78

Poly1305: polynomial evaluation

Consider m1r8 + m2r7 + · · · + m8r

  • Horner’s rule:

r m1 m2 m3 m4 m5 m6 m7 m8 + + + + + + + × × × × × × × ×

15 / 22

slide-79
SLIDE 79

Poly1305: polynomial evaluation

Consider m1r8 + m2r7 + · · · + m8r

  • Horner’s rule:

r m1 m2 m3 m4 m5 m6 m7 m8 + + + + + + + × × × × × × × ×

  • n multiplications (and n − 1 additions)

15 / 22

slide-80
SLIDE 80

Poly1305: polynomial evaluation

Consider m1r8 + m2r7 + · · · + m8r

  • Horner’s rule:

r m1 m2 m3 m4 m5 m6 m7 m8 + + + + + + + × × × × × × × ×

  • n multiplications (and n − 1 additions)
  • The issue of being “on-line”

15 / 22

slide-81
SLIDE 81

GMAC

16 / 22

slide-82
SLIDE 82

GMAC

  • The NIST-standard authenticated encryption scheme GCM

16 / 22

slide-83
SLIDE 83

GMAC

  • The NIST-standard authenticated encryption scheme GCM
  • Galois Counter Mode

16 / 22

slide-84
SLIDE 84

GMAC

  • The NIST-standard authenticated encryption scheme GCM
  • Galois Counter Mode
  • Special hardware support for AES-GCM in high-end CPUs

16 / 22

slide-85
SLIDE 85

GMAC

  • The NIST-standard authenticated encryption scheme GCM
  • Galois Counter Mode
  • Special hardware support for AES-GCM in high-end CPUs
  • Polynomial evaluation MAC:

t = (m1rℓ + m2rℓ−1 + · · · + mℓr) + s ✖

16 / 22

slide-86
SLIDE 86

GMAC

  • The NIST-standard authenticated encryption scheme GCM
  • Galois Counter Mode
  • Special hardware support for AES-GCM in high-end CPUs
  • Polynomial evaluation MAC:

t = (m1rℓ + m2rℓ−1 + · · · + mℓr) + s

  • Based on arithmetic in

F2128 = F2[x]/(x128 + x7 + x2 + x + 1) ✖

16 / 22

slide-87
SLIDE 87

GMAC

  • The NIST-standard authenticated encryption scheme GCM
  • Galois Counter Mode
  • Special hardware support for AES-GCM in high-end CPUs
  • Polynomial evaluation MAC:

t = (m1rℓ + m2rℓ−1 + · · · + mℓr) + s

  • Based on arithmetic in

F2128 = F2[x]/(x128 + x7 + x2 + x + 1) ✖ Binary fields: better in hardware

16 / 22

slide-88
SLIDE 88

GCM

http://en.wikipedia.org/wiki/Galois/Counter_Mode

17 / 22

slide-89
SLIDE 89

GMAC: speeds

reference platform PCLMUQDQ cycles per byte K¨ asper–Schwabe 2009 Core 2 no 14.40 Sandy Bridge no 13.10 Krovetz–Rogaway 2011 Westmere yes 2.00 Gueron 2013 Sandy Bridge yes 1.79 Haswell yes 0.40

18 / 22

slide-90
SLIDE 90

Auth256∗

19 / 22

slide-91
SLIDE 91

Auth256∗

  • Construction

19 / 22

slide-92
SLIDE 92

Auth256∗

  • Construction
  • a pseudo-dot-product MAC:

t = (m1 + r1)(m2 + r2) + (m3 + r3)(m4 + r4) + · · · + s

19 / 22

slide-93
SLIDE 93

Auth256∗

  • Construction
  • a pseudo-dot-product MAC:

t = (m1 + r1)(m2 + r2) + (m3 + r3)(m4 + r4) + · · · + s

  • base field F2256 = F28[x]/(φ). Tower field construction for F28.

19 / 22

slide-94
SLIDE 94

Auth256∗

  • Construction
  • a pseudo-dot-product MAC:

t = (m1 + r1)(m2 + r2) + (m3 + r3)(m4 + r4) + · · · + s

  • base field F2256 = F28[x]/(φ). Tower field construction for F28.
  • Compared to GMAC

19 / 22

slide-95
SLIDE 95

Auth256∗

  • Construction
  • a pseudo-dot-product MAC:

t = (m1 + r1)(m2 + r2) + (m3 + r3)(m4 + r4) + · · · + s

  • base field F2256 = F28[x]/(φ). Tower field construction for F28.
  • Compared to GMAC
  • higher security level

19 / 22

slide-96
SLIDE 96

Auth256∗

  • Construction
  • a pseudo-dot-product MAC:

t = (m1 + r1)(m2 + r2) + (m3 + r3)(m4 + r4) + · · · + s

  • base field F2256 = F28[x]/(φ). Tower field construction for F28.
  • Compared to GMAC
  • higher security level
  • 0.5/1 multiplications per block

19 / 22

slide-97
SLIDE 97

Auth256∗

  • Construction
  • a pseudo-dot-product MAC:

t = (m1 + r1)(m2 + r2) + (m3 + r3)(m4 + r4) + · · · + s

  • base field F2256 = F28[x]/(φ). Tower field construction for F28.
  • Compared to GMAC
  • higher security level
  • 0.5/1 multiplications per block
  • larger key size

19 / 22

slide-98
SLIDE 98

Auth256∗

  • Construction
  • a pseudo-dot-product MAC:

t = (m1 + r1)(m2 + r2) + (m3 + r3)(m4 + r4) + · · · + s

  • base field F2256 = F28[x]/(φ). Tower field construction for F28.
  • Compared to GMAC
  • higher security level
  • 0.5/1 multiplications per block
  • larger key size
  • very different field construction for low bit operation count

19 / 22

slide-99
SLIDE 99

Wegman–Carter construction: security

  • “δ-xor-universal hash”: For all distinct (m, m′) and ∆, we

have Pr

  • Hashr(m) = Hashr(m′) ⊕ ∆
  • ≤ δ

20 / 22

slide-100
SLIDE 100

Wegman–Carter construction: security

  • “δ-xor-universal hash”: For all distinct (m, m′) and ∆, we

have Pr

  • Hashr(m) = Hashr(m′) ⊕ ∆
  • ≤ δ
  • The one-time pad hides all information about the key r.
  • The best strategy for the attacker is to guess.

20 / 22

slide-101
SLIDE 101

Auth256: Security Proof

Hash values:

h =(m1 + r1)(m2 + r2) + (m3 + r3)(m4 + r4) + · · · + (m2ℓ−1 + r2ℓ−1)(m2ℓ + r2ℓ), h′ =(m′

1 + r1)(m′ 2 + r2) + (m′ 3 + r3)(m′ 4 + r4) + · · · + (m′ 2ℓ−1 + r2ℓ−1)(m′ 2ℓ + r2ℓ). 21 / 22

slide-102
SLIDE 102

Auth256: Security Proof

Hash values:

h =(m1 + r1)(m2 + r2) + (m3 + r3)(m4 + r4) + · · · + (m2ℓ−1 + r2ℓ−1)(m2ℓ + r2ℓ), h′ =(m′

1 + r1)(m′ 2 + r2) + (m′ 3 + r3)(m′ 4 + r4) + · · · + (m′ 2ℓ−1 + r2ℓ−1)(m′ 2ℓ + r2ℓ).

Then h = h′ + ∆ if and only if

r1(m2 − m′

2) + r2(m1 − m′ 1) + r3(m4 − m′ 4) + r4(m3 − m′ 3) + · · ·

= ∆ + m′

1m′ 2 − m1m2 + m′ 3m′ 4 − m3m4 + · · · . 21 / 22

slide-103
SLIDE 103

Auth256: Security Proof

Hash values:

h =(m1 + r1)(m2 + r2) + (m3 + r3)(m4 + r4) + · · · + (m2ℓ−1 + r2ℓ−1)(m2ℓ + r2ℓ), h′ =(m′

1 + r1)(m′ 2 + r2) + (m′ 3 + r3)(m′ 4 + r4) + · · · + (m′ 2ℓ−1 + r2ℓ−1)(m′ 2ℓ + r2ℓ).

Then h = h′ + ∆ if and only if

r1(m2 − m′

2) + r2(m1 − m′ 1) + r3(m4 − m′ 4) + r4(m3 − m′ 3) + · · ·

= ∆ + m′

1m′ 2 − m1m2 + m′ 3m′ 4 − m3m4 + · · · .

m = m′ implies that there are at most |K|2ℓ−1 solutions for r.

21 / 22

slide-104
SLIDE 104

CBC-MAC

http://en.wikipedia.org/wiki/CBC-MAC

22 / 22