How To Install libxcrypt on CentOS 8

libxcrypt is Extended crypt library for DES, MD5, Blowfish and others Extended crypt library for DES, MD5, Blowfish and others

Introduction

In this tutorial we learn how to install libxcrypt on CentOS 8.

What is libxcrypt

libxcrypt is a modern library for one-way hashing of passwords. It supports DES, MD5, SHA-2-256, SHA-2-512, and bcrypt-based password hashes, and provides the traditional Unix ‘crypt’ and ‘crypt_r’ interfaces, as well as a set of extended interfaces pioneered by Openwall Linux, ‘crypt_rn’, ‘crypt_ra’, ‘crypt_gensalt’, ‘crypt_gensalt_rn’, and ‘crypt_gensalt_ra’. libxcrypt is intended to be used by login(1), passwd(1), and other similar programs; that is, to hash a small number of passwords during an interactive authentication dialogue with a human. It is not suitable for use in bulk password-cracking applications, or in any other situation where speed is more important than careful handling of sensitive data. However, it is intended to be fast and lightweight enough for use in servers that must field thousands of login attempts per minute. On Linux-based systems, by default libxcrypt will be binary backward compatible with the libcrypt.so.1 shipped as part of the GNU C Library. This means that all existing binary executables linked against glibc’s libcrypt should work unmodified with this library’s libcrypt.so.1. We have taken pains to provide exactly the same “symbol versions” as were used by glibc on various CPU architectures, and to account for the variety of ways in which the Openwall extensions were patched into glibc’s libcrypt by some Linux distributions. (For instance, compatibility symlinks for SuSE’s “libowcrypt” are provided.) However, the converse is not true will not work with glibc’s libcrypt. Also, programs that use certain legacy APIs supplied by glibc’s libcrypt (’encrypt’, ’encrypt_r’, ‘setkey’, ‘setkey_r’, and ‘fcrypt’) cannot be compiled against libxcrypt. libxcrypt 4.1.1 4.el8 i686 74 k libxcrypt-4.1.1-4.el8.src.rpm baseos Extended crypt library for DES, MD5, Blowfish and others https LGPLv2+ and BSD and Public Domain libxcrypt is a modern library for one-way hashing of passwords. It supports DES, MD5, SHA-2-256, SHA-2-512, and bcrypt-based password hashes, and provides the traditional Unix ‘crypt’ and ‘crypt_r’ interfaces, as well as a set of extended interfaces pioneered by Openwall Linux, ‘crypt_rn’, ‘crypt_ra’, ‘crypt_gensalt’, ‘crypt_gensalt_rn’, and ‘crypt_gensalt_ra’. libxcrypt is intended to be used by login(1), passwd(1), and other similar programs; that is, to hash a small number of passwords during an interactive authentication dialogue with a human. It is not suitable for use in bulk password-cracking applications, or in any other situation where speed is more important than careful handling of sensitive data. However, it is intended to be fast and lightweight enough for use in servers that must field thousands of login attempts per minute. On Linux-based systems, by default libxcrypt will be binary backward compatible with the libcrypt.so.1 shipped as part of the GNU C Library. This means that all existing binary executables linked against glibc’s libcrypt should work unmodified with this library’s libcrypt.so.1. We have taken pains to provide exactly the same “symbol versions” as were used by glibc on various CPU architectures, and to account for the variety of ways in which the Openwall extensions were patched into glibc’s libcrypt by some Linux distributions. (For instance, compatibility symlinks for SuSE’s “libowcrypt” are provided.) However, the converse is not true will not work with glibc’s libcrypt. Also, programs that use certain legacy APIs supplied by glibc’s libcrypt (’encrypt’, ’encrypt_r’, ‘setkey’, ‘setkey_r’, and ‘fcrypt’) cannot be compiled against libxcrypt.

We can use yum or dnf to install libxcrypt on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install libxcrypt.

Install libxcrypt on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install libxcrypt using dnf by running the following command:

sudo dnf -y install libxcrypt

Install libxcrypt on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install libxcrypt using yum by running the following command:

sudo yum -y install libxcrypt

How To Uninstall libxcrypt on CentOS 8

To uninstall only the libxcrypt package we can use the following command:

sudo dnf remove libxcrypt

libxcrypt Package Contents on CentOS 8

/lib/.libcrypt.so.1.1.0.hmac
/lib/.libcrypt.so.1.hmac
/lib/libcrypt.so.1
/lib/libcrypt.so.1.1.0
/usr/lib/.build-id
/usr/lib/.build-id/f9
/usr/lib/.build-id/f9/890e7d0987ea1e5376eeaf7b56b5abece25af6
/usr/share/doc/libxcrypt
/usr/share/doc/libxcrypt/NEWS
/usr/share/doc/libxcrypt/README
/usr/share/doc/libxcrypt/THANKS
/usr/share/licenses/libxcrypt
/usr/share/licenses/libxcrypt/AUTHORS
/usr/share/licenses/libxcrypt/COPYING.LIB
/usr/share/licenses/libxcrypt/LICENSING
/usr/share/man/man5/crypt.5.gz
/lib64/.libcrypt.so.1.1.0.hmac
/lib64/.libcrypt.so.1.hmac
/lib64/libcrypt.so.1
/lib64/libcrypt.so.1.1.0
/usr/lib/.build-id
/usr/lib/.build-id/a3
/usr/lib/.build-id/a3/baf007ac157d196f2d24cd74f2a0d83456a34d
/usr/share/doc/libxcrypt
/usr/share/doc/libxcrypt/NEWS
/usr/share/doc/libxcrypt/README
/usr/share/doc/libxcrypt/THANKS
/usr/share/licenses/libxcrypt
/usr/share/licenses/libxcrypt/AUTHORS
/usr/share/licenses/libxcrypt/COPYING.LIB
/usr/share/licenses/libxcrypt/LICENSING
/usr/share/man/man5/crypt.5.gz

References

Summary

In this tutorial we learn how to install libxcrypt on CentOS 8 using yum and dnf.