Blame man3/key_setsecret.3

Packit 7cfc04
.\"  Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
Packit 7cfc04
.\"
Packit 7cfc04
.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
Packit 7cfc04
.\" Distributed under GPL
Packit 7cfc04
.\" %%%LICENSE_END
Packit 7cfc04
.\"
Packit 7cfc04
.\"  I had no way the check the functions out
Packit 7cfc04
.\"  be careful
Packit 7cfc04
.TH KEY_SETSECRET 3 2017-09-15 "" "Linux Programmer's Manual"
Packit 7cfc04
.SH NAME
Packit 7cfc04
key_decryptsession, key_encryptsession, key_setsecret, key_gendes,
Packit 7cfc04
key_secretkey_is_set \- interfaces to rpc keyserver daemon
Packit 7cfc04
.SH SYNOPSIS
Packit 7cfc04
.B "#include <rpc/rpc.h>"
Packit 7cfc04
.PP
Packit 7cfc04
.BI "int key_decryptsession(char *" remotename ,
Packit 7cfc04
.BI "des_block *" deskey );
Packit 7cfc04
.PP
Packit 7cfc04
.BI "int key_encryptsession(char *" remotename ,
Packit 7cfc04
.BI "des_block *" deskey );
Packit 7cfc04
.PP
Packit 7cfc04
.BI "int key_gendes(des_block *" deskey );
Packit 7cfc04
.PP
Packit 7cfc04
.BI "int key_setsecret(char *" key );
Packit 7cfc04
.PP
Packit 7cfc04
.B "int key_secretkey_is_set(void);"
Packit 7cfc04
.SH DESCRIPTION
Packit 7cfc04
The functions here are used within the RPC's secure authentication
Packit 7cfc04
mechanism (AUTH_DES).
Packit 7cfc04
There should be no need for user programs to
Packit 7cfc04
use this functions.
Packit 7cfc04
.PP
Packit 7cfc04
The function
Packit 7cfc04
.BR key_decryptsession ()
Packit 7cfc04
uses the (remote) server netname and takes the DES key
Packit 7cfc04
for decrypting.
Packit 7cfc04
It uses the public key of the server and the
Packit 7cfc04
secret key associated with the effective UID of the calling process.
Packit 7cfc04
.PP
Packit 7cfc04
The function
Packit 7cfc04
.BR key_encryptsession ()
Packit 7cfc04
is the inverse of
Packit 7cfc04
.BR key_decryptsession ().
Packit 7cfc04
It encrypts the DES keys with the public key of the server and
Packit 7cfc04
the secret key associated with the effective UID of the calling process.
Packit 7cfc04
.PP
Packit 7cfc04
The function
Packit 7cfc04
.BR key_gendes ()
Packit 7cfc04
is used to ask the keyserver for a secure conversation key.
Packit 7cfc04
.PP
Packit 7cfc04
The function
Packit 7cfc04
.BR key_setsecret ()
Packit 7cfc04
is used to set the key for the effective UID of the calling process.
Packit 7cfc04
.PP
Packit 7cfc04
The function
Packit 7cfc04
.BR key_secretkey_is_set ()
Packit 7cfc04
can be used to determine whether a key has been
Packit 7cfc04
set for the effective UID of the calling process.
Packit 7cfc04
.SH RETURN VALUE
Packit 7cfc04
These functions return 1 on success and 0 on failure.
Packit 7cfc04
.SH ATTRIBUTES
Packit 7cfc04
For an explanation of the terms used in this section, see
Packit 7cfc04
.BR attributes (7).
Packit 7cfc04
.TS
Packit 7cfc04
allbox;
Packit 7cfc04
lbw22 lb lb
Packit 7cfc04
l l l.
Packit 7cfc04
Interface	Attribute	Value
Packit 7cfc04
T{
Packit 7cfc04
.BR key_decryptsession (),
Packit 7cfc04
.br
Packit 7cfc04
.BR key_encryptsession (),
Packit 7cfc04
.br
Packit 7cfc04
.BR key_gendes (),
Packit 7cfc04
.br
Packit 7cfc04
.BR key_setsecret (),
Packit 7cfc04
.br
Packit 7cfc04
.BR key_secretkey_is_set ()
Packit 7cfc04
T}	Thread safety	MT-Safe
Packit 7cfc04
.TE
Packit 7cfc04
.sp 1
Packit 7cfc04
.SH NOTES
Packit 7cfc04
Note that we talk about two types of encryption here.
Packit 7cfc04
One is asymmetric using a public and secret key.
Packit 7cfc04
The other is symmetric, the
Packit 7cfc04
64-bit DES.
Packit 7cfc04
.PP
Packit 7cfc04
These routines were part of the Linux/Doors-project, abandoned by now.
Packit 7cfc04
.SH SEE ALSO
Packit 7cfc04
.BR crypt (3)
Packit 7cfc04
.SH COLOPHON
Packit 7cfc04
This page is part of release 4.15 of the Linux
Packit 7cfc04
.I man-pages
Packit 7cfc04
project.
Packit 7cfc04
A description of the project,
Packit 7cfc04
information about reporting bugs,
Packit 7cfc04
and the latest version of this page,
Packit 7cfc04
can be found at
Packit 7cfc04
\%https://www.kernel.org/doc/man\-pages/.