hash-flooding defense · Python · Rust · keyed
SipHash-2-4 — a keyed hash designed to resist hash-flooding DoS attacks. Uses a 128-bit secret key. Used for hash tables in Python, Rust, Redis, and many language runtimes. Pure JavaScript.
Key (hex) field — the default 0102030405060708090a0b0c0d0e0f10 works for quick testing.Input text box — the SipHash-2-4 digest appears instantly in the output box below.Copy to copy the 16-character hex digest to your clipboard.Clear any time to reset the input and recompute.Python, Rust, and Redis use SipHash for hash-table keys. Reproduce the same values here to confirm how your language's runtime hashes a string.
See why a secret, per-process key stops attackers from predicting collisions and triggering worst-case hash-table performance.
Produce expected SipHash-2-4 outputs for a known key to use in unit tests or cross-check a library implementation.
Flip a single key character and watch the digest scramble — a quick feel for the avalanche effect in keyed hashing.
SipHash-2-4 runs 2 compression rounds per 8-byte block plus 4 finalization rounds. This tool makes that pipeline tangible.
Everything runs in your browser. Nothing is uploaded, logged, or sent to a server — safe for sensitive payloads and keys.
SipHash is a keyed hash function (a pseudo-random function) that maps a message to a 64-bit digest using a 128-bit secret key. The -2-4 variant is the most common and is used for hash tables in Python, Rust, Redis, and others.
They are the round counts: 2 compression rounds per 8-byte message block and 4 finalization rounds at the end. More rounds mean more work but stronger diffusion.
The key prevents attackers from precomputing colliding inputs. Hash tables seed themselves with a random key so an adversary can't craft many strings that land in the same bucket — the classic "hash-flooding" denial-of-service attack.
A hex string of up to 32 characters (128 bits), like the default 0102030405060708090a0b0c0d0e0f10. Shorter keys are zero-padded on the right, and non-hex characters will cause an error. Clearing the key falls back to the default.
SipHash always outputs 64 bits, and each byte renders as two hex digits — so the result is always 16 characters, regardless of input length.
Not in the same sense. SipHash is a keyed PRF (it can authenticate data like a MAC), but its 64-bit output is far too short for general collision resistance. It's designed for hash tables and short tags, not for unkeyed hashing.
Never. All computation happens locally in JavaScript. Your input and key are not sent to, stored on, or logged by any server.