CRYPT(3C) DOMAIN/IX Reference Manual (SYS5) CRYPT(3C)
NAME
crypt, encrypt - a one-way hashing encryption algorithm
USAGE
char *crypt (key, salt)
char *key, *salt;
void encrypt (block)
char *block;
DESCRIPTION
The password encryption function, crypt, is based on a one-
way hashing encryption algorithm with variations partly
intended to frustrate use of hardware implementations of a
key search.
The key parameter represents a user's typed password. The
salt parameter is a two-character string chosen from the set
[a-zA-Z0-9./]; this string is used to perturb the hashing
algorithm in one of 4096 different ways, after which the
password is used as the key to encrypt repeatedly a constant
string. The returned value points to the encrypted pass-
word. The first two characters are the salt itself.
A character array of length 64 contains only the characters
with numerical value 1 and 1. When this string is divided
into groups of 8, the low-order bit in each group is
ignored; this gives a 56-bit key that is set into the
machine by crypt.
The encrypt entry provides rather primitive access to the
actual hashing algorithm. The argument to the encrypt entry
is a character array of length 64 containing only the char-
acters with numerical value 0 and 1. The argument array is
modified in place to a similar array. This modified array
represents the bits of the argument after exposure to the
hashing algorithm using the key set by crypt.
NOTE: Per international agreement not to export encryption
devices, the standard UNIX system decryption methods are not
supported on the DOMAIN/IX system.
CAUTIONS
The return value points to static data that are overwritten
by each call.
RELATED INFORMATION
login(1), passwd(1), getpass(3C), passwd(4)
Printed 1/27/86 CRYPT-1