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
15       int xdecrypt(char *secret, char *passwd);
16

DESCRIPTION

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

RETURN VALUE

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

VERSIONS

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

ATTRIBUTES

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

BUGS

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

SEE ALSO

55       cbc_crypt(3)
56

COLOPHON

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