512-bit · Custom Cryptographic Hash Function

RUDRA-512

// Inspired by Lord Shiva · Built in C++ · 512-bit digest · ~50% Avalanche

512 Bit Output
8×64 State Words
32 Default Rounds
~50% Avalanche Effect
128 Hex Characters
FIELD 01
Input Message
Type any text you want to hash. Press Enter or click Hash It to compute.

Default: "hello"
FIELD 02
Rounds
Number of permutation rounds applied per block. Higher = slower but stronger mixing.

Default: 32
FIELD 03
Salt (Optional)
Prepended to input before hashing. Same input + different salt = completely different hash.

Default: none (empty)
SECTION 04
Avalanche Demo
Enter two similar inputs (e.g. "hello" vs "hellp"). Changed bits highlight in red. Ideal score is ~50%.

Output shown in binary
SECTION 05
Permutation Stepper
Click Step Forward to animate one word-round, or Auto Run to play all rounds. Uses the current input and rounds values.
OUTPUT
Hash Output
Result is 128 hex chars = 512 bits, split into 8 coloured 64-bit word chunks. Avalanche section shows all 512 bits in binary.
// Rudra-512 Digest (128 hex chars = 512 bits)
How It Works
// Rudra-512 processes input in 64-byte blocks through four distinct phases
STEP 01
Salt Prepend
If a salt is provided, it is prepended to the input before any processing. This ensures different digests for same inputs with different salts.
data = salt + input
STEP 02
Padding
Input is padded to a multiple of 64 bytes. A 0x80 byte is appended, then zeros, then the 64-bit little-endian message length.
msg || 0x80 || 0x00... || len64
STEP 03
State Init
8 × 64-bit words initialised with fixed constants. These alternating-pattern constants seed the state with high entropy.
s[0] = 0x123456789abcdef0 s[7] = 0x8877665544332211
STEP 04
Block Absorption
Each 64-byte block is split into 8 little-endian 64-bit words. Each word is XORed into the corresponding state word.
state[j] ^= word_j(block)
STEP 05
Permutation
For each round, every state word is: XORed with a rotated neighbour, added to another neighbour, then rotated by 17. Runs ×rounds per block.
s[i] ^= rotl(s[(i+1)%8], (i+1)*7) s[i] += s[(i+2)%8] s[i] = rotl(s[i], 17)
STEP 06
Finalisation
After all blocks, one final permutation runs for ⌊rounds/2⌋ rounds. The 8 state words are serialised to 128 hex characters.
permute(state, rounds/2) digest = hex(s[0..7])
Single Round Animation

Watch how state[i] transforms through XOR → rotate → add → rotate in each round

Round 0 / 8 words
Click "Step Forward" to start the permutation animation
1-Bit Change → ~50% Different Output

Change a single character — observe how ~50% of output bits flip. This is Rudra-512's hallmark security property.

Rudra-512 vs SHA-512 vs SHA3-512
Algorithm Frequency Runs Entropy Avalanche Speed (h/s) Collisions
Rudra-512 49.89% 0.5006 0.999997 50.18% 117,536 None
SHA-512 49.71% 0.4998 0.999977 49.72% 459,841 None
SHA3-512 49.81% 0.4999 0.999990 50.14% 427,948 None

* Rudra-512 is intentionally slower to resist GPU brute-force attacks.
* Frequency closer to 50% = better bit balance. Entropy closer to 1.0 = more unpredictable.

512-bit output Salt support Configurable rounds File hashing Python bindings Node.js bindings CLI tools Data integrity Password hashing Content addressing Blockchain Deduplication