512-bit · Custom Cryptographic Hash · v3 Hardened · 3D Edition

RUDRA-512

// Inspired by Lord Shiva · Built in C++ · 512-bit digest · BPE Tokenization · Embedded Salt · Asymmetric Rotations

512Bit Output
8×64State Words
32Default Rounds
~50%Avalanche
128Hex Chars
// Rudra-512 v3 Digest — 128 hex chars = 512 bits
How It Works — v3
// Rudra-512 v3 processes input through eight hardened phases with novel cryptographic constructions
STEP 01 · [NC4]
BPE-Inspired Tokenization
Input tokenized before hashing. Variable-length tokens based on frequency analysis. Prevents trivial bit-pattern manipulation attacks.
seed = simple_hash(input) token_len = 1 + ((seed >> 8) % 16) tokens = split(input, token_len)
STEP 02 · [NC5]
Embedded Salt Positioning
Salt embedded at a deterministic position, not prepended. Position computed from hash(salt) + hash(input). Prevents prefix attacks and dictionary attacks.
pos = (hash(salt) + hash(input)) % (total_len - salt_len) embed salt at pos in stream
STEP 03 · [NC6]
State Whitening
After initial state setup, perform one pre-absorption permutation. Ensures input-independent initialization diverges from v3. Prevents IV-recovery attacks.
init_state(rounds, salt_hash) whiten_state(s) // 2 rounds // diverges before any input
STEP 04 · [NC7]
Asymmetric Rotations
Rotation schedule includes per-word asymmetric offsets. Word-round dependent rotations increase diffusion rate dramatically.
rot = (ROUND_ROT[(i*5+r*9)%64] + (i ^ r)) % 64 v = rotl64(v, rot) // asymmetric
STEP 05 · [NC8]
Variable Block Order
Block indices XORed with hash(salt) before use in tweak. Prevents block reordering attacks and sequential block exploits.
obf_idx = block_idx ^ salt_hash tweak = rotl(obf_idx + j + s[j], ROT[j%8])
STEP 06 · [C1]
Non-linear Absorption
State-dependent tweak: s[j] placed inside rotl argument — algebraically non-cancellable. Prevents meet-in-the-middle attacks.
tweak = rotl(obf_idx+j+s[j], ROT[j]) s[j] ^= word ^ tweak
STEP 07 · [C3]
Snapshot Permutation
Full state snapshot per round eliminates sequential-update asymmetry. Period-64 rotation schedule per word for maximum diffusion.
old = s[:] v = old[i]^rotl(old[(i+mix)%8],ROT[i]) v = rotl(v, ROUND_ROT[(i*5+r*9)%64]+(i^r)) s[i] = v
STEP 08 · [C2]
Finalisation
After all blocks absorbed: final permutation for full round count (min 1). State serialised as 16-char zero-padded hex — 128 chars total.
permute(state, rounds) digest = hex(s[0..7]) // 128 chars
Round-by-Round Animation

Steps through the exact operations of the v3 permute() function with asymmetric rotations. Hash shown here matches output above exactly.

Phase:  |  Round:  |  Word:  |  Op:
Click "Step Forward" to begin stepping through the Rudra-512 v3 pipeline
1-Bit Change → ~50% Different Output

Modify a single character and watch ~50% of bits flip. Changed bits shown in orange.

Rudra-512 v3 vs SHA-512 vs SHA3-512
AlgorithmBit FreqRunsEntropyAvalancheSpeed (h/s)Collisions
Rudra-512 v3 50.0254%0.5002701.000000 50.1301%142,500None
SHA-512 49.7373%0.5021090.999980 49.7192%860,149None
SHA3-512 49.6582%0.4965821.000000 50.1404%653,170None

* v3 slower than v3 — BPE tokenization + state whitening add overhead, intentional for GPU brute-force resistance.
* v3: Adds NC4 BPE tokenization, NC5 embedded salt positioning, NC6 state whitening, NC7 asymmetric rotations, NC8 variable block order.

512-bit outputBPE Tokenization Embedded SaltState Whitening Asymmetric RotationsBlock Obfuscation Configurable roundsFile hashing Python bindingsNode.js bindings CLI toolsData integrity v3 HardenedSnapshot Permutation Period-64 RotationsNon-linear Absorb