CRACK Solution
Unique Keys
CRACK per-position XOR key array

Prerequisites
Unlocks
LINK
Techniqueper-position XOR key array
Rulenonzero
SampleLINK
Walkthrough
Recover the accepted input below, then submit it to the CRACK verifier.
Reject Samples
- LIN
- LINKX
- link
- MINK
Verifier Listing
; llama_multi_key: per-position XOR key array, the powers of two. Position i is
; XORed with key[i] = {0x01,0x02,0x04,0x08} and compared to a stored target. XOR
; is self-inverse. Technique: per-position XOR key array. r0 = 1 on accept.
; Accept rule: nonzero.
;
; targets = 0x4D 0x4B 0x4A 0x43 -> password "LINK"
; 'L'^0x01=0x4D, 'I'^0x02=0x4B, 'N'^0x04=0x4A, 'K'^0x08=0x43
len r1
cmp r1, 4
jnz bad ; exactly 4 bytes
mov r7, 0
ldb r0, [r7]
xor r0, 0x01
cmp r0, 0x4d
jnz bad
inc r7
ldb r0, [r7]
xor r0, 0x02
cmp r0, 0x4b
jnz bad
inc r7
ldb r0, [r7]
xor r0, 0x04
cmp r0, 0x4a
jnz bad
inc r7
ldb r0, [r7]
xor r0, 0x08
cmp r0, 0x43
jnz bad
mov r0, 1
ret
bad: mov r0, 0
ret