nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds > Struct Template Reference

#include <salsa20_functions.hpp>

+ Inheritance diagram for nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >:
+ Collaboration diagram for nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >:

Public Types

typedef policy_type::block_type block_type
 
typedef policy_type::byte_type byte_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 salsa20_policy< 64, 256, Rounds > policy_type
 
typedef std::array< word_type, round_constants_sizeround_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}))
 
void schedule_iv (block_type &block, key_schedule_type &schedule, const iv_type &iv)
 
void schedule_key (key_schedule_type &state, const key_type &key)
 

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 = 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 iv_size
 
constexpr static const std::size_t key_bits = policy_type::key_bits
 
constexpr static const std::size_t key_schedule_bits = policy_type::key_schedule_bits
 
constexpr static const std::size_t key_schedule_size = policy_type::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 round_constants_size
 
constexpr static const std::size_t rounds
 
constexpr static const std::size_t value_bits
 
constexpr static const std::size_t word_bits = policy_type::word_bits
 
constexpr static const std::size_t word_bytes = word_bits / CHAR_BIT
 

Member Typedef Documentation

◆ block_type

template<std::size_t Rounds>
typedef policy_type::block_type nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >::block_type

◆ byte_type

typedef policy_type::byte_type nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >::byte_type
inherited

◆ iv_type

template<std::size_t Rounds>
typedef policy_type::iv_type nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >::iv_type

◆ key_schedule_type

◆ key_type

template<std::size_t Rounds>
typedef policy_type::key_type nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >::key_type

◆ policy_type

template<std::size_t Rounds>
typedef salsa20_policy<64, 256, Rounds> nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >::policy_type

◆ round_constants_type

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

◆ value_type

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

◆ word_type

template<std::size_t Rounds>
typedef policy_type::word_type nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >::word_type

Member Function Documentation

◆ BOOST_STATIC_ASSERT() [1/3]

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

◆ BOOST_STATIC_ASSERT() [2/3]

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

◆ BOOST_STATIC_ASSERT() [3/3]

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

◆ CRYPTO3_INLINE_VARIABLE() [1/2]

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

◆ CRYPTO3_INLINE_VARIABLE() [2/2]

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

◆ hsalsa20()

static void nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >::hsalsa20 ( word_type  output[8],
const key_schedule_type  input 
)
inlinestaticinherited

◆ rotl() [1/2]

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

◆ rotl() [2/2]

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

◆ rotr() [1/2]

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

◆ rotr() [2/2]

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

◆ salsa_core()

static void nil::crypto3::stream::detail::salsa20_policy< IVBits, KeyBits, Rounds >::salsa_core ( block_type block,
const key_schedule_type input 
)
inlinestaticinherited

◆ schedule_iv()

template<std::size_t Rounds>
void nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >::schedule_iv ( block_type block,
key_schedule_type schedule,
const iv_type iv 
)
inline

◆ schedule_key()

template<std::size_t Rounds>
void nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >::schedule_key ( key_schedule_type state,
const key_type key 
)
inline

◆ shl() [1/2]

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

◆ shl() [2/2]

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

◆ shr() [1/2]

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

◆ shr() [2/2]

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 Rounds>
constexpr static const std::size_t nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >::block_bits = policy_type::block_bits
staticconstexpr

◆ block_size

template<std::size_t Rounds>
constexpr static const std::size_t nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >::block_size = policy_type::block_size
staticconstexpr

◆ iv_bits

template<std::size_t Rounds>
constexpr static const std::size_t nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >::iv_bits = policy_type::iv_bits
staticconstexpr

◆ iv_size

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

◆ key_bits

template<std::size_t Rounds>
constexpr static const std::size_t nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >::key_bits = policy_type::key_bits
staticconstexpr

◆ key_schedule_bits

template<std::size_t Rounds>
constexpr static const std::size_t nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >::key_schedule_bits = policy_type::key_schedule_bits
staticconstexpr

◆ key_schedule_size

template<std::size_t Rounds>
constexpr static const std::size_t nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >::key_schedule_size = policy_type::key_schedule_size
staticconstexpr

◆ key_size

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

◆ max_key_bits

template<std::size_t Rounds>
constexpr static const std::size_t nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >::max_key_bits = policy_type::max_key_bits
staticconstexpr

◆ min_key_bits

template<std::size_t Rounds>
constexpr static const std::size_t nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >::min_key_bits = policy_type::min_key_bits
staticconstexpr

◆ round_constants_size

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

◆ rounds

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

◆ value_bits

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

◆ word_bits

template<std::size_t Rounds>
constexpr static const std::size_t nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >::word_bits = policy_type::word_bits
staticconstexpr

◆ word_bytes

template<std::size_t Rounds>
constexpr static const std::size_t nil::crypto3::stream::detail::salsa20_functions< 64, 256, Rounds >::word_bytes = word_bits / CHAR_BIT
staticconstexpr

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