Secret Santa protocol by Tom 7!
Phase 1
Decide on an ordering for the players P
1, P
2,
... P
n. The player P
n is the distinguished
"Chair." They have a special job so it should be someone who knows
how to do this right! The Chair starts things off:
The Chair
On the
keygen tab,
the Chair generates a
session key pair. This consists of a
private key and a
public key. Both of these are just numbers.
They copy the session private key somewhere safe, and write down
that it's the session key so that they don't mix it up with
something else. They publish the session
public
key to the e-mail thread for everyone to see.
Everybody
Everybody generates a
personal key pair, which they
do on the
keygen
tab. They copy their
personal private key
somewhere safe, noting that it's their own private key (keeping
it straight from the session key, for example). They never share
this. The public key is a pseudonym, so revealing it outside
the protocol would give away your identity and is forbidden!
Thrilled to be following such strict rules, the players
get excited to participate in the chain mail, if they want.
Chain mail
The goal of the chain mail is to get all of the public keys
to the Chair without the Chair knowing who anybody is.
All the
personal public keys shared at
this point are encrypted with the
session
public key.
A player can encrypt their key on the
encrypt tab.
The keys are just numbers, so you need to encrypt them as
numbers (the box on the right) not as base-100 text (the box
on the left). Use the session public key
in the box on the top, and paste your personal
public key in the box on the right. The
encrypted key is the pair of big numbers
separated by a comma in the box on the bottom.
P1 sends the first message.
A message is sent privately from one person to the next, in the
order decided upon at the beginning. The message contains the set
of encrypted public keys. For Player Pk, they see
encrypted keys from
P1, P2, ... Pk-1. The player
adds their own encrypted key, and
shuffles the list (perhaps using the
util tab). They
pass (only) the list to the next player.
If a player breaks the e-mail chain then the dead girl comes out
of the TV, which is really bad news. Don't let that happen!
The Chair, Pt. 2
The chair receives the list of the
encrypted
keys last. They can add their
encrypted
key to the list if they want to feel what it's like to be
a regular participant, but there's not much point because their
next job is to decrypt each of the
encrypted
keys to get the
public keys for each
player. They do this on the
decrypt.
They decrypt each
message individually,
always using the
session private key.
The decrypted
personal public keys are
the numeric plaintexts, not the base-100 decoded "message," which
should look like gibberish unless hackers are afoot.
Once the Chair has all the decrypted public keys,
they add their personal public key to this
list and sort it numerically in ascending order (perhaps using the
util tab).
They publish this list of numbers to the e-mail thread for
everyone to see.
We are done with the session key now, and the Chair no longer has
a special role. Everything else happens with the personal keys.
Phase 2
Everybody
Next, everybody needs to make sure their
public key
is part of that list. They shouldn't ever reveal which one is theirs.
They should just say something like "Looks good!" or "Mine isn't on
the list!" If the Chair is competent and nobody is messing around, then
everybody's public key should be on that sorted list, and the number
of keys should be correct as well.
Informing your Santa
Each player should find their own
public key
in the list. The entry
before them is their Santa. (The
first entry wraps around to find their Santa as the last entry.)
They don't know who this is, but they can send them a message.
Using their Santa's public key, the player
encrypts a text message. They do this on the
encrypt tab,
this time using the
text (base 100) entry form. The message should contain the
player's own name and mailing address (or other instructions, like
P.O. box, etc.). It can also contain hints about what you like,
or holiday cheer. They publish (only) the encrypted
message to the e-mail thread. They don't mention the public
key (this would give away their own identity).
Becoming Santa
Each participant sees all of these
encrypted
messages on the thread. They try decrypting each one using
their own
personal private key on the
decrypt tab. All
but one of these will "decrypt" to gibberish, but one should
contain the message from their Santee.
As a final check: Only after all the messages have been sent,
participants should check that there are n messages, and everybody
should confirm that they decrypted exactly one message.