nil::crypto3::block::modes::detail::ccm_decryption_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator > Struct Template Reference

#include <ccm.hpp>

+ Inheritance diagram for nil::crypto3::block::modes::detail::ccm_decryption_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator >:
+ Collaboration diagram for nil::crypto3::block::modes::detail::ccm_decryption_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator >:

Public Types

typedef policy_type::associated_data_type associated_data_type
 
typedef policy_type::block_type block_type
 
typedef policy_type::cipher_type cipher_type
 
typedef policy_type::nonce_type nonce_type
 
typedef policy_type::padding_type padding_type
 
typedef ccm_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator > policy_type
 

Public Member Functions

 BOOST_STATIC_ASSERT (block_bits==128)
 
 BOOST_STATIC_ASSERT (length_bits >=2 &&length_bits<=8)
 
 BOOST_STATIC_ASSERT (nonce_bits >=min_nonce_bits &&nonce_bits<=max_nonce_bits)
 
 BOOST_STATIC_ASSERT (tag_bits % 2)
 
 BOOST_STATIC_ASSERT (tag_bits >=4 *CHAR_BIT &&tag_bits<=16 *CHAR_BIT)
 

Static Public Member Functions

static block_type begin_message (const cipher_type &cipher, const block_type &plaintext)
 
static void encode_length (std::size_t len, uint8_t out[])
 
static block_type end_message (const cipher_type &cipher, const block_type &plaintext)
 
static block_type format_b0 (const associated_data_type &ad, const nonce_type &nonce, size_t sz)
 
static block_type format_c0 (const nonce_type &nonce)
 
static void inc (Container &C)
 
static block_type process_block (const cipher_type &cipher, const block_type &plaintext)
 

Static Public Attributes

constexpr static const std::size_t block_bits = policy_type::block_bits
 
constexpr static const std::size_t block_words = policy_type::block_words
 
constexpr static const std::size_t length_bits = policy_type::length_bits
 
constexpr static const std::size_t max_nonce_bits
 
constexpr static const std::size_t min_nonce_bits
 
constexpr static const std::size_t nonce_bits = policy_type::nonce_bits
 
constexpr static const std::size_t nonce_size
 
constexpr static const std::size_t tag_bits = policy_type::tag_bits
 

Member Typedef Documentation

◆ associated_data_type

template<typename Cipher , typename Padding , std::size_t NonceBits, std::size_t TagBits = 16 * CHAR_BIT, std::size_t LengthBits = 3 * CHAR_BIT, template< typename > class Allocator = std::allocator>
typedef policy_type::associated_data_type nil::crypto3::block::modes::detail::ccm_decryption_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator >::associated_data_type

◆ block_type

template<typename Cipher , typename Padding , std::size_t NonceBits, std::size_t TagBits = 16 * CHAR_BIT, std::size_t LengthBits = 3 * CHAR_BIT, template< typename > class Allocator = std::allocator>
typedef policy_type::block_type nil::crypto3::block::modes::detail::ccm_decryption_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator >::block_type

◆ cipher_type

template<typename Cipher , typename Padding , std::size_t NonceBits, std::size_t TagBits = 16 * CHAR_BIT, std::size_t LengthBits = 3 * CHAR_BIT, template< typename > class Allocator = std::allocator>
typedef policy_type::cipher_type nil::crypto3::block::modes::detail::ccm_decryption_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator >::cipher_type

◆ nonce_type

template<typename Cipher , typename Padding , std::size_t NonceBits, std::size_t TagBits = 16 * CHAR_BIT, std::size_t LengthBits = 3 * CHAR_BIT, template< typename > class Allocator = std::allocator>
typedef policy_type::nonce_type nil::crypto3::block::modes::detail::ccm_decryption_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator >::nonce_type

◆ padding_type

template<typename Cipher , typename Padding , std::size_t NonceBits, std::size_t TagBits = 16 * CHAR_BIT, std::size_t LengthBits = 3 * CHAR_BIT, template< typename > class Allocator = std::allocator>
typedef policy_type::padding_type nil::crypto3::block::modes::detail::ccm_decryption_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator >::padding_type

◆ policy_type

template<typename Cipher , typename Padding , std::size_t NonceBits, std::size_t TagBits = 16 * CHAR_BIT, std::size_t LengthBits = 3 * CHAR_BIT, template< typename > class Allocator = std::allocator>
typedef ccm_policy<Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator> nil::crypto3::block::modes::detail::ccm_decryption_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator >::policy_type

Member Function Documentation

◆ begin_message()

template<typename Cipher , typename Padding , std::size_t NonceBits, std::size_t TagBits = 16 * CHAR_BIT, std::size_t LengthBits = 3 * CHAR_BIT, template< typename > class Allocator = std::allocator>
static block_type nil::crypto3::block::modes::detail::ccm_decryption_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator >::begin_message ( const cipher_type cipher,
const block_type plaintext 
)
inlinestatic

◆ BOOST_STATIC_ASSERT() [1/5]

nil::crypto3::block::modes::detail::ccm_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, std::allocator >::BOOST_STATIC_ASSERT ( block_bits  = = 128)
inherited

◆ BOOST_STATIC_ASSERT() [2/5]

nil::crypto3::block::modes::detail::ccm_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, std::allocator >::BOOST_STATIC_ASSERT ( length_bits >=2 &&length_bits<=  8)
inherited

◆ BOOST_STATIC_ASSERT() [3/5]

nil::crypto3::block::modes::detail::ccm_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, std::allocator >::BOOST_STATIC_ASSERT ( nonce_bits >=min_nonce_bits &&nonce_bits<=  max_nonce_bits)
inherited

◆ BOOST_STATIC_ASSERT() [4/5]

nil::crypto3::block::modes::detail::ccm_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, std::allocator >::BOOST_STATIC_ASSERT ( tag_bits 2)
inherited

◆ BOOST_STATIC_ASSERT() [5/5]

nil::crypto3::block::modes::detail::ccm_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, std::allocator >::BOOST_STATIC_ASSERT ( tag_bits >=4 *CHAR_BIT &&tag_bits<=16 *  CHAR_BIT)
inherited

◆ encode_length()

static void nil::crypto3::block::modes::detail::ccm_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, std::allocator >::encode_length ( std::size_t  len,
uint8_t  out[] 
)
inlinestaticinherited

◆ end_message()

template<typename Cipher , typename Padding , std::size_t NonceBits, std::size_t TagBits = 16 * CHAR_BIT, std::size_t LengthBits = 3 * CHAR_BIT, template< typename > class Allocator = std::allocator>
static block_type nil::crypto3::block::modes::detail::ccm_decryption_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator >::end_message ( const cipher_type cipher,
const block_type plaintext 
)
inlinestatic

◆ format_b0()

static block_type nil::crypto3::block::modes::detail::ccm_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, std::allocator >::format_b0 ( const associated_data_type ad,
const nonce_type nonce,
size_t  sz 
)
inlinestaticinherited

◆ format_c0()

static block_type nil::crypto3::block::modes::detail::ccm_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, std::allocator >::format_c0 ( const nonce_type nonce)
inlinestaticinherited

◆ inc()

static void nil::crypto3::block::modes::detail::ccm_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, std::allocator >::inc ( Container &  C)
inlinestaticinherited

◆ process_block()

template<typename Cipher , typename Padding , std::size_t NonceBits, std::size_t TagBits = 16 * CHAR_BIT, std::size_t LengthBits = 3 * CHAR_BIT, template< typename > class Allocator = std::allocator>
static block_type nil::crypto3::block::modes::detail::ccm_decryption_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator >::process_block ( const cipher_type cipher,
const block_type plaintext 
)
inlinestatic

Member Data Documentation

◆ block_bits

template<typename Cipher , typename Padding , std::size_t NonceBits, std::size_t TagBits = 16 * CHAR_BIT, std::size_t LengthBits = 3 * CHAR_BIT, template< typename > class Allocator = std::allocator>
constexpr static const std::size_t nil::crypto3::block::modes::detail::ccm_decryption_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator >::block_bits = policy_type::block_bits
staticconstexpr

◆ block_words

template<typename Cipher , typename Padding , std::size_t NonceBits, std::size_t TagBits = 16 * CHAR_BIT, std::size_t LengthBits = 3 * CHAR_BIT, template< typename > class Allocator = std::allocator>
constexpr static const std::size_t nil::crypto3::block::modes::detail::ccm_decryption_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator >::block_words = policy_type::block_words
staticconstexpr

◆ length_bits

template<typename Cipher , typename Padding , std::size_t NonceBits, std::size_t TagBits = 16 * CHAR_BIT, std::size_t LengthBits = 3 * CHAR_BIT, template< typename > class Allocator = std::allocator>
constexpr static const std::size_t nil::crypto3::block::modes::detail::ccm_decryption_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator >::length_bits = policy_type::length_bits
staticconstexpr

◆ max_nonce_bits

constexpr static const std::size_t nil::crypto3::block::modes::detail::ccm_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, std::allocator >::max_nonce_bits
staticconstexprinherited

◆ min_nonce_bits

constexpr static const std::size_t nil::crypto3::block::modes::detail::ccm_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, std::allocator >::min_nonce_bits
staticconstexprinherited

◆ nonce_bits

template<typename Cipher , typename Padding , std::size_t NonceBits, std::size_t TagBits = 16 * CHAR_BIT, std::size_t LengthBits = 3 * CHAR_BIT, template< typename > class Allocator = std::allocator>
constexpr static const std::size_t nil::crypto3::block::modes::detail::ccm_decryption_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator >::nonce_bits = policy_type::nonce_bits
staticconstexpr

◆ nonce_size

constexpr static const std::size_t nil::crypto3::block::modes::detail::ccm_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, std::allocator >::nonce_size
staticconstexprinherited

◆ tag_bits

template<typename Cipher , typename Padding , std::size_t NonceBits, std::size_t TagBits = 16 * CHAR_BIT, std::size_t LengthBits = 3 * CHAR_BIT, template< typename > class Allocator = std::allocator>
constexpr static const std::size_t nil::crypto3::block::modes::detail::ccm_decryption_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator >::tag_bits = policy_type::tag_bits
staticconstexpr

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