Classes |
Public Types |
Public Member Functions |
Static Public Attributes |
Static Protected Member Functions |
Protected Attributes |
List of all members
nil::crypto3::block::md5 Class Reference
MD5 block cipher. Stands as a foundation for MD5 hashes. More...
#include <md5.hpp>
Collaboration diagram for nil::crypto3::block::md5:
Classes | |
struct | stream_processor |
Public Types | |
typedef policy_type::block_type | block_type |
typedef stream_endian::little_octet_big_bit | endian_type |
typedef policy_type::key_type | key_type |
typedef policy_type::word_type | word_type |
Public Member Functions | |
block_type | decrypt (const block_type &ciphertext) const |
block_type | encrypt (const block_type &plaintext) const |
md5 (const key_type &k) | |
virtual | ~md5 () |
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 | key_bits = policy_type::key_bits |
constexpr static const std::size_t | key_words = policy_type::key_words |
constexpr static const std::size_t | rounds = policy_type::rounds |
constexpr static const std::size_t | word_bits = policy_type::word_bits |
Static Protected Member Functions | |
static block_type | decrypt_block (key_type const &key, const block_type &ciphertext) |
static block_type | encrypt_block (key_type const &key, block_type const &plaintext) |
Protected Attributes | |
key_type | key |
Detailed Description
MD5 block cipher. Stands as a foundation for MD5 hashes.
Encrypt implemented directly from the RFC as found at http://www.faqs.org/rfcs/rfc1321.html
Decrypt is a straight-forward inverse
In MD5 terminology:
- plaintext = AA, BB, CC, and DD
- ciphertext = A, B, C, and D
- key = M^(i) and X
Member Typedef Documentation
◆ block_type
◆ endian_type
◆ key_type
◆ word_type
Constructor & Destructor Documentation
◆ md5()
|
inline |
◆ ~md5()
|
inlinevirtual |
Member Function Documentation
◆ decrypt()
|
inline |
◆ decrypt_block()
|
inlinestaticprotected |
◆ encrypt()
|
inline |
◆ encrypt_block()
|
inlinestaticprotected |
Member Data Documentation
◆ block_bits
|
staticconstexpr |
◆ block_words
|
staticconstexpr |
◆ key
|
protected |
◆ key_bits
|
staticconstexpr |
◆ key_words
|
staticconstexpr |
◆ rounds
|
staticconstexpr |
◆ word_bits
|
staticconstexpr |
The documentation for this class was generated from the following file: