]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/key_setsecret.3
9c1cd67f5dea0578629696e9d7a6209a3d74a231
[thirdparty/man-pages.git] / man3 / key_setsecret.3
1 .\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
2 .\"
3 .\" SPDX-License-Identifier: GPL-1.0-or-later
4 .\"
5 .\" I had no way the check the functions out
6 .\" be careful
7 .TH KEY_SETSECRET 3 2021-03-22 "Linux man-pages (unreleased)" "Linux Programmer's Manual"
8 .SH NAME
9 key_decryptsession, key_encryptsession, key_setsecret, key_gendes,
10 key_secretkey_is_set \- interfaces to rpc keyserver daemon
11 .SH LIBRARY
12 Standard C library
13 .RI ( libc ", " \-lc )
14 .SH SYNOPSIS
15 .nf
16 .B #include <rpc/rpc.h>
17 .PP
18 .BI "int key_decryptsession(char *" remotename ", des_block *" deskey );
19 .BI "int key_encryptsession(char *" remotename ", des_block *" deskey );
20 .PP
21 .BI "int key_gendes(des_block *" deskey );
22 .PP
23 .BI "int key_setsecret(char *" key );
24 .B int key_secretkey_is_set(void);
25 .fi
26 .SH DESCRIPTION
27 The functions here are used within the RPC's secure authentication
28 mechanism (AUTH_DES).
29 There should be no need for user programs to
30 use this functions.
31 .PP
32 The function
33 .BR key_decryptsession ()
34 uses the (remote) server netname and takes the DES key
35 for decrypting.
36 It uses the public key of the server and the
37 secret key associated with the effective UID of the calling process.
38 .PP
39 The function
40 .BR key_encryptsession ()
41 is the inverse of
42 .BR key_decryptsession ().
43 It encrypts the DES keys with the public key of the server and
44 the secret key associated with the effective UID of the calling process.
45 .PP
46 The function
47 .BR key_gendes ()
48 is used to ask the keyserver for a secure conversation key.
49 .PP
50 The function
51 .BR key_setsecret ()
52 is used to set the key for the effective UID of the calling process.
53 .PP
54 The function
55 .BR key_secretkey_is_set ()
56 can be used to determine whether a key has been
57 set for the effective UID of the calling process.
58 .SH RETURN VALUE
59 These functions return 1 on success and 0 on failure.
60 .SH ATTRIBUTES
61 For an explanation of the terms used in this section, see
62 .BR attributes (7).
63 .ad l
64 .nh
65 .TS
66 allbox;
67 lbx lb lb
68 l l l.
69 Interface Attribute Value
70 T{
71 .BR key_decryptsession (),
72 .BR key_encryptsession (),
73 .BR key_gendes (),
74 .BR key_setsecret (),
75 .BR key_secretkey_is_set ()
76 T} Thread safety MT-Safe
77 .TE
78 .hy
79 .ad
80 .sp 1
81 .SH NOTES
82 Note that we talk about two types of encryption here.
83 One is asymmetric using a public and secret key.
84 The other is symmetric, the
85 64-bit DES.
86 .PP
87 These routines were part of the Linux/Doors-project, abandoned by now.
88 .SH SEE ALSO
89 .BR crypt (3)