Hash Functions, the MD5 Algorithm and the Future (SHA-3)

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Hash Functions, the MD5 Algorithm and the Future (SHA-3) - Presentation Transcript

    1. Hash Functions, the MD5 Algorithm and the Future (SHA-3) Dylan Field, Fall ’08 SSU Math Colloquium
    2. What is a hash?
    3. First, Consider Humpty Dumpty...
    4. Humpty Dumpty sat on a wall.
    5. Humpty Dumpty had a great fall.
    6. All the king’s horses and all the king’s men
    7. Couldn’t put Humpty together again.
    8. X
    9. h(x)
    10. BUT h(x) is a one way function
    11. ... so they can’t put Humpty together again.
    12. x hash function h(x) Humpty falls
    13. ‘ hello’ MD5 x hash function h(x) Humpty falls
    14. 5d41402abc4b ‘ hello’ MD5 2a76b9719d91 1017c592 x hash function h(x) Humpty falls
    15. - going backwards - - sdrawkcab gniog -
    16. - going backwards - - sdrawkcab gniog -
    17. - going backwards - NO!!! - sdrawkcab gniog -
    18. - going backwards - 5d41402abc4b 2a76b9719d91 1017c592 - sdrawkcab gniog -
    19. - going backwards - 5d41402abc4b 2a76b9719d91 1017c592 ‘ hello’ - sdrawkcab gniog -
    20. Requirements h(x)
    21. Requirements h(x) Given h(x) cannot find x 1
    22. Requirements h(x) Given h(x) h(x) is cannot find x constant 1 2
    23. Requirements h(x) Given h(x) h(x) is Can’t find x2 cannot find x constant so h(x2)=h(x1) 1 2 3
    24. Requirement #3 - Humpty Dumpty Style
    25. Requirement #3 - Humpty Dumpty Style ≠
    26. Requirement #3 - Humpty Dumpty Style ≠ ≠ ≠ ≠ .........
    27. so how does it work?
    28. ‘ hello’
    29. 5d41402abc4b2a76b9719d911017c592
    30. we’re going to focus on MD5
    31. 1. Convert ‘x’ to binary
    32. ‘ hello’ 0110100001100101011011000110110001101111
    33. 1. Convert ‘x’ to binary 2. Pad ‘x’ so that size of x (mod 512) = 0
    34. ‘hello’ in binary 0110100001100101011011000110110001101111 1 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 00000 0000000000101000
    35. ‘hello’ in binary 0110100001100101011011000110110001101111 1 add ‘1’ 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 00000 0000000000101000
    36. ‘hello’ in binary 0110100001100101011011000110110001101111 1 add ‘1’ 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0’s until 0000000000 0000000000 0000000000 0000000000 0000000000 x mod 512 = 496 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 00000 0000000000101000
    37. ‘hello’ in binary 0110100001100101011011000110110001101111 1 add ‘1’ 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0’s until 0000000000 0000000000 0000000000 0000000000 0000000000 x mod 512 = 496 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 00000 add 16 bit binary 0000000000101000 representation of x
    38. xpadded = 0110100001100101011011000110110001101111 1 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 00000 0000000000101000
    39. 1. Convert ‘x’ to binary 2. Pad ‘x’ so that size of x (mod 512) = 0 3. Break ‘x’ into 512 bit sub parts and 32 bit words
    40. 0110100001100101011011000110110001101111 1 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 00000 0000000000101000 W1 = 01101000011001010110110001101100
    41. 1. Convert ‘x’ to binary 2. Pad ‘x’ so that size of x (mod 512) = 0 3. Break ‘x’ into 512 bit sub parts and 32 bit words 4. Assign values to k[i], r[i], w[g], h0, h1, h2 and h3.
    42. k[i] = |sin(i+1)| x 232 where ‘i’ is in radians
    43. k[i] = |sin(i+1)| x 232 where ‘i’ is in radians r[i] = Various round shift amounts
    44. k[i] = |sin(i+1)| x 232 where ‘i’ is in radians r[i] = Various round shift amounts w[g] = Word number (0 – 15)
    45. k[i] = |sin(i+1)| x 232 where ‘i’ is in radians r[i] = Various round shift amounts w[g] = Word number (0 – 15) h0 = a = 0x67452301 h1 = b = 0xEFCDAB89 h2 = c = 0x98BADCFE h3 = d = 0x10325476
    46. 1. Convert ‘x’ to binary 2. Pad ‘x’ so that size of x (mod 512) = 0 3. Break ‘x’ into 512 bit sub parts and 32 bit words 4. Assign values to k[i], r[i], w[g], h0, h1, h2 and h3. 5. Perform 64 rounds on each sub part
    47. But first... binary operations!
    48. ∧ (AKA ‘AND’)
    49. p q ∧ T T
    50. p q ∧ T T T
    51. p q ∧ T T T T F
    52. p q ∧ T T T T F F
    53. p q ∧ T T T T F F F T
    54. p q ∧ T T T T F F F T F
    55. p q ∧ T T T T F F F T F F F
    56. p q ∧ T T T T F F F T F F F F
    57. In binary: T=1 F=0
    58. p q ∧ T T T T F F F T F F F F
    59. p q ∧ bit 1 bit 2 ∧ T T T 1 1 1 T F F 1 0 0 F T F 0 1 0 F F F 0 0 0
    60. bit 1 bit 2 ∨ 1 1 1 1 0 1 0 1 1 0 0 0
    61. ⊕ “XOR is a type of logical disjunction on two operands that results in a value of “true” if and only if exactly one of the operands has a value of ‘true’”
    62. bit 1 bit 2 ∨ bit 1 bit 2 ⊕ 1 1 1 1 1 F 1 0 1 1 0 T 0 1 1 0 1 T 0 0 0 0 0 F
    63. ¬
    64. ¬ (not)
    65. ¬1=0 ¬0=1
    66. << (bit shift)
    67. 1 0 1 0 1 0
    68. 0 1 0 1 0 0 1 0 1 0 0 0
    69. Remember: a,b,c,d are h0-3
    70. Operation A f = (b ∧ c) ∨ (¬ b ∧ d) g=i
    71. Operation B f = (d ∧ b) ∨ ((¬ d) ∧ c) g = (5i + 1) mod 16
    72. Operation C f=b⊕c⊕d g = (3i + 5) mod 16
    73. Operation D f = c ⊕ (b ∨ (¬ d)) g = (7i) mod 16
    74. A B C D
    75. A B C D
    76. A B C D
    77. B b + {(a + f + k[i] + w[g]) << r[i]}
    78. b + {(a + f + k[i] + w[g]) << r[i]} h1 h0 Calculated in The gth word Operations A-D (32 bit chunk) |sin(i+1)| x 232 ith pre-designated where ‘i’ is in radians shift
    79. After all 64 rounds...
    80. 1. Convert ‘x’ to binary 2. Pad ‘x’ so that size of x (mod 512) = 0 3. Break ‘x’ into 512 bit sub parts and 32 bit words 4. Assign values to k[i], r[i], w[g], h0, h1, h2 and h3. 5. Perform 64 rounds on each sub part 6. Add a, b, c and d to register values
    81. h0 = h0 + a h1 = h1 + b h2 = h2 + c h3 = h3 + d
    82. 1. Convert ‘x’ to binary 2. Pad ‘x’ so that size of x (mod 512) = 0 3. Break ‘x’ into 512 bit sub parts and 32 bit words 4. Assign values to k[i], r[i], w[g], h0, h1, h2 and h3. 5. Perform 64 rounds on each sub part 6. Add a, b, c and d to register values 7. Append the register values to create digest
    83. 128 bit digest
    84. ‘ hello’
    85. 5d41402abc4b2a76b9719d911017c592
    86. So?
    87. Applications
    88. Applications Password Protection
    89. Message Integrity Applications Password Protection
    90. Message Integrity Applications Digital Password Signatures Protection
    91. Password Protection
    92. When you registered... MD5 ‘password’ 5f4dcc3b5aa765d61d8327deb882cf99
    93. When you registered... MD5 ‘password’ 5f4dcc3b5aa765d61d8327deb882cf99 Data Base
    94. ‘password’
    95. MD5 ‘password’
    96. MD5 ‘password’ 5f4dcc3b5aa765d61d8327deb882cf99
    97. 5f4dcc3b5aa765d61d8327deb882cf99 = stored, hashed password?
    98. 5f4dcc3b5aa765d61d8327deb882cf99 = stored, hashed password? No. Give ‘incorrect password’ error
    99. 5f4dcc3b5aa765d61d8327deb882cf99 = stored, hashed password? No. Yes. Give ‘incorrect Let user password’ error into website
    100. Attacks
    101. Rainbow Tables
    102. omgyouarenever 1c9fee8bd70a5afb6 goingtocrackthis 30fc4f38e97123f 123
    103. omgyouarenever 1c9fee8bd70a5afb6 goingtocrackthis 30fc4f38e97123f 123
    104. and Brute Force Attacks
    105. Message Integrity
    106. digest
    107. File Verification
    108. File Verification Guarding against corruption
    109. File Verification Guarding against corruption Proving you have something before you release it
    110. Attacks
    111. Nostradamus Attack
    112. But on November 30th 2007...
    113. “We have used a Sony Playstation 3 to correctly predict the outcome of the 2008 US presidential elections. In order not to influence the voters we keep our prediction secret, but commit to it by publishing its cryptographic hash on this website. The document with the correct prediction and matching hash will be revealed after the elections.” - Marc Stevens, Arjen Lenstra and Benne de Weger
    114. 3D515DEAD7AA1656 0ABA3E9DF05CBC80
    115. But how could they have known!?!?
    116. But how could they have known!?!? They didn’t.
    117. 3D515DEAD7AA1656 0ABA3E9DF05CBC80
    118. Digital Signatures
    119. MD5 hash
    120. MD5 hash private key encrypted
    121. MD5 hash private key hash encrypted public key
    122. MD5 hash private MD5 key hash encrypted public key
    123. MD5 hash private MD5 key hash ✔ encrypted public key
    124. Attacks
    125. Collision Attack
    126. hash private MD5 key hash ✔ encrypted public key
    127. Changed hash Message MD5 hash ✔ encrypted public key
    128. Very Dangerous!
    129. Birthday Attack
    130. Relies on ‘Birthday Paradox’
    131. Relies on ‘Birthday Paradox’ First we calculate the chance no one has the same birthday
    132. p(1)=100%
    133. p(2)=(1)(1 - 1/365)
    134. p(3)=(1)(1 - 1/365)(1 - 2/365)
    135. To Generalize...
    136. P(n)= 365! . 365 n(365-n)!
    137. 23 50% chance
    138. 30 70.6% chance
    139. 50 97% chance
    140. We can use this property to find out how many hashes must be calculated to find a collision.
    141. Current State of MD5
    142. MD5 =
    143. MD5 = Broken
    144. The Future of Hashes
    145. Submissions were due on October 30th
    146. Currently Submitted
    147. Skein Maraca BLAKE MD6 Keccak CubeHash Edon-R Ponic EnRUPT SHAMATA MCSSHA-3 Sgàil Blue Midnight Wish Grøstl ESSENCE WaMM Boole NaSHA NKS2D Waterfall
    148. Skein BLAKE MD6 Maraca Keccak CubeHash Edon-R Ponic EnRUPT SHAMATA MCSSHA-3 Sgàil Blue Midnight Wish Grøstl ESSENCE WaMM Boole NaSHA NKS2D Waterfall
    149. Thank you for coming!
    150. Any Questions?

    + Dylan FieldDylan Field, 11 months ago

    custom

    1426 views, 1 favs, 0 embeds more stats

    This was filmed at the Sonoma State University math more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1426
      • 1426 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 57
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories