Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
Macros | Functions | Variables
chacha20.cpp File Reference
#include <crypto/chacha20.h>
#include <crypto/common.h>
#include <cstring>
Include dependency graph for chacha20.cpp:

Go to the source code of this file.

Macros

#define QUARTERROUND(a, b, c, d)
 

Functions

static constexpr uint32_t rotl32 (uint32_t v, int c)
 

Variables

static const uint8_t sigma [] = "expand 32-byte k"
 
static const uint8_t tau [] = "expand 16-byte k"
 

Macro Definition Documentation

◆ QUARTERROUND

#define QUARTERROUND (   a,
  b,
  c,
 
)
Value:
do { \
a += b; \
d = rotl32(d ^ a, 16); \
c += d; \
b = rotl32(b ^ c, 12); \
a += b; \
d = rotl32(d ^ a, 8); \
c += d; \
b = rotl32(b ^ c, 7); \
} while (0)
static constexpr uint32_t rotl32(uint32_t v, int c)
Definition chacha20.cpp:13
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85

Definition at line 17 of file chacha20.cpp.

Function Documentation

◆ rotl32()

static constexpr uint32_t rotl32 ( uint32_t  v,
int  c 
)
inlinestaticconstexpr

Definition at line 13 of file chacha20.cpp.

Here is the call graph for this function:

Variable Documentation

◆ sigma

const uint8_t sigma[] = "expand 32-byte k"
static

Definition at line 29 of file chacha20.cpp.

◆ tau

const uint8_t tau[] = "expand 16-byte k"
static

Definition at line 30 of file chacha20.cpp.