" CRC and how to Reverse it A CRC Tutorial & The c00l way to Reverse CRC by anarchriz " [...] I'll show it a little different way: a0 + X =(1) points to b3 b2 b1 b0 in table a1 + b0 + Y =(2) points to c3 c2 c1 c0 in table a2 + b1 + c0 + Z =(3) points to d3 d2 d1 d0 in table a3 + b2 + c1 + d0 + W =(4) points to e4 e3 e2 e1 in table b3 + c2 + d1 + e0 =f0 c3 + d2 + e1 =f1 d3 + e2 =f2 e3 =f3 (1) (2) (3) (4) (figure 4) This is reversed in the same way as the 16bit version. I shall give an example with real values. For the table values use the CRC-32 table in the appendix. Take for CRC register before, a3 a2 a1 a0 -> AB CD EF 66 Take for CRC register after, f3 f2 f1 f0 -> 56 33 14 78 (wanted value) Here we go: First byte of entries entry value e3=f3 =56 -> 35h=(4) 56B3C423 for e3 e2 e1 e0 d3=f2+e2 =33+B3 =E6 -> 4Fh=(3) E6635C01 for d3 d2 d1 d0 c3=f1+e1+d2 =14+C4+63 =B3 -> F8h=(2) B3667A2E for c3 c2 c1 c0 b3=f0+e0+d1+c2=78+23+5C+66=61 -> DEh=(1) 616BFFD3 for b3 b2 b1 b0 Now we have all needed values, then X=(1)+ a0= DE+66=B8 Y=(2)+ b0+a1= F8+D3+EF=C4 Z=(3)+ c0+b1+a2= 4F+2E+FF+CD=53 W=(4)+d0+c1+b2+a3=35+01+7A+6B+AB=8E (final computation) Conclusion: to change the CRC-32 register from ABCDEF66 to 56331478 we need this sequence of bytes: B8 C4 53 8E [...] -------------------------------------------------------------------------------- I don't know if a fix was released, but the computation is wrong. Let me correct this ;) First byte of entries entry value e3=f3 =56 -> 35h=(4) 56B3C423 for e3 e2 e1 e0 d3=f2+e2 =33+B3 =80 -> 95h=(3) 806567CB for d3 d2 d1 d0 c3=f1+e1+d2 =14+C4+65 =B5 -> BDh=(2) B5D0CF31 for c3 c2 c1 c0 b3=f0+e0+d1+c2=78+23+67+D0=EC -> C1h=(1) EC63F226 for b3 b2 b1 b0 Now we have all needed values, then X=(1)+ a0= C1+66=A7 Y=(2)+ b0+a1= BD+26+EF=74 Z=(3)+ c0+b1+a2= 95+31+F2+CD=9B W=(4)+d0+c1+b2+a3=35+CB+CF+63+AB=F9 (final computation) I remind that anarchriz comptutes only the raw crc32, i mean it's just the "core"; because as you know the algorithm ends with a "XOR -1". So to find which bytes need to be added with my "CRC-Bidouille" just make two XORs ! ABCDEF66 xor FFFFFFFF = 54321099 56331478 xor FFFFFFFF = A9CCEB87 which will give you : A7749BF9, we did it ! Lucifer48 [Phrozen Crew] -------------------------------------------------------------------------------- Can you beleive that the CRC32 is this file is 48484848 ;)))) T;M