message integrity message auth codes
play

Message integrity Message Auth. Codes Dan Boneh Message - PowerPoint PPT Presentation

Online Cryptography Course


  1. Online ¡Cryptography ¡Course ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Dan ¡Boneh ¡ Message ¡integrity ¡ Message ¡Auth. ¡Codes ¡ Dan ¡Boneh ¡

  2. Message ¡Integrity ¡ Goal: ¡ ¡ ¡ ¡ ¡ ¡ integrity , ¡ ¡ ¡ ¡no ¡confiden>ality. ¡ Examples: ¡ – Protec>ng ¡public ¡binaries ¡on ¡disk. ¡ ¡ ¡ ¡ – Protec>ng ¡banner ¡ads ¡on ¡web ¡pages. ¡ Dan ¡Boneh ¡

  3. Message ¡integrity: ¡ ¡ ¡MACs ¡ k ¡ k ¡ message ¡ ¡m ¡ ¡ tag ¡ Alice ¡ Bob ¡ Generate ¡tag: ¡ Verify ¡tag: ¡ ? ¡ ¡ ¡ ¡ ¡ ¡tag ¡ ← ¡S(k, ¡m) ¡ ¡ ¡ ¡ ¡V(k, ¡m, ¡tag) ¡ ¡= ¡`yes ’ ¡ Def: ¡ ¡ ¡ ¡ MAC ¡ ¡I ¡= ¡(S,V) ¡ ¡defined ¡over ¡ ¡(K,M,T) ¡is ¡a ¡pair ¡of ¡algs: ¡ ¡ – S(k,m) ¡outputs ¡t ¡in ¡T ¡ – V(k,m,t) ¡outputs ¡`yes ’ ¡or ¡`no ’ ¡ Dan ¡Boneh ¡

  4. Integrity ¡requires ¡a ¡secret ¡key ¡ message ¡ ¡m ¡ ¡ tag ¡ Alice ¡ Bob ¡ Generate ¡tag: ¡ Verify ¡tag: ¡ ? ¡ ¡ ¡ ¡ ¡ ¡tag ¡ ← ¡CRC(m) ¡ ¡ ¡ ¡ ¡V(m, ¡tag) ¡ ¡= ¡`yes ’ ¡ • ARacker ¡can ¡easily ¡modify ¡message ¡m ¡and ¡re-­‑compute ¡CRC. ¡ • CRC ¡designed ¡to ¡detect ¡ random , ¡not ¡malicious ¡errors. ¡ Dan ¡Boneh ¡

  5. Secure ¡MACs ¡ ARacker’s ¡power: ¡ ¡ ¡ ¡ chosen ¡message ¡a?ack ¡ • ¡ ¡ ¡ ¡for ¡m 1 ,m 2 ,…,m q ¡ ¡ ¡aRacker ¡is ¡given ¡ ¡ ¡t i ¡ ← ¡S(k,m i ) ¡ ARacker ’ s ¡goal: ¡ ¡ ¡ existenAal ¡forgery ¡ • ¡ ¡ ¡ ¡produce ¡some ¡ new ¡valid ¡message/tag ¡pair ¡ ¡(m,t). ¡ ¡(m,t) ¡ ¡ ∉ ¡ ¡ { ¡(m 1 ,t 1 ) ¡, ¡… ¡, ¡(m q ,t q ) ¡ } ¡ ¡ ¡ ¡ ⇒ ¡ ¡ ¡aRacker ¡cannot ¡produce ¡a ¡valid ¡tag ¡for ¡a ¡new ¡message ¡ ⇒ ¡ ¡ ¡given ¡ ¡(m,t) ¡ ¡ ¡aRacker ¡cannot ¡even ¡produce ¡(m,t’) ¡ ¡for ¡ ¡ ¡t’ ¡≠ ¡t ¡ ¡ Dan ¡Boneh ¡

  6. Secure ¡MACs ¡ • For ¡a ¡MAC ¡ ¡ ¡I=(S,V) ¡ ¡and ¡adv. ¡ ¡A ¡ ¡define ¡a ¡MAC ¡game ¡as: ¡ m 1 ¡ ∈ ¡M ¡ m 2 ¡ , ¡…, ¡m q ¡ Chal. ¡ Adv. ¡ t 2 ¡ , ¡…, ¡t q ¡ t 1 ¡ ← ¡S(k,m 1 ) ¡ k ← K ¡ (m,t) ¡ b ¡ b =1 ¡ ¡ ¡ ¡if ¡ ¡V(k,m,t) ¡= ¡`yes ’ ¡ ¡ ¡and ¡ ¡(m,t) ¡ ¡ ∉ ¡ ¡{ ¡(m 1 ,t 1 ) ¡, ¡… ¡, ¡(m q ,t q ) ¡} ¡ b =0 ¡ ¡ ¡otherwise ¡ Def: ¡ ¡I=(S,V) ¡ ¡is ¡a ¡ secure ¡MAC ¡ if ¡for ¡all ¡ “ efficient ” ¡ ¡A: ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Adv MAC [A,I] ¡ ¡= ¡ ¡Pr[Chal. ¡outputs ¡1] ¡ ¡ ¡ ¡ is ¡ “ negligible. ” ¡ Dan ¡Boneh ¡

  7. Let ¡ ¡I ¡= ¡(S,V) ¡be ¡a ¡MAC. ¡ Suppose ¡an ¡aRacker ¡is ¡able ¡to ¡find ¡ ¡m 0 ¡≠ ¡m 1 ¡such ¡that ¡ ¡S(k, ¡m 0 ) ¡= ¡S(k, ¡m 1 ) ¡ ¡ ¡ ¡ ¡for ¡ ¡½ ¡of ¡the ¡keys ¡k ¡in ¡K ¡ Can ¡this ¡MAC ¡be ¡secure? ¡ Yes, ¡the ¡aRacker ¡cannot ¡generate ¡a ¡valid ¡tag ¡for ¡m 0 ¡or ¡m 1 ¡ No, ¡this ¡MAC ¡can ¡be ¡broken ¡using ¡a ¡chosen ¡msg ¡aRack ¡ It ¡depends ¡on ¡the ¡details ¡of ¡the ¡MAC ¡

  8. Let ¡ ¡I ¡= ¡(S,V) ¡be ¡a ¡MAC. ¡ Suppose ¡S(k,m) ¡is ¡always ¡5 ¡bits ¡long ¡ ¡ Can ¡this ¡MAC ¡be ¡secure? ¡ No, ¡an ¡aRacker ¡can ¡simply ¡guess ¡the ¡tag ¡for ¡messages ¡ It ¡depends ¡on ¡the ¡details ¡of ¡the ¡MAC ¡ Yes, ¡the ¡aRacker ¡cannot ¡generate ¡a ¡valid ¡tag ¡for ¡any ¡message ¡

  9. Example: ¡ ¡protec>ng ¡system ¡files ¡ Suppose ¡at ¡install ¡>me ¡the ¡system ¡computes: ¡ filename ¡ filename ¡ filename ¡ ⋯ ¡ k ¡derived ¡from ¡ F 1 ¡ F 2 ¡ F n ¡ user’s ¡password ¡ t 1 ¡= ¡S(k,F 1 ) ¡ t 2 ¡= ¡S(k,F 2 ) ¡ t n ¡= ¡S(k,F n ) ¡ Later ¡a ¡virus ¡infects ¡system ¡and ¡modifies ¡system ¡files ¡ User ¡reboots ¡into ¡clean ¡OS ¡and ¡supplies ¡his ¡password ¡ – Then: ¡ ¡ ¡secure ¡MAC ¡ ¡ ¡ ⇒ ¡ ¡ ¡all ¡modified ¡files ¡will ¡be ¡detected ¡ Dan ¡Boneh ¡

  10. End ¡of ¡Segment ¡ Dan ¡Boneh ¡

  11. Online ¡Cryptography ¡Course ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Dan ¡Boneh ¡ Message ¡Integrity ¡ MACs ¡based ¡on ¡PRFs ¡ Dan ¡Boneh ¡

  12. Review: ¡ ¡ ¡Secure ¡MACs ¡ MAC: ¡ ¡ ¡signing ¡alg. ¡ ¡ ¡ S(k,m) ⟶ t ¡ ¡ ¡and ¡verifica>on ¡alg. ¡ ¡ ¡ V(k,m,t) ¡ ⟶ 0,1 ¡ ARacker’s ¡power: ¡ ¡ ¡ ¡ chosen ¡message ¡a?ack ¡ • ¡ ¡ ¡ ¡for ¡m 1 ,m 2 ,…,m q ¡ ¡ ¡aRacker ¡is ¡given ¡ ¡ ¡t i ¡ ← ¡S(k,m i ) ¡ ARacker ’ s ¡goal: ¡ ¡ ¡ existenAal ¡forgery ¡ • ¡ ¡ ¡ ¡produce ¡some ¡ new ¡valid ¡message/tag ¡pair ¡ ¡(m,t). ¡ ¡(m,t) ¡ ¡ ∉ ¡ ¡ { ¡(m 1 ,t 1 ) ¡, ¡… ¡, ¡(m q ,t q ) ¡ } ¡ ¡ ¡ ⇒ ¡ ¡ ¡aRacker ¡cannot ¡produce ¡a ¡valid ¡tag ¡for ¡a ¡new ¡message ¡ Dan ¡Boneh ¡

  13. Secure ¡PRF ¡ ¡ ¡ ⇒ ¡ ¡ ¡Secure ¡MAC ¡ For ¡a ¡PRF ¡ ¡ ¡ F: ¡K ¡× ¡X ¡ ¡ ⟶ ¡Y ¡ ¡ ¡ define ¡a ¡MAC ¡ ¡ ¡ ¡I F ¡= ¡(S,V) ¡ ¡ ¡ ¡as: ¡ – ¡ S(k,m) ¡ ¡:= ¡ ¡F(k,m) ¡ – ¡ V(k,m,t): ¡ ¡ ¡output ¡`yes ’ ¡if ¡ ¡t ¡= ¡F(k,m) ¡and ¡`no ’ ¡otherwise. ¡ message ¡ ¡m ¡ ¡ tag ¡ Alice ¡ Bob ¡ tag ¡ ← ¡F(k,m) ¡ accept ¡msg ¡if ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡tag ¡ = ¡F(k,m) ¡ Dan ¡Boneh ¡

  14. A ¡bad ¡example ¡ Suppose ¡ ¡ ¡ F: ¡K ¡× ¡X ¡ ¡ ⟶ ¡Y ¡ ¡ ¡ is ¡a ¡secure ¡PRF ¡with ¡ ¡ ¡Y ¡= ¡{0,1} 10 ¡ ¡ ¡ ¡ ¡Is ¡the ¡derived ¡MAC ¡ ¡ ¡I F ¡ ¡ ¡a ¡secure ¡MAC ¡system? ¡ Yes, ¡the ¡MAC ¡is ¡secure ¡because ¡the ¡PRF ¡is ¡secure ¡ ¡ No ¡tags ¡are ¡too ¡short: ¡ ¡anyone ¡can ¡guess ¡the ¡tag ¡for ¡any ¡msg ¡ It ¡depends ¡on ¡the ¡func>on ¡ ¡ ¡F ¡

  15. Security ¡ Thm: ¡If ¡ ¡ F: ¡K×X ⟶ Y ¡ ¡ is ¡a ¡secure ¡PRF ¡ ¡and ¡ ¡1/|Y| ¡is ¡negligible ¡ ¡ ¡ ¡ ¡ (i.e. ¡ ¡|Y| ¡is ¡large) ¡ ¡ ¡ then ¡ ¡I F ¡ ¡is ¡a ¡secure ¡MAC. ¡ ¡In ¡par>cular, ¡ ¡for ¡every ¡eff. ¡MAC ¡adversary ¡A ¡aRacking ¡I F ¡ ¡ there ¡exists ¡an ¡eff. ¡PRF ¡adversary ¡B ¡aRacking ¡F ¡ ¡s.t.: ¡ ¡ ¡ ¡Adv MAC [A, ¡I F ] ¡ ¡ ≤ ¡ ¡Adv PRF [B, ¡F] ¡ ¡ ¡+ ¡ ¡1/|Y| ¡ ¡ ⇒ ¡ ¡ ¡I F ¡ ¡is ¡secure ¡as ¡long ¡as ¡ ¡|Y| ¡ ¡is ¡large, ¡ ¡ ¡say ¡ ¡|Y| ¡= ¡2 80 ¡. ¡ Dan ¡Boneh ¡

  16. Proof ¡Sketch ¡ Suppose ¡ ¡ ¡f: ¡ X ¡ ¡ ⟶ ¡Y ¡ ¡ ¡ ¡ is ¡a ¡truly ¡random ¡func>on ¡ Then ¡MAC ¡adversary ¡A ¡must ¡win ¡the ¡following ¡game: ¡ ¡ m 1 ¡ ∈ ¡X ¡ m 2 ¡ , ¡…, ¡ ¡ ¡m q ¡ Chal. ¡ Adv. ¡ f(m 2) ¡ , ¡…, ¡f(m q ) ¡ t 1 ¡ ← ¡f(m 1 ) ¡ ¡ f ¡ ¡ in ¡ ¡ (m,t) ¡ ¡Funs[X,Y] ¡ ¡ A ¡wins ¡if ¡ ¡ ¡ ¡ t ¡= ¡f(m) ¡ ¡ ¡ ¡ and ¡ ¡ ¡ ¡ ¡ ¡ m ¡ ¡ ∉ ¡ ¡ { ¡m 1 ¡, ¡… ¡, ¡m q ¡ } ¡ ⇒ ¡ ¡ ¡ ¡ ¡ ¡Pr[A ¡wins] ¡= ¡1/|Y| ¡ same ¡must ¡hold ¡for ¡ ¡F(k,x) ¡ Dan ¡Boneh ¡ ¡

  17. Examples ¡ • AES: ¡ ¡ ¡a ¡MAC ¡for ¡16-­‑byte ¡messages. ¡ • Main ¡ques>on: ¡ ¡ ¡ ¡how ¡to ¡convert ¡Small-­‑MAC ¡into ¡a ¡Big-­‑MAC ¡ ¡? ¡ • Two ¡main ¡construc>ons ¡used ¡in ¡prac>ce: ¡ – CBC-­‑MAC ¡ ¡ ¡(banking ¡– ¡ANSI ¡X9.9, ¡X9.19, ¡ ¡ ¡FIPS ¡186-­‑3) ¡ – HMAC ¡ ¡(Internet ¡protocols: ¡ ¡SSL, ¡IPsec, ¡SSH, ¡…) ¡ • Both ¡convert ¡a ¡small-­‑PRF ¡into ¡a ¡big-­‑PRF. ¡ Dan ¡Boneh ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend