Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Idea of a little simple lottery system with hash
5 points by keepworking on May 9, 2024 | hide | past | favorite | 2 comments
I just came up with the idea of a little simple lottery system with hash.

{Time of purchase of lottery } + {lottery number} + {buyer id} +...

The above form is listed each time the buyer continues to be added, and the winner's lottery number is derived from the hashing value of the data.

I think it is difficult to manipulate because it does not require the reliability of any random number generator and because the participants provide random numbers.

I don't think the hardware resources will be big, and I think it's a pretty easy way to implement and for participants to verify, so can you give me some advice?




This isn't specified well enough to get detailed criticism. I don't know what you're hashing exactly but I think it includes purchase time. Depending on resolution of {Time of purchase of lottery} it might be very easy to manipulate.


The idea was to list participants' purchase information in a byte array and hash them. I thought that the more participants there were, the more difficult it would be to induce the desired hash value to come out.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: