PCG is a family of simple, fast, space-efficient, statistically excellent pseudorandom number generators developed by Melissa O’Neill. This implementation uses 128-bit state with RXS-M-XS permutation outputting 64-bit values, combining a linear congruential generator with output mixing for excellent statistical properties.
| Property | Value |
|---|---|
| Category | Random Number Generators |
| Sub-category | Pseudorandom Number Generator |
| Security status | 🎓 Educational Only |
| Complexity | Intermediate |
| Inventor | Melissa E. O’Neill |
| Year | 2014 |
| Origin | 🇺🇸 United States |
| Source | algorithms/random/pcg.js |
| Parameter | Supported values |
|---|---|
| Seed sizes | 8 bytes (64 bits) to 16 bytes (128 bits) in steps of 8 bytes |
| Flag | Value |
|---|---|
IsDeterministic |
Yes |
IsCryptographicallySecure |
No |
Status: 🎓 Educational Only
No vulnerabilities are recorded for this implementation.
1 vector ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 — PCG64 seed=0, first 9 x 64-bit outputs (Abseil golden vector)
| Field | Value |
|---|---|
seed |
0000000000000000 |
outputSize |
72 |
input |
null |
expected |
01070196e695f8f1703ec840c59f4493 e54954914b3a44fa96130ff204b9285e 7d9fdef535ceb21a666feed42e1219a0 981f685721c8326fad80710d6eab4dda e202c480b037a029 |