crypt(3C) crypt(3C)NAME crypt, encrypt - generate DES encryption SYNOPSIS char *crypt(key,salt) char *key, *salt; void encrypt(block,edflag) char *block; int edflag; DESCRIPTION crypt is the password encryption function. It is based on the NBS Data Encryption Standard (DES), with variations intended to frustrate the use of DES hardware implementations for key search. key is a user's typed password. salt is a 2-character string chosen from the set [a-zA-Z0-9./]; this string is used to perturb the DES algorithm in one of 4,096 different ways, after which the password is used as the key to encrypt repeatedly a constant string. The returned value points to the encrypted password. The first 2 characters are the salt itself. The encrypt entry provides (rather primitive) access to the actual DES algorithm. The argument to the encrypt entry is a character array of length 64, containing only the characters with numerical value 0 and 1. The argument array is changed in place to a similar array representing the bits of the argument after having been subjected to the DES algorithm. If edflag is zero, the argument is encrypted; if nonzero, it is decrypted. LIMITATIONS The return value points to static data that is overwritten by each call. SEE ALSO getpass(3C), passwd(4) crypt(1), login(1), passwd(1) in A/UX Command Reference January 1992 1