171 lines
3.8 KiB
HTML
171 lines
3.8 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of KEY_SETSECRET</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>KEY_SETSECRET</H1>
|
|
Section: Linux Programmer's Manual (3)<BR>Updated: 2017-09-15<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
key_decryptsession, key_encryptsession, key_setsecret, key_gendes,
|
|
key_secretkey_is_set - interfaces to rpc keyserver daemon
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>#include <<A HREF="file:///usr/include/rpc/rpc.h">rpc/rpc.h</A>></B>
|
|
|
|
<P>
|
|
|
|
<B>int key_decryptsession(char *</B><I>remotename</I><B>,</B>
|
|
|
|
<B>des_block *</B><I>deskey</I><B>);</B>
|
|
|
|
<P>
|
|
|
|
<B>int key_encryptsession(char *</B><I>remotename</I><B>,</B>
|
|
|
|
<B>des_block *</B><I>deskey</I><B>);</B>
|
|
|
|
<P>
|
|
|
|
<B>int key_gendes(des_block *</B><I>deskey</I><B>);</B>
|
|
|
|
<P>
|
|
|
|
<B>int key_setsecret(char *</B><I>key</I><B>);</B>
|
|
|
|
<P>
|
|
|
|
<B>int key_secretkey_is_set(void);</B>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
The functions here are used within the RPC's secure authentication
|
|
mechanism (AUTH_DES).
|
|
There should be no need for user programs to
|
|
use this functions.
|
|
<P>
|
|
|
|
The function
|
|
<B>key_decryptsession</B>()
|
|
|
|
uses the (remote) server netname and takes the DES key
|
|
for decrypting.
|
|
It uses the public key of the server and the
|
|
secret key associated with the effective UID of the calling process.
|
|
<P>
|
|
|
|
The function
|
|
<B>key_encryptsession</B>()
|
|
|
|
is the inverse of
|
|
<B>key_decryptsession</B>().
|
|
|
|
It encrypts the DES keys with the public key of the server and
|
|
the secret key associated with the effective UID of the calling process.
|
|
<P>
|
|
|
|
The function
|
|
<B>key_gendes</B>()
|
|
|
|
is used to ask the keyserver for a secure conversation key.
|
|
<P>
|
|
|
|
The function
|
|
<B>key_setsecret</B>()
|
|
|
|
is used to set the key for the effective UID of the calling process.
|
|
<P>
|
|
|
|
The function
|
|
<B>key_secretkey_is_set</B>()
|
|
|
|
can be used to determine whether a key has been
|
|
set for the effective UID of the calling process.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>RETURN VALUE</H2>
|
|
|
|
These functions return 1 on success and 0 on failure.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>ATTRIBUTES</H2>
|
|
|
|
For an explanation of the terms used in this section, see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+attributes">attributes</A></B>(7).
|
|
|
|
<TABLE BORDER>
|
|
<TR VALIGN=top><TD><B>Interface</B></TD><TD><B>Attribute</B></TD><TD><B>Value</B><BR></TD></TR>
|
|
<TR VALIGN=top><TD>
|
|
<B>key_decryptsession</B>(),
|
|
|
|
<BR>
|
|
|
|
<B>key_encryptsession</B>(),
|
|
|
|
<BR>
|
|
|
|
<B>key_gendes</B>(),
|
|
|
|
<BR>
|
|
|
|
<B>key_setsecret</B>(),
|
|
|
|
<BR>
|
|
|
|
<B>key_secretkey_is_set</B>()
|
|
|
|
</TD><TD>Thread safety</TD><TD>MT-Safe<BR></TD></TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
Note that we talk about two types of encryption here.
|
|
One is asymmetric using a public and secret key.
|
|
The other is symmetric, the
|
|
64-bit DES.
|
|
<P>
|
|
|
|
These routines were part of the Linux/Doors-project, abandoned by now.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?3+crypt">crypt</A></B>(3)
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>COLOPHON</H2>
|
|
|
|
This page is part of release 5.05 of the Linux
|
|
<I>man-pages</I>
|
|
|
|
project.
|
|
A description of the project,
|
|
information about reporting bugs,
|
|
and the latest version of this page,
|
|
can be found at
|
|
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="4"><A HREF="#lbAE">RETURN VALUE</A><DD>
|
|
<DT id="5"><A HREF="#lbAF">ATTRIBUTES</A><DD>
|
|
<DT id="6"><A HREF="#lbAG">NOTES</A><DD>
|
|
<DT id="7"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
<DT id="8"><A HREF="#lbAI">COLOPHON</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:46 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|