About RIPEMD128 hash
RIPEMD-128 (RACE Integrity Primitives Evaluation Message Digest) is a cryptographic hash function designed by Hans Dobbertin, Antoon Bosselaers, and Bart Preneel. It was developed in the early 1990s as an improvement over RIPEMD, and it produces a 128-bit hash value, making it shorter than its successors RIPEMD-160 and RIPEMD-256.
Characteristics of RIPEMD-128
Fixed-Length Output:
- RIPEMD-128 produces a fixed-length output of 128 bits (16 bytes), regardless of the input data's length.
Input Padding:
- Similar to other hash functions of its time, RIPEMD-128 pads the input message so that its length is congruent to 448 modulo 512 bits. Padding involves appending a single '1' bit followed by '0' bits until the message length is 64 bits short of a multiple of 512. The length of the original message (before padding) is then appended as a 64-bit integer.
Processing in Blocks:
- RIPEMD-128 processes the input message in 512-bit (64-byte) blocks.
Initialization Vector (IV):
- RIPEMD-128 uses an initial vector (IV) consisting of four 32-bit words:
- IV0 = 0x67452301
- IV1 = 0xEFCDAB89
- IV2 = 0x98BADCFE
- IV3 = 0x10325476
- RIPEMD-128 uses an initial vector (IV) consisting of four 32-bit words:
Compression Function:
- The compression function of RIPEMD-128 involves multiple rounds of operations, including bitwise logical functions (AND, OR, XOR, NOT), additions modulo 2^32, rotations, and bitwise shifts.
Algorithm Steps
Initialization:
- Initialize the state variables (A, B, C, D) to the IV values.
Padding:
- Pad the input message according to the specified padding rules.
Processing:
- Divide the padded message into 512-bit blocks.
- For each block, perform the rounds of the compression function, updating the state variables.
Output:
- After processing all blocks, concatenate the state variables to produce the final 128-bit hash value.
Security and Usage
Security:
- RIPEMD-128 was designed to provide moderate security against collision attacks and preimage attacks. However, as cryptographic techniques advanced, its security level has become inadequate for most modern applications. It is generally not recommended for new designs due to vulnerabilities found over time.
Usage:
- RIPEMD-128 was historically used in various applications, including digital signatures, message authentication codes (MACs), and checksums. However, its usage has decreased in favor of more secure hash functions such as SHA-2 and SHA-3.
Summary
RIPEMD-128 is a cryptographic hash function that produces a 128-bit hash value. It was designed in the early 1990s and provides moderate security against certain types of attacks. However, due to advancements in cryptanalysis and the availability of more secure alternatives, its use in modern cryptographic applications is not recommended.