How To Install libsecp256k1-0 on Ubuntu 20.04

In this tutorial we learn how to install libsecp256k1-0 on Ubuntu 20.04. libsecp256k1-0 is library for EC operations on curve secp256k1

Introduction

In this tutorial we learn how to install libsecp256k1-0 on Ubuntu 20.04.

What is libsecp256k1-0

libsecp256k1-0 is:

An optimized C library for EC operations on curve secp256k1.

NB! This library is a work in progress and is being used to research best practices. Use at your own risk.

Features:

  • secp256k1 ECDSA signing/verification and key generation.
  • Adding/multiplying private/public keys.
  • Serialization/parsing of private keys, public keys, signatures.
  • Constant time, constant memory access signing and pubkey generation.
  • Derandomized DSA (via RFC6979 or with a caller provided function.)
  • Very efficient implementation.

There are three methods to install libsecp256k1-0 on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libsecp256k1-0 Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install libsecp256k1-0

Install libsecp256k1-0 Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libsecp256k1-0

Install libsecp256k1-0 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 Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install libsecp256k1-0

How To Uninstall libsecp256k1-0 on Ubuntu 20.04

To uninstall only the libsecp256k1-0 package we can use the following command:

sudo apt-get remove libsecp256k1-0

Uninstall libsecp256k1-0 And Its Dependencies

To uninstall libsecp256k1-0 and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove libsecp256k1-0

Remove libsecp256k1-0 Configurations and Data

To remove libsecp256k1-0 configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge libsecp256k1-0

Remove libsecp256k1-0 configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libsecp256k1-0

References

Summary

In this tutorial we learn how to install libsecp256k1-0 package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.