nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator > Struct Template Reference

#include <rc4_policy.hpp>

+ Inheritance diagram for nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >:
+ Collaboration diagram for nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >:

Classes

struct  state_type
 

Public Types

typedef basic_functions< 32 >::byte_type byte_type
 
typedef std::array< byte_type, iv_sizeiv_type
 
typedef std::array< byte_type, key_schedule_sizekey_schedule_type
 
typedef std::array< byte_type, key_sizekey_type
 
typedef basic_functions< 32 >::word_type word_type
 

Public Member Functions

 BOOST_STATIC_ASSERT (min_key_bits<=KeyBits &&KeyBits<=max_key_bits)
 

Static Public Member Functions

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 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 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 * CHAR_BIT
 
constexpr static const std::size_t key_schedule_size = 256
 
constexpr static const std::size_t key_size = key_bits / CHAR_BIT
 
constexpr static const std::size_t max_key_bits = 256 * CHAR_BIT
 
constexpr static const std::size_t min_key_bits = CHAR_BIT
 
constexpr static const std::size_t state_bits = state_size * CHAR_BIT
 
constexpr static const std::size_t state_size = 256
 
constexpr static const std::size_t word_bits
 

Member Typedef Documentation

◆ byte_type

template<std::size_t IVBits, std::size_t KeyBits, template< typename > class Allocator = std::allocator>
typedef basic_functions<32>::byte_type nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >::byte_type

◆ iv_type

template<std::size_t IVBits, std::size_t KeyBits, template< typename > class Allocator = std::allocator>
typedef std::array<byte_type, iv_size> nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >::iv_type

◆ key_schedule_type

template<std::size_t IVBits, std::size_t KeyBits, template< typename > class Allocator = std::allocator>
typedef std::array<byte_type, key_schedule_size> nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >::key_schedule_type

◆ key_type

template<std::size_t IVBits, std::size_t KeyBits, template< typename > class Allocator = std::allocator>
typedef std::array<byte_type, key_size> nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >::key_type

◆ word_type

template<std::size_t IVBits, std::size_t KeyBits, template< typename > class Allocator = std::allocator>
typedef basic_functions<32>::word_type nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >::word_type

Member Function Documentation

◆ BOOST_STATIC_ASSERT()

template<std::size_t IVBits, std::size_t KeyBits, template< typename > class Allocator = std::allocator>
nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >::BOOST_STATIC_ASSERT ( min_key_bits<=KeyBits &&KeyBits<=  max_key_bits)

◆ 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

◆ 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

◆ iv_bits

template<std::size_t IVBits, std::size_t KeyBits, template< typename > class Allocator = std::allocator>
constexpr static const std::size_t nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >::iv_bits = IVBits
staticconstexpr

◆ iv_size

template<std::size_t IVBits, std::size_t KeyBits, template< typename > class Allocator = std::allocator>
constexpr static const std::size_t nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >::iv_size = IVBits / CHAR_BIT
staticconstexpr

◆ key_bits

template<std::size_t IVBits, std::size_t KeyBits, template< typename > class Allocator = std::allocator>
constexpr static const std::size_t nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >::key_bits = KeyBits
staticconstexpr

◆ key_schedule_bits

template<std::size_t IVBits, std::size_t KeyBits, template< typename > class Allocator = std::allocator>
constexpr static const std::size_t nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >::key_schedule_bits = key_schedule_size * CHAR_BIT
staticconstexpr

◆ key_schedule_size

template<std::size_t IVBits, std::size_t KeyBits, template< typename > class Allocator = std::allocator>
constexpr static const std::size_t nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >::key_schedule_size = 256
staticconstexpr

◆ key_size

template<std::size_t IVBits, std::size_t KeyBits, template< typename > class Allocator = std::allocator>
constexpr static const std::size_t nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >::key_size = key_bits / CHAR_BIT
staticconstexpr

◆ max_key_bits

template<std::size_t IVBits, std::size_t KeyBits, template< typename > class Allocator = std::allocator>
constexpr static const std::size_t nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >::max_key_bits = 256 * CHAR_BIT
staticconstexpr

◆ min_key_bits

template<std::size_t IVBits, std::size_t KeyBits, template< typename > class Allocator = std::allocator>
constexpr static const std::size_t nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >::min_key_bits = CHAR_BIT
staticconstexpr

◆ state_bits

template<std::size_t IVBits, std::size_t KeyBits, template< typename > class Allocator = std::allocator>
constexpr static const std::size_t nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >::state_bits = state_size * CHAR_BIT
staticconstexpr

◆ state_size

template<std::size_t IVBits, std::size_t KeyBits, template< typename > class Allocator = std::allocator>
constexpr static const std::size_t nil::crypto3::stream::detail::rc4_policy< IVBits, KeyBits, Allocator >::state_size = 256
staticconstexpr

◆ word_bits

constexpr static const std::size_t nil::crypto3::stream::detail::basic_functions< WordBits >::word_bits
staticconstexprinherited

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