Read the comments under TFA. Nothing was broken. The author was quick to write the article without understanding protocol first.
It looks like a bunch of convoluted code that doesn't actually accomplish anything.
Why is
sha1_a = SHA1 (msg_key + substr (auth_key, x, 32));
sha1_b = SHA1 (substr (auth_key, 32+x, 16) + msg_key + substr (auth_key, 48+x, 16));
sha1_с = SHA1 (substr (auth_key, 64+x, 32) + msg_key);
sha1_d = SHA1 (msg_key + substr (auth_key, 96+x, 32));
aes_key = substr (sha1_a, 0, 8) + substr (sha1_b, 8, 12) + substr (sha1_c, 4, 12);
aes_iv = substr (sha1_a, 8, 12) + substr (sha1_b, 0, 8) + substr (sha1_c, 16, 4) + substr (sha1_d, 0, 8);
better than sha1_a = SHA1 (msg_key + auth_key);
sha1_b = SHA1 (sha1_a);
sha1_с = SHA1 (sha1_b);
sha1_d = SHA1 (sha1_C);
aes_key = SHA1(sha1_a+sha1_b+sha1_c);
aes_iv = SHA1(aes_key+sha1_d);
and more importantly why is it better than aes_key = RANDOM
aes_iv = RANDOM
Are there special properties of the random bits of parts of various hashes that makes it more 'random'?To me it looks like repeatedly sending the same message, or a message whose hash varied by a few bits, would leak part of the auth key, basically the person probably doesn't know what they are doing and are just adding extra 'stuff' to assure themselves it's secure.