CRACK Solution

Three Locks

CRACK multi-phase defuse

In-game screenshot of Three Locks
In-game view
FamilyCRACK Graph0.280 DifficultyEasy Ring03 IDz1_three_phase

Prerequisites

TWIN RAILS

Unlocks

Index XOR

Accepted input RUST2024
Techniquemulti-phase defuse Rulenonzero SampleRUST2024

Walkthrough

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

Reject Samples

  • RUST202
  • RUST2024X
  • rust2024
  • RUST2025
  • GUST2024
Verifier Listing
; z1_three_phase: Three Locks. A multi-phase defuse with three sequential
; gates. Fail any one and you are rejected before reaching the next, so all three
; must pass at once. r0 = 1 on accept (nonzero rule).
;
;   Phase 1: length must be exactly 8.
;   Phase 2: the first 4 chars are "RUST" (direct compares 0x52,0x55,0x53,0x54).
;   Phase 3: the last 4 chars each XOR'd with 0x10 equal { 0x22,0x20,0x22,0x24 }
;            -> decodes to "2024".
; Answer: RUST2024

        ; --- phase 1: length gate ---
        len   r1
        cmp   r1, 8
        jnz   bad

        ; --- phase 2: literal prefix "RUST" ---
        mov   r7, 0
        ldb   r0, [r7]
        cmp   r0, 0x52      ; 'R'
        jnz   bad
        inc   r7
        ldb   r0, [r7]
        cmp   r0, 0x55      ; 'U'
        jnz   bad
        inc   r7
        ldb   r0, [r7]
        cmp   r0, 0x53      ; 'S'
        jnz   bad
        inc   r7
        ldb   r0, [r7]
        cmp   r0, 0x54      ; 'T'
        jnz   bad

        ; --- phase 3: XOR-encoded suffix "2024" ---
        inc   r7
        ldb   r0, [r7]      ; input[4]
        xor   r0, 0x10
        cmp   r0, 0x22      ; '2'
        jnz   bad
        inc   r7
        ldb   r0, [r7]      ; input[5]
        xor   r0, 0x10
        cmp   r0, 0x20      ; '0'
        jnz   bad
        inc   r7
        ldb   r0, [r7]      ; input[6]
        xor   r0, 0x10
        cmp   r0, 0x22      ; '2'
        jnz   bad
        inc   r7
        ldb   r0, [r7]      ; input[7]
        xor   r0, 0x10
        cmp   r0, 0x24      ; '4'
        jnz   bad

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