#include <crypto/common.h>
#include <crypto/chacha20.h>
#include <support/cleanse.h>
#include <span.h>
#include <algorithm>
#include <string.h>
Go to the source code of this file.
|
#define | QUARTERROUND(a, b, c, d) |
|
#define | REPEAT10(a) do { {a}; {a}; {a}; {a}; {a}; {a}; {a}; {a}; {a}; {a}; } while(0) |
|
|
constexpr static uint32_t | rotl32 (uint32_t v, int c) |
|
◆ QUARTERROUND
#define QUARTERROUND |
( |
|
a, |
|
|
|
b, |
|
|
|
c, |
|
|
|
d |
|
) |
| |
Value: a += b; d =
rotl32(d ^ a, 16); \
c += d; b =
rotl32(b ^ c, 12); \
a += b; d =
rotl32(d ^ a, 8); \
constexpr static uint32_t rotl32(uint32_t v, int c)
Definition at line 18 of file chacha20.cpp.
◆ REPEAT10
#define REPEAT10 |
( |
|
a | ) |
do { {a}; {a}; {a}; {a}; {a}; {a}; {a}; {a}; {a}; {a}; } while(0) |
◆ rotl32()
constexpr static uint32_t rotl32 |
( |
uint32_t |
v, |
|
|
int |
c |
|
) |
| |
|
inlinestaticconstexpr |