Skip to content

Solver for glibc type 3 random()

License

BSL-1.0, BSL-1.0 licenses found

Licenses found

BSL-1.0
LICENSE
BSL-1.0
LICENSE_1_0.txt
Notifications You must be signed in to change notification settings

surrealwaffle/predicting-random

Repository files navigation

predicting-random

Solver for glibc type 3 random()

Building

This project can be built using CMake.

cmake -B build
cd build
cmake --build .

This project requires a C++20 compiler, mostly for concepts and some basic standard library features.

This project provides two targets:

  • predicting-random-solver, the library portion of the project; and,
  • predicting-random-tester, which verifies the solver from the library portion of the target against a given seed.

Critical portions of the code can be auto-vectorized. If you are benchmarking the code, it is recommended to compile on -O3 and -O2 with g++ and clang++, respectively.

How It Works

The structure of glibc LFSR-based random() allows one to observe output from random() and build a system of linear equations which can be used to solve for the state of the PRNG. For more details, see the preamble of the file solver.hpp.

About

Solver for glibc type 3 random()

Resources

License

BSL-1.0, BSL-1.0 licenses found

Licenses found

BSL-1.0
LICENSE
BSL-1.0
LICENSE_1_0.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published