nil::crypto3::block::modes::detail::ocb_decryption_policy< BlockCipher, Padding, TagBits, Allocator > Class Template Reference

#include <ocb.hpp>

+ Inheritance diagram for nil::crypto3::block::modes::detail::ocb_decryption_policy< BlockCipher, Padding, TagBits, Allocator >:
+ Collaboration diagram for nil::crypto3::block::modes::detail::ocb_decryption_policy< BlockCipher, Padding, TagBits, Allocator >:

Public Types

template<typename T >
using allocator_type = typename policy_type::template allocator_type< T >
 
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::padding_type padding_type
 

Public Member Functions

 BOOST_STATIC_ASSERT (block_bits==128||block_bits==192||block_bits==256||block_bits==512)
 
 BOOST_STATIC_ASSERT (tag_bits % 4==0)
 
 BOOST_STATIC_ASSERT (tag_bits >=CHAR_BIT &&tag_bits<=32)
 
 BOOST_STATIC_ASSERT (tag_bits<=block_bits)
 
void update_nonce (const uint8_t nonce[], size_t nonce_len)
 

Static Public Member Functions

static block_type begin_message (const cipher_type &cipher, const block_type &plaintext)
 
static block_type end_message (const cipher_type &cipher, const block_type &plaintext)
 
static secure_vector< uint8_t > hash (const L_computer< cipher_type > &L, const cipher_type &cipher, const associated_data_type &ad)
 
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 tag_bits
 

Protected Member Functions

void decrypt (uint8_t buffer[], size_t blocks)
 

Member Typedef Documentation

◆ allocator_type

template<typename BlockCipher , typename Padding , std::size_t TagBits, template< typename > class Allocator = std::allocator>
template<typename T >
using nil::crypto3::block::modes::detail::ocb_decryption_policy< BlockCipher, Padding, TagBits, Allocator >::allocator_type = typename policy_type::template allocator_type<T>

◆ associated_data_type

template<typename BlockCipher , typename Padding , std::size_t TagBits, template< typename > class Allocator = std::allocator>
typedef policy_type::associated_data_type nil::crypto3::block::modes::detail::ocb_decryption_policy< BlockCipher, Padding, TagBits, Allocator >::associated_data_type

◆ block_type

template<typename BlockCipher , typename Padding , std::size_t TagBits, template< typename > class Allocator = std::allocator>
typedef policy_type::block_type nil::crypto3::block::modes::detail::ocb_decryption_policy< BlockCipher, Padding, TagBits, Allocator >::block_type

◆ cipher_type

template<typename BlockCipher , typename Padding , std::size_t TagBits, template< typename > class Allocator = std::allocator>
typedef policy_type::cipher_type nil::crypto3::block::modes::detail::ocb_decryption_policy< BlockCipher, Padding, TagBits, Allocator >::cipher_type

◆ padding_type

template<typename BlockCipher , typename Padding , std::size_t TagBits, template< typename > class Allocator = std::allocator>
typedef policy_type::padding_type nil::crypto3::block::modes::detail::ocb_decryption_policy< BlockCipher, Padding, TagBits, Allocator >::padding_type

Member Function Documentation

◆ begin_message()

template<typename BlockCipher , typename Padding , std::size_t TagBits, template< typename > class Allocator = std::allocator>
static block_type nil::crypto3::block::modes::detail::ocb_decryption_policy< BlockCipher, Padding, TagBits, Allocator >::begin_message ( const cipher_type cipher,
const block_type plaintext 
)
inlinestatic

◆ BOOST_STATIC_ASSERT() [1/4]

nil::crypto3::block::modes::detail::ocb_policy< BlockCipher, Padding, TagBits, std::allocator >::BOOST_STATIC_ASSERT ( block_bits  = = 128 || block_bits == 192 || block_bits == 256 || block_bits == 512)
inherited

◆ BOOST_STATIC_ASSERT() [2/4]

nil::crypto3::block::modes::detail::ocb_policy< BlockCipher, Padding, TagBits, std::allocator >::BOOST_STATIC_ASSERT ( tag_bits 4 = = 0)
inherited

◆ BOOST_STATIC_ASSERT() [3/4]

nil::crypto3::block::modes::detail::ocb_policy< BlockCipher, Padding, TagBits, std::allocator >::BOOST_STATIC_ASSERT ( tag_bits >=CHAR_BIT &&tag_bits<=  32)
inherited

◆ BOOST_STATIC_ASSERT() [4/4]

nil::crypto3::block::modes::detail::ocb_policy< BlockCipher, Padding, TagBits, std::allocator >::BOOST_STATIC_ASSERT ( tag_bits<=  block_bits)
inherited

◆ decrypt()

template<typename BlockCipher , typename Padding , std::size_t TagBits, template< typename > class Allocator = std::allocator>
void nil::crypto3::block::modes::detail::ocb_decryption_policy< BlockCipher, Padding, TagBits, Allocator >::decrypt ( uint8_t  buffer[],
size_t  blocks 
)
inlineprotected

◆ end_message()

template<typename BlockCipher , typename Padding , std::size_t TagBits, template< typename > class Allocator = std::allocator>
static block_type nil::crypto3::block::modes::detail::ocb_decryption_policy< BlockCipher, Padding, TagBits, Allocator >::end_message ( const cipher_type cipher,
const block_type plaintext 
)
inlinestatic

◆ hash()

static secure_vector<uint8_t> nil::crypto3::block::modes::detail::ocb_policy< BlockCipher, Padding, TagBits, std::allocator >::hash ( const L_computer< cipher_type > &  L,
const cipher_type cipher,
const associated_data_type ad 
)
inlinestaticinherited

◆ process_block()

template<typename BlockCipher , typename Padding , std::size_t TagBits, template< typename > class Allocator = std::allocator>
static block_type nil::crypto3::block::modes::detail::ocb_decryption_policy< BlockCipher, Padding, TagBits, Allocator >::process_block ( const cipher_type cipher,
const block_type plaintext 
)
inlinestatic

◆ update_nonce()

void nil::crypto3::block::modes::detail::ocb_policy< BlockCipher, Padding, TagBits, std::allocator >::update_nonce ( const uint8_t  nonce[],
size_t  nonce_len 
)
inlineinherited

Member Data Documentation

◆ block_bits

template<typename BlockCipher , typename Padding , std::size_t TagBits, template< typename > class Allocator = std::allocator>
constexpr static const std::size_t nil::crypto3::block::modes::detail::ocb_decryption_policy< BlockCipher, Padding, TagBits, Allocator >::block_bits = policy_type::block_bits
staticconstexpr

◆ block_words

template<typename BlockCipher , typename Padding , std::size_t TagBits, template< typename > class Allocator = std::allocator>
constexpr static const std::size_t nil::crypto3::block::modes::detail::ocb_decryption_policy< BlockCipher, Padding, TagBits, Allocator >::block_words = policy_type::block_words
staticconstexpr

◆ tag_bits

constexpr static const std::size_t nil::crypto3::block::modes::detail::ocb_policy< BlockCipher, Padding, TagBits, std::allocator >::tag_bits
staticconstexprinherited

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