Cryptographically correct way to roll a giveaway winner I'm looking to create a fair selection of a giveaway winner, but I am versed enough in cryptography theory to determine if the below would hold up to public scrutiny if published on github.
The reason I am not using random.choice is for a &quot;suspense&quot; factor, where participants will be removed one by one until only one is left. I first shuffle the list, then pick random participant entries to remove.
Can someone who is well versed on this topic maybe give me some pointers or tell me I am doing it completely wrong?
from Cryptodome.Random import random

    def __init__(self) -&gt; None:
        &quot;&quot;&quot;Initialize object.&quot;&quot;&quot;

        self._participants = {}

    def roll(self) -&gt; List[str]:
        winners = []
        logs = []

        for participant, entries in self._participants.items():
            for _ in range(entries):
                winners.append(participant)

        random.shuffle(winners)
        while len(winners) &gt; 1:
            remove_entry = random.randint(0, len(winners) -1)
            del winners[remove_entry]
   
        return logs

    def add(self, name: str, entries: int):
        &quot;&quot;&quot;Add an entry.&quot;&quot;&quot;
        self._participants[name] = entries
It looks mostly sound.
Why are you returning logs?
It is initialized to [] but never written to after that.
Are you aware of Crypto.Random.random.sample(population, k)?