Cipherpack v1.2.0-dirty
A Cryprographic Stream Processor
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
cipherpack::CryptoConfig Struct Reference

CryptoConfig, contains crypto algorithms settings given at encryption wired via the Cipherpack Data Stream, hence received and used at decryption if matching keys are available. More...

#include <cipherpack.hpp>

Collaboration diagram for cipherpack::CryptoConfig:

Public Member Functions

 CryptoConfig () noexcept
 
 CryptoConfig (const std::string &pk_type_, const std::string &pk_fingerprt_hash_algo_, const std::string &pk_enc_padding_algo_, const std::string &pk_enc_hash_algo_, const std::string &pk_sign_algo_, const std::string &sym_enc_algo_, const size_t sym_enc_nonce_bytes_) noexcept
 
std::string to_string () const noexcept
 
bool valid () const noexcept
 

Static Public Member Functions

static CryptoConfig getDefault () noexcept
 Returns default CryptoConfig. More...
 

Public Attributes

std::string pk_enc_hash_algo
 
std::string pk_enc_padding_algo
 
std::string pk_fingerprt_hash_algo
 
std::string pk_sign_algo
 
std::string pk_type
 
std::string sym_enc_algo
 
size_t sym_enc_nonce_bytes
 

Detailed Description

CryptoConfig, contains crypto algorithms settings given at encryption wired via the Cipherpack Data Stream, hence received and used at decryption if matching keys are available.

See also
Cipherpack Overview
Cipherpack Data Stream

Definition at line 205 of file cipherpack.hpp.

Constructor & Destructor Documentation

◆ CryptoConfig() [1/2]

cipherpack::CryptoConfig::CryptoConfig ( )
inlinenoexcept

Definition at line 227 of file cipherpack.hpp.

Here is the caller graph for this function:

◆ CryptoConfig() [2/2]

cipherpack::CryptoConfig::CryptoConfig ( const std::string &  pk_type_,
const std::string &  pk_fingerprt_hash_algo_,
const std::string &  pk_enc_padding_algo_,
const std::string &  pk_enc_hash_algo_,
const std::string &  pk_sign_algo_,
const std::string &  sym_enc_algo_,
const size_t  sym_enc_nonce_bytes_ 
)
inlinenoexcept

Definition at line 237 of file cipherpack.hpp.

Member Function Documentation

◆ getDefault()

CryptoConfig CryptoConfig::getDefault ( )
staticnoexcept

Returns default CryptoConfig.

  • Public-Key type is RSA.
  • Public key fingerprint hash algorithm is SHA-256.
  • Public-Key padding algorithm is OAEP.
  • Public-Key hash algorithm is SHA-256.
  • Public-Key signature algorithm is EMSA1(SHA-256).
  • Symmetric Authenticated Encryption with Additional Data (AEAD) encryption+MAC cipher algo is ChaCha20Poly1305.
  • Symmetric AEAD ChaCha Nonce size 96 bit for one message per symmetric-key. Sizes are usually: 64-bit classic, 96-bit IETF, 192-bit big.
Examples
commandline.cpp, and test_01_cipherpack.cpp.

Definition at line 123 of file crypto0.cpp.

Here is the caller graph for this function:

◆ valid()

bool CryptoConfig::valid ( ) const
noexcept

Definition at line 131 of file crypto0.cpp.

Here is the caller graph for this function:

◆ to_string()

std::string CryptoConfig::to_string ( ) const
noexcept

Definition at line 141 of file crypto0.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ pk_type

std::string cipherpack::CryptoConfig::pk_type

Definition at line 206 of file cipherpack.hpp.

◆ pk_fingerprt_hash_algo

std::string cipherpack::CryptoConfig::pk_fingerprt_hash_algo

Definition at line 207 of file cipherpack.hpp.

◆ pk_enc_padding_algo

std::string cipherpack::CryptoConfig::pk_enc_padding_algo

Definition at line 208 of file cipherpack.hpp.

◆ pk_enc_hash_algo

std::string cipherpack::CryptoConfig::pk_enc_hash_algo

Definition at line 209 of file cipherpack.hpp.

◆ pk_sign_algo

std::string cipherpack::CryptoConfig::pk_sign_algo

Definition at line 210 of file cipherpack.hpp.

◆ sym_enc_algo

std::string cipherpack::CryptoConfig::sym_enc_algo

Definition at line 211 of file cipherpack.hpp.

◆ sym_enc_nonce_bytes

size_t cipherpack::CryptoConfig::sym_enc_nonce_bytes

Definition at line 212 of file cipherpack.hpp.


The documentation for this struct was generated from the following files: