All PryIDA examples

PUBLIC EXERCISE / ELF X86-64

r6 · Cancel the repeated XOR

Simplify a three-pass calculation into one XOR per input byte.

Original puzzle at the reviewed revision · All five public exercises

Original SHA-256 26536db255eefb48b3171df80cdde772e43b3c587a0f1d5fa160b82ae93d926f

01 Identify and open the file

Open r6, select File Details, and confirm the fingerprint before using any offsets. Analyze main and check_password with REA.

PryIDA File Details and Hex for r6.
PryIDA File Details and Hex for r6.

02 Separate input length from the score

Check the main call and read check_password. The function first requires 0x15, or 21, bytes. The loops then calculate a total. Main takes the success branch when that total is zero.

PryIDA Pseudocode for main in r6.
PryIDA Pseudocode for main in r6.

03 Count exactly how many bytes the loop visits

The stop test includes the final index, so each inner loop visits 43 positions. The index wraps every 21 bytes. Forty-three is two trips around the input plus one more byte at the starting position. With XOR, applying the same byte twice cancels it. Each inner loop therefore contributes just that starting byte.

PryIDA Pseudocode for check_password in r6.
PryIDA Pseudocode for check_password in r6.

04 Read the first table

At virtual address 0x601050, follow key1 to its file bytes. A virtual address is where the instruction expects the table in memory. A Hex offset is its position in the file. Use the listed offset when jumping in Hex.

Hex offset 0x1050 · Virtual address 0x601050 · 21 bytes

PryIDA Hex selection at 0x1050 in r6.
PryIDA Hex selection at 0x1050 in r6.

05 Read the second table and combine the rules

Follow key2 at 0x601070. The three identical input passes leave one input byte after pairs cancel. The contribution for position i is input[i] XOR key1[i] XOR key2[i]. Since the 21 contributions are nonnegative and their sum fits easily in the accumulator, a total of zero requires every contribution to be zero.

Hex offset 0x1070 · Virtual address 0x601070 · 21 bytes

PryIDA Hex selection at 0x1070 in r6.
PryIDA Hex selection at 0x1070 in r6.

06 Solve one position and replay all 21

At position zero, 0x10 XOR 0x74 is 0x64, the letter d. Repeat the calculation at each position. The independent replay uses the full three-loop form and confirms that all 21 contributions, and their sum, are zero.

Hex offset 0x6da · Virtual address 0x4006da · 7 bytes

PryIDA Hex selection at 0x6da in r6.
PryIDA Hex selection at 0x6da in r6.
Reveal the solution

dude_you_killed_it_gg

The replay reads the original ELF bytes and applies the recovered check to this input. Open the receipt for the exact byte ranges and verification values.

Evidence receipt · Python checker replay