*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> crypt (3c)              
Title
Content
Arch
Section
 

Contents


CRYPT(3C)							     CRYPT(3C)


NAME    [Toc]    [Back]

     crypt, setkey, encrypt - generate hashing encryption

SYNOPSIS    [Toc]    [Back]

     #include <crypt.h>

     char *crypt(const char *key, const	char *salt);

     void setkey(const char *key);

     void encrypt(const	char *block, int ignored);

DESCRIPTION    [Toc]    [Back]

     crypt is the password encryption function.	 It is based on	a one way
     hashing encryption	algorithm with variations intended (among other
     things) to	frustrate use of hardware implementations of a key search.

     Key is the	input string to	encrypt, for instance, a user's	typed
     password.	Salt 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
     password.	The first two characters are the salt itself.

     The setkey	and encrypt entries provide (rather primitive) access to the
     actual hashing algorithm.	The argument of	setkey is a character array of
     length 64 containing only the characters with numerical value 0 and 1.
     If	this string is divided into groups of 8, the low-order bit in each
     group is ignored; this gives a 56-bit key which is	set into the machine.
     This is the key that will be used with the	hashing	algorithm to encrypt
     the string	block with the function	encrypt.

     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 modified	in place to a similar array representing the
     bits of the argument after	having been subjected to the hashing algorithm
     using the key set by setkey.  Ignored is unused by	encrypt	but it must be
     present.

SEE ALSO    [Toc]    [Back]

      
      
     login(1), passwd(1), getpass(3C), passwd(4)

CAVEAT    [Toc]    [Back]

     The return	value points to	static data that are overwritten by each call.


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
makekey Tru64 generate encryption key
makekey HP-UX generate encryption key
makekey IRIX generate encryption key
des_string_to_key Tru64 Data Encryption Standard (DES) encryption library routines (Auth)
des_quad_cksum Tru64 Data Encryption Standard (DES) encryption library routines (Auth)
des_is_weak_key Tru64 Data Encryption Standard (DES) encryption library routines (Auth)
des_key_sched Tru64 Data Encryption Standard (DES) encryption library routines (Auth)
des_crypt Tru64 Data Encryption Standard (DES) encryption library routines (Auth)
hash OpenBSD general kernel hashing functions
ohash_interval OpenBSD helper functions for open hashing
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service