nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits > Struct Template Reference

#include <rijndael_policy.hpp>

+ Inheritance diagram for nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >:
+ Collaboration diagram for nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >:

Public Types

typedef std::array< byte_type, block_bytesblock_type
 
typedef rijndael_functions< 32, BlockBits >::byte_type byte_type
 
typedef rijndael_functions< 32, block_bits >::constants_type constants_type
 
typedef std::array< byte_type, key_byteskey_type
 
typedef std::array< byte_type, mm_sizemm_type
 
typedef rijndael_functions< 32, block_bits >::prefetched_constants_type prefetched_constants_type
 
typedef std::array< byte_type, round_constants_sizeround_constants_type
 
typedef std::array< byte_type, shift_offsets_sizeshift_offsets_type
 
typedef rijndael_functions< 32, BlockBits >::word_type word_type
 

Public Member Functions

 BOOST_ALIGNMENT (64) const expr static const ants_type const inverted_constants
 
 BOOST_ALIGNMENT (64) const expr static const constants_type const ants
 
 BOOST_ALIGNMENT (64) const expr static const round_constants_type round_constants
 

Static Public Member Functions

static byte_type mul (byte_type x, byte_type y)
 
static const prefetched_constants_type prefetch_constants (const constants_type &constants)
 
static const prefetched_constants_type prefetch_inverted_constants (const constants_type &constants)
 
static typename ::nil::crypto3::detail::basic_functions< WordBits >::word_type rotate_left (typename ::nil::crypto3::detail::basic_functions< WordBits >::word_type x)
 
template<std::size_t n>
static word_type rotl (word_type x)
 
template<std::size_t n>
static word_type rotl (word_type x)
 
template<std::size_t n>
static word_type rotl (word_type x)
 
template<std::size_t n>
static word_type rotl (word_type x)
 
static word_type rotl (word_type x, std::size_t n)
 
static word_type rotl (word_type x, std::size_t n)
 
static word_type rotl (word_type x, std::size_t n)
 
static word_type rotl (word_type x, std::size_t n)
 
template<std::size_t n>
static word_type rotr (word_type x)
 
template<std::size_t n>
static word_type rotr (word_type x)
 
template<std::size_t n>
static word_type rotr (word_type x)
 
template<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 rotr (word_type x, std::size_t n)
 
static word_type rotr (word_type x, std::size_t n)
 
static word_type rotr (word_type x, std::size_t n)
 
template<std::size_t n>
static word_type shl (word_type x)
 
template<std::size_t n>
static word_type shl (word_type x)
 
template<std::size_t n>
static word_type shl (word_type x)
 
template<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 shl (word_type x, std::size_t n)
 
static word_type shl (word_type x, std::size_t n)
 
static word_type shl (word_type x, std::size_t n)
 
template<std::size_t n>
static word_type shr (word_type x)
 
template<std::size_t n>
static word_type shr (word_type x)
 
template<std::size_t n>
static word_type shr (word_type x)
 
template<std::size_t n>
static word_type shr (word_type x)
 
static word_type shr (word_type x, std::size_t n)
 
static word_type shr (word_type x, std::size_t n)
 
static word_type shr (word_type x, std::size_t n)
 
static word_type shr (word_type x, std::size_t n)
 
static byte_type xtime (byte_type s)
 
static byte_type xtime11 (byte_type s)
 
static byte_type xtime13 (byte_type s)
 
static byte_type xtime14 (byte_type s)
 
static byte_type xtime3 (byte_type s)
 
static byte_type xtime4 (byte_type s)
 
static byte_type xtime8 (byte_type s)
 
static byte_type xtime9 (byte_type s)
 

Static Public Attributes

constexpr static const std::size_t block_bits = BlockBits
 
constexpr static const std::size_t block_bytes = BlockBits / byte_bits
 
constexpr static const std::size_t block_words = block_bits / word_bits
 
constexpr static const std::size_t byte_bits = rijndael_functions<32, BlockBits>::byte_bits
 
constexpr static const std::size_t constants_size
 
constexpr static const mm_type inverted_mm
 
constexpr static const shift_offsets_type inverted_shift_offsets
 
constexpr static const std::size_t key_bits = KeyBits
 
constexpr static const std::size_t key_bytes = word_bytes * key_words
 
constexpr static const std::size_t key_words = key_bits / word_bits
 
constexpr static const constants_type log_
 
constexpr static const mm_type mm
 
constexpr static const std::size_t mm_size = 16
 
constexpr static const constants_type pow_
 
constexpr static const std::size_t round_constants_size = 30
 
constexpr static const shift_offsets_type shift_offsets
 
constexpr static const std::size_t shift_offsets_size = 3
 
constexpr static const std::size_t word_bits = rijndael_functions<32, BlockBits>::word_bits
 
constexpr static const std::size_t word_bytes = rijndael_functions<32, BlockBits>::word_bytes
 

Member Typedef Documentation

◆ block_type

template<std::size_t KeyBits, std::size_t BlockBits>
typedef std::array<byte_type, block_bytes> nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::block_type

◆ byte_type

template<std::size_t KeyBits, std::size_t BlockBits>
typedef rijndael_functions<32, BlockBits>::byte_type nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::byte_type

◆ constants_type

template<std::size_t KeyBits, std::size_t BlockBits>
typedef rijndael_functions<32, block_bits>::constants_type nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::constants_type

◆ key_type

template<std::size_t KeyBits, std::size_t BlockBits>
typedef std::array<byte_type, key_bytes> nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::key_type

◆ mm_type

template<std::size_t KeyBits, std::size_t BlockBits>
typedef std::array<byte_type, mm_size> nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::mm_type

◆ prefetched_constants_type

template<std::size_t KeyBits, std::size_t BlockBits>
typedef rijndael_functions<32, block_bits>::prefetched_constants_type nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::prefetched_constants_type

◆ round_constants_type

template<std::size_t KeyBits, std::size_t BlockBits>
typedef std::array<byte_type, round_constants_size> nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::round_constants_type

◆ shift_offsets_type

template<std::size_t KeyBits, std::size_t BlockBits>
typedef std::array<byte_type, shift_offsets_size> nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::shift_offsets_type

◆ word_type

template<std::size_t KeyBits, std::size_t BlockBits>
typedef rijndael_functions<32, BlockBits>::word_type nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::word_type

Member Function Documentation

◆ BOOST_ALIGNMENT() [1/3]

template<std::size_t KeyBits, std::size_t BlockBits>
nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::BOOST_ALIGNMENT ( 64  ) const
inline

◆ BOOST_ALIGNMENT() [2/3]

template<std::size_t KeyBits, std::size_t BlockBits>
nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::BOOST_ALIGNMENT ( 64  ) const
inline

◆ BOOST_ALIGNMENT() [3/3]

template<std::size_t KeyBits, std::size_t BlockBits>
nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::BOOST_ALIGNMENT ( 64  ) const
inline

◆ mul()

static byte_type nil::crypto3::block::detail::rijndael_functions< WordBits, BlockBits >::mul ( byte_type  x,
byte_type  y 
)
inlinestaticinherited

◆ prefetch_constants()

static const prefetched_constants_type nil::crypto3::block::detail::rijndael_functions< WordBits, BlockBits >::prefetch_constants ( const constants_type constants)
inlinestaticinherited

◆ prefetch_inverted_constants()

static const prefetched_constants_type nil::crypto3::block::detail::rijndael_functions< WordBits, BlockBits >::prefetch_inverted_constants ( const constants_type constants)
inlinestaticinherited

◆ rotate_left()

static typename ::nil::crypto3::detail::basic_functions<WordBits>::word_type nil::crypto3::block::detail::rijndael_functions< WordBits, BlockBits >::rotate_left ( typename ::nil::crypto3::detail::basic_functions< WordBits >::word_type  x)
inlinestaticinherited

◆ rotl() [1/8]

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

◆ rotl() [2/8]

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

◆ rotl() [3/8]

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

◆ rotl() [4/8]

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

◆ rotl() [5/8]

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

◆ rotl() [6/8]

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

◆ rotl() [7/8]

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

◆ rotl() [8/8]

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

◆ rotr() [1/8]

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

◆ rotr() [2/8]

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

◆ rotr() [3/8]

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

◆ rotr() [4/8]

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

◆ rotr() [5/8]

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

◆ rotr() [6/8]

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

◆ rotr() [7/8]

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

◆ rotr() [8/8]

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

◆ shl() [1/8]

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

◆ shl() [2/8]

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

◆ shl() [3/8]

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

◆ shl() [4/8]

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

◆ shl() [5/8]

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

◆ shl() [6/8]

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

◆ shl() [7/8]

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

◆ shl() [8/8]

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

◆ shr() [1/8]

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

◆ shr() [2/8]

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

◆ shr() [3/8]

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

◆ shr() [4/8]

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

◆ shr() [5/8]

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

◆ shr() [6/8]

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

◆ shr() [7/8]

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

◆ shr() [8/8]

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

◆ xtime()

static byte_type nil::crypto3::block::detail::rijndael_functions< WordBits, BlockBits >::xtime ( byte_type  s)
inlinestaticinherited

◆ xtime11()

static byte_type nil::crypto3::block::detail::rijndael_functions< WordBits, BlockBits >::xtime11 ( byte_type  s)
inlinestaticinherited

◆ xtime13()

static byte_type nil::crypto3::block::detail::rijndael_functions< WordBits, BlockBits >::xtime13 ( byte_type  s)
inlinestaticinherited

◆ xtime14()

static byte_type nil::crypto3::block::detail::rijndael_functions< WordBits, BlockBits >::xtime14 ( byte_type  s)
inlinestaticinherited

◆ xtime3()

static byte_type nil::crypto3::block::detail::rijndael_functions< WordBits, BlockBits >::xtime3 ( byte_type  s)
inlinestaticinherited

◆ xtime4()

static byte_type nil::crypto3::block::detail::rijndael_functions< WordBits, BlockBits >::xtime4 ( byte_type  s)
inlinestaticinherited

◆ xtime8()

static byte_type nil::crypto3::block::detail::rijndael_functions< WordBits, BlockBits >::xtime8 ( byte_type  s)
inlinestaticinherited

◆ xtime9()

static byte_type nil::crypto3::block::detail::rijndael_functions< WordBits, BlockBits >::xtime9 ( byte_type  s)
inlinestaticinherited

Member Data Documentation

◆ block_bits

template<std::size_t KeyBits, std::size_t BlockBits>
constexpr static const std::size_t nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::block_bits = BlockBits
staticconstexpr

◆ block_bytes

template<std::size_t KeyBits, std::size_t BlockBits>
constexpr static const std::size_t nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::block_bytes = BlockBits / byte_bits
staticconstexpr

◆ block_words

template<std::size_t KeyBits, std::size_t BlockBits>
constexpr static const std::size_t nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::block_words = block_bits / word_bits
staticconstexpr

◆ byte_bits

template<std::size_t KeyBits, std::size_t BlockBits>
constexpr static const std::size_t nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::byte_bits = rijndael_functions<32, BlockBits>::byte_bits
staticconstexpr

◆ constants_size

template<std::size_t KeyBits, std::size_t BlockBits>
constexpr static const std::size_t nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::constants_size
staticconstexpr
Initial value:
=
constexpr static const std::size_t constants_size
Definition: rijndael_functions.hpp:49

◆ inverted_mm

template<std::size_t KeyBits, std::size_t BlockBits>
constexpr basic_rijndael_policy< KeyBits, BlockBits >::mm_type const nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::inverted_mm
staticconstexpr
Initial value:
= {0x0e, 0x0b, 0x0d, 0x09, 0x09, 0x0e, 0x0b, 0x0d,
0x0d, 0x09, 0x0e, 0x0b, 0x0b, 0x0d, 0x09, 0x0e}

◆ inverted_shift_offsets

template<std::size_t KeyBits, std::size_t BlockBits>
constexpr basic_rijndael_policy< KeyBits, BlockBits >::shift_offsets_type const nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::inverted_shift_offsets
staticconstexpr
Initial value:
= {
block_words - 1, block_words == 8 ? 5 : block_words - 2,
block_words == 8 ? 4 : block_words == 7 ? 3 : block_words - 3}
constexpr static const std::size_t block_words
Definition: rijndael_policy.hpp:45

◆ key_bits

template<std::size_t KeyBits, std::size_t BlockBits>
constexpr static const std::size_t nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::key_bits = KeyBits
staticconstexpr

◆ key_bytes

template<std::size_t KeyBits, std::size_t BlockBits>
constexpr static const std::size_t nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::key_bytes = word_bytes * key_words
staticconstexpr

◆ key_words

template<std::size_t KeyBits, std::size_t BlockBits>
constexpr static const std::size_t nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::key_words = key_bits / word_bits
staticconstexpr

◆ log_

constexpr rijndael_functions< KeyBits, BlockBits >::constants_type const nil::crypto3::block::detail::rijndael_functions< KeyBits, BlockBits >::log_
staticconstexprinherited

◆ mm

template<std::size_t KeyBits, std::size_t BlockBits>
constexpr basic_rijndael_policy< KeyBits, BlockBits >::mm_type const nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::mm
staticconstexpr
Initial value:
= {0x02, 0x03, 0x01, 0x01, 0x01, 0x02, 0x03, 0x01,
0x01, 0x01, 0x02, 0x03, 0x03, 0x01, 0x01, 0x02}

◆ mm_size

template<std::size_t KeyBits, std::size_t BlockBits>
constexpr static const std::size_t nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::mm_size = 16
staticconstexpr

◆ pow_

constexpr rijndael_functions< KeyBits, BlockBits >::constants_type const nil::crypto3::block::detail::rijndael_functions< KeyBits, BlockBits >::pow_
staticconstexprinherited

◆ round_constants_size

template<std::size_t KeyBits, std::size_t BlockBits>
constexpr static const std::size_t nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::round_constants_size = 30
staticconstexpr

◆ shift_offsets

template<std::size_t KeyBits, std::size_t BlockBits>
constexpr basic_rijndael_policy< KeyBits, BlockBits >::shift_offsets_type const nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::shift_offsets
staticconstexpr
Initial value:
= {1, block_words == 8 ? 3 : 2,
block_words > 6 ? 4 : 3}

◆ shift_offsets_size

template<std::size_t KeyBits, std::size_t BlockBits>
constexpr static const std::size_t nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::shift_offsets_size = 3
staticconstexpr

◆ word_bits

template<std::size_t KeyBits, std::size_t BlockBits>
constexpr static const std::size_t nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::word_bits = rijndael_functions<32, BlockBits>::word_bits
staticconstexpr

◆ word_bytes

template<std::size_t KeyBits, std::size_t BlockBits>
constexpr static const std::size_t nil::crypto3::block::detail::basic_rijndael_policy< KeyBits, BlockBits >::word_bytes = rijndael_functions<32, BlockBits>::word_bytes
staticconstexpr

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