ccm.hpp
Go to the documentation of this file.
133 inline static block_type begin_message(const cipher_type &cipher, const block_type &plaintext) {
137 inline static block_type process_block(const cipher_type &cipher, const block_type &plaintext) {
215 inline static block_type begin_message(const cipher_type &cipher, const block_type &plaintext) {
219 inline static block_type process_block(const cipher_type &cipher, const block_type &plaintext) {
370 typedef detail::ccm_encryption_policy<cipher_type, padding_type, NonceBits, TagBits, LengthBits,
373 typedef detail::ccm_decryption_policy<cipher_type, padding_type, NonceBits, TagBits, LengthBits,
Definition: ccm.hpp:282
ccm(const key_type &key, const AssociatedDataContainer &associated_data, const nonce_type &nonce)
Definition: ccm.hpp:309
cipher_type::key_type key_type
Definition: ccm.hpp:290
policy_type::padding_type padding_type
Definition: ccm.hpp:287
ccm(const cipher_type &cipher, const AssociatedDataContainer &associated_data, const nonce_type &nonce)
Definition: ccm.hpp:302
static std::size_t required_output_size(std::size_t inputlen)
Definition: ccm.hpp:326
policy_type::nonce_type nonce_type
Definition: ccm.hpp:293
block_type end_message(const block_type &plaintext)
Definition: ccm.hpp:322
cipher_type::block_type block_type
Definition: ccm.hpp:299
block_type process_block(const block_type &plaintext)
Definition: ccm.hpp:318
policy_type::associated_data_type associated_data_type
Definition: ccm.hpp:295
policy_type::cipher_type cipher_type
Definition: ccm.hpp:286
block_type begin_message(const block_type &plaintext)
Definition: ccm.hpp:314
void schedule_associated_data(const AssociatedDataContainer &input_ad)
Definition: ccm.hpp:332
boost::mpl::apply< AccumulatorSet, tag::block< Mode > >::type::result_type block(const AccumulatorSet &acc)
Definition: accumulators/block.hpp:259
Definition: algebra/include/nil/crypto3/detail/make_array.hpp:33
boost::accumulators::accumulator_set< mac::digest< MessageAuthenticationCode::input_block_bits >, boost::accumulators::features< accumulators::tag::mac< MessageAuthenticationCode > >> BlockCipher
Definition: cbc_mac_state.hpp:40
void xor_buf(uint8_t out[], const uint8_t in[], size_t length)
Definition: memory_operations.hpp:245
bool constant_time_compare(const uint8_t x[], const uint8_t y[], size_t len)
Definition: memory_operations.hpp:143
void copy_mem(T *out, const T *in, size_t n)
Definition: memory_operations.hpp:186
Definition: pair.hpp:31
Definition: cipher.hpp:38
Definition: ccm.hpp:380
detail::ccm< Policy< cipher_type, padding_type, NonceBits, TagBits, LengthBits, Allocator > > type
Definition: ccm.hpp:383
detail::ccm_decryption_policy< cipher_type, padding_type, NonceBits, TagBits, LengthBits, Allocator > decryption_policy
Definition: ccm.hpp:375
Padding< BlockCipher > padding_type
Definition: ccm.hpp:368
detail::ccm_encryption_policy< cipher_type, padding_type, NonceBits, TagBits, LengthBits, Allocator > encryption_policy
Definition: ccm.hpp:372
Definition: ccm.hpp:196
policy_type::padding_type padding_type
Definition: ccm.hpp:204
policy_type::cipher_type cipher_type
Definition: ccm.hpp:203
static block_type process_block(const cipher_type &cipher, const block_type &plaintext)
Definition: ccm.hpp:219
policy_type::associated_data_type associated_data_type
Definition: ccm.hpp:209
static block_type begin_message(const cipher_type &cipher, const block_type &plaintext)
Definition: ccm.hpp:215
policy_type::block_type block_type
Definition: ccm.hpp:213
static block_type end_message(const cipher_type &cipher, const block_type &plaintext)
Definition: ccm.hpp:223
ccm_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator > policy_type
Definition: ccm.hpp:198
policy_type::nonce_type nonce_type
Definition: ccm.hpp:207
Definition: ccm.hpp:115
static block_type begin_message(const cipher_type &cipher, const block_type &plaintext)
Definition: ccm.hpp:133
policy_type::block_type block_type
Definition: ccm.hpp:131
ccm_policy< Cipher, Padding, NonceBits, TagBits, LengthBits, Allocator > policy_type
Definition: ccm.hpp:116
policy_type::associated_data_type associated_data_type
Definition: ccm.hpp:127
static block_type end_message(const cipher_type &cipher, const block_type &plaintext)
Definition: ccm.hpp:141
policy_type::nonce_type nonce_type
Definition: ccm.hpp:125
static block_type process_block(const cipher_type &cipher, const block_type &plaintext)
Definition: ccm.hpp:137
policy_type::cipher_type cipher_type
Definition: ccm.hpp:121
policy_type::padding_type padding_type
Definition: ccm.hpp:122
Definition: ccm.hpp:40
BOOST_STATIC_ASSERT(length_bits >=2 &&length_bits<=8)
static void encode_length(std::size_t len, uint8_t out[])
Definition: ccm.hpp:77
constexpr static const std::size_t length_bits
Definition: ccm.hpp:45
cipher_type::block_type block_type
Definition: ccm.hpp:53
constexpr static const std::size_t block_bits
Definition: ccm.hpp:51
constexpr static const std::size_t nonce_bits
Definition: ccm.hpp:59
static block_type format_b0(const associated_data_type &ad, const nonce_type &nonce, size_t sz)
Definition: ccm.hpp:91
BOOST_STATIC_ASSERT(nonce_bits >=min_nonce_bits &&nonce_bits<=max_nonce_bits)
static block_type format_c0(const nonce_type &nonce)
Definition: ccm.hpp:103
BOOST_STATIC_ASSERT(block_bits==128)
BOOST_STATIC_ASSERT(tag_bits % 2)
constexpr static const std::size_t tag_bits
Definition: ccm.hpp:44
static void inc(Container &C)
Definition: ccm.hpp:69
std::array< std::uint8_t, nonce_size > nonce_type
Definition: ccm.hpp:61
BOOST_STATIC_ASSERT(tag_bits >=4 *CHAR_BIT &&tag_bits<=16 *CHAR_BIT)
constexpr static const std::size_t nonce_size
Definition: ccm.hpp:60
Padding padding_type
Definition: ccm.hpp:42
std::vector< boost::uint_t< CHAR_BIT >, Allocator< boost::uint_t< CHAR_BIT > > > associated_data_type
Definition: ccm.hpp:66
constexpr static const std::size_t block_words
Definition: ccm.hpp:52
constexpr static const std::size_t min_nonce_bits
Definition: ccm.hpp:57
constexpr static const std::size_t max_nonce_bits
Definition: ccm.hpp:58