Install argon2 on Ubuntu 20.04

Install argon2 on Ubuntu 20.04

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

This tutorial demonstrates how to install argon2 on Ubuntu 20.04.

Install argon2

Update the package lists:

sudo apt update

Run the following command to install argon2:

sudo apt install -y argon2

Testing argon2

Run the argon2 command to generate hash for given password using salt:

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

Hash generation is affected by options:

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

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

By default, hash is generated using Argon2i variant. The -id option defines 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 want to completely remove argon2, run the following command:

sudo apt purge --autoremove -y argon2

Leave a Comment

Cancel reply

Your email address will not be published.