CRACK Solution

Barrel Roll

CRACK rotate-left-3 cipher

In-game screenshot of Barrel Roll
In-game view
FamilyCRACK Graph0.248 DifficultyEasy Ring03 IDllama_rot3

Prerequisites

Magic Sum

Unlocks

Rolling Key

Accepted input WARP
Techniquerotate-left-3 cipher Rulenonzero SampleWARP

Walkthrough

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

Reject Samples

  • WAR
  • WARPX
  • warp
  • XARP
Verifier Listing
; llama_rot3: ROL-3 cipher. Each input byte is rotated left by 3 bits and
; compared to a stored target. To decode you rotate right by 3. Technique: 8-bit
; rotate left by 3. r0 = 1 on accept. Accept rule: nonzero.
;
; targets = 0xBA 0x0A 0x92 0x82  (each input byte rotated left 3)  ->  "WARP".

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

        mov   r7, 0
        ldb   r0, [r7]
        rol   r0, 3
        cmp   r0, 0xba
        jnz   bad
        inc   r7
        ldb   r0, [r7]
        rol   r0, 3
        cmp   r0, 0x0a
        jnz   bad
        inc   r7
        ldb   r0, [r7]
        rol   r0, 3
        cmp   r0, 0x92
        jnz   bad
        inc   r7
        ldb   r0, [r7]
        rol   r0, 3
        cmp   r0, 0x82
        jnz   bad

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