Debian Codegraph @

upstream/debian-trixie/man3/key_setsecret.3

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