LSH is a
cryptographic hash function
A cryptographic hash function (CHF) is a hash algorithm (a map (mathematics), map of an arbitrary binary string to a binary string with a fixed size of n bits) that has special properties desirable for a cryptography, cryptographic application: ...
designed in 2014 by
South Korea
South Korea, officially the Republic of Korea (ROK), is a country in East Asia. It constitutes the southern half of the Korea, Korean Peninsula and borders North Korea along the Korean Demilitarized Zone, with the Yellow Sea to the west and t ...
to provide integrity in general-purpose software environments such as
PCs and
smart device
A smart device is an electronic device, generally connected to other devices or networks via different wireless protocols (such as Bluetooth, Zigbee, near-field communication, Wi-Fi, NearLink, Li-Fi, or 5G) that can operate to some extent inte ...
s.
LSH is one of the cryptographic algorithms approved by the Korean Cryptographic Module Validation Program (KCMVP).
And it is the national standard of South Korea (KS X 3262).
Specification
The overall structure of the hash function LSH is shown in the following figure.

The hash function LSH has the wide-pipe Merkle-Damgård structure with one-zeros padding.
The message hashing process of LSH consists of the following three stages.
# ''Initialization'':
#* One-zeros padding of a given bit string message.
#* Conversion to 32-word array message blocks from the padded bit string message.
#* Initialization of a chaining variable with the initialization vector.
# ''Compression'':
#* Updating of chaining variables by iteration of a compression function with message blocks.
# ''Finalization'':
#* Generation of an
-bit hash value from the final chaining variable.
The specifications of the hash function LSH are as follows.
Initialization
Let
be a given bit string message.
The given
is padded by one-zeros, i.e., the bit ‘1’ is appended to the end of
, and the bit ‘0’s are appended until a bit length of a padded message is
, where
and
is the smallest integer not less than
.
Let
be the one-zeros-padded
-bit string of
.
Then
is considered as a
-byte array
, where
for all
.
The
-byte array
converts into a
-word array
as follows.