1 #ifndef blamka_round_ref_H
2 #define blamka_round_ref_H
4 #include "argon2-impl.h"
6 /*designed by the Lyra PHC team */
7 static inline uint64_t fBlaMka(uint64_t x
, uint64_t y
) {
8 const uint64_t m
= UINT64_C(0xFFFFFFFF);
9 const uint64_t xy
= (x
& m
) * (y
& m
);
10 return x
+ y
+ 2 * xy
;
13 #define G(a, b, c, d) \
16 d = rotr64(d ^ a, 32); \
18 b = rotr64(b ^ c, 24); \
20 d = rotr64(d ^ a, 16); \
22 b = rotr64(b ^ c, 63); \
25 #define BLAKE2_ROUND_NOMSG(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, \
30 G(v2, v6, v10, v14); \
31 G(v3, v7, v11, v15); \
32 G(v0, v5, v10, v15); \
33 G(v1, v6, v11, v12); \