]>
Commit | Line | Data |
---|---|---|
fea681da | 1 | .\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de) |
2297bf0e | 2 | .\" |
38f20bb9 | 3 | .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE) |
b18188c5 | 4 | .\" Distributed under GPL |
38f20bb9 | 5 | .\" %%%LICENSE_END |
1714d184 | 6 | .\" |
fea681da | 7 | .\" I had no way the check the functions out |
b9560046 | 8 | .\" be careful |
5722c835 | 9 | .TH KEY_SETSECRET 3 2015-07-23 "" "Linux Programmer's Manual" |
fea681da MK |
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 | |
0daa9e92 | 14 | .B "#include <rpc/rpc.h>" |
68e4db0a | 15 | .PP |
bc572b8f | 16 | .BI "int key_decryptsession(char *" remotename , |
fea681da | 17 | .BI "des_block *" deskey ); |
68e4db0a | 18 | .PP |
bc572b8f | 19 | .BI "int key_encryptsession(char *" remotename , |
fea681da | 20 | .BI "des_block *" deskey ); |
68e4db0a | 21 | .PP |
fea681da | 22 | .BI "int key_gendes(des_block *" deskey ); |
68e4db0a | 23 | .PP |
bc572b8f | 24 | .BI "int key_setsecret(char *" key ); |
68e4db0a | 25 | .PP |
fea681da | 26 | .B "int key_secretkey_is_set(void);" |
fea681da MK |
27 | .SH DESCRIPTION |
28 | The functions here are used within the RPC's secure authentication | |
c13182ef MK |
29 | mechanism (AUTH_DES). |
30 | There should be no need for user programs to | |
fea681da | 31 | use this functions. |
847e0d88 | 32 | .PP |
fea681da | 33 | The function |
c13182ef MK |
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 | |
fea681da | 38 | secret key associated with the effective UID of the calling process. |
847e0d88 | 39 | .PP |
fea681da MK |
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 | |
0425de01 | 45 | the secret key associated with the effective UID of the calling process. |
847e0d88 | 46 | .PP |
fea681da | 47 | The function |
c13182ef | 48 | .BR key_gendes () |
fea681da | 49 | is used to ask the keyserver for a secure conversation key. |
847e0d88 | 50 | .PP |
fea681da | 51 | The function |
c13182ef MK |
52 | .BR key_setsecret () |
53 | is used to set the key for the effective UID of the calling process. | |
847e0d88 | 54 | .PP |
fea681da MK |
55 | The function |
56 | .BR key_secretkey_is_set () | |
57 | can be used to determine whether a key has been | |
c13182ef | 58 | set for the effective UID of the calling process. |
47297adb | 59 | .SH RETURN VALUE |
2b2581ee | 60 | These functions return 1 on success and 0 on failure. |
f8f22117 ZL |
61 | .SH ATTRIBUTES |
62 | For an explanation of the terms used in this section, see | |
63 | .BR attributes (7). | |
64 | .TS | |
65 | allbox; | |
e2d7e8a1 | 66 | lbw22 lb lb |
f8f22117 ZL |
67 | l l l. |
68 | Interface Attribute Value | |
69 | T{ | |
70 | .BR key_decryptsession (), | |
71 | .br | |
72 | .BR key_encryptsession (), | |
73 | .br | |
74 | .BR key_gendes (), | |
75 | .br | |
76 | .BR key_setsecret (), | |
77 | .br | |
78 | .BR key_secretkey_is_set () | |
79 | T} Thread safety MT-Safe | |
80 | .TE | |
847e0d88 | 81 | .sp 1 |
19c98696 | 82 | .SH NOTES |
c13182ef | 83 | Note that we talk about two types of encryption here. |
19c98696 | 84 | One is asymmetric using a public and secret key. |
c13182ef | 85 | The other is symmetric, the |
fea681da | 86 | 64-bit DES. |
a9445f51 MK |
87 | .PP |
88 | These routines were part of the Linux/Doors-project, abandoned by now. | |
47297adb | 89 | .SH SEE ALSO |
fea681da | 90 | .BR crypt (3) |