Fabcoin Core  0.16.2
P2P Digital Currency
Public Types | Public Member Functions | Private Attributes | List of all members
ChaCha20 Class Reference

A PRNG class for ChaCha20. More...

#include <chacha20.h>

Inheritance diagram for ChaCha20:
[legend]
Collaboration diagram for ChaCha20:
[legend]

Public Types

typedef SymmetricCipherFinal< ConcretePolicyHolder< ChaCha_Policy< 20 >, AdditiveCipherTemplate<> >, ChaCha_Info< 20 > > Encryption
 
typedef Encryption Decryption
 
- Public Types inherited from SymmetricCipherDocumentation
typedef SymmetricCipher Encryption
 implements the SymmetricCipher interface More...
 
typedef SymmetricCipher Decryption
 implements the SymmetricCipher interface More...
 

Public Member Functions

 ChaCha20 ()
 
 ChaCha20 (const unsigned char *key, size_t keylen)
 
void SetKey (const unsigned char *key, size_t keylen)
 
void SetIV (uint64_t iv)
 
void Seek (uint64_t pos)
 
void Output (unsigned char *output, size_t bytes)
 
- Public Member Functions inherited from ChaCha_Info< 20 >
CRYPTOPP_STATIC_CONSTEXPR const char * StaticAlgorithmName ()
 
- Public Member Functions inherited from VariableKeyLength< 32, 16, 32, 16, SimpleKeyingInterface::UNIQUE_IV, 8 >
CRYPTOPP_STATIC_CONSTEXPR size_t CRYPTOPP_API StaticGetValidKeyLength (size_t keylength)
 The minimum key length used by the algorithm provided as a constant. More...
 

Private Attributes

uint32_t input [16]
 

Detailed Description

A PRNG class for ChaCha20.

ChaCha20 stream cipher.

See also
ChaCha, a variant of Salsa20 (2008.01.28).

Bernstein and ECRYPT's ChaCha is slightly different from the TLS working group's implementation for cipher suites TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, and TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256.

Since
Crypto++ 5.6.4

Definition at line 12 of file chacha20.h.

Member Typedef Documentation

Definition at line 86 of file chacha.h.

Definition at line 85 of file chacha.h.

Constructor & Destructor Documentation

ChaCha20::ChaCha20 ( )

Definition at line 52 of file chacha20.cpp.

ChaCha20::ChaCha20 ( const unsigned char *  key,
size_t  keylen 
)

Definition at line 57 of file chacha20.cpp.

Here is the call graph for this function:

Member Function Documentation

void ChaCha20::Output ( unsigned char *  output,
size_t  bytes 
)

Definition at line 74 of file chacha20.cpp.

Here is the caller graph for this function:

void ChaCha20::Seek ( uint64_t  pos)

Definition at line 68 of file chacha20.cpp.

void ChaCha20::SetIV ( uint64_t  iv)

Definition at line 62 of file chacha20.cpp.

void ChaCha20::SetKey ( const unsigned char *  key,
size_t  keylen 
)

Definition at line 24 of file chacha20.cpp.

Here is the caller graph for this function:

Member Data Documentation

uint32_t ChaCha20::input[16]
private

Definition at line 15 of file chacha20.h.


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