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