Good day, you need to implement the MAA (Message Authenticator Algorithm) hashing algorithm to verify the authenticity of the participants of the crypto-protocol, but that the fact that Schneier is given out is only a small part:

"This algorithm is an ISO standard. It provides a 32-bit hash value and was designed for mainframes with fast multiplication instructions.

v = v <<< 1

e = v xor w

x = ((((e + y) mod 2 ^ 32) ۷A۸C) * (x xor Mi)) mod 2 ^ 32-1

y = ((((e + x) mod 2 ^ 32) ۷B۸D) * (y xor Mi)) mod 2 ^ 32-1

These actions are repeated for each message block, Mi, and the resulting hash value is obtained using XOR x and y. The variables v and e depend on the key. A, B, C and D are constants. Perhaps this algorithm is widely used, but it is not safe enough. It has been designed for a long time and is not too complicated. "

So my question is this: where do the constants and variables in this algorithm come from (or what rules are generated)?

    1 answer 1

    Wikipedia says:

    A <- 0x02040801
    B <- 0x00804021
    C <- 0xbfef7fdf
    D <- 0x7dfefbff

    Obviously, this is set to 4 single bits in A and B, and vice versa in C and D. Getting W, V and so on is also described in Wikipedia, I see no reason to reprint.