Skip to content

dalctf 2026

LCG Seed Squared

Crypto challenge from DALCTF 2026.

Challenge Description:

I've been messing around with LCGs recently. I've forgotten the seed but I can remember I took something squared...

i checked the source and saw that each output was made with t = ord(flag[i]) * x

the flag format was DalCTF{...} so i used the first output with the first character D

text

71303168 / ord('D') = 71303168 / 68 = 1048576

that gave the first state

text

x0 = 1048576

then i verified it with the rng

text

rng(1048576) = 85084641
8253210177 / ord('a') = 85084641

that confirmed the state recovery was correct

after that i generated the full state sequence and divided each output by its matching state to recover each character

Flag

DalCTF{533m1ng1y_r4nd0m1y_g3n3r473d_num63rs}

Discussion

Loading discussion…

Related solves

Keep reading

Complete archive