chacha20poly1305.hpp
Go to the documentation of this file.
191 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) {
Definition: chacha20poly1305.hpp:271
block_type begin_message(const block_type &plaintext)
Definition: chacha20poly1305.hpp:293
policy_type::mac_type mac_type
Definition: chacha20poly1305.hpp:277
constexpr static const std::size_t block_words
Definition: chacha20poly1305.hpp:283
block_type process_block(const block_type &plaintext)
Definition: chacha20poly1305.hpp:297
policy_type::padding_type padding_type
Definition: chacha20poly1305.hpp:276
mac_type mac
Definition: chacha20poly1305.hpp:317
void schedule_associated_data(const AssociatedDataContainer &iad)
Definition: chacha20poly1305.hpp:311
stream_cipher_type::key_type key_type
Definition: chacha20poly1305.hpp:279
associated_data_type ad
Definition: chacha20poly1305.hpp:314
policy_type::stream_cipher_type stream_cipher_type
Definition: chacha20poly1305.hpp:275
constexpr static const std::size_t block_bits
Definition: chacha20poly1305.hpp:282
stream_cipher_type cipher
Definition: chacha20poly1305.hpp:316
stream_cipher_type::block_type block_type
Definition: chacha20poly1305.hpp:284
static std::size_t required_output_size(std::size_t inputlen)
Definition: chacha20poly1305.hpp:305
policy_type::associated_data_type associated_data_type
Definition: chacha20poly1305.hpp:280
block_type end_message(const block_type &plaintext)
Definition: chacha20poly1305.hpp:301
chacha20poly1305(const stream_cipher_type &cipher, const AssociatedDataContainer &associated_data)
Definition: chacha20poly1305.hpp:287
boost::mpl::apply< AccumulatorSet, tag::mac< ProcessingPolicy > >::type::result_type mac(const AccumulatorSet &acc)
Definition: accumulators/mac.hpp:99
boost::mpl::apply< AccumulatorSet, tag::block< Mode > >::type::result_type block(const AccumulatorSet &acc)
Definition: accumulators/block.hpp:259
boost::mpl::apply< AccumulatorSet, tag::stream< Mode > >::type::result_type stream(const AccumulatorSet &acc)
Definition: accumulators/stream.hpp:175
bool constant_time_compare(const uint8_t x[], const uint8_t y[], size_t len)
Definition: memory_operations.hpp:143
Definition: pair.hpp:31
Definition: chacha20poly1305.hpp:358
detail::chacha20poly1305< Policy< stream_cipher_type, padding_type, NonceBits, TagBits, Allocator > > type
Definition: chacha20poly1305.hpp:361
See draft-irtf-cfrg-chacha20-poly1305-03 for specification If a nonce of 64 bits is used the older ve...
Definition: chacha20poly1305.hpp:336
detail::chacha20poly1305_encryption_policy< padding_type, NonceBits, TagBits, stream_cipher_type, mac_type, Allocator > encryption_policy
Definition: chacha20poly1305.hpp:347
StreamCipher stream_cipher_type
Definition: chacha20poly1305.hpp:337
detail::chacha20poly1305_decryption_policy< padding_type, NonceBits, TagBits, stream_cipher_type, mac_type, Allocator > decryption_policy
Definition: chacha20poly1305.hpp:354
MessageAuthenticationCode mac_type
Definition: chacha20poly1305.hpp:338
Padding< StreamCipher > padding_type
Definition: chacha20poly1305.hpp:339
Definition: chacha20poly1305.hpp:172
policy_type::associated_data_type associated_data_type
Definition: chacha20poly1305.hpp:184
static block_type begin_message(const cipher_type &cipher, const block_type &plaintext)
Definition: chacha20poly1305.hpp:191
static block_type end_message(const cipher_type &cipher, const block_type &plaintext)
Definition: chacha20poly1305.hpp:229
static block_type process_block(const cipher_type &cipher, const block_type &plaintext)
Definition: chacha20poly1305.hpp:219
policy_type::nonce_type nonce_type
Definition: chacha20poly1305.hpp:185
constexpr static const std::size_t block_words
Definition: chacha20poly1305.hpp:188
policy_type::padding_type padding_type
Definition: chacha20poly1305.hpp:182
policy_type::stream_cipher_type cipher_type
Definition: chacha20poly1305.hpp:181
chacha20poly1305_policy< Padding, NonceBits, TagBits, StreamCipher, MessageAuthenticationCode, Allocator > policy_type
Definition: chacha20poly1305.hpp:179
policy_type::block_type block_type
Definition: chacha20poly1305.hpp:189
constexpr static const std::size_t block_bits
Definition: chacha20poly1305.hpp:187
Definition: chacha20poly1305.hpp:78
static block_type begin_message(const stream_cipher_type &cipher, const block_type &plaintext)
Definition: chacha20poly1305.hpp:97
static block_type process_block(const stream_cipher_type &cipher, const block_type &plaintext)
Definition: chacha20poly1305.hpp:126
policy_type::stream_cipher_type stream_cipher_type
Definition: chacha20poly1305.hpp:87
policy_type::padding_type padding_type
Definition: chacha20poly1305.hpp:88
static block_type end_message(const stream_cipher_type &cipher, const block_type &plaintext)
Definition: chacha20poly1305.hpp:137
constexpr static const std::size_t block_bits
Definition: chacha20poly1305.hpp:93
policy_type::nonce_type nonce_type
Definition: chacha20poly1305.hpp:91
policy_type::block_type block_type
Definition: chacha20poly1305.hpp:95
chacha20poly1305_policy< Padding, NonceBits, TagBits, StreamCipher, MessageAuthenticationCode, Allocator > policy_type
Definition: chacha20poly1305.hpp:85
constexpr static const std::size_t block_words
Definition: chacha20poly1305.hpp:94
policy_type::associated_data_type associated_data_type
Definition: chacha20poly1305.hpp:90
Definition: chacha20poly1305.hpp:48
MessageAuthenticationCode mac_type
Definition: chacha20poly1305.hpp:52
std::size_t size_type
Definition: chacha20poly1305.hpp:49
constexpr static const std::size_t nonce_bits
Definition: chacha20poly1305.hpp:55
BOOST_STATIC_ASSERT(nonce_bits==8 *CHAR_BIT||nonce_bits==12 *CHAR_BIT)
Padding padding_type
Definition: chacha20poly1305.hpp:53
std::array< std::uint8_t, nonce_size > nonce_type
Definition: chacha20poly1305.hpp:57
StreamCipher stream_cipher_type
Definition: chacha20poly1305.hpp:51
constexpr static const std::size_t nonce_size
Definition: chacha20poly1305.hpp:56
std::vector< boost::uint_t< CHAR_BIT >, Allocator< boost::uint_t< CHAR_BIT > > > associated_data_type
Definition: chacha20poly1305.hpp:62