There is no installation needed to use these functions; they are part of the PHP core.
As of PHP 8.1.0, crypt() can be built against a system crypt library by specifying the --with-external-libcrypt configure option.