Cracking Python’s Random Module: Exploiting Linearity in the Mersenne Twister
Published:
Python’s random isn’t random enough. Solving linear equations to predict Mersenne Twister outputs with partial state knowledge by exploiting the linearity in the Mersenne Twister PRNG. The challenge is taken from Cyber Jawara 2024 Finals and actually consist of two different challenge. The solution to this challenge was inspired by this writeup.

Saya bermain dengan tim
This July 2025, I had the incredible opportunity to participate in the CIMPA Research School on “Arithmetic in Action: Number Theory and its Applications to Cryptography and Coding Theory” held at Universitas Gadjah Mada in Yogyakarta, Indonesia. As a cryptography enthusiast, this experience was amazing and really opened my mind to the deep mathematical foundations underlying modern cryptographic systems.
Some problems I solved at IMC 2024. My approaches sometimes differ from the official solutions, but the math still works out. You can find the official solutions for Day 1 and Day 2 at the following links: