$ cat writeup.md…
$ cat writeup.md…
Securinets CTF Quals 2026
Task: an 8-bit calculator JSON service hides an affine map F and asks for F(r) in 16 one-shot rounds. Solution: bypass the int-only bit_length check with floats, pack five memory cells into one IEEE-754 double, then recover y=a*x+b from two pairs.
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
We had a 4-bit calculator capable of performing simple operations and storing their results. My little brother kept repeating the same operation until its tiny memory was full. Luckily, I managed to upgrade it to 8 bits, giving it 200 bytes of memory: 100 bytes for inputs and 100 bytes for results. There's just one catch: the calculator erases its entire history as soon as I display the results. Can you figure out what he was doing before it's too late?
English summary: a TCP service exposes a tiny virtual calculator driven by JSON requests. It holds two arrays, x (inputs) and y (results) of 100 cells each, supports add, mult, add_const, mult_const, and a submit operation that reveals one cell. A hidden affine function F maps the x cells to the y cells (y = F(x)). Each connection plays 16 rounds; every round the memory is regenerated, a new secret is chosen, and exactly one submit is allowed before the state is destroyed. To pass a round you must answer F(r) for a random r chosen by the server.
...
$ grep --similar