have anyone done this before?

Moderator: BarsMonster

Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
ktion23
Posts: 2
Joined: Sat Aug 29, 2009 2:51 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

have anyone done this before?

Post by ktion23 » Tue Apr 27, 2010 9:47 pm

Code: Select all

    #define aMD5_RnA(a, b, s) a -= b; a = MD5_ROL(a, s);

    #define aMD5_ROUND1(a, b, c, d, Xk, s, Ti) \
      aMD5_RnA(a,b,(32 - s)) \
      a -= ((c & b) | ((~b) & d)) + Xk + Ti;

    #define aMD5_ROUND2(a, b, c, d, Xk, s, Ti) \
      aMD5_RnA(a,b,(32 - s)) \
      a -= ((d & b) | ((~d) & c)) + Xk + Ti;

    #define aMD5_ROUND3(a, b, c, d, Xk, s, Ti) \
      aMD5_RnA(a,b,(32 - s)) \
      a -= (b ^ c ^ d) + Xk + Ti;

    #define aMD5_ROUND4(a, b, c, d, Xk, s, Ti) \
      aMD5_RnA(a, b, (32 -s));\
      a -= (c ^ (b | (~d))) + Xk + Ti;

    #define MD5_AA 0x67452301
    #define MD5_BB 0xefcdab89
    #define MD5_CC 0x98badcfe
    #define MD5_DD 0x10325476

            //get a,b,c,d from the md5 hash.

       a -= MD5_AA;
       b -= MD5_BB;
       c -= MD5_CC;
       d -= MD5_DD;

       aMD5_ROUND4(b, c, d, a, 0,   21, 0xeb86d391);
       aMD5_ROUND4(c, d, a, b, cc,  15, 0x2ad7d2bb);
       aMD5_ROUND4(d, a, b, c, 0,   10, 0xbd3af235);
       aMD5_ROUND4(a, b, c, d, 0,    6, 0xf7537e82);
       aMD5_ROUND4(b, c, d, a, 0,   21, 0x4e0811a1);
       aMD5_ROUND4(c, d, a, b, 0,   15, 0xa3014314);
       aMD5_ROUND4(d, a, b, c, 0,   10, 0xfe2ce6e0);
       aMD5_ROUND4(a, b, c, d, 0,    6, 0x6fa87e4f);
       aMD5_ROUND4(b, c, d, a, bb,  21, 0x85845dd1);
       aMD5_ROUND4(c, d, a, b, 0,   15, 0xffeff47d);
       aMD5_ROUND4(d, a, b, c, dd,  10, 0x8f0ccc92);
       aMD5_ROUND4(a, b, c, d, 0,    6, 0x655b59c3);
       aMD5_ROUND4(b, c, d, a, 0,   21, 0xfc93a039);
       aMD5_ROUND4(c, d, a, b, ml8, 15, 0xab9423a7);
       aMD5_ROUND4(d, a, b, c, 0,   10, 0x432aff97);

//store a,b,c,d
    while (aa = next_pass_in_aa()) {
//load a,b,c,d
       aMD5_ROUND4(a, b, c, d, aa,   6, 0xf4292244);

       aMD5_ROUND3(b, c, d, a, cc,  23, 0xc4ac5665);
       aMD5_ROUND3(c, d, a, b, 0,   16, 0x1fa27cf8);
       aMD5_ROUND3(d, a, b, c, 0,   11, 0xe6db99e5);
       aMD5_ROUND3(a, b, c, d, 0,    4, 0xd9d4d039);
       aMD5_ROUND3(b, c, d, a, 0,   23, 0x04881d05);
       aMD5_ROUND3(c, d, a, b, dd,  16, 0xd4ef3085);
       aMD5_ROUND3(d, a, b, c, aa,  11, 0xeaa127fa);
       aMD5_ROUND3(a, b, c, d, 0,    4, 0x289b7ec6);
       aMD5_ROUND3(b, c, d, a, 0,   23, 0xbebfbc70);
       aMD5_ROUND3(c, d, a, b, 0,   16, 0xf6bb4b60);
       aMD5_ROUND3(d, a, b, c, 0,   11, 0x4bdecfa9);
       aMD5_ROUND3(a, b, c, d, bb,   4, 0xa4beea44);
       aMD5_ROUND3(b, c, d, a, ml8, 23, 0xfde5380c);
       aMD5_ROUND3(c, d, a, b, 0,   16, 0x6d9d6122);
       aMD5_ROUND3(d, a, b, c, 0,   11, 0x8771f681);
       aMD5_ROUND3(a, b, c, d, 0,    4, 0xfffa3942);

       aMD5_ROUND2(b, c, d, a, 0,   20, 0x8d2a4c8a);
       aMD5_ROUND2(c, d, a, b, 0,   14, 0x676f02d9);
       aMD5_ROUND2(d, a, b, c, cc,   9, 0xfcefa3f8);
       aMD5_ROUND2(a, b, c, d, 0,    5, 0xa9e3e905);
       aMD5_ROUND2(b, c, d, a, 0,   20, 0x455a14ed);
       aMD5_ROUND2(c, d, a, b, dd,  14, 0xf4d50d87);
       aMD5_ROUND2(d, a, b, c, ml8,  9, 0xc33707d6);
       aMD5_ROUND2(a, b, c, d, 0,    5, 0x21e1cde6);
       aMD5_ROUND2(b, c, d, a, 0,   20, 0xe7d3fbc8);
       aMD5_ROUND2(c, d, a, b, 0,   14, 0xd8a1e681);
       aMD5_ROUND2(d, a, b, c, 0,    9, 0x02441453);
       aMD5_ROUND2(a, b, c, d, 0,    5, 0xd62f105d);
       aMD5_ROUND2(b, c, d, a, aa,  20, 0xe9b6c7aa);
       aMD5_ROUND2(c, d, a, b, 0,   14, 0x265e5a51);
       aMD5_ROUND2(d, a, b, c, 0,    9, 0xc040b340);
       aMD5_ROUND2(a, b, c, d, bb,   5, 0xf61e2562);

       aMD5_ROUND1(b, c, d, a, 0,   22, 0x49b40821);
       aMD5_ROUND1(c, d, a, b, ml8, 17, 0xa679438e);
       aMD5_ROUND1(d, a, b, c, 0,   12, 0xfd987193);
       aMD5_ROUND1(a, b, c, d, 0,    7, 0x6b901122);
       aMD5_ROUND1(b, c, d, a, 0,   22, 0x895cd7be);
       aMD5_ROUND1(c, d, a, b, 0,   17, 0xffff5bb1);
       aMD5_ROUND1(d, a, b, c, 0,   12, 0x8b44f7af);
       aMD5_ROUND1(a, b, c, d, 0,    7, 0x698098d8);
       aMD5_ROUND1(b, c, d, a, 0,   22, 0xfd469501);
       aMD5_ROUND1(c, d, a, b, 0,   17, 0xa8304613);
       aMD5_ROUND1(d, a, b, c, 0,   12, 0x4787c62a);
       aMD5_ROUND1(a, b, c, d, 0,    7, 0xf57c0faf);

       uint32_t ra = 0xd76aa477 + aa;
       MD5_RnA(ra,MD5_BB,7);
       if (a == ra) {
        //check the rest.
       }
    }

Sc00bz
Posts: 136
Joined: Fri Oct 03, 2008 8:28 am
Contact:

Re: have anyone done this before?

Post by Sc00bz » Wed Apr 28, 2010 1:21 am

Yes, only difference is most reverse the last 15 steps then go forward 16+16+13 steps and check a vs ra+data[0] then do the next steps as needed. You can also half reverse 2 more steps so you can skip about a step more worth of work.
http://3.14.by/forum/viewtopic.php?f=8&t=47&p=2313

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 1 guest