CRACK Solution
ROLLING KEY
CRACK rolling add cipher

Prerequisites
Unlocks
ABCDEF
Techniquerolling add cipher
Rulenonzero
SampleABCDEF
Walkthrough
Recover the accepted input below, then submit it to the CRACK verifier.
Verifier Listing
; t04_rolling: rolling additive cipher, checked in a LOOP. Each input byte has
; had its own position added to a constant base: input[i] = (BASE + i) & 0xFF.
; The check subtracts the position back off and confirms every byte decodes to
; the same BASE (0x41 = 'A'). Technique: position-dependent (rolling) key + a
; counted loop over the input. r0 = 1 on accept. Accept rule: nonzero.
;
; sample "ABCDEF": 0x41 0x42 ... 0x46, each (byte: index) == 0x41.
len r2 ; r2 = length
cmp r2, 6
jnz bad ; fixed-length puzzle: exactly 6 bytes
mov r7, 0 ; r7 = index / input offset
loop: cmp r7, r2
jge ok ; reached the end with no mismatch -> accept
ldb r0, [r7] ; r0 = input[r7]
sub r0, r7 ; subtract the position (the rolling key)
cmp r0, 0x41 ; must decode to BASE
jnz bad
inc r7
jmp loop
ok: mov r0, 1
ret
bad: mov r0, 0
ret