Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
Functions | Variables
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 <cassert>
#include <limits>
Include dependency graph for chacha_poly_aead.cpp:

Go to the source code of this file.

Functions

static void CHACHA20_POLY1305_AEAD (benchmark::Bench &bench, size_t buffersize, bool include_decryption)
 
static void CHACHA20_POLY1305_AEAD_64BYTES_ONLY_ENCRYPT (benchmark::Bench &bench)
 
static void CHACHA20_POLY1305_AEAD_256BYTES_ONLY_ENCRYPT (benchmark::Bench &bench)
 
static void CHACHA20_POLY1305_AEAD_1MB_ONLY_ENCRYPT (benchmark::Bench &bench)
 
static void CHACHA20_POLY1305_AEAD_64BYTES_ENCRYPT_DECRYPT (benchmark::Bench &bench)
 
static void CHACHA20_POLY1305_AEAD_256BYTES_ENCRYPT_DECRYPT (benchmark::Bench &bench)
 
static void CHACHA20_POLY1305_AEAD_1MB_ENCRYPT_DECRYPT (benchmark::Bench &bench)
 
static void HASH (benchmark::Bench &bench, size_t buffersize)
 
static void HASH_64BYTES (benchmark::Bench &bench)
 
static void HASH_256BYTES (benchmark::Bench &bench)
 
static void HASH_1MB (benchmark::Bench &bench)
 
 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 uint8_t k1 [32] = {0}
 
static const uint8_t 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_1MB  )

◆ BENCHMARK() [8/9]

BENCHMARK ( HASH_256BYTES  )

◆ BENCHMARK() [9/9]

BENCHMARK ( HASH_64BYTES  )

◆ CHACHA20_POLY1305_AEAD()

static void CHACHA20_POLY1305_AEAD ( benchmark::Bench bench,
size_t  buffersize,
bool  include_decryption 
)
static

Definition at line 25 of file chacha_poly_aead.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CHACHA20_POLY1305_AEAD_1MB_ENCRYPT_DECRYPT()

static void CHACHA20_POLY1305_AEAD_1MB_ENCRYPT_DECRYPT ( benchmark::Bench bench)
static

Definition at line 89 of file chacha_poly_aead.cpp.

Here is the call graph for this function:

◆ CHACHA20_POLY1305_AEAD_1MB_ONLY_ENCRYPT()

static void CHACHA20_POLY1305_AEAD_1MB_ONLY_ENCRYPT ( benchmark::Bench bench)
static

Definition at line 74 of file chacha_poly_aead.cpp.

Here is the call graph for this function:

◆ CHACHA20_POLY1305_AEAD_256BYTES_ENCRYPT_DECRYPT()

static void CHACHA20_POLY1305_AEAD_256BYTES_ENCRYPT_DECRYPT ( benchmark::Bench bench)
static

Definition at line 84 of file chacha_poly_aead.cpp.

Here is the call graph for this function:

◆ CHACHA20_POLY1305_AEAD_256BYTES_ONLY_ENCRYPT()

static void CHACHA20_POLY1305_AEAD_256BYTES_ONLY_ENCRYPT ( benchmark::Bench bench)
static

Definition at line 70 of file chacha_poly_aead.cpp.

Here is the call graph for this function:

◆ CHACHA20_POLY1305_AEAD_64BYTES_ENCRYPT_DECRYPT()

static void CHACHA20_POLY1305_AEAD_64BYTES_ENCRYPT_DECRYPT ( benchmark::Bench bench)
static

Definition at line 79 of file chacha_poly_aead.cpp.

Here is the call graph for this function:

◆ CHACHA20_POLY1305_AEAD_64BYTES_ONLY_ENCRYPT()

static void CHACHA20_POLY1305_AEAD_64BYTES_ONLY_ENCRYPT ( benchmark::Bench bench)
static

Definition at line 65 of file chacha_poly_aead.cpp.

Here is the call graph for this function:

◆ HASH()

static void HASH ( benchmark::Bench bench,
size_t  buffersize 
)
static

Definition at line 95 of file chacha_poly_aead.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HASH_1MB()

static void HASH_1MB ( benchmark::Bench bench)
static

Definition at line 110 of file chacha_poly_aead.cpp.

Here is the call graph for this function:

◆ HASH_256BYTES()

static void HASH_256BYTES ( benchmark::Bench bench)
static

Definition at line 106 of file chacha_poly_aead.cpp.

Here is the call graph for this function:

◆ HASH_64BYTES()

static void HASH_64BYTES ( benchmark::Bench bench)
static

Definition at line 102 of file chacha_poly_aead.cpp.

Here is the call graph for this function:

Variable Documentation

◆ aead

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

◆ BUFFER_SIZE_LARGE

constexpr uint64_t BUFFER_SIZE_LARGE = 1024 * 1024
staticconstexpr

Definition at line 18 of file chacha_poly_aead.cpp.

◆ BUFFER_SIZE_SMALL

constexpr uint64_t BUFFER_SIZE_SMALL = 256
staticconstexpr

Definition at line 17 of file chacha_poly_aead.cpp.

◆ BUFFER_SIZE_TINY

constexpr uint64_t BUFFER_SIZE_TINY = 64
staticconstexpr

Definition at line 16 of file chacha_poly_aead.cpp.

◆ k1

const uint8_t k1[32] = {0}
static

Definition at line 20 of file chacha_poly_aead.cpp.

◆ k2

const uint8_t k2[32] = {0}
static

Definition at line 21 of file chacha_poly_aead.cpp.