The purpose of this project is simple, to automate the famous tradition of the secret Santa according to the following rules:
- Data extracted from a .csv file
- Sending emails
- Data protection
- Exception management (no draws within the same group)
- Possibility to store the draw
- Zero-knowledge proof
The principle and a demonstration can be found here : research paper | presentation
Contributor(s) : @StanislasMzx (Stanislas MEZUREUX) @alicelaboss (Alice ESPINOSA)
This code source is published under GPLv3 licence.
Copyright (C) 2021 Stanislas MEZUREUX - Alice ESPINOSA
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Clone this project on your laptop by executing the following command in your terminal :
git clone https://github.com/StanislasMzx/Secret-Santa-TIPE
Modify the following lines in SecretSanta.py
AMOUNT = 10
NAME = 'MPSI1 227/228'
DATE = '03/01/2022'
GMAIL_ADDRESS = '[email protected]'
GMAIL_PASSWORD = '***secret(santa)'
Remark : Gmail account allows you to send 100 emails per day via this application
The list of participants must be a csv file stored in /draw_files
and must have the following format :
Prenom,NOM,Team,email
Stanislas,MEZUREUX,BlueTeam,[email protected]
Alice,ESPINOSA,RedTeam,[email protected]
Remark : if no conditions are set, give each participant the same team name (e.g. noTeam).
Remark : do not delete the first line, it is part of the csv format.
from SecretSanta import *
input_file = 'draw_files/data.csv' # path of data
Secret_Santa(input_file) # will export the ciphered print to /draw_files
They are required for zero-knowledge proof and resend of draw.
Draw path must be /draw_file/secret_santa_draw.py
from SecretSanta import *
zero_knowledge_proof(secret_key, public_key) # keys returned by step 4
Draw path must be /draw_file/secret_santa_draw.py
from SecretSanta import *
resend(secret_key, public_key, draw_file) # keys returned by step 4
Stanislas MEZUREUX - [email protected]
Alice ESPINOSA - [email protected]