nil::crypto3::stream::chacha< IVBits, KeyBits, Rounds > Class Template Reference
DJB's ChaCha (https://cr.yp.to/chacha.html) More...
#include <chacha.hpp>

Public Types | |
typedef policy_type::block_type | block_type |
typedef policy_type::iv_type | iv_type |
typedef policy_type::key_schedule_type | key_schedule_type |
typedef policy_type::key_type | key_type |
Public Member Functions | |
chacha (key_schedule_type &schedule, const key_type &key, const iv_type &iv=iv_type()) | |
template<typename InputRange , typename OutputRange > | |
void | process (InputRange &in, OutputRange &out, key_schedule_type &schedule, block_type &block) |
void | seek (block_type &block, key_schedule_type &schedule, uint64_t offset) |
Static Public Attributes | |
constexpr static const std::size_t | block_bits = policy_type::block_bits |
constexpr static const std::size_t | block_size = policy_type::block_size |
constexpr static const std::size_t | iv_bits = policy_type::iv_bits |
constexpr static const std::size_t | key_bits = policy_type::key_bits |
constexpr static const std::size_t | max_key_bits = policy_type::max_key_bits |
constexpr static const std::size_t | min_key_bits = policy_type::min_key_bits |
constexpr static const std::size_t | min_key_schedule_bits = policy_type::min_key_schedule_bits |
constexpr static const std::size_t | min_key_schedule_size = policy_type::min_key_schedule_size |
constexpr static const std::size_t | rounds = policy_type::rounds |
Detailed Description
template<std::size_t IVBits = 64, std::size_t KeyBits = 128, std::size_t Rounds = 20>
class nil::crypto3::stream::chacha< IVBits, KeyBits, Rounds >
DJB's ChaCha (https://cr.yp.to/chacha.html)
- Template Parameters
-
Rounds Amount of rounds
- Note
- Currently only 8, 12 or 20 rounds are supported, all others will throw an exception
Member Typedef Documentation
◆ block_type
template<std::size_t IVBits = 64, std::size_t KeyBits = 128, std::size_t Rounds = 20>
typedef policy_type::block_type nil::crypto3::stream::chacha< IVBits, KeyBits, Rounds >::block_type |
◆ iv_type
template<std::size_t IVBits = 64, std::size_t KeyBits = 128, std::size_t Rounds = 20>
typedef policy_type::iv_type nil::crypto3::stream::chacha< IVBits, KeyBits, Rounds >::iv_type |
◆ key_schedule_type
template<std::size_t IVBits = 64, std::size_t KeyBits = 128, std::size_t Rounds = 20>
typedef policy_type::key_schedule_type nil::crypto3::stream::chacha< IVBits, KeyBits, Rounds >::key_schedule_type |
◆ key_type
template<std::size_t IVBits = 64, std::size_t KeyBits = 128, std::size_t Rounds = 20>
typedef policy_type::key_type nil::crypto3::stream::chacha< IVBits, KeyBits, Rounds >::key_type |
Constructor & Destructor Documentation
◆ chacha()
template<std::size_t IVBits = 64, std::size_t KeyBits = 128, std::size_t Rounds = 20>
|
inline |
Member Function Documentation
◆ process()
template<std::size_t IVBits = 64, std::size_t KeyBits = 128, std::size_t Rounds = 20>
template<typename InputRange , typename OutputRange >
|
inline |
◆ seek()
template<std::size_t IVBits = 64, std::size_t KeyBits = 128, std::size_t Rounds = 20>
|
inline |
Member Data Documentation
◆ block_bits
template<std::size_t IVBits = 64, std::size_t KeyBits = 128, std::size_t Rounds = 20>
|
staticconstexpr |
◆ block_size
template<std::size_t IVBits = 64, std::size_t KeyBits = 128, std::size_t Rounds = 20>
|
staticconstexpr |
◆ iv_bits
template<std::size_t IVBits = 64, std::size_t KeyBits = 128, std::size_t Rounds = 20>
|
staticconstexpr |
◆ key_bits
template<std::size_t IVBits = 64, std::size_t KeyBits = 128, std::size_t Rounds = 20>
|
staticconstexpr |
◆ max_key_bits
template<std::size_t IVBits = 64, std::size_t KeyBits = 128, std::size_t Rounds = 20>
|
staticconstexpr |
◆ min_key_bits
template<std::size_t IVBits = 64, std::size_t KeyBits = 128, std::size_t Rounds = 20>
|
staticconstexpr |
◆ min_key_schedule_bits
template<std::size_t IVBits = 64, std::size_t KeyBits = 128, std::size_t Rounds = 20>
|
staticconstexpr |
◆ min_key_schedule_size
template<std::size_t IVBits = 64, std::size_t KeyBits = 128, std::size_t Rounds = 20>
|
staticconstexpr |
◆ rounds
template<std::size_t IVBits = 64, std::size_t KeyBits = 128, std::size_t Rounds = 20>
|
staticconstexpr |
The documentation for this class was generated from the following files: