Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getpass(3C)

passwd(4)

crypt(3X)

login(1)

passwd(1)



crypt(3C)                                               crypt(3C)



NAME
     crypt, setkey, encrypt - generate hashing encryption

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

     void setkey (key)
     char *key;

     void encrypt (block, fake)
     char *block;
     int fake;

DESCRIPTION
     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 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 dif-
     ferent 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.  Fake is not used and is ignored, but should
     be present if lint(1) is used.

SEE ALSO
     getpass(3C), passwd(4), crypt(3X).
     login(1), passwd(1) in the CX/UX User's Reference Manual.

BUGS
     The return value points to static data that are overwritten



Page 1                        CX/UX Programmer's Reference Manual





crypt(3C)                                               crypt(3C)



     by each call.






















































Page 2                        CX/UX Programmer's Reference Manual



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026