CRACK Solution

Bit Rotator

CRACK rotate-left-1 cipher

In-game screenshot of Bit Rotator
In-game view
FamilyCRACK Graph0.245 DifficultyEasy Ring03 IDllama_rol1

Prerequisites

CLOCK GATECENTER HOLD

Unlocks

Parity Byte

Accepted input TURN
Techniquerotate-left-1 cipher Rulenonzero SampleTURN

Walkthrough

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

Reject Samples

  • TUR
  • TURNX
  • turn
  • TURM
Verifier Listing
; llama_rol1: rotate-left-1 cipher. Each input byte is rotated left by 1 bit
; (bit 7 wraps to bit 0) and compared to a stored target. To decode you rotate
; right by 1. Technique: 8-bit rotate left by 1. r0 = 1 on accept. Accept rule:
; nonzero.
;
; targets = 0xA8 0xAA 0xA4 0x9C  (each input byte rotated left 1)  ->  "TURN".

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

        mov   r7, 0
        ldb   r0, [r7]
        rol   r0, 1
        cmp   r0, 0xa8
        jnz   bad
        inc   r7
        ldb   r0, [r7]
        rol   r0, 1
        cmp   r0, 0xaa
        jnz   bad
        inc   r7
        ldb   r0, [r7]
        rol   r0, 1
        cmp   r0, 0xa4
        jnz   bad
        inc   r7
        ldb   r0, [r7]
        rol   r0, 1
        cmp   r0, 0x9c
        jnz   bad

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