1key_setsecret(3) Library Functions Manual key_setsecret(3)
2
3
4
6 key_decryptsession, key_encryptsession, key_setsecret, key_gendes,
7 key_secretkey_is_set - interfaces to rpc keyserver daemon
8
10 Standard C library (libc, -lc)
11
13 #include <rpc/rpc.h>
14
15 int key_decryptsession(char *remotename, des_block *deskey);
16 int key_encryptsession(char *remotename, des_block *deskey);
17
18 int key_gendes(des_block *deskey);
19
20 int key_setsecret(char *key);
21 int key_secretkey_is_set(void);
22
24 The functions here are used within the RPC's secure authentication
25 mechanism (AUTH_DES). There should be no need for user programs to use
26 this functions.
27
28 The function key_decryptsession() uses the (remote) server netname and
29 takes the DES key for decrypting. It uses the public key of the server
30 and the secret key associated with the effective UID of the calling
31 process.
32
33 The function key_encryptsession() is the inverse of key_decryptses‐
34 sion(). It encrypts the DES keys with the public key of the server and
35 the secret key associated with the effective UID of the calling
36 process.
37
38 The function key_gendes() is used to ask the keyserver for a secure
39 conversation key.
40
41 The function key_setsecret() is used to set the key for the effective
42 UID of the calling process.
43
44 The function key_secretkey_is_set() can be used to determine whether a
45 key has been set for the effective UID of the calling process.
46
48 These functions return 1 on success and 0 on failure.
49
51 For an explanation of the terms used in this section, see at‐
52 tributes(7).
53
54 ┌────────────────────────────────────────────┬───────────────┬─────────┐
55 │Interface │ Attribute │ Value │
56 ├────────────────────────────────────────────┼───────────────┼─────────┤
57 │key_decryptsession(), key_encryptsession(), │ Thread safety │ MT-Safe │
58 │key_gendes(), key_setsecret(), │ │ │
59 │key_secretkey_is_set() │ │ │
60 └────────────────────────────────────────────┴───────────────┴─────────┘
61
63 Note that we talk about two types of encryption here. One is
64 asymmetric using a public and secret key. The other is symmetric, the
65 64-bit DES.
66
67 These routines were part of the Linux/Doors-project, abandoned by now.
68
70 crypt(3)
71
72
73
74Linux man-pages 6.05 2023-07-20 key_setsecret(3)