Public Types |
Public Member Functions |
Static Public Attributes |
Protected Types |
List of all members
nil::crypto3::block::shacal Class Reference
Shacal. Merkle-Damgård construction foundation for SHA hashes. More...
#include <shacal.hpp>
Inheritance diagram for nil::crypto3::block::shacal:
Collaboration diagram for nil::crypto3::block::shacal:
Public Types | |
typedef policy_type::block_type | block_type |
typedef policy_type::key_type | key_type |
typedef policy_type::schedule_type | schedule_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 |
shacal (const key_type &k) | |
shacal (schedule_type s) | |
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 |
Protected Types | |
typedef detail::shacal_policy | policy_type |
Detailed Description
Shacal. Merkle-Damgård construction foundation for SHA hashes.
Implemented directly from the SHA standard as found at http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
The original FIPS-180 seems to be gone, but FIPS 180-1 (http://www.itl.nist.gov/fipspubs/fip180-1.htm) says the onl in SHA-1 from SHA(-0) is the rotation in the key scheduling.
In SHA terminology:
- plaintext = H^(i-1)
- ciphertext = H^(i)
- key = M^(i)
- schedule = W
Member Typedef Documentation
◆ block_type
|
inherited |
◆ key_type
|
inherited |
◆ policy_type
|
protectedinherited |
◆ schedule_type
|
inherited |
◆ word_type
|
inherited |
Constructor & Destructor Documentation
◆ shacal() [1/2]
|
inline |
◆ shacal() [2/2]
|
inline |
Member Function Documentation
◆ decrypt()
|
inlineinherited |
◆ encrypt()
|
inlineinherited |
Member Data Documentation
◆ block_bits
|
staticconstexprinherited |
◆ block_words
|
staticconstexprinherited |
◆ key_bits
|
staticconstexprinherited |
◆ key_words
|
staticconstexprinherited |
◆ rounds
|
staticconstexprinherited |
◆ word_bits
|
staticconstexprinherited |
The documentation for this class was generated from the following file: