1XCRYPT(3)                  Linux Programmer's Manual                 XCRYPT(3)
2
3
4

NAME

6       xencrypt, xdecrypt, passwd2des - RFS password encryption
7

SYNOPSIS

9       #include <rpc/des_crypt.h>
10
11       void passwd2des(char *passwd, char *key);
12
13       int xencrypt(char *secret, char *passwd);
14       int xdecrypt(char *secret, char *passwd);
15

DESCRIPTION

17       WARNING:  Do  not  use these functions in new code. They do not achieve
18       any type of acceptable cryptographic security guarantees.
19
20       The function passwd2des() takes a character string passwd of  arbitrary
21       length  and  fills a character array key of length 8.  The array key is
22       suitable for use as DES key.  It has odd parity set in bit  0  of  each
23       byte.   Both  other  functions described here use this function to turn
24       their argument passwd into a DES key.
25
26       The xencrypt() function takes the ASCII character string  secret  given
27       in  hex, which must have a length that is a multiple of 16, encrypts it
28       using the DES key derived from passwd by passwd2des(), and outputs  the
29       result again in secret as a hex string of the same length.
30
31       The xdecrypt() function performs the converse operation.
32

RETURN VALUE

34       The  functions  xencrypt()  and xdecrypt() return 1 on success and 0 on
35       error.
36

VERSIONS

38       These functions are available in glibc since version 2.1.
39

ATTRIBUTES

41       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
42       tributes(7).
43
44       ┌────────────────────────────────────────────┬───────────────┬─────────┐
45Interface                                   Attribute     Value   
46       ├────────────────────────────────────────────┼───────────────┼─────────┤
47passwd2des(), xencrypt(), xdecrypt()        │ Thread safety │ MT-Safe │
48       └────────────────────────────────────────────┴───────────────┴─────────┘
49

BUGS

51       The prototypes are missing from the abovementioned include file.
52

SEE ALSO

54       cbc_crypt(3)
55

COLOPHON

57       This  page  is  part of release 5.12 of the Linux man-pages project.  A
58       description of the project, information about reporting bugs,  and  the
59       latest     version     of     this    page,    can    be    found    at
60       https://www.kernel.org/doc/man-pages/.
61
62
63
64                                  2021-03-22                         XCRYPT(3)
Impressum