Bitcoin ABC 0.30.5
P2P Digital Currency
|
A class for ChaCha20 256-bit stream cipher developed by Daniel J. More...
#include <chacha20.h>
Public Member Functions | |
ChaCha20 () | |
ChaCha20 (const uint8_t *key, size_t keylen) | |
void | SetKey (const uint8_t *key, size_t keylen) |
set key with flexible keylength; 256bit recommended More... | |
void | SetIV (uint64_t iv) |
void | Seek (uint64_t pos) |
void | Keystream (uint8_t *c, size_t bytes) |
outputs the keystream of size <bytes> into More... | |
void | Crypt (const uint8_t *input, uint8_t *output, size_t bytes) |
enciphers the message <input> of length <bytes> and write the enciphered representation into <output> Used for encryption and decryption (XOR) More... | |
Private Attributes | |
uint32_t | input [16] |
A class for ChaCha20 256-bit stream cipher developed by Daniel J.
Bernstein https://cr.yp.to/chacha/chacha-20080128.pdf
Definition at line 15 of file chacha20.h.
ChaCha20::ChaCha20 | ( | ) |
Definition at line 61 of file chacha20.cpp.
ChaCha20::ChaCha20 | ( | const uint8_t * | key, |
size_t | keylen | ||
) |
void ChaCha20::Crypt | ( | const uint8_t * | input, |
uint8_t * | output, | ||
size_t | bytes | ||
) |
enciphers the message <input> of length <bytes> and write the enciphered representation into <output> Used for encryption and decryption (XOR)
Definition at line 194 of file chacha20.cpp.
void ChaCha20::Keystream | ( | uint8_t * | c, |
size_t | bytes | ||
) |
outputs the keystream of size <bytes> into
Definition at line 79 of file chacha20.cpp.
void ChaCha20::Seek | ( | uint64_t | pos | ) |
void ChaCha20::SetIV | ( | uint64_t | iv | ) |
void ChaCha20::SetKey | ( | const uint8_t * | key, |
size_t | keylen | ||
) |
set key with flexible keylength; 256bit recommended
Definition at line 32 of file chacha20.cpp.
|
private |
Definition at line 17 of file chacha20.h.