CRACK Solution

Double Scramble

CRACK folded two-pass XOR (0x12 then 0x34)

In-game screenshot of Double Scramble
In-game view
FamilyCRACK Graph0.242 DifficultyEasy Ring02 IDllama_double_xor

Prerequisites

TIME DIVISION

Unlocks

CALL METERROLLING KEY

Accepted input CORE
Techniquefolded two-pass XOR (0x12 then 0x34) Rulenonzero SampleCORE

Walkthrough

Recover the accepted input below, then submit it to the CRACK verifier.

Reject Samples

  • COR
  • COREX
  • core
  • DORE
Verifier Listing
; llama_double_xor: two XOR passes (0x12 then 0x34) that fold into one. Two
; XORs in a row reduce to a single XOR with 0x12 ^ 0x34 = 0x26, so the check XORs
; each input byte with 0x26 and compares to a stored target. XOR is self-inverse.
; Technique: folded two-pass XOR. r0 = 1 on accept. Accept rule: nonzero.
;
; targets = 0x65 0x69 0x74 0x63  (after ^0x26)  ->  password "CORE".

        len   r1
        cmp   r1, 4
        jnz   bad           ; exactly 4 bytes

        mov   r7, 0
        ldb   r0, [r7]
        xor   r0, 0x26
        cmp   r0, 0x65
        jnz   bad
        inc   r7
        ldb   r0, [r7]
        xor   r0, 0x26
        cmp   r0, 0x69
        jnz   bad
        inc   r7
        ldb   r0, [r7]
        xor   r0, 0x26
        cmp   r0, 0x74
        jnz   bad
        inc   r7
        ldb   r0, [r7]
        xor   r0, 0x26
        cmp   r0, 0x63
        jnz   bad

        mov   r0, 1
        ret
bad:    mov   r0, 0
        ret