I'm working on a programming language that's intended to compile to retro hardware, and I want to add a PRNG to the specification. Ideally, this would be both standard (easy to find specifications for) and cryptographically secure. This won't be used for anything actually security-critical—including a Commodore 64 in any system that needs to be secure seems like a terrible idea—but being cryptographically secure means it automatically satisfies all statistical randomness tests, like the next-bit test.
The easiest solution (that I can see) would be a XOF, but even small ones like Ascon are infeasible to compute on retro hardware. But, Ascon is also designed to be secure by modern standards, which is a much higher threshold than I actually need.
Are there any (probably older/outdated) XOFs that are feasible to calculate on 16-bit hardware—or ideally, even 8-bit—that satisfy the next-bit test? Again, this will not actually be used for anything security-related, but if I'm building a specific PRNG into the language specification, I want it to be a good one that passes statistical tests.
EDIT: Some more details:
- This is a language intended for writing games in, so security isn't a concern at all—I don't doubt that a dedicated attacker nowadays could break any security implemented on a C64 or Amiga!
- But related languages have suffered from poor-quality PRNGs making games unbeatable, because e.g. looking at the lowest bits of the initial output makes a certain random event never occur or always occur. So passing statistical randomness tests is my biggest concern, and using a CSPRNG (even an outdated one) seems like the easiest way to do that.
- Right now, I'm starting with a 16-bit system with 64 KiB of RAM. It would be nice to eventually get it working on 8-bit systems like the Commodore, but I'm starting with less constraints to make sure it can work at all. So the problem with Ascon is how long it takes to do the permutations, not storing the state in between.