RIPEMD-160 hash generator
RIPEMD-160 is a 160-bit hash function designed in 1996 by Hans Dobbertin, Antoon Bosselaers and Bart Preneel as part of the European RIPE project. It was created as an openly designed alternative to the NSA-designed SHA-1 and to replace the earlier, weaker RIPEMD. This RIPEMD-160 generator computes the digest of text or files in your browser.
Example
Input:
The quick brown fox jumps over the lazy dogRIPEMD-160 hash:
37f332f68db77bd9d7edd4969571ad671cf9dd3bThe digest of an empty input is 9c1185a5c5e9fc54612808977ee8f548b2258d31.
At a glance
| Property | Value |
|---|---|
| Digest size | 160 bits (20 bytes, 40 hex characters) |
| Block size | 512 bits |
| Design | Two parallel lines of 5 rounds × 16 steps, combined at the end |
| Designed | Dobbertin, Bosselaers and Preneel, 1996 (ISO/IEC 10118-3) |
| Status | No practical collision attacks on the full function |
Test vectors for checking an implementation
If you are porting or debugging RIPEMD-160 code, compare its output for these standard inputs with the values below (and with this tool):
| Input | RIPEMD-160 |
|---|---|
| (empty) | 9c1185a5c5e9fc54612808977ee8f548b2258d31 |
a | 0bdc9d2d256b3ee9daae347be6f4dc835a467ffe |
abc | 8eb208f7e05d987a9b044a8e98c6b087f15a0bfc |
A frequent porting bug is byte order: like MD5, RIPEMD-160 reads message words and the length field little-endian, unlike SHA-1 and SHA-256, and getting that wrong changes every result. In a Bitcoin address, the 20-byte HASH160 is prefixed with a version byte and followed by a 4-byte checksum, and those 25 bytes are written in Base58, which you can inspect with Base58 decode.
Why two parallel lines?
RIPEMD-160 processes every block twice, in two independent “lines” with different constants and message orderings, then combines the results. An attacker has to control both lines at once, which is much harder than attacking a single line. This design has held up well: unlike SHA-1, no collision for the full RIPEMD-160 has been found.
The family also includes RIPEMD-128, RIPEMD-256 and RIPEMD-320. The two larger variants only lengthen the output; they are designed to offer the same security level as RIPEMD-128 and RIPEMD-160, so they are rarely the right choice when you need more strength.
Security considerations
Although unbroken, RIPEMD-160’s 160-bit output provides only about 80 bits of collision resistance — the same size class as SHA-1 — which is considered too small for new designs that need long-term collision resistance. It is fine for compatibility and for uses where preimage resistance is what matters. For new systems, choose SHA-256, SHA-3 or BLAKE2.
RIPEMD-160 in Bitcoin
Bitcoin uses “HASH160” = RIPEMD-160(SHA-256(x)) to shorten public keys and scripts into 20-byte values for addresses. Note that this means RIPEMD-160 is applied to the binary SHA-256 digest, not to its hex text; hashing the hex string here will not reproduce a Bitcoin HASH160. You would need a tool that hashes raw bytes, or code such as hashlib.new('ripemd160', hashlib.sha256(data).digest()) (RIPEMD-160 may require OpenSSL’s legacy provider in recent Python builds).
Other hashes worth comparing: SHA-1 (same length, broken) and SHA-256. Everything runs locally in your browser.