# Cracking simple LCG PRNG

DevFeed: [Cracking simple LCG PRNG](<https://devfeed.tech/articles/cracking-simple-lcg-prng-20542.md>)

Original publisher: [Read original article](<https://yurichev.com/blog/LCG/>)

Published: 2017-03-01T23:00:00Z

Content type: tutorial

Language: en

Sources: [Dennis Yurichev](<https://devfeed.tech/sources/dennis-yurichev.md>)

Topics: [Security](<https://devfeed.tech/topics/security.md>), [MSVC](<https://devfeed.tech/topics/msvc.md>), [Code](<https://devfeed.tech/topics/code.md>), [Unix](<https://devfeed.tech/topics/unix.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [msvc](<https://devfeed.tech/tags/msvc.md>), [security](<https://devfeed.tech/tags/security.md>), [unix](<https://devfeed.tech/tags/unix.md>)

## AI overview

This article demonstrates how to recover the 32-bit state of an MSVC rand()-based linear congruential generator from observations of a color-lines game. It uses brute force to predict future ball placements and explains why LCGs are unsuitable for security-sensitive randomness.

## Source excerpt

Cracking simple LCG PRNG