collision resistance introduc3on
play

Collision resistance Introduc3on Dan Boneh Recap: message - PowerPoint PPT Presentation

Online Cryptography Course


  1. Online ¡Cryptography ¡Course ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Dan ¡Boneh ¡ Collision ¡resistance ¡ Introduc3on ¡ Dan ¡Boneh ¡

  2. Recap: ¡message ¡integrity ¡ So ¡far, ¡four ¡MAC ¡construc3ons: ¡ ¡ ECBC-­‑MAC, ¡ ¡CMAC ¡ ¡ ¡: ¡ ¡ ¡commonly ¡used ¡with ¡ AES ¡ ¡ (e.g. ¡802.11i) ¡ ¡ ¡ PRFs ¡ ¡ NMAC ¡ ¡ ¡ ¡ ¡: ¡ ¡ ¡basis ¡of ¡HMAC ¡ ¡(this ¡segment) ¡ ¡ PMAC : ¡ ¡ ¡a ¡parallel ¡MAC ¡ ¡ randomized ¡ ¡ Carter-­‑Wegman ¡MAC : ¡ ¡ ¡built ¡from ¡a ¡fast ¡one-­‑3me ¡MAC ¡ MAC ¡ This ¡module: ¡ ¡ ¡MACs ¡from ¡collision ¡resistance. ¡ Dan ¡Boneh ¡

  3. Collision ¡Resistance ¡ Let ¡ ¡H: ¡M ¡ → T ¡ ¡be ¡a ¡hash ¡func3on ¡ ¡ ¡ ¡ ¡ ¡ ¡ ( ¡ ¡|M| ¡>> ¡|T| ¡ ¡) ¡ A ¡ collision ¡for ¡H ¡is ¡a ¡pair ¡ ¡m 0 ¡, ¡m 1 ¡ ∈ ¡M ¡ ¡such ¡that: ¡ ¡ ¡ ¡ ¡H(m 0 ) ¡ ¡= ¡ ¡H(m 1 ) ¡ ¡ ¡ ¡and ¡ ¡ ¡ ¡m 0 ¡ ≠ ¡m 1 ¡ A ¡func3on ¡H ¡is ¡ collision ¡resistant ¡ if ¡for ¡all ¡(explicit) ¡ “ eff ” algs. ¡A: ¡ ¡ ¡ ¡ ¡ ¡ ¡ Adv CR [A,H] ¡ ¡= ¡ ¡Pr[ ¡A ¡outputs ¡collision ¡for ¡H] ¡ ¡is ¡ “ neg ” . Example: ¡ ¡ ¡SHA-­‑256 ¡ ¡(outputs ¡256 ¡bits) ¡ Dan ¡Boneh ¡

  4. MACs ¡from ¡Collision ¡Resistance ¡ Let ¡I ¡= ¡(S,V) ¡ ¡be ¡a ¡MAC ¡for ¡short ¡messages ¡over ¡(K,M,T) ¡ ¡ ¡ ¡ ¡(e.g. ¡AES) ¡ Let ¡ ¡H: ¡M big ¡ → ¡M ¡ ¡ Def: ¡ ¡ ¡ ¡I big ¡= ¡(S big ¡, ¡V big ¡) ¡ ¡ ¡ ¡over ¡ ¡ ¡(K, ¡M big , ¡T) ¡ ¡ ¡as: ¡ ¡ ¡ S big (k,m) ¡= ¡S(k,H(m)) ¡ ¡ ¡ ¡; ¡ ¡ ¡ ¡ ¡V big (k,m,t) ¡= ¡V(k,H(m),t) ¡ Thm : ¡ ¡ ¡If ¡ ¡I ¡ ¡is ¡a ¡secure ¡MAC ¡and ¡ ¡H ¡ ¡is ¡collision ¡resistant ¡ ¡ ¡then ¡ ¡ ¡ ¡ ¡I big ¡ ¡is ¡a ¡secure ¡MAC. ¡ Example: ¡ ¡ ¡ ¡ ¡ ¡S(k,m) ¡= ¡AES 2-­‑block-­‑cbc (k, ¡ ¡SHA-­‑256(m)) ¡ ¡ ¡is ¡a ¡secure ¡MAC. ¡ Dan ¡Boneh ¡

  5. MACs ¡from ¡Collision ¡Resistance ¡ ¡ S big (k, ¡m) ¡= ¡S(k, ¡H(m)) ¡ ¡ ¡ ¡; ¡ ¡ ¡ ¡ ¡V big (k, ¡m, ¡t) ¡= ¡V(k, ¡H(m), ¡t) ¡ Collision ¡resistance ¡is ¡necessary ¡for ¡security: ¡ ¡Suppose ¡adversary ¡can ¡find ¡ ¡m 0 ¡ ≠ ¡m 1 ¡ ¡s.t. ¡ ¡ ¡H(m 0 ) ¡= ¡H(m 1 ). ¡ ¡Then: ¡ ¡ ¡ S big ¡is ¡insecure ¡under ¡a ¡1-­‑chosen ¡msg ¡a]ack ¡ ¡ ¡step ¡1: ¡ ¡adversary ¡asks ¡for ¡ ¡t ¡ ⟵ S(k, ¡m 0 ) ¡ ¡ ¡step ¡2: ¡ ¡ ¡output ¡ ¡ ¡(m 1 ¡, ¡t) ¡ ¡ ¡as ¡forgery ¡ Dan ¡Boneh ¡

  6. Protec3ng ¡file ¡integrity ¡using ¡C.R. ¡hash ¡ So`ware ¡packages: ¡ read-­‑only ¡ public ¡space ¡ package ¡name ¡ package ¡name ¡ package ¡name ¡ ⋯ ¡ F 1 ¡ F 2 ¡ F n ¡ H(F 2 ) ¡ H(F 1 ) ¡ H(F n ) ¡ When ¡user ¡downloads ¡package, ¡can ¡verify ¡that ¡contents ¡are ¡valid ¡ H ¡collision ¡resistant ¡ ¡ ¡ ⇒ ¡ ¡a]acker ¡cannot ¡modify ¡package ¡without ¡detec3on ¡ no ¡key ¡needed ¡(public ¡verifiability), ¡ ¡ ¡but ¡requires ¡read-­‑only ¡space ¡ Dan ¡Boneh ¡

  7. End ¡of ¡Segment ¡ Dan ¡Boneh ¡

  8. Online ¡Cryptography ¡Course ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Dan ¡Boneh ¡ Collision ¡resistance ¡ Generic ¡birthday ¡a]ack ¡ Dan ¡Boneh ¡

  9. Generic ¡a]ack ¡on ¡C.R. ¡func3ons ¡ Let ¡ ¡H: ¡M ¡ → ¡{0,1} n ¡ ¡be ¡a ¡hash ¡func3on ¡ ¡ ¡ ¡( ¡|M| ¡>> ¡2 n ¡ ¡ ) ¡ Generic ¡alg. ¡to ¡find ¡a ¡collision ¡ in ¡Lme ¡ ¡ ¡O(2 n/2 ) ¡ ¡ ¡ hashes ¡ Algorithm: ¡ 1. Choose ¡ 2 n/2 ¡ ¡ random ¡messages ¡in ¡M: ¡ ¡ ¡ ¡ ¡m 1 , ¡…, ¡m 2n/ 2 ¡ ¡ ¡ ¡ ¡ ¡ ¡(dis3nct ¡w.h.p ¡) ¡ 2. For ¡i ¡= ¡1, ¡…, ¡ ¡2 n/2 ¡ ¡ compute ¡ ¡ ¡ ¡t i ¡= ¡H(m i ) ¡ ¡ ¡ ¡ ∈ {0,1} n ¡ ¡ 3. Look ¡for ¡a ¡collision ¡ ¡(t i ¡= ¡t j ). ¡ ¡ ¡ ¡If ¡not ¡found, ¡got ¡back ¡to ¡step ¡1. ¡ How ¡well ¡will ¡this ¡work? ¡ Dan ¡Boneh ¡

  10. The ¡birthday ¡paradox ¡ Let ¡ ¡ ¡r 1 , ¡…, ¡r n ¡ ∈ ¡{1,…,B} ¡ ¡ ¡be ¡indep. ¡iden3cally ¡distributed ¡integers. ¡ ¡ Thm : ¡ ¡ ¡when ¡ ¡ n = ¡1.2 ¡× ¡ B 1/2 ¡ ¡then ¡ ¡ ¡Pr [ ¡ ∃ i≠j: ¡ ¡ ¡r i ¡= ¡r j ¡ ] ¡ ≥ ¡ ¡½ ¡ ¡ ¡ Proof: ¡ ¡ ¡(for ¡uniform ¡indep. ¡r 1 , ¡…, ¡r n ¡) ¡ Dan ¡Boneh ¡

  11. B=10 6 ¡ # ¡samples ¡ ¡n ¡ Dan ¡Boneh ¡

  12. Generic ¡a]ack ¡ H: ¡M ¡ → ¡{0,1} n ¡ ¡. ¡ ¡ ¡ ¡ ¡ ¡Collision ¡finding ¡algorithm: ¡ 1. Choose ¡ 2 n/2 ¡ ¡ random ¡elements ¡in ¡M: ¡ ¡ ¡ ¡ ¡m 1 , ¡…, ¡m 2n/2 ¡ 2. For ¡i ¡= ¡1, ¡…, ¡ ¡2 n/2 ¡ ¡ compute ¡ ¡ ¡ ¡t i ¡= ¡H(m i ) ¡ ¡ ¡ ¡ ∈ {0,1} n ¡ ¡ 3. Look ¡for ¡a ¡collision ¡ ¡(t i ¡= ¡t j ). ¡ ¡ ¡ ¡If ¡not ¡found, ¡got ¡back ¡to ¡step ¡1. ¡ ¡ Expected ¡number ¡of ¡itera3on ¡≈ ¡ ¡ ¡2 ¡ ¡ Running ¡3me: ¡ ¡ O(2 n/2 ) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ (space ¡ ¡O(2 n/2 ) ¡) ¡ Dan ¡Boneh ¡

  13. Sample ¡C.R. ¡hash ¡func3ons: ¡ Crypto++ ¡ ¡5.6.0 ¡ ¡ ¡ ¡ ¡ ¡[ ¡Wei ¡Dai ¡] ¡ AMD ¡Opteron, ¡ ¡ ¡2.2 ¡GHz ¡ ¡ ¡ ¡ ¡ ( ¡Linux) ¡ ¡ ¡ ¡ ¡ digest ¡ ¡ ¡ ¡ generic ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ func3on ¡size ¡(bits) ¡Speed ¡ ¡ (MB/sec) ¡a]ack ¡3me ¡ NIST ¡standards ¡ ¡SHA-­‑1 ¡ ¡160 ¡ ¡153 ¡2 80 ¡ ¡SHA-­‑256 ¡ ¡256 ¡ ¡111 ¡2 128 ¡ ¡SHA-­‑512 ¡ ¡512 ¡ ¡99 ¡2 256 ¡ ¡Whirlpool ¡ ¡512 ¡ ¡57 ¡2 256 ¡ * ¡best ¡known ¡collision ¡finder ¡for ¡SHA-­‑1 ¡requires ¡2 51 ¡hash ¡evalua3ons ¡ ¡ ¡ Dan ¡Boneh ¡

  14. Quantum ¡Collision ¡Finder ¡ Classical ¡ Quantum ¡ algorithms ¡ algorithms ¡ Block ¡cipher ¡ O( ¡ |K| ¡) ¡ O( ¡ |K| 1/2 ¡) ¡ E: ¡K ¡× ¡X ¡ ⟶ ¡X ¡ exhaus3ve ¡search ¡ Hash ¡func3on ¡ O( ¡ |T| 1/2 ¡ ) ¡ O( ¡ |T| 1/3 ¡) ¡ H: ¡M ¡ ⟶ ¡T ¡ collision ¡finder ¡ Dan ¡Boneh ¡

  15. End ¡of ¡Segment ¡ Dan ¡Boneh ¡

  16. Online ¡Cryptography ¡Course ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Dan ¡Boneh ¡ Collision ¡resistance ¡ The ¡Merkle-­‑Damgard ¡ Paradigm ¡ Dan ¡Boneh ¡

  17. Collision ¡resistance: ¡ ¡review ¡ Let ¡ ¡H: ¡M ¡ → T ¡ ¡be ¡a ¡hash ¡func3on ¡ ¡ ¡ ¡( ¡|M| ¡>> ¡|T| ¡) ¡ A ¡ collision ¡for ¡H ¡is ¡a ¡pair ¡ ¡m 0 ¡, ¡m 1 ¡ ∈ ¡M ¡ ¡such ¡that: ¡ ¡ ¡ ¡ ¡ H(m 0 ) ¡ ¡= ¡ ¡H(m 1 ) ¡ ¡ ¡ ¡and ¡ ¡ ¡ ¡m 0 ¡ ≠ ¡m 1 ¡ ¡ ¡ Goal: ¡ ¡ ¡collision ¡resistant ¡(C.R.) ¡hash ¡func3ons ¡ ¡ Step ¡1: ¡ ¡given ¡C.R. ¡func3on ¡for ¡ short ¡messages, ¡ ¡ ¡ ¡construct ¡C.R. ¡func3on ¡for ¡ long ¡messages ¡ ¡ ¡ Dan ¡Boneh ¡

  18. The ¡Merkle-­‑Damgard ¡iterated ¡construc3on ¡ m[0] m[1] m[2] m[3] ll PB H(m) ¡ IV ¡ h h h h H 0 ¡ H 1 ¡ H 2 ¡ H 3 ¡ H 4 ¡ (fixed) ¡ Given ¡ ¡ ¡ h: ¡T ¡× ¡X ¡ ⟶ ¡T ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ (compression ¡func3on) ¡ we ¡obtain ¡ ¡ ¡ ¡ H: ¡X ≤L ¡ ⟶ ¡T ¡ . ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡H i ¡ ¡-­‑ ¡ ¡chaining ¡variables ¡ If ¡no ¡space ¡for ¡PB ¡ ¡ 1000…0 ¡ ¡ll ¡ ¡msg ¡len ¡ PB: ¡ ¡ ¡ ¡padding ¡block ¡ ¡ add ¡another ¡block ¡ 64 ¡bits ¡ 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