CBC-MAC. More...

#include <cbc_mac.hpp>

+ Collaboration diagram for nil::crypto3::mac::cbc_mac< BlockCipher >:

Public Types

typedef BlockCipher block_cipher_type
 
typedef policy_type::block_type block_type
 
typedef policy_type::digest_type digest_type
 
typedef policy_type::key_type key_type
 
typedef policy_type::state_type state_type
 

Public Member Functions

void begin_message (state_type &state, const block_type &block)
 
 cbc_mac (const block_cipher_type &cipher)
 
 cbc_mac (const key_type &key)
 
void end_message (digest_type &digest, const state_type &state, const block_type &block)
 
void process_block (state_type &state, const block_type &block)
 

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 digest_bits = policy_type::digest_bits
 
constexpr static const std::size_t key_bits = policy_type::key_bits
 
constexpr static const std::size_t key_words = policy_type::key_words
 
constexpr static const std::size_t state_bits = policy_type::state_bits
 
constexpr static const std::size_t state_words = policy_type::state_words
 

Protected Member Functions

void schedule_key (const key_type &key)
 

Protected Attributes

block_cipher_type cipher
 

Detailed Description

template<typename BlockCipher>
struct nil::crypto3::mac::cbc_mac< BlockCipher >

CBC-MAC.

Template Parameters
BlockCipher

Member Typedef Documentation

◆ block_cipher_type

template<typename BlockCipher >
typedef BlockCipher nil::crypto3::mac::cbc_mac< BlockCipher >::block_cipher_type

◆ block_type

template<typename BlockCipher >
typedef policy_type::block_type nil::crypto3::mac::cbc_mac< BlockCipher >::block_type

◆ digest_type

template<typename BlockCipher >
typedef policy_type::digest_type nil::crypto3::mac::cbc_mac< BlockCipher >::digest_type

◆ key_type

template<typename BlockCipher >
typedef policy_type::key_type nil::crypto3::mac::cbc_mac< BlockCipher >::key_type

◆ state_type

template<typename BlockCipher >
typedef policy_type::state_type nil::crypto3::mac::cbc_mac< BlockCipher >::state_type

Constructor & Destructor Documentation

◆ cbc_mac() [1/2]

template<typename BlockCipher >
nil::crypto3::mac::cbc_mac< BlockCipher >::cbc_mac ( const block_cipher_type cipher)
inline

◆ cbc_mac() [2/2]

template<typename BlockCipher >
nil::crypto3::mac::cbc_mac< BlockCipher >::cbc_mac ( const key_type key)
inline

Member Function Documentation

◆ begin_message()

template<typename BlockCipher >
void nil::crypto3::mac::cbc_mac< BlockCipher >::begin_message ( state_type state,
const block_type block 
)
inline

◆ end_message()

template<typename BlockCipher >
void nil::crypto3::mac::cbc_mac< BlockCipher >::end_message ( digest_type digest,
const state_type state,
const block_type block 
)
inline

◆ process_block()

template<typename BlockCipher >
void nil::crypto3::mac::cbc_mac< BlockCipher >::process_block ( state_type state,
const block_type block 
)
inline

◆ schedule_key()

template<typename BlockCipher >
void nil::crypto3::mac::cbc_mac< BlockCipher >::schedule_key ( const key_type key)
inlineprotected

Member Data Documentation

◆ block_bits

template<typename BlockCipher >
constexpr static const std::size_t nil::crypto3::mac::cbc_mac< BlockCipher >::block_bits = policy_type::block_bits
staticconstexpr

◆ block_words

template<typename BlockCipher >
constexpr static const std::size_t nil::crypto3::mac::cbc_mac< BlockCipher >::block_words = policy_type::block_words
staticconstexpr

◆ cipher

template<typename BlockCipher >
block_cipher_type nil::crypto3::mac::cbc_mac< BlockCipher >::cipher
protected

◆ digest_bits

template<typename BlockCipher >
constexpr static const std::size_t nil::crypto3::mac::cbc_mac< BlockCipher >::digest_bits = policy_type::digest_bits
staticconstexpr

◆ key_bits

template<typename BlockCipher >
constexpr static const std::size_t nil::crypto3::mac::cbc_mac< BlockCipher >::key_bits = policy_type::key_bits
staticconstexpr

◆ key_words

template<typename BlockCipher >
constexpr static const std::size_t nil::crypto3::mac::cbc_mac< BlockCipher >::key_words = policy_type::key_words
staticconstexpr

◆ state_bits

template<typename BlockCipher >
constexpr static const std::size_t nil::crypto3::mac::cbc_mac< BlockCipher >::state_bits = policy_type::state_bits
staticconstexpr

◆ state_words

template<typename BlockCipher >
constexpr static const std::size_t nil::crypto3::mac::cbc_mac< BlockCipher >::state_words = policy_type::state_words
staticconstexpr

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