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

LSH Algorithms More...

Typedefs

typedef hasher< detail::lsh_provider< uint32_t > > digestpp::lsh256
 LSH256 hash function.
 
typedef hasher< detail::lsh_provider< uint64_t > > digestpp::lsh512
 LSH512 hash function.
 
template<size_t N>
using digestpp::static_size::lsh256 = hasher<detail::lsh_provider<uint32_t, N>>
 LSH256 hash function (static-size version)
 
template<size_t N>
using digestpp::static_size::lsh512 = hasher<detail::lsh_provider<uint64_t, N>>
 LSH512 hash function (static-size version)
 

Detailed Description

LSH Algorithms

Typedef Documentation

◆ lsh256 [1/2]

LSH256 hash function.

LSH (Lightweight Secure Hash) function designed for high performance on general-purpose software environments including PCs and smart devices.

Designed by KISA (Korea Internet & Security Agency).

LSH uses a wide-pipe Merkle-Damgård structure. The compression function uses ARX (Addition, Rotation, XOR) operations for efficient software implementation.

LSH (Lightweight Secure Hash) is optimized for software implementation and designed as an alternative to SHA-2, with competitive performance and modern security properties.

Korean national standard: KS X 3262. Approved by Korean Cryptographic Module Validation Program (KCMVP). LSH256 is optimized for 32-bit platforms.

Type:
Cryptographic hash function.
Output size:
8 - 256 bits
Default size:
none
Exceptions
std::runtime_errorif the requested digest size is not divisible by 8 (full bytes), or is not within the supported range
Example:
// Output a 256-bit LSH256 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:
f8025b61eb10d80a7f03ccfb906222a0645bb175fdeee9595f223936edbf7070
See also
hasher, lsh512, digestpp::static_size::lsh256

◆ lsh256 [2/2]

template<size_t N>
using digestpp::static_size::lsh256 = hasher<detail::lsh_provider<uint32_t, N>>

LSH256 hash function (static-size version)

Variant of LSH256 with output size specified as template parameter.

Type:
Cryptographic hash function.
Output size:
8 - 256 bits
Example:
// Output a 256-bit LSH256 digest of a string
hasher.absorb("The quick brown fox jumps over the lazy dog");
std::cout << hasher.hexdigest() << '\n';
Example output:
f8025b61eb10d80a7f03ccfb906222a0645bb175fdeee9595f223936edbf7070
See also
hasher, lsh512, digestpp::lsh256

◆ lsh512 [1/2]

LSH512 hash function.

Lightweight Secure Hash function, 64-bit word variant. Designed by KISA (Korea Internet & Security Agency).

LSH-512 is optimized for 64-bit platforms and provides higher security levels than LSH-256, with support for up to 512-bit output.

Korean national standard: KS X 3262. Approved by Korean Cryptographic Module Validation Program (KCMVP). LSH512 is optimized for 64-bit platforms.

Type:
Cryptographic hash function.
Output size:
8 - 512 bits
Default size:
none
Exceptions
std::runtime_errorif the requested digest size is not divisible by 8 (full bytes), or is not within the supported range
Example:
// Output a 256-bit LSH512 digest of a string
hasher.absorb("The quick brown fox jumps over the lazy dog");
std::cout << hasher.hexdigest() << '\n';
Example output:
5e4ebe2017e84f35420bda7486ebbd791e0ece579cc18e49341b9a526466e633
See also
hasher, lsh256, digestpp::static_size::lsh512

◆ lsh512 [2/2]

template<size_t N>
using digestpp::static_size::lsh512 = hasher<detail::lsh_provider<uint64_t, N>>

LSH512 hash function (static-size version)

Variant of LSH512 with output size specified as template parameter.

Type:
Cryptographic hash function.
Output size:
8 - 512 bits
Example:
// Output a 256-bit LSH512 digest of a string
hasher.absorb("The quick brown fox jumps over the lazy dog");
std::cout << hasher.hexdigest() << '\n';
Example output:
5e4ebe2017e84f35420bda7486ebbd791e0ece579cc18e49341b9a526466e633
See also
hasher, lsh256, digestpp::lsh512