digestpp 1.0
C++11 header-only message digest library
Loading...
Searching...
No Matches
Esch

Esch Algorithms More...

Typedefs

typedef hasher< detail::esch_provider< 512, false > > digestpp::esch
 Esch hash function.
 
typedef hasher< detail::esch_provider< 384, true > > digestpp::esch256_xof
 XOEsch256 (Esch-256 in XOF mode)
 
typedef hasher< detail::esch_provider< 512, true > > digestpp::esch384_xof
 XOEsch384 (Esch-384 in XOF mode)
 
template<size_t N>
using digestpp::static_size::esch = hasher<detail::esch_provider<512, false, N>>
 Esch hash function (static-size version)
 

Detailed Description

Esch Algorithms

Typedef Documentation

◆ esch [1/2]

Esch hash function.

Hash function based on the Sparkle permutation family. A finalist in the NIST Lightweight Cryptography competition.

Designed by Christof Beierle, Alex Biryukov, Luan Cardoso dos Santos, Johann Großschädl, Léo Perrin, Aleksei Udovenko, Vesselin Velichkov, and Qingju Wang.

Esch uses the ARX (Addition-Rotation-XOR) design philosophy and is optimized for software implementations on resource-constrained devices. The algorithm provides good performance on both 8-bit microcontrollers and 32-bit/64-bit platforms.

Type:
Cryptographic hash function.
Output size:
256 / 384 bits
Default size:
none (must be specified)
Exceptions
std::runtime_errorif the requested digest size is not supported
Example:
// Output a 256-bit Esch digest of a string
hasher.absorb("The quick brown fox jumps over the lazy dog");
std::cout << hasher.hexdigest() << '\n';
Main class template implementing the public API for hashing.
Definition hasher.hpp:38
std::string hexdigest() const
Return hex digest of absorbed data.
Definition hasher.hpp:372
hasher & absorb(const T *data, size_t len)
Absorbs bytes from a C-style pointer to character buffer.
Definition hasher.hpp:86
Example output:
d43f87a0fe60fc5925064880c6116c136b6d94fa24a93dffcb35d178c3af932c
See also
hasher, esch256_xof, digestpp::static_size::esch

◆ esch [2/2]

template<size_t N>
using digestpp::static_size::esch = hasher<detail::esch_provider<512, false, N>>

Esch hash function (static-size version)

Variant of Esch with output size specified as template parameter.

Type:
Cryptographic hash function.
Output size:
256 / 384 bits
Template Parameters
NDigest size in bits (256 or 384).
Example:
// Output a 256-bit Esch digest of a string
hasher.absorb("The quick brown fox jumps over the lazy dog");
std::cout << hasher.hexdigest() << '\n';
Example output:
d43f87a0fe60fc5925064880c6116c136b6d94fa24a93dffcb35d178c3af932c
See also
hasher, digestpp::esch

◆ esch256_xof

XOEsch256 (Esch-256 in XOF mode)

Extendable output function based on Esch-256/Sparkle384.

XOEsch allows squeezing arbitrary amounts of data, making it suitable for key derivation and other applications in lightweight cryptography.

Lightweight alternative to SHAKE for constrained environments based on Sparkle384 permutation.

Type:
Extendable output function (XOF).
Example:
// Absorb a string and squeeze 32 bytes of output
digestpp::esch_xof hasher;
hasher.absorb("The quick brown fox jumps over the lazy dog");
std::cout << hasher.hexsqueeze(32) << '\n';
std::string hexsqueeze(size_t len)
Squeeze bytes and return them as a hex string.
Definition hasher.hpp:296
Example output:
8f2e2748fb97b99ad18aed8f9f72cad036fb00b1a21147bb0273551d07bf9d80
See also
hasher, esch, esch384_xof

◆ esch384_xof

XOEsch384 (Esch-384 in XOF mode)

Extendable output function based on Esch-384/Sparkle512. Higher security variant providing 192-bit security level.

Type:
Extendable output function (XOF).
Example:
// Absorb a string and squeeze 32 bytes of output
digestpp::esch_xof hasher;
hasher.absorb("The quick brown fox jumps over the lazy dog");
std::cout << hasher.hexsqueeze(32) << '\n';
Example output:
355b7d373fdbbdbc9332586714e676087847a71d529a818930db17a268fd021f
See also
hasher, esch, esch256_xof