RIPEMD128 Hash Tool
Other Hash Generator
MD2 MD4 MD5 SHA1 SHA224 SHA256 SHA384 SHA512/224 SHA512/256 SHA512 SHA3-224 SHA3-256 SHA3-384 SHA3-512 RIPEMD128 RIPEMD160 RIPEMD256 RIPEMD320 WHIRLPOOL TIGER128,3 TIGER160,3 TIGER192,3 TIGER128,4 TIGER160,4 TIGER192,4 SNEFRU SNEFRU256 GOST GOST-CRYPTO ADLER32 CRC32 CRC32B CRC32C FNV132 FNV1A32 FNV164 FNV1A64 JOAAT MURMUR3A MURMUR3C MURMUR3F XXH32 XXH64 XXH3 XXH128 HAVAL128,3 HAVAL160,3 HAVAL192,3 HAVAL224,3 HAVAL256,3 HAVAL128,4 HAVAL160,4 HAVAL192,4 HAVAL224,4 HAVAL256,4 HAVAL128,5 HAVAL160,5 HAVAL192,5 HAVAL224,5 HAVAL256,5The RIPEMD-128 algorithm is a cryptographic hash function designed to produce a fixed-size output of 128 bits from an arbitrary-length input. It belongs to the RIPEMD family, which was developed as a secure alternative to earlier hash functions. RIPEMD-128 is based on the Merkle–Damgård construction, utilizing a series of compression functions to process input data in fixed-size blocks.
Input Processing
The algorithm begins by padding the input message to ensure its length is a multiple of 512 bits. Padding involves appending a single '1' bit, followed by sufficient '0' bits, and finally adding a 64-bit representation of the original message length. The padded message is then divided into 512-bit blocks, which serve as the primary units for the compression function.
Initialization
RIPEMD-128 uses four 32-bit initial values for its internal state, denoted as A, B, C, and D. These constants are chosen to provide sufficient diffusion and prevent trivial collisions. Each 512-bit block is processed sequentially, updating these state variables through multiple rounds of operations.
Compression Function
The core of RIPEMD-128 consists of two parallel lines of computation, each performing 64 steps divided into four rounds. Each round employs a nonlinear function that combines bitwise operations, modular addition, and rotations. One line processes the message block in its original order, while the other line processes the message in a permuted order. After all rounds, the results of both lines are combined to update the current state.
Nonlinear Functions
The algorithm uses specific Boolean functions for each round to introduce nonlinearity and enhance diffusion. These functions include XOR, AND, OR, and NOT operations applied to the current state variables. Each operation is carefully structured to ensure avalanche effects, where a single-bit change in the input leads to multiple-bit changes in the output.
Message Schedule and Constants
Each round uses a predetermined sequence of message word indices and additive constants. These constants are derived from prime numbers to reduce patterns and improve security. The rotation amounts for bitwise shifts vary per step to maximize mixing of bits across the state variables.
Output Generation
After processing all message blocks, the final values of the four state variables are concatenated in little-endian order to produce the 128-bit hash. The resulting digest is unique for different inputs with extremely high probability and exhibits strong resistance to preimage and collision attacks within the design constraints of the algorithm.