Skip to content

Automation of Secret Santa - TIPE 2021-2022 - MP - Lycée Henri POINCARÉ - Stanislas MEZUREUX - Alice ESPINOSA

License

Notifications You must be signed in to change notification settings

StanislasMzx/Secret-Santa-TIPE

Repository files navigation

Secret Santa - TIPE

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)

Licence

GPLv3 license

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/>.

Usage

1 - Clone the project

Clone this project on your laptop by executing the following command in your terminal :

git clone https://github.com/StanislasMzx/Secret-Santa-TIPE

2 - Configure email

Modify the following lines in SecretSanta.py

AMOUNT = 10
NAME = 'MPSI1 227/228'
DATE = '03/01/2022'
GMAIL_ADDRESS = 'secret.santa.tipe@gmail.com'
GMAIL_PASSWORD = '***secret(santa)'

Remark : Gmail account allows you to send 100 emails per day via this application

3 - Check the data input format

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,stanmzx@gmail.com
Alice,ESPINOSA,RedTeam,stanmzx@gmail.com

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.

4 - Make a draw

from SecretSanta import *

input_file = 'draw_files/data.csv' # path of data

Secret_Santa(input_file) # will export the ciphered print to /draw_files

⚠️ WARNING : Remember to store the public key and the private key.

They are required for zero-knowledge proof and resend of draw.

5 - Zero-knowledge proof

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

6 - Resend the draw

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

Contact

Stanislas MEZUREUX - stanmzx@gmail.com

Alice ESPINOSA - alice.espinosa29@gmail.com

About

Automation of Secret Santa - TIPE 2021-2022 - MP - Lycée Henri POINCARÉ - Stanislas MEZUREUX - Alice ESPINOSA

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages