1KEY_SETSECRET(3)           Linux Programmer's Manual          KEY_SETSECRET(3)
2
3
4

NAME

6       key_decryptsession,   key_encryptsession,   key_setsecret,  key_gendes,
7       key_secretkey_is_set - interfaces to rpc keyserver daemon
8

SYNOPSIS

10       #include <rpc/rpc.h>
11
12       int key_decryptsession(char *remotename, des_block *deskey);
13       int key_encryptsession(char *remotename, des_block *deskey);
14
15       int key_gendes(des_block *deskey);
16
17       int key_setsecret(char *key);
18       int key_secretkey_is_set(void);
19

DESCRIPTION

21       The functions here are used  within  the  RPC's  secure  authentication
22       mechanism (AUTH_DES).  There should be no need for user programs to use
23       this functions.
24
25       The function key_decryptsession() uses the (remote) server netname  and
26       takes the DES key for decrypting.  It uses the public key of the server
27       and the secret key associated with the effective  UID  of  the  calling
28       process.
29
30       The  function  key_encryptsession()  is  the inverse of key_decryptses‐
31       sion().  It encrypts the DES keys with the public key of the server and
32       the  secret  key  associated  with  the  effective  UID  of the calling
33       process.
34
35       The function key_gendes() is used to ask the  keyserver  for  a  secure
36       conversation key.
37
38       The  function  key_setsecret() is used to set the key for the effective
39       UID of the calling process.
40
41       The function key_secretkey_is_set() can be used to determine whether  a
42       key has been set for the effective UID of the calling process.
43

RETURN VALUE

45       These functions return 1 on success and 0 on failure.
46

ATTRIBUTES

48       For  an  explanation  of  the  terms  used  in  this  section,  see at‐
49       tributes(7).
50
51       ┌────────────────────────────────────────────┬───────────────┬─────────┐
52Interface                                   Attribute     Value   
53       ├────────────────────────────────────────────┼───────────────┼─────────┤
54key_decryptsession(), key_encryptsession(), │ Thread safety │ MT-Safe │
55key_gendes(), key_setsecret(),              │               │         │
56key_secretkey_is_set()                      │               │         │
57       └────────────────────────────────────────────┴───────────────┴─────────┘
58

NOTES

60       Note that we talk about two types of encryption here.  One is  asymmet‐
61       ric  using a public and secret key.  The other is symmetric, the 64-bit
62       DES.
63
64       These routines were part of the Linux/Doors-project, abandoned by now.
65

SEE ALSO

67       crypt(3)
68

COLOPHON

70       This page is part of release 5.12 of the Linux  man-pages  project.   A
71       description  of  the project, information about reporting bugs, and the
72       latest    version    of    this    page,    can     be     found     at
73       https://www.kernel.org/doc/man-pages/.
74
75
76
77                                  2021-03-22                  KEY_SETSECRET(3)
Impressum