nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits > Struct Template Reference

#include <chacha_functions.hpp>

+ Inheritance diagram for nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits >:
+ Collaboration diagram for nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits >:

Public Types

typedef policy_type::block_type block_type
 
typedef basic_functions< 32 >::byte_type byte_type
 
typedef detail::chacha_avx2_impl< Round, IVSize, KeyBits > impl_type
 
typedef policy_type::iv_type iv_type
 
typedef policy_type::key_schedule_type key_schedule_type
 
typedef policy_type::key_type key_type
 
typedef chacha_policy< Round, IVSize, KeyBits > policy_type
 
typedef std::array< word_type, round_constants_sizeround_constants_type
 
typedef byte_type value_type
 
typedef basic_functions< 32 >::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

template<std::size_t n>
static word_type rotl (word_type x)
 
static word_type rotl (word_type x, std::size_t n)
 
template<std::size_t n>
static word_type rotr (word_type x)
 
static word_type rotr (word_type x, std::size_t n)
 
static void schedule_key (key_schedule_type &schedule, const key_type &key)
 
template<std::size_t n>
static word_type shl (word_type x)
 
static word_type shl (word_type x, std::size_t n)
 
template<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 = policy_type::block_bits
 
constexpr static const std::size_t block_size
 
constexpr static const std::size_t iv_bits = policy_type::iv_bits
 
constexpr static const std::size_t iv_size
 
constexpr static const std::size_t key_bits = policy_type::key_bits
 
constexpr static const std::size_t key_schedule_bits
 
constexpr static const std::size_t key_schedule_size
 
constexpr static const std::size_t key_size
 
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::key_schedule_bits
 
constexpr static const std::size_t min_key_schedule_size = policy_type::key_schedule_size
 
constexpr static const std::size_t round_constants_size
 
constexpr static const std::size_t rounds = policy_type::rounds
 
constexpr static const std::size_t value_bits
 
constexpr static const std::size_t word_bits
 

Member Typedef Documentation

◆ block_type

template<std::size_t Round, std::size_t IVSize, std::size_t KeyBits>
typedef policy_type::block_type nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits >::block_type

◆ byte_type

typedef basic_functions<32>::byte_type nil::crypto3::stream::detail::chacha_policy< Rounds, IVBits, KeyBits >::byte_type
inherited

◆ impl_type

template<std::size_t Round, std::size_t IVSize, std::size_t KeyBits>
typedef detail::chacha_avx2_impl<Round, IVSize, KeyBits> nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits >::impl_type

◆ iv_type

template<std::size_t Round, std::size_t IVSize, std::size_t KeyBits>
typedef policy_type::iv_type nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits >::iv_type

◆ key_schedule_type

template<std::size_t Round, std::size_t IVSize, std::size_t KeyBits>
typedef policy_type::key_schedule_type nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits >::key_schedule_type

◆ key_type

template<std::size_t Round, std::size_t IVSize, std::size_t KeyBits>
typedef policy_type::key_type nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits >::key_type

◆ policy_type

template<std::size_t Round, std::size_t IVSize, std::size_t KeyBits>
typedef chacha_policy<Round, IVSize, KeyBits> nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits >::policy_type

◆ round_constants_type

typedef std::array<word_type, round_constants_size> nil::crypto3::stream::detail::chacha_policy< Rounds, IVBits, KeyBits >::round_constants_type
inherited

◆ value_type

typedef byte_type nil::crypto3::stream::detail::chacha_policy< Rounds, IVBits, KeyBits >::value_type
inherited

◆ word_type

typedef basic_functions<32>::word_type nil::crypto3::stream::detail::chacha_policy< Rounds, IVBits, KeyBits >::word_type
inherited

Member Function Documentation

◆ BOOST_STATIC_ASSERT() [1/3]

nil::crypto3::stream::detail::chacha_policy< Rounds, IVBits, KeyBits >::BOOST_STATIC_ASSERT ( key_size 16 = = 0)
inherited

◆ BOOST_STATIC_ASSERT() [2/3]

nil::crypto3::stream::detail::chacha_policy< Rounds, IVBits, KeyBits >::BOOST_STATIC_ASSERT ( min_key_bits<=KeyBits<=  max_key_bits)
inherited

◆ BOOST_STATIC_ASSERT() [3/3]

nil::crypto3::stream::detail::chacha_policy< Rounds, IVBits, KeyBits >::BOOST_STATIC_ASSERT ( Rounds %  2 = = 0)
inherited

◆ CRYPTO3_INLINE_VARIABLE() [1/2]

nil::crypto3::stream::detail::chacha_policy< Rounds, IVBits, KeyBits >::CRYPTO3_INLINE_VARIABLE ( round_constants_type  ,
sigma  ,
({0x61707865, 0x3320646e, 0x79622d32, 0x6b206574})   
)
inherited

◆ CRYPTO3_INLINE_VARIABLE() [2/2]

nil::crypto3::stream::detail::chacha_policy< Rounds, IVBits, KeyBits >::CRYPTO3_INLINE_VARIABLE ( round_constants_type  ,
tau  ,
({0x61707865, 0x3120646e, 0x79622d36, 0x6b206574})   
)
inherited

◆ rotl() [1/2]

template<std::size_t WordBits>
template<std::size_t n>
static word_type nil::crypto3::stream::detail::basic_functions< WordBits >::rotl ( word_type  x)
inlinestaticinherited

◆ rotl() [2/2]

template<std::size_t WordBits>
static word_type nil::crypto3::stream::detail::basic_functions< WordBits >::rotl ( word_type  x,
std::size_t  n 
)
inlinestaticinherited

◆ rotr() [1/2]

template<std::size_t WordBits>
template<std::size_t n>
static word_type nil::crypto3::stream::detail::basic_functions< WordBits >::rotr ( word_type  x)
inlinestaticinherited

◆ rotr() [2/2]

template<std::size_t WordBits>
static word_type nil::crypto3::stream::detail::basic_functions< WordBits >::rotr ( word_type  x,
std::size_t  n 
)
inlinestaticinherited

◆ schedule_key()

template<std::size_t Round, std::size_t IVSize, std::size_t KeyBits>
static void nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits >::schedule_key ( key_schedule_type schedule,
const key_type key 
)
inlinestatic

◆ shl() [1/2]

template<std::size_t WordBits>
template<std::size_t n>
static word_type nil::crypto3::stream::detail::basic_functions< WordBits >::shl ( word_type  x)
inlinestaticinherited

◆ shl() [2/2]

template<std::size_t WordBits>
static word_type nil::crypto3::stream::detail::basic_functions< WordBits >::shl ( word_type  x,
std::size_t  n 
)
inlinestaticinherited

◆ shr() [1/2]

template<std::size_t WordBits>
template<std::size_t n>
static word_type nil::crypto3::stream::detail::basic_functions< WordBits >::shr ( word_type  x)
inlinestaticinherited

◆ shr() [2/2]

template<std::size_t WordBits>
static word_type nil::crypto3::stream::detail::basic_functions< WordBits >::shr ( word_type  x,
std::size_t  n 
)
inlinestaticinherited

Member Data Documentation

◆ block_bits

template<std::size_t Round, std::size_t IVSize, std::size_t KeyBits>
constexpr static const std::size_t nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits >::block_bits = policy_type::block_bits
staticconstexpr

◆ block_size

constexpr static const std::size_t nil::crypto3::stream::detail::chacha_policy< Rounds, IVBits, KeyBits >::block_size
staticconstexprinherited

◆ iv_bits

template<std::size_t Round, std::size_t IVSize, std::size_t KeyBits>
constexpr static const std::size_t nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits >::iv_bits = policy_type::iv_bits
staticconstexpr

◆ iv_size

constexpr static const std::size_t nil::crypto3::stream::detail::chacha_policy< Rounds, IVBits, KeyBits >::iv_size
staticconstexprinherited

◆ key_bits

template<std::size_t Round, std::size_t IVSize, std::size_t KeyBits>
constexpr static const std::size_t nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits >::key_bits = policy_type::key_bits
staticconstexpr

◆ key_schedule_bits

constexpr static const std::size_t nil::crypto3::stream::detail::chacha_policy< Rounds, IVBits, KeyBits >::key_schedule_bits
staticconstexprinherited

◆ key_schedule_size

constexpr static const std::size_t nil::crypto3::stream::detail::chacha_policy< Rounds, IVBits, KeyBits >::key_schedule_size
staticconstexprinherited

◆ key_size

constexpr static const std::size_t nil::crypto3::stream::detail::chacha_policy< Rounds, IVBits, KeyBits >::key_size
staticconstexprinherited

◆ max_key_bits

template<std::size_t Round, std::size_t IVSize, std::size_t KeyBits>
constexpr static const std::size_t nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits >::max_key_bits = policy_type::max_key_bits
staticconstexpr

◆ min_key_bits

template<std::size_t Round, std::size_t IVSize, std::size_t KeyBits>
constexpr static const std::size_t nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits >::min_key_bits = policy_type::min_key_bits
staticconstexpr

◆ min_key_schedule_bits

template<std::size_t Round, std::size_t IVSize, std::size_t KeyBits>
constexpr static const std::size_t nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits >::min_key_schedule_bits = policy_type::key_schedule_bits
staticconstexpr

◆ min_key_schedule_size

template<std::size_t Round, std::size_t IVSize, std::size_t KeyBits>
constexpr static const std::size_t nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits >::min_key_schedule_size = policy_type::key_schedule_size
staticconstexpr

◆ round_constants_size

constexpr static const std::size_t nil::crypto3::stream::detail::chacha_policy< Rounds, IVBits, KeyBits >::round_constants_size
staticconstexprinherited

◆ rounds

template<std::size_t Round, std::size_t IVSize, std::size_t KeyBits>
constexpr static const std::size_t nil::crypto3::stream::detail::chacha_functions< Round, IVSize, KeyBits >::rounds = policy_type::rounds
staticconstexpr

◆ value_bits

constexpr static const std::size_t nil::crypto3::stream::detail::chacha_policy< Rounds, IVBits, KeyBits >::value_bits
staticconstexprinherited

◆ word_bits

constexpr static const std::size_t nil::crypto3::stream::detail::chacha_policy< Rounds, IVBits, KeyBits >::word_bits
staticconstexprinherited

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