Rating:

Tldr;

1. Assume we know the first k bits

2. Send flips to get

```

flipped = ... ? 1 1 1 1 ... 1 1 0

```

3. We know that with that set of flips the next iteration (seed + 2) will be with seed

```

if ? is 0

= ... 1 0 0 0 0 ... 0 0 0

then we end up with the k+1th bit being flipped to 1 and everything below it being zero

if ? is 1

= ..x 0 0 0 0 0 ... 0 0 0

then we flip the k+2th bit and everything below it being zero.

```

4. Then we send flips to get

```

= ... 1 0 0 0 0 ... 0 0 0

```

5. If the second one took one iteration less, then we know the k+1th bit (the ?) is 0, otherwise then the k+1th bit is 1.

Original writeup (https://ubcctf.github.io/2020/11/dragonctf2020-bitflips/).