![]() |
![]()
| ![]() |
![]()
NAME
LIBRARYCrypt Library (libcrypt, -lcrypt) SYNOPSIS
char *
char *
const char *
int
DESCRIPTIONThe
The first argument to
All routines are designed to be time-consuming. DES Extended Format:The key is divided into groups of 8 characters (the last group is NUL-padded) and the low-order 7 bits of each character (56 bits per group) are used to form the DES key as follows: the first group of 56 bits becomes the initial DES key. For each additional group, the XOR of the encryption of the current DES key with itself and the group bits becomes the next DES key. The salt is a 9-character array consisting of an underscore followed by 4 bytes of iteration count and 4 bytes of salt. These are encoded as printable characters, 6 bits per character, least significant character first. The values 0 to 63 are encoded as “./0-9A-Za-z”. This allows 24 bits for both count and salt. The salt introduces disorder in the DES algorithm in one of 16777216 or 4096 possible ways (i.e., with 24 or 12 bits: if bit i of the salt is set, then bits i and i+24 are swapped in the DES E-box output). The DES key is used to encrypt a 64-bit constant using
count iterations of DES. The value returned is a
Modular crypt:If the salt begins with the string $digit$ then the Modular Crypt Format is used. The digit represents which algorithm is used in encryption. Following the token is the actual salt to use in the encryption. The maximum length of the salt used depends upon the module. The salt must be terminated with the end of the string character (NUL) or a dollar sign. Any characters after the dollar sign are ignored. Currently supported algorithms are:
Other crypt formats may be easily added. An example salt would be: Traditional crypt:The algorithm used will depend upon whether
How the salt is used will depend upon the algorithm for the hash. For best results, specify at least eight characters of salt. The
The
The
RETURN VALUESThe The SEE ALSOHISTORYA rotor-based The DES section of the code (FreeSec 1.0) was developed outside the United States of America as an unencumbered replacement for the U.S.-only NetBSD libcrypt encryption library. The AUTHORSOriginally written by David Burren <davidb@werj.com.au>, later additions and changes by Poul-Henning Kamp, Mark R V Murray, Michael Bretterklieber, Kris Kennaway, Brian Feldman, Paul Herman and Niels Provos. BUGSThe The NT-hash scheme does not use a salt, and is not hard for a competent attacker to break. Its use is not recommended.
|