Public Types |
Public Member Functions |
Static Public Member Functions |
Static Public Attributes |
List of all members
nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds > Struct Template Reference
#include <salsa20_policy.hpp>
Inheritance diagram for nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >:
Collaboration diagram for nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >:
Public Types | |
typedef std::array< byte_type, block_size > | block_type |
typedef policy_type::byte_type | byte_type |
typedef std::array< byte_type, iv_size > | iv_type |
typedef std::array< word_type, key_schedule_size > | key_schedule_type |
typedef std::array< byte_type, key_size > | key_type |
typedef basic_functions< 32 > | policy_type |
typedef std::array< word_type, round_constants_size > | round_constants_type |
typedef byte_type | value_type |
typedef policy_type::word_type | word_type |
Public Member Functions | |
BOOST_STATIC_ASSERT (key_size % 16==0) | |
BOOST_STATIC_ASSERT (min_key_bits<=KeyBits<=max_key_bits) | |
BOOST_STATIC_ASSERT (Rounds % 2==0) | |
CRYPTO3_INLINE_VARIABLE (round_constants_type, sigma,({0x61707865, 0x3320646e, 0x79622d32, 0x6b206574})) | |
CRYPTO3_INLINE_VARIABLE (round_constants_type, tau,({0x61707865, 0x3120646e, 0x79622d36, 0x6b206574})) | |
Static Public Member Functions | |
static void | hsalsa20 (word_type output[8], const key_schedule_type input) |
static word_type | rotl (word_type x) |
static word_type | rotl (word_type x, std::size_t n) |
static word_type | rotr (word_type x) |
static word_type | rotr (word_type x, std::size_t n) |
static void | salsa_core (block_type &block, const key_schedule_type &input) |
static word_type | shl (word_type x) |
static word_type | shl (word_type x, std::size_t n) |
static word_type | shr (word_type x) |
static word_type | shr (word_type x, std::size_t n) |
Static Public Attributes | |
constexpr static const std::size_t | block_bits = block_size * value_bits |
constexpr static const std::size_t | block_size = 64 |
constexpr static const std::size_t | iv_bits = IVBits |
constexpr static const std::size_t | iv_size = IVBits / CHAR_BIT |
constexpr static const std::size_t | key_bits = KeyBits |
constexpr static const std::size_t | key_schedule_bits = key_schedule_size * word_bits |
constexpr static const std::size_t | key_schedule_size = 16 |
constexpr static const std::size_t | key_size = key_bits / CHAR_BIT |
constexpr static const std::size_t | max_key_bits = 32 * CHAR_BIT |
constexpr static const std::size_t | min_key_bits = 16 * CHAR_BIT |
constexpr static const std::size_t | round_constants_size = 4 |
constexpr static const std::size_t | rounds = Rounds |
constexpr static const std::size_t | value_bits = CHAR_BIT |
constexpr static const std::size_t | word_bits |
Member Typedef Documentation
◆ block_type
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
typedef std::array<byte_type, block_size> nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >::block_type |
◆ byte_type
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
typedef policy_type::byte_type nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >::byte_type |
◆ iv_type
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
typedef std::array<byte_type, iv_size> nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >::iv_type |
◆ key_schedule_type
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
typedef std::array<word_type, key_schedule_size> nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >::key_schedule_type |
◆ key_type
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
typedef std::array<byte_type, key_size> nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >::key_type |
◆ policy_type
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
typedef basic_functions<32> nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >::policy_type |
◆ round_constants_type
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
typedef std::array<word_type, round_constants_size> nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >::round_constants_type |
◆ value_type
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
typedef byte_type nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >::value_type |
◆ word_type
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
typedef policy_type::word_type nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >::word_type |
Member Function Documentation
◆ BOOST_STATIC_ASSERT() [1/3]
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >::BOOST_STATIC_ASSERT | ( | key_size % | 16 = =0 | ) |
◆ BOOST_STATIC_ASSERT() [2/3]
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >::BOOST_STATIC_ASSERT | ( | min_key_bits<=KeyBits<= | max_key_bits | ) |
◆ BOOST_STATIC_ASSERT() [3/3]
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >::BOOST_STATIC_ASSERT | ( | Rounds % | 2 = =0 | ) |
◆ CRYPTO3_INLINE_VARIABLE() [1/2]
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >::CRYPTO3_INLINE_VARIABLE | ( | round_constants_type | , |
sigma | , | ||
({0x61707865, 0x3320646e, 0x79622d32, 0x6b206574}) | |||
) |
◆ CRYPTO3_INLINE_VARIABLE() [2/2]
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >::CRYPTO3_INLINE_VARIABLE | ( | round_constants_type | , |
tau | , | ||
({0x61707865, 0x3120646e, 0x79622d36, 0x6b206574}) | |||
) |
◆ hsalsa20()
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
|
inlinestatic |
◆ rotl() [1/2]
|
inlinestaticinherited |
◆ rotl() [2/2]
|
inlinestaticinherited |
◆ rotr() [1/2]
|
inlinestaticinherited |
◆ rotr() [2/2]
|
inlinestaticinherited |
◆ salsa_core()
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
|
inlinestatic |
◆ shl() [1/2]
|
inlinestaticinherited |
◆ shl() [2/2]
|
inlinestaticinherited |
◆ shr() [1/2]
|
inlinestaticinherited |
◆ shr() [2/2]
|
inlinestaticinherited |
Member Data Documentation
◆ block_bits
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
|
staticconstexpr |
◆ block_size
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
|
staticconstexpr |
◆ iv_bits
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
|
staticconstexpr |
◆ iv_size
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
|
staticconstexpr |
◆ key_bits
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
|
staticconstexpr |
◆ key_schedule_bits
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
|
staticconstexpr |
◆ key_schedule_size
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
|
staticconstexpr |
◆ key_size
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
|
staticconstexpr |
◆ max_key_bits
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
|
staticconstexpr |
◆ min_key_bits
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
|
staticconstexpr |
◆ round_constants_size
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
|
staticconstexpr |
◆ rounds
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
|
staticconstexpr |
◆ value_bits
template<std::size_t IVBits, std::size_t KeyBits, std::size_t Rounds>
|
staticconstexpr |
◆ word_bits
|
staticconstexprinherited |
The documentation for this struct was generated from the following file: