Reverse Engineering Mersenne Twister with Linear Algebra

Mersenne Twister (MT)은 좋은 통계적 특성을 가진 PRNG이지만 암호학적으로는 안전하지 않다. 이 글은 MT의 내부 상태를 출력값으로부터 선형대수를 이용해 복원하는 방법을 설명한다. MT의 tempering 과정은 GF(2) 위의 선형 연산으로 표현 가능하며, 이 과정을 행렬 곱셈으로 모델링하고 역행렬을 구해 tempering의 가역성을 증명한다. 이를 통해 640번의 출력 이후 내부 상태를 완전히 복원하고 이후 출력 예측이 가능함을 보인다. 비트 조작 방식이 더 효율적이지만, 선형대수 접근법은 개념적으로 더 명확하다.

https://www.johndcook.com/blog/2026/05/10/reverse-mersenne-twister/

#mersennetwister #prng #linearalgebra #galoisfield #cryptography

Reverse engineering Mersenne Twister with Linear Algebra

The Mersenne Twister is unsuitable for cryptography because its internal state can be inferred from its output. How to compute the inverse using linear algebra.

John D. Cook | Applied Mathematics Consulting
This (Pseudo) Random Number Generator Does It With Neon

The quest for true randomness has roots in cryptography and is a rabbit hole that gets surprisingly deep with alarmingly rapidity. Still, the generation of random-enough numbers is a popular hacker…

Hackaday

What Is Random Generation?

이 글은 컴퓨터에서의 난수 생성 원리와 Property-Based Testing(PBT)에서의 난수 생성기 설계 방법을 다룹니다. 선형 합동 생성기(LCG) 같은 PRNG의 동작과 한계, 난수의 품질 평가 방법을 설명하며, 부동소수점, 불리언, 범위 제한 정수 등 다양한 난수 생성 기법을 소개합니다. 또한, 복잡한 랜덤 데이터 구조 생성을 위한 RNG 상태 관리 및 함수형 조합기(bind) 패턴을 통한 생성기 설계 방법도 다룹니다. 이는 AI 테스트 및 시뮬레이션, 데이터 생성에 필요한 난수 생성 이해에 도움을 줍니다.

https://alperenkeles.com/posts/what-is-random-generation/

#randomnumbergeneration #propertybasedtesting #prng #softwaretesting #functionalprogramming

What is random generation?

"One Number Repeated Forever: RNG in NSMB"

Apparently the coders for Nintendo Super Mario Brothers took a tried-and-true pseudo random number generator and tweaked it a little. Turns out this made it a lot worse.

https://roadrunnerwmc.github.io/blog/2020/05/08/nsmb-rng.html

#prng #programming #nsmb #algorithms

One Number Repeated Forever: RNG in NSMB

Whatever I feel like writing about.

Writings of RoadrunnerWMC

This is probably an unexpected interpretation of #genuary12, "Boxes Only", but I like how it turned out. Thinking of different uses of the term "box" in mathematical contexts, somehow I recalled the Box-Muller transformation, named after George E. P. Box and Mervin Muller, used to convert uniformly-distributed random numbers into a normal distribution. This is a visualization of the Box-Muller transform (which includes some rectangular boxes in there for good measure).

#genuary #genuary2026 #boxmuller #prng #randomvariate #randomnumber

simd-prng | devlog

Một nhà nghiên cứu đang tìm kiếm sự quan tâm đến phương pháp chọn tham số toán học của họ. Phương pháp này giúp chọn độ dài dãy, modulo, hoặc tham số generator cho các điều kiện 2^A≡1 (mod p^t). Ứng dụng trong thiết kế PRNG, căn chỉnh scrambler, và số học trường residue. Họ sẵn sàng xác minh kết quả cho các cặp (p, t) và chấp nhận thách thức tính toán phức tạp.

#mathematics #algorithm #PRNG #parameterSelection #verification #coding #python #optimization #computationalMath #research #verified #p

I was inspired to take a look at the PICO-8 RNG by some of the #RoguelikeCelebration talks, and it looks like it is unfortunately Not Good: https://www.lexaloffle.com/bbs/?pid=81103 #pico8 #prng
cursed_petri