crypt is a Unix utility. From the link:
Linux distributions generally do not include a Unix compatible version of the crypt command. This is largely due to a combination of three major factors:
- crypt is relatively obscure and rarely used for e-mail attachments nor as a file format
- crypt is considered far too cryptographically weak to withstand brute force attacks by modern computing systems (Linux systems generally ship with GNU Privacy Guard which is considered to be reasonably secure by modern standards)
- During the early years of Linux development and adoption there was some concern that even as weak as the algorithm used by crypt was, that it might still run afoul of ITAR's export controls; so mainstream distribution developers in the United States generally excluded it (and left their customers to fetch GnuPG/GPG or other strong cryptographic software from international sites, sometimes providing packages or scripts to automate that process).
Source code for crypt can be found on the Unix Archive Sites.
mcrypt is the successor/Linux version of crypt and we have been using this (at least) since Lucid. Replacement for old unix crypt(1) it states at the package details.
Source code for mcrypt can be found here: mcrypt_2.6.8-1.3_i386.deb on Intel x86 machines
But this is not installed in a default Ubuntu.
But what you are looking for is probably registered in ...
This is the place where Linux systems store what to use. By default, for Ubuntu, this is SHA512. So this is not an encryption but a hashed password starting with $6$.
Example using sha1sum:
$ echo hello|sha1sum
Regarding comment see: http://packages.ubuntu.com/raring/makepasswd That is the one called to make the password from the plain text one.
Here is a source: http://people.defora.org/~khorben/projects/makepasswd/
return _hash_blowfish(password, salt, iterations);
return _hash_des(password, salt);
return _hash_sha1(password, salt, iterations);
return _hash_sha256(password, salt);
return _hash_sha512(password, salt);
return _hash_shmd5(password, salt);
errno = ENOSYS;
all the functions used are below this bit of code.