A recent series of newspaper articles in my local area details the schemes of a guy named Eddie Tipton who at one time headed the IT department for the Multi-State Lottery Association. He planted extra code in the lottery systems that made it possible to predict future drawings on certain dates, and he and some of his relatives scammed these lotteries out of several million dollars by being provided this inside information. Tipton has been convicted for these crimes. One article describes Tipton's methods; and another article quotes Tipton as saying that lotteries are still fatally flawed -- a claim vehemently denied by lottery officials, claiming they now have security processes that are "100 times better;" but given Tipton's "expertise," I am inclined to believe he knows what he's talking about.
So my question is: What can be done, in the way of coding and administering a lottery system's random-number generator(s), to provide a high level of reassurance that the system is fair and cannot be or have been invaded by scammers, either inside or outside of the lottery-administering organization? There are obvious things like maintaining physical security of the system, but I'm talking specifically about dealing with the fact that pseudo-random number algorithms are inherently deterministic, albeit chaotic. So we need to ensure that there is no way to rig it or to predict in any way the sequence that is generated. I have a few ideas of my own, but I'll hold on to them for a while.
I want to emphasize that I am asking about quality by design, not by inspection. No post-hoc testing will answer this. Once those numbers are generated, it's too late to ask questions about the integrity of the system. The system must already exist to ensure that the next numbers drawn can be trusted by all regulators and by the public as coming from a fair process.