Botan  2.1.0
Crypto and TLS for C++11
Namespaces | Macros
blake2b.cpp File Reference
#include <botan/blake2b.h>
#include <botan/exceptn.h>
#include <botan/mem_ops.h>
#include <botan/loadstor.h>
#include <botan/rotate.h>
#include <algorithm>

Go to the source code of this file.

Namespaces

 Botan
 

Macros

#define G(r, i, a, b, c, d)
 
#define ROUND(r)
 

Macro Definition Documentation

#define G (   r,
  i,
  a,
  b,
  c,
 
)
Value:
do { \
a = a + b + m[blake2b_sigma[r][2 * i + 0]]; \
d = rotate_right<uint64_t>(d ^ a, 32); \
c = c + d; \
b = rotate_right<uint64_t>(b ^ c, 24); \
a = a + b + m[blake2b_sigma[r][2 * i + 1]]; \
d = rotate_right<uint64_t>(d ^ a, 16); \
c = c + d; \
b = rotate_right<uint64_t>(b ^ c, 63); \
} while(0)
#define ROUND (   r)
Value:
do { \
G(r, 0, v[0], v[4], v[8], v[12]); \
G(r, 1, v[1], v[5], v[9], v[13]); \
G(r, 2, v[2], v[6], v[10], v[14]); \
G(r, 3, v[3], v[7], v[11], v[15]); \
G(r, 4, v[0], v[5], v[10], v[15]); \
G(r, 5, v[1], v[6], v[11], v[12]); \
G(r, 6, v[2], v[7], v[8], v[13]); \
G(r, 7, v[3], v[4], v[9], v[14]); \
} while(0)
#define G(r, i, a, b, c, d)