4.2 Our Improvements
4.2.2 The Improvements on MD5
After surveying the previous papers about the multi-message modification techniques on MD5 [Kli05b, Kli05a, SNKO05, LL05], we find that something can be improved. As mentioned in Section 3.4, there are two iterations in the
collision searching algorithm of MD5. We also introduce our improvements in two parts, the first iteration (or the first block) and the second iteration (or the second block).
• The First Iteration:
– For the sufficient condition “c5,32= d5,32” in the first iteration, we do the following procedure.
1. We complement the bit c4,18.
2. Because c4 changes, we use the following equations to update the message words m14, m15, and m0.
m14= ((c4− d4) ≫ 17) − c3− F F (d4, a4, b3) − t15
m15= ((b4− c4) ≫ 22) − b3− F F (c4, d4, a4) − t16 m0 = ((a5− b4) ≫ 5) − a4− GG(b4, c4, d4) − t17
3. We add the extra condition “b4,18 = a5,18 = 0”. Note that
“a5,18= 0” itself is a sufficient condition.
4. We compute the chaining value d5by d5 = ((d4+GG(a5, b4, c4)+
m6+t18) ≪ 9)+a5but c4,18changes. However, the extra con-dition “b4,18 = a5,18” guarantees that GG(a5,18, b4,18, c4,18) = GG(0, 0, cold4,18) = 0 → 0 unchanges. This also implies that d5
unchanges.
5. We update the chaining value c5 by c5 = ((c4+GG(d5, a5, b4)+
m11+ t19) ≪ 14) + d5 = (((cold4 ± 217) + GG(d5, a5, b4) + m11+
t19) ≪ 14)+d5 = cold5 ±231. This implies that the complement of the bit c5,32 occurs.
6. Because m0 changes, we update the chaining value a1 by a1 = ((a0+ F F (b0, c0, d0) + m0+ t1) ≪ 7) + b0.
7. Because a1 also changes, we use the following equations to update the message words m1, m2, m3, and m4.
m1 = ((d1− a1) ≫ 12) − d0− F F (a1, b0, c0) − t2 m2 = ((c1− d1) ≫ 17) − c0− F F (d1, a1, b0) − t3
m3 = ((b1− c1) ≫ 22) − b0− F F (c1, d1, a1) − t4 m4 = ((a2− b1) ≫ 7) − a1− F F (b1, c1, d1) − t5
Sasaki et al. also give a type 2 multi-message modification for the sufficient condition “c5,32 = d5,32” in their paper [SNKO05, Ta-ble 6]. But there are six extra conditions in their multi-message modification method. As mentioned in Section 4.1, the extra con-dition is not necessary for the message modification techniques, they are used to avoid too many chaining values from changing instead. So if the message modification method need too many extra conditions, the size of the set of the collision message pair will become too small. Even if sometimes we need to add the extra condition to help us to do the multi-message modification, but we must decrease the total number of the extra conditions as possible as we can to enlarge the size of the set of the collision message
pair. In our multi-message modification for the sufficient condition
“c5,32 = d5,32”, we need only one extra condition “c5,32 = d5,32”.
• The Second Iteration:
– For the sufficient condition “d5,18 = 1” in the second iteration, we do the following procedure.
1. We complement the bit d4,9.
2. Because d4 changes, we use the following equations to update the message words m13, m14, and m15.
m13= ((d4− a4) ≫ 12) − d3− F F (a4, b3, c3) − t14 m14= ((c4− d4) ≫ 17) − c3− F F (d4, a4, b3) − t15 m15= ((b4− c4) ≫ 22) − b3− F F (c4, d4, a4) − t16
3. We add the extra condition “b4,9 = c4,9”.
4. Because the bit d4,9 changes, we update ∆17,9 by ∆17,9 = GG(b4,9, c4,9, d4,9) = GG(b4,9, c4,9, dold4,9) = (b4,9 → c4,9)∨(c4,9 → b4,9). The extra condition “b4,9 = c4,9” guarantees that ∆17,9 unchange. This also implies that a5 = ((a4+ GG(b4, c4, d4) + m1+ t17) ≪ 5) + b4 unchanges.
5. Finally, we update the chaining value d5 by d5 = ((d4 + GG(a5, b4, c4)+m6+t18) ≪ 9)+a5 = (((dold4 ±28)+GG(a5, b4, c4)+
m6+ t18) ≪ 9) + a5 = dold5 ± 217. This will cause the comple-ment of the bit d5,18 to occur.
– For the sufficient condition “d5,32 = a5,32” in the second iteration, we do the following procedure.
1. We complement the bit d2,23.
2. We add the extra condition “a2,23= b1,23”.
3. Because d2 changes, we use the following equations to update the message words m5, m6, m7, m8, and m9.
m5 = ((d2 − a2) ≫ 12) − d1− F F (a2, b1, c1) − t6
m6 = ((c2− d2) ≫ 17) − c1− F F (d2, a2, b1) − t7 (4.4) m7 = ((b2− c2) ≫ 22) − b1− F F (c2, d2, a2) − t8
m8 = ((a3− b2) ≫ 7) − a2− F F (b2, c2, d2) − t9
m9 = ((d3 − a3) ≫ 12) − d2− F F (a3, b2, c2) − t10
4. In equation 4.4, F F (d2,23, a2,23, b1,23) = F F (dold2,23, a2,23, b1,23) = (b1,23 → a2,23) ∨ (a2,23 → b1,23). The extra condition “a2,23 = b1,23” cause the complement of F F (d2,23, a2,23, b1,23) to oc-cur. The word m6 = ((c2 − (dold2 ± 222)) ≫ 17) − c1 − (F Fold(d2, a2, b1) ± 222) − t7 = mold6 ∓ (25 + 222). Then d5 = ((d4+GG(a4, b3, c3)+m6+t18) ≪ 9)+a5 = ((d4+GG(a4, b3, c3)+
(mold6 ∓ (25+ 222)) + t18) ≪ 9) + a5 = dold5 ∓ (214+ 231). This causes the complement of the bit d5,32 to occur.
– For the sufficient condition “c5,18= 0” in the second iteration, we do the following procedure.
1. We complement the bit b2,4.
2. Because b2 changes, we use the following equations to update the message words m7, m8, m9, m10, and m11.
m7 = ((b2− c2) ≫ 22) − b1− F F (c2, d2, a2) − t8 m8 = ((a3− b2) ≫ 7) − a2− F F (b2, c2, d2) − t9 m9 = ((d3− a3) ≫ 12) − d2− F F (a3, b2, c2) − t10 m10 = ((c3− d3) ≫ 17) − c2− F F (d3, a3, b2) − t11
m11 = ((b3− c3) ≫ 22) − b2− F F (c3, d3, a3) − t12 (4.5)
3. In equation 4.5, m11 = ((b3 − c3) ≫ 22) − (bold2 ± 23) − F F (c3, d3, a3)−t12 = mold11∓23. Then c5 = ((c4+GG(d5, a5, b4)+
m11+ t19) ≪ 14) + d5 = ((c4+ GG(d5, a5, b4) + (m11∓ 23) + t19) ≪ 14)+d5 = cold5 ∓217. This implies that the complement of the bit c5,18 to occur.
– For the sufficient condition “c5,32= d5,32” in the second iteration, we do the following procedure.
1. We complement the bit c4,18.
2. Because c4 changes, we use the following equations to update the message words m14 and m15.
m14= ((c4− d4) ≫ 17) − c3− F F (d4, a4, b3) − t15
m15= ((b4− c4) ≫ 22) − b3− F F (c4, d4, a4) − t16
3. We compute the chaining value a5by a5 = ((a4+GG(b4, c4, d4)+
m0+ t17) ≪ 5) + b4 but c4,18changes. However, the sufficient condition “d4, 18 = 1” guarantees that GG(b4,18, c4,18, d4,18) = GG(b4,18, cold4,18, 0) is always equal to b4,18. This also implies that a5 unchanges.
4. We add the extra condition “b4,18= 0”.
5. We compute the chaining value d5by d5 = ((d4+GG(a5, b4, c4)+
m6+t18) ≪ 9)+a5and c4,18changes. But the extra condition
“b4,18= 0” cause that GG(a5,18, b4,18, c4,18) = GG(a5,18, b4,18, cold4,18) = (a5,18 → b4,18) ∧ (b4,18 → a5,18). The bit “a5,18 = 0” itself is a sufficient condition, so GG(a5,18, b4,18, c4,18) = 0 → 0 un-changes. This also implies that d5 unchanges.
6. Finally, we update the chaining value c5 is by c5 = ((c4 + GG(d5, a5, b4) + m11 + t19) ≪ 14) + d5 = (((cold4 ± 217) + GG(d5, a5, b4) + m11 + t19) ≪ 14) + d5 = cold5 ± 231. This implies that the complement of the bit c5,32 to occur.
– For the sufficient condition “d6,32 = a6,32” in the second iteration, we do the following procedure.
1. We complement the bit a3,23.
2. We add the extra conditions “d3,23= 1” and “c3,23 = 1”.
3. Because a3 changes, so we use the following equations to
up-date the message words m8, m9, m10, and m12.
m8 = ((a3− b2) ≫ 7) − a2− F F (b2, c2, d2) − t9 m9 = ((d3− a3) ≫ 12) − d2− F F (a3, b2, c2) − t10
m10= ((c3− d3) ≫ 17) − c2− F F (d3, a3, b2) − t11 (4.6) m12= ((a4− b3) ≫ 7) − a3− F F (b3, c3, d3) − t13
4. Because a3 also changes, we update the chaining value b3 by b3 = ((b2 + F F (c3, d3, a3) + m11+ t12) ≪ 22) + c3. But the extra condition “c3,23= 1” cause that F F (c3,23, d3,23, a3,23) = F F (1, d3,23, aold3,23) is always equal to d3,23 and unchanges. So b3 unchanges.
5. In equation 4.6, the extra conditions “d3,23 = 1” cause that F F (d3,23, a3,23, b2,23) = F F (1, aold3,23, b2,23) = aold3,23. Then m10= ((c3− d3) ≫ 17) − c2− (F Fold(d3, a3, b2) ± 222) − t11= mold10 ∓ 222. The word d6 = ((d5 + GG(a6, b5, c5) + m10 + t22) ≪ 9)+a6 = ((d5+GG(a6, b5, c5)+(mold10 ∓222)+t22) ≪ 9)+a6 = dold6 ∓ 231. This implies that the complement of the bit d6,32 occurs.
Finally we analyze the time complexity of our improvements on multi-message modification of MD5. In the first iteration of MD5, our improvements is as efficient as Sasaki et al.’s results [SNKO05]. But the size of the set of our collision message pair is larger than Sasaki et al.’s. We also find that some
extra conditions in their multi-message modification can be erased. These extra conditions are as follows:
• The extra condition “d3,4 = 0” for the sufficient condition “c5,18 = 0”
[SNKO05, Table 5]. No matter what c5,18 is, we just need to comple-ment it.
• The extra condition “a4,1 = 1” and “d1,13= 0” for the sufficient condi-tion “a6,18 = b5,18” [SNKO05, Table 8]. No matter what a4,1 and d1,13 are, we just need to complement them.
• The extra condition “a3,23 = 0” for the sufficient condition “d6,32 = a6,32” [SNKO05, Table 10]. No matter what a3,23 is, we just need to complement it.
So the size of the set of the collision message pair can be enlarged by eras-ing these four extra conditions. Because the collision searcheras-ing algorithm so far doesn’t satisfy all the sufficient conditions, they need to restart the whole collision searching algorithm many times. If we add these extra condi-tions, we must reset these extra conditions when restarting the whole collision searching algorithm. This is because that these extra conditions are broken when doing the message modification in the second round. So we need to recover them by resetting them. But other conditions, including sufficient conditions and other extra conditions, are not broken when doing the mes-sage modification in the second round. Our improvements is more efficient
than Liang and Lai’s results [LL05]. Note that the collision searching algo-rithm will restart the whole algoalgo-rithm many times. As mentioned before, the small range searching algorithm given by Liang and Lai [LL05] is less efficient than Sasaki et al.’s multi-message modification methods [SNKO05].
So in each time, a small time increase will cause that the time of finding the collision increase longer because the algorithm will execute inside the loop many times.
For the second iteration of MD5, Sasaki et al. don’t give any multi-message modification method. We combine Liang and Lai’s results [LL05]
and our improvements introduced before. We can modify for the sufficient conditions “a5,4 = b4,4”, “a5,16 = b4,16”, “a5,18= 0”, and “d5,30= a5,30” by us-ing Liang and Lai’s type 1 multi-message modification methods, and for the sufficient conditions “d5,18 = 1”, “d5,32 = a5,32”, “c5,18 = 0”, “c5,32 = d5,32”, and “d6,32= a6,32” by using our own type 2 multi-message modification meth-ods. Because Sasaki et al. don’t give any multi-message modification method for the second iteration, so our improvements are more efficient than theirs.
We give 5 more type 2 multi-message modification on 5 sufficient conditions than Liang and Lai’s results for the second round. In these 5 sufficient con-ditions, Liang and Lai either use the small range searching techniques or restart the whole collision searching algorithm. So our improvements are more efficient than Liang and Lai’s results.