Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

chacha_poly_aead.cpp File Reference
#include <iostream>
#include <bench/bench.h>
#include <crypto/chacha_poly_aead.h>
#include <crypto/poly1305.h>
#include <hash.h>
#include <limits>
#include <assert.h>
+ Include dependency graph for chacha_poly_aead.cpp:

Go to the source code of this file.

Functions

static void CHACHA20_POLY1305_AEAD (benchmark::State &state, size_t buffersize, bool include_decryption)
 
static void CHACHA20_POLY1305_AEAD_64BYTES_ONLY_ENCRYPT (benchmark::State &state)
 
static void CHACHA20_POLY1305_AEAD_256BYTES_ONLY_ENCRYPT (benchmark::State &state)
 
static void CHACHA20_POLY1305_AEAD_1MB_ONLY_ENCRYPT (benchmark::State &state)
 
static void CHACHA20_POLY1305_AEAD_64BYTES_ENCRYPT_DECRYPT (benchmark::State &state)
 
static void CHACHA20_POLY1305_AEAD_256BYTES_ENCRYPT_DECRYPT (benchmark::State &state)
 
static void CHACHA20_POLY1305_AEAD_1MB_ENCRYPT_DECRYPT (benchmark::State &state)
 
static void HASH (benchmark::State &state, size_t buffersize)
 
static void HASH_64BYTES (benchmark::State &state)
 
static void HASH_256BYTES (benchmark::State &state)
 
static void HASH_1MB (benchmark::State &state)
 
 BENCHMARK (CHACHA20_POLY1305_AEAD_64BYTES_ONLY_ENCRYPT)
 
 BENCHMARK (CHACHA20_POLY1305_AEAD_256BYTES_ONLY_ENCRYPT)
 
 BENCHMARK (CHACHA20_POLY1305_AEAD_1MB_ONLY_ENCRYPT)
 
 BENCHMARK (CHACHA20_POLY1305_AEAD_64BYTES_ENCRYPT_DECRYPT)
 
 BENCHMARK (CHACHA20_POLY1305_AEAD_256BYTES_ENCRYPT_DECRYPT)
 
 BENCHMARK (CHACHA20_POLY1305_AEAD_1MB_ENCRYPT_DECRYPT)
 
 BENCHMARK (HASH_64BYTES)
 
 BENCHMARK (HASH_256BYTES)
 
 BENCHMARK (HASH_1MB)
 

Variables

static constexpr uint64_t BUFFER_SIZE_TINY = 64
 
static constexpr uint64_t BUFFER_SIZE_SMALL = 256
 
static constexpr uint64_t BUFFER_SIZE_LARGE = 1024 * 1024
 
static const unsigned char k1 [32] = {0}
 
static const unsigned char k2 [32] = {0}
 
static ChaCha20Poly1305AEAD aead (k1, 32, k2, 32)
 

Function Documentation

◆ BENCHMARK() [1/9]

◆ BENCHMARK() [2/9]

◆ BENCHMARK() [3/9]

◆ BENCHMARK() [4/9]

◆ BENCHMARK() [5/9]

◆ BENCHMARK() [6/9]

◆ BENCHMARK() [7/9]

BENCHMARK ( HASH_64BYTES  )

◆ BENCHMARK() [8/9]

BENCHMARK ( HASH_256BYTES  )

◆ BENCHMARK() [9/9]

BENCHMARK ( HASH_1MB  )

◆ CHACHA20_POLY1305_AEAD()

◆ CHACHA20_POLY1305_AEAD_1MB_ENCRYPT_DECRYPT()

static void CHACHA20_POLY1305_AEAD_1MB_ENCRYPT_DECRYPT ( benchmark::State state)
static

Definition at line 85 of file chacha_poly_aead.cpp.

References BUFFER_SIZE_LARGE, and CHACHA20_POLY1305_AEAD().

◆ CHACHA20_POLY1305_AEAD_1MB_ONLY_ENCRYPT()

static void CHACHA20_POLY1305_AEAD_1MB_ONLY_ENCRYPT ( benchmark::State state)
static

Definition at line 70 of file chacha_poly_aead.cpp.

References BUFFER_SIZE_LARGE, and CHACHA20_POLY1305_AEAD().

◆ CHACHA20_POLY1305_AEAD_256BYTES_ENCRYPT_DECRYPT()

static void CHACHA20_POLY1305_AEAD_256BYTES_ENCRYPT_DECRYPT ( benchmark::State state)
static

Definition at line 80 of file chacha_poly_aead.cpp.

References BUFFER_SIZE_SMALL, and CHACHA20_POLY1305_AEAD().

◆ CHACHA20_POLY1305_AEAD_256BYTES_ONLY_ENCRYPT()

static void CHACHA20_POLY1305_AEAD_256BYTES_ONLY_ENCRYPT ( benchmark::State state)
static

Definition at line 65 of file chacha_poly_aead.cpp.

References BUFFER_SIZE_SMALL, and CHACHA20_POLY1305_AEAD().

◆ CHACHA20_POLY1305_AEAD_64BYTES_ENCRYPT_DECRYPT()

static void CHACHA20_POLY1305_AEAD_64BYTES_ENCRYPT_DECRYPT ( benchmark::State state)
static

Definition at line 75 of file chacha_poly_aead.cpp.

References BUFFER_SIZE_TINY, and CHACHA20_POLY1305_AEAD().

◆ CHACHA20_POLY1305_AEAD_64BYTES_ONLY_ENCRYPT()

static void CHACHA20_POLY1305_AEAD_64BYTES_ONLY_ENCRYPT ( benchmark::State state)
static

Definition at line 60 of file chacha_poly_aead.cpp.

References BUFFER_SIZE_TINY, and CHACHA20_POLY1305_AEAD().

◆ HASH()

static void HASH ( benchmark::State state,
size_t  buffersize 
)
static

◆ HASH_1MB()

static void HASH_1MB ( benchmark::State state)
static

Definition at line 110 of file chacha_poly_aead.cpp.

References BUFFER_SIZE_LARGE, and HASH().

◆ HASH_256BYTES()

static void HASH_256BYTES ( benchmark::State state)
static

Definition at line 105 of file chacha_poly_aead.cpp.

References BUFFER_SIZE_SMALL, and HASH().

◆ HASH_64BYTES()

static void HASH_64BYTES ( benchmark::State state)
static

Definition at line 100 of file chacha_poly_aead.cpp.

References BUFFER_SIZE_TINY, and HASH().

Variable Documentation

◆ aead

ChaCha20Poly1305AEAD aead(k1, 32, k2, 32)
static

Referenced by CHACHA20_POLY1305_AEAD().

◆ BUFFER_SIZE_LARGE

constexpr uint64_t BUFFER_SIZE_LARGE = 1024 * 1024
static

◆ BUFFER_SIZE_SMALL

constexpr uint64_t BUFFER_SIZE_SMALL = 256
static

◆ BUFFER_SIZE_TINY

constexpr uint64_t BUFFER_SIZE_TINY = 64
static

◆ k1

◆ k2

Released under the MIT license