Install argon2 on Raspberry Pi

The argon2 is a command line tool which enables to generate the Argon2 cryptographic hash that commonly used for password hashing.

This tutorial demonstrates how to install argon2 on Raspberry Pi.

Install argon2

Connect to Raspberry Pi via SSH and update the package lists:

sudo apt update

Install argon2:

sudo apt install -y argon2

Testing argon2

In order to generate hash for given password using salt, execute the argon2 command:

echo -n "Hello" | argon2 mysalt0123456789 -k 65536 -t 4 -p 2 -e

Command options affects hash generation:

  • -k - defines maximum memory usage in kibibytes.
  • -t - defines the number of iterations.
  • -p - defines the number of threads.

The -e option defines that command should output only encoded hash without additional information.

By default, Argon2i variant is used to generate the hash. The -id option specifies that Argon2id variant should be used instead of Argon2i.

echo -n "Hello" | argon2 mysalt0123456789 -k 65536 -t 4 -p 2 -e -id

Uninstall argon2

If you decided to completely remove argon2, execute the following command:

sudo apt purge --autoremove -y argon2

Leave a Comment

Your email address will not be published.