Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

chacha20.cpp File Reference
#include <crypto/common.h>
#include <crypto/chacha20.h>
#include <string.h>
+ 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 unsigned char sigma [] = "expand 32-byte k"
 
static const unsigned char tau [] = "expand 16-byte k"
 

Macro Definition Documentation

◆ QUARTERROUND

#define QUARTERROUND (   a,
  b,
  c,
 
)
Value:
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);
static constexpr uint32_t rotl32(uint32_t v, int c)
Definition: chacha20.cpp:13

Definition at line 15 of file chacha20.cpp.

Referenced by ChaCha20::Crypt(), and ChaCha20::Keystream().

Function Documentation

◆ rotl32()

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

Definition at line 13 of file chacha20.cpp.

Variable Documentation

◆ sigma

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

Definition at line 21 of file chacha20.cpp.

Referenced by ChaCha20::SetKey().

◆ tau

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

Definition at line 22 of file chacha20.cpp.

Referenced by ChaCha20::SetKey().

Released under the MIT license