in reply to Re: Temporarily Obscuring a Lottery Draw
in thread Temporarily Obscuring a Lottery Draw

May I recommend two improvements?

someone actually bothers to try to crack it

That's *very* easy to do. Say you have "N" participants.

It's even easier than attacking passwords of length 2. Hashing the pairings is merely security theatre. You might as well MIME::Base64 them.

Replies are listed 'Best First'.
Re^3: Temporarily Obscuring a Lottery Draw
by kennethk (Abbot) on Nov 03, 2008 at 16:34 UTC
    B doesn't give to A if A gave to B the previous year

    That's an interesting one - I may implement it

    That's *very* easy to do

    The real security is chmodding the file to 600. However, there are a few people in the admin group (including myself), so the md5 is more about overhead (making someone take time to write a script) than actual security. The only truly secure choice I can see implementing is the e-mail reminder.

      The overhead is very little more than using MIME::Base64. The (untested) "decrypting" script:

      I realise this isn't a place where security is critical. I just wanted to introduce you to security thinking for future reference.

      By the way, change
      open INPUT, '<' . $participantsFile
      to
      open INPUT, '<', $participantsFile
      for free benefits. It wouldn't hurt to add at least the very simple "or die $!;".