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

KangarooTwelve Algorithms More...

Typedefs

typedef hasher< detail::k12m14_provider< 128, detail::kangaroo_type::k12 >, mixin::k12m14_mixindigestpp::k12
 KangarooTwelve (K12) extendable output function.
 
typedef k12 digestpp::kt128
 KT128 - alias for KangarooTwelve.
 
typedef hasher< detail::k12m14_provider< 256, detail::kangaroo_type::m14 >, mixin::k12m14_mixindigestpp::m14
 MarsupilamiFourteen (M14) extendable output function.
 
typedef hasher< detail::k12m14_provider< 256, detail::kangaroo_type::k12 >, mixin::k12m14_mixindigestpp::kt256
 KT256 extendable output function.
 

Detailed Description

KangarooTwelve Algorithms

Typedef Documentation

◆ k12

typedef hasher<detail::k12m14_provider<128, detail::kangaroo_type::k12>, mixin::k12m14_mixin> digestpp::k12

KangarooTwelve (K12) extendable output function.

High-performance XOF based on Keccak with reduced rounds for speed. Designed by Guido Bertoni, Joan Daemen, Michaël Peeters, Gilles Van Assche, Ronny Van Keer, and Benoît Viguier (the Keccak/SHA-3 team).

KangarooTwelve uses 12 rounds of Keccak-p[1600] instead of 24 rounds in SHAKE128, providing excellent performance while maintaining 128-bit security.

Recommended for high-performance applications. Standardized as RFC 9861 (Informational, October 2025).

Type:
Extendable output function (XOF).

Optional parameters:

Optional parameters:
customization

See mixin::k12m14_mixin for the description of optional parameters.

Example:
// Absorb a string and squeeze 32 bytes of output
hasher.absorb("The quick brown fox jumps over the lazy dog");
std::cout << hasher.hexsqueeze(32) << '\n';
Main class template implementing the public API for hashing.
Definition hasher.hpp:38
hasher & absorb(const T *data, size_t len)
Absorbs bytes from a C-style pointer to character buffer.
Definition hasher.hpp:86
std::string hexsqueeze(size_t len)
Squeeze bytes and return them as a hex string.
Definition hasher.hpp:296
Example output:
b4f249b4f77c58df170aa4d1723db1127d82f1d98d25ddda561ada459cd11a48
See also
hasher, mixin::k12m14_mixin, m14, shake128, kt128

◆ kt128

KT128 - alias for KangarooTwelve.

Alternative name for KangarooTwelve (K12). KT128 emphasizes the 128-bit security level.

Type:
Extendable output function (XOF).
See also
k12

◆ kt256

KT256 extendable output function.

Alternative high-security XOF based on KangarooTwelve design principles. KT256 uses 12 rounds (same as K12) but with 256-bit security configuration.

Similar to SHAKE256 but with reduced rounds for performance. Different from MarsupilamiFourteen (M14) in round count.

Standardized as RFC 9861 (Informational, October 2025).

Type:
Extendable output function (XOF).

Optional parameters:

Type:
Extendable output function (XOF).
Optional parameters:
customization

See mixin::k12m14_mixin for the description of optional parameters.

Example:
// Absorb a string and squeeze 32 bytes of output
hasher.absorb("The quick brown fox jumps over the lazy dog");
std::cout << hasher.hexsqueeze(32) << '\n';
Example output:
b23d2e9cea9f4904e02bec06817fc10ce38ce8e93ef4c89e6537076af8646404
See also
hasher, mixin::k12m14_mixin, k12, m14, shake256

◆ m14

typedef hasher<detail::k12m14_provider<256, detail::kangaroo_type::m14>, mixin::k12m14_mixin> digestpp::m14

MarsupilamiFourteen (M14) extendable output function.

High-security variant of KangarooTwelve, providing 256-bit security. Uses the same design principles as K12 but with a larger security margin.

MarsupilamiFourteen uses 14 rounds of Keccak-p[1600] and provides security equivalent to SHAKE256, while maintaining better performance characteristics.

Recommended for high-security, high-performance applications.

Type:
Extendable output function (XOF).

Optional parameters:

Optional parameters:
customization

See mixin::k12m14_mixin for the description of optional parameters.

Example:
// Absorb a string and squeeze 32 bytes of output
hasher.absorb("The quick brown fox jumps over the lazy dog");
std::cout << hasher.hexsqueeze(32) << '\n';
Example output:
3611bcaa666347770dbffd4562f137c5adfe2e09f3c4268ef7c7d7c0e6c5d59c
See also
hasher, mixin::k12m14_mixin, k12, shake256