How To Install python-spake2 on Debian 9

In this tutorial we learn how to install python-spake2 on Debian 9. python-spake2 is SPAKE2 password-authenticated key exchange (pure python)

Introduction

In this tutorial we learn how to install python-spake2 on Debian 9.

What is python-spake2

python-spake2 is:

This library implements the SPAKE2 password-authenticated key exchange (“PAKE”) algorithm. This allows two parties, who share a weak password, to safely derive a strong shared secret (and therefore build an encrypted+authenticated channel).

A passive attacker who eavesdrops on the connection learns no information about the password or the generated secret. An active attacker (man-in-the-middle) gets exactly one guess at the password, and unless they get it right, they learn no information about the password or the generated secret. Each execution of the protocol enables one guess. The use of a weak password is made safer by the rate-limiting of guesses: no off-line dictionary attack is available to the network-level attacker, and the protocol does not depend upon having previously-established confidentiality of the network (unlike e.g. sending a plaintext password over TLS).

The protocol requires the exchange of one pair of messages, so only one round trip is necessary to establish the session key. If key-confirmation is necessary, that will require a second round trip.

There are three methods to install python-spake2 on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install python-spake2 Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install python-spake2 using apt-get by running the following command:

sudo apt-get -y install python-spake2

Install python-spake2 Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install python-spake2 using apt by running the following command:

sudo apt -y install python-spake2

Install python-spake2 Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install python-spake2 using aptitude by running the following command:

sudo aptitude -y install python-spake2

How To Uninstall python-spake2 on Debian 9

To uninstall only the python-spake2 package we can use the following command:

sudo apt-get remove python-spake2

Uninstall python-spake2 And Its Dependencies

To uninstall python-spake2 and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove python-spake2

Remove python-spake2 Configurations and Data

To remove python-spake2 configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge python-spake2

Remove python-spake2 configuration, data, and all of its dependencies

We can use the following command to remove python-spake2 configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge python-spake2

Dependencies

python-spake2 have the following dependencies:

References

Summary

In this tutorial we learn how to install python-spake2 package on Debian 9 using different package management tools: apt, apt-get and aptitude.