Lab 07 - Whatsapp End-to-end Encryption

In this lab you will implement a simplified version of the Signal Protocol, which is the basis for WhatsApp's end-to-end encryption.

The first versions of Whatsapp protocol were described here. A more recent document is available here. WhatsApp's security is based on the Signal protocol, which was first used by TextSecure. The Signal protocol is described in detail in this paper.

For the Elliptic Curves, you can use this library.

For installation, follow these steps (NOTE: you can use your fep instance via Python3 environments):

  • Install the necessary tools (not necessary on fep):
sudo apt install build-essential python3-dev
sudo apt install python3-pip
  • Use wget to download the required zip (find it below)
  • Create a Python3 environment, make sure PyPI is up to date and install the required packages:
python3 -m venv create env
source ./env/bin/activate
pip install --upgrade pip
pip install cryptography donna25519

If local installation does not work, use your fep instance.

Task

Find the required zip here - lab07.zip.

Create a common master_secret for two clients which communicate through a server. (TODO 1.1 & TODO 1.2) Print it on both clients and make sure they both have the same secret.

How to run

Open three different terminals.

First terminal (start the server):

python main_server.py

Second terminal (start the first client and enter RECV mode:

python main_client.py
RECV

Third terminal (start the second client and send a message):

python main_client.py
MSG <id_other_client> Hello!
ac/laboratoare/07.txt · Last modified: 2024/11/14 13:05 by dimitrie.valu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0