Go to the documentation of this file. 1 #include <linux/kernel.h>
2 #include <linux/export.h>
6 #define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
7 #define G(x, y, z) (((x) & (y)) + (((x) ^ (y)) & (z)))
8 #define H(x, y, z) ((x) ^ (y) ^ (z))
16 #define ROUND(f, a, b, c, d, x, s) \
17 (a += f(b, c, d) + x, a = (a << s) | (a >> (32 - s)))
19 #define K2 013240474631UL
20 #define K3 015666365641UL
27 __u32 a = buf[0],
b = buf[1],
c = buf[2],
d = buf[3];
32 ROUND(
F, c, d, a, b, in[2] +
K1, 11);
33 ROUND(
F, b, c, d, a, in[3] +
K1, 19);
36 ROUND(
F, c, d, a, b, in[6] +
K1, 11);
37 ROUND(
F, b, c, d, a, in[7] +
K1, 19);
43 ROUND(
G, b, c, d, a, in[7] +
K2, 13);
47 ROUND(
G, b, c, d, a, in[6] +
K2, 13);
52 ROUND(
H, c, d, a, b, in[2] +
K3, 11);
53 ROUND(
H, b, c, d, a, in[6] +
K3, 15);
56 ROUND(
H, c, d, a, b, in[0] +
K3, 11);
57 ROUND(
H, b, c, d, a, in[4] +
K3, 15);