ocb.hpp
Go to the documentation of this file.
161 inline static block_type begin_message(const cipher_type &cipher, const block_type &plaintext) {
310 inline static block_type begin_message(const cipher_type &cipher, const block_type &plaintext) {
314 inline static block_type process_block(const cipher_type &cipher, const block_type &plaintext) {
421 inline static block_type begin_message(const cipher_type &cipher, const block_type &plaintext) {
425 inline static block_type process_block(const cipher_type &cipher, const block_type &plaintext) {
Definition: ocb.hpp:36
const secure_vector< uint8_t > & offset() const
Definition: ocb.hpp:64
void init(const secure_vector< uint8_t > &offset)
Definition: ocb.hpp:52
L_computer(const BlockCipher &cipher)
Definition: ocb.hpp:38
const secure_vector< uint8_t > & dollar() const
Definition: ocb.hpp:60
const secure_vector< uint8_t > & get(size_t i) const
Definition: ocb.hpp:68
const uint8_t * compute_offsets(size_t block_index, size_t blocks)
Definition: ocb.hpp:76
const secure_vector< uint8_t > & star() const
Definition: ocb.hpp:56
Definition: ocb.hpp:405
static block_type begin_message(const cipher_type &cipher, const block_type &plaintext)
Definition: ocb.hpp:421
policy_type::cipher_type cipher_type
Definition: ocb.hpp:409
constexpr static const std::size_t block_words
Definition: ocb.hpp:418
policy_type::associated_data_type associated_data_type
Definition: ocb.hpp:415
void decrypt(uint8_t buffer[], size_t blocks)
Definition: ocb.hpp:502
policy_type::padding_type padding_type
Definition: ocb.hpp:410
constexpr static const std::size_t block_bits
Definition: ocb.hpp:417
static block_type process_block(const cipher_type &cipher, const block_type &plaintext)
Definition: ocb.hpp:425
typename policy_type::template allocator_type< T > allocator_type
Definition: ocb.hpp:413
static block_type end_message(const cipher_type &cipher, const block_type &plaintext)
Definition: ocb.hpp:434
policy_type::block_type block_type
Definition: ocb.hpp:419
Definition: ocb.hpp:292
static block_type process_block(const cipher_type &cipher, const block_type &plaintext)
Definition: ocb.hpp:314
typename policy_type::template allocator_type< T > allocator_type
Definition: ocb.hpp:300
constexpr static const std::size_t block_bits
Definition: ocb.hpp:306
void encrypt(uint8_t buffer[], size_t blocks)
Definition: ocb.hpp:379
policy_type::cipher_type cipher_type
Definition: ocb.hpp:296
static block_type end_message(const cipher_type &cipher, const block_type &plaintext)
Definition: ocb.hpp:323
constexpr static const std::size_t tag_bits
Definition: ocb.hpp:302
static block_type begin_message(const cipher_type &cipher, const block_type &plaintext)
Definition: ocb.hpp:310
constexpr static const std::size_t block_words
Definition: ocb.hpp:307
policy_type::padding_type padding_type
Definition: ocb.hpp:297
policy_type::block_type block_type
Definition: ocb.hpp:308
policy_type::associated_data_type associated_data_type
Definition: ocb.hpp:304
Definition: ocb.hpp:523
block_type process_block(const block_type &plaintext)
Definition: ocb.hpp:547
block_type begin_message(const block_type &plaintext)
Definition: ocb.hpp:543
constexpr static const std::size_t block_bits
Definition: ocb.hpp:533
policy_type::cipher_type cipher_type
Definition: ocb.hpp:527
cipher_type::key_type key_type
Definition: ocb.hpp:530
cipher_type::block_type block_type
Definition: ocb.hpp:535
policy_type::associated_data_type associated_data_type
Definition: ocb.hpp:531
constexpr static const std::size_t block_words
Definition: ocb.hpp:534
block_type end_message(const block_type &plaintext)
Definition: ocb.hpp:551
void schedule_associated_data(const AssociatedDataContainer &iad)
Definition: ocb.hpp:561
policy_type::padding_type padding_type
Definition: ocb.hpp:528
static std::size_t required_output_size(std::size_t inputlen)
Definition: ocb.hpp:555
ocb(const cipher_type &cipher, const AssociatedDataContainer &associated_data)
Definition: ocb.hpp:538
constexpr T min(const vector< T, N > &v)
computes the minimum valued element
Definition: algebra/include/nil/crypto3/algebra/vector/math.hpp:135
constexpr T sum(const vector< T, N > &v)
computes the sum of elements
Definition: algebra/include/nil/crypto3/algebra/vector/math.hpp:124
boost::mpl::apply< AccumulatorSet, tag::mac< ProcessingPolicy > >::type::result_type mac(const AccumulatorSet &acc)
Definition: accumulators/mac.hpp:99
boost::mpl::apply< AccumulatorSet, tag::hash< Hash > >::type::result_type hash(const AccumulatorSet &acc)
Definition: accumulators/hash.hpp:284
boost::mpl::apply< AccumulatorSet, tag::block< Mode > >::type::result_type block(const AccumulatorSet &acc)
Definition: accumulators/block.hpp:259
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 poly_double_n(uint8_t out[], InputIterator first, InputIterator last)
Definition: mac/include/nil/crypto3/detail/poly_dbl.hpp:83
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: ocb.hpp:138
static secure_vector< uint8_t > hash(const L_computer< cipher_type > &L, const cipher_type &cipher, const associated_data_type &ad)
Definition: ocb.hpp:254
Padding padding_type
Definition: ocb.hpp:140
constexpr static const std::size_t block_bits
Definition: ocb.hpp:150
std::vector< boost::uint_t< CHAR_BIT >, allocator_type< boost::uint_t< CHAR_BIT > > > associated_data_type
Definition: ocb.hpp:159
BOOST_STATIC_ASSERT(tag_bits<=block_bits)
BlockCipher cipher_type
Definition: ocb.hpp:139
BOOST_STATIC_ASSERT(tag_bits >=CHAR_BIT &&tag_bits<=32)
cipher_type::block_type block_type
Definition: ocb.hpp:152
static block_type begin_message(const cipher_type &cipher, const block_type &plaintext)
Definition: ocb.hpp:161
Allocator< T > allocator_type
Definition: ocb.hpp:143
constexpr static const std::size_t block_words
Definition: ocb.hpp:151
BOOST_STATIC_ASSERT(tag_bits % 4==0)
constexpr static const std::size_t tag_bits
Definition: ocb.hpp:145
BOOST_STATIC_ASSERT(block_bits==128||block_bits==192||block_bits==256||block_bits==512)
void update_nonce(const uint8_t nonce[], size_t nonce_len)
Definition: ocb.hpp:173
Definition: ocb.hpp:606
detail::ocb< Policy< cipher_type, padding_type, TagBits, allocator_type > > type
Definition: ocb.hpp:607
Definition: ocb.hpp:593
detail::ocb_decryption_policy< cipher_type, padding_type, TagBits, allocator_type > decryption_policy
Definition: ocb.hpp:603
detail::ocb_encryption_policy< cipher_type, padding_type, TagBits, allocator_type > encryption_policy
Definition: ocb.hpp:601