summaryrefslogtreecommitdiffstats
path: root/man/man3/xcrypt.3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-24 04:52:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-24 04:52:22 +0000
commit3d08cd331c1adcf0d917392f7e527b3f00511748 (patch)
tree312f0d1e1632f48862f044b8bb87e602dcffb5f9 /man/man3/xcrypt.3
parentAdding debian version 6.7-2. (diff)
downloadmanpages-3d08cd331c1adcf0d917392f7e527b3f00511748.tar.xz
manpages-3d08cd331c1adcf0d917392f7e527b3f00511748.zip
Merging upstream version 6.8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man/man3/xcrypt.3')
-rw-r--r--man/man3/xcrypt.395
1 files changed, 95 insertions, 0 deletions
diff --git a/man/man3/xcrypt.3 b/man/man3/xcrypt.3
new file mode 100644
index 0000000..d00642a
--- /dev/null
+++ b/man/man3/xcrypt.3
@@ -0,0 +1,95 @@
+'\" t
+.\" Copyright 2003 walter harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" SPDX-License-Identifier: GPL-1.0-or-later
+.\"
+.\" this is the 3rd type of interface for cryptographic routines
+.\" 1. encrypt() expects a bit field
+.\" 2. cbc_crypt() byte values
+.\" 3. xencrypt() a hexstring
+.\" to bad to be true :(
+.\"
+.TH XCRYPT 3 2024-05-02 "Linux man-pages (unreleased)"
+.SH NAME
+xencrypt, xdecrypt, passwd2des \- RFS password encryption
+.SH LIBRARY
+Standard C library
+.RI ( libc ", " \-lc )
+.SH SYNOPSIS
+.nf
+.B "#include <rpc/des_crypt.h>"
+.P
+.BI "void passwd2des(char " *passwd ", char *" key ");"
+.P
+.BI "int xencrypt(char *" secret ", char *" passwd ");"
+.BI "int xdecrypt(char *" secret ", char *" passwd ");"
+.fi
+.SH DESCRIPTION
+.BR WARNING :
+Do not use these functions in new code.
+They do not achieve any type of acceptable cryptographic security guarantees.
+.P
+The function
+.BR passwd2des ()
+takes a character string
+.I passwd
+of arbitrary length and fills a character array
+.I key
+of length 8.
+The array
+.I key
+is suitable for use as DES key.
+It has odd parity set in bit 0 of each byte.
+Both other functions described here use this function to turn their
+argument
+.I passwd
+into a DES key.
+.P
+The
+.BR xencrypt ()
+function takes the ASCII character string
+.I secret
+given in hex,
+.\" (over the alphabet 0123456789abcdefABCDEF),
+which must have a length that is a multiple of 16,
+encrypts it using the DES key derived from
+.I passwd
+by
+.BR passwd2des (),
+and outputs the result again in
+.I secret
+as a hex string
+.\" (over the alphabet 0123456789abcdef)
+of the same length.
+.P
+The
+.BR xdecrypt ()
+function performs the converse operation.
+.SH RETURN VALUE
+The functions
+.BR xencrypt ()
+and
+.BR xdecrypt ()
+return 1 on success and 0 on error.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbx lb lb
+l l l.
+Interface Attribute Value
+T{
+.na
+.nh
+.BR passwd2des (),
+.BR xencrypt (),
+.BR xdecrypt ()
+T} Thread safety MT-Safe
+.TE
+.SH VERSIONS
+These functions are available since glibc 2.1.
+.SH BUGS
+The prototypes are missing from the abovementioned include file.
+.SH SEE ALSO
+.BR cbc_crypt (3)