// 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