We are developing a lottery platform, and we are discussing what the best way to implement it would be.
As we have it right now, the system pre-generates, using a TRNG device, all the winning numbers for the day (about 400) and store it encrypted in a database table. Then, at the specific time that the draw is to be executed, the platform chooses, sequentially, the winning number that was pre-generated and presents it to the clients that are awaiting for the draws.
Some of us are not too sure of this approach, and worry that whoever has access to the server where the database is hosted will be able to see what the winning draws for the day are. They believe that generating the random number on the spot is the only way to go, but I wonder if pre-generating them and encrypting the numbers is secure enough.
It is my belief, that if somebody has access to our server we will have bigger problems than just that, as we have other APIs running there that are of crucial importance to the operation of our business, and that we should focus on hardening the server against intruders.
I would like to know what the best approach would be in this situation.