OSDN Git Service

(split) LDP: Update original to LDP v3.38.
[linuxjm/LDP_man-pages.git] / original / man3 / key_setsecret.3
1 .\"  Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
2 .\"  Distributed under GPL
3 .\"  I had no way the check the functions out
4 .\"  be careful
5 .TH KEY_SETSECRET 3 2002-07-18 "" "Linux Programmer's Manual"
6 .SH NAME
7 key_decryptsession, key_encryptsession, key_setsecret, key_gendes,
8 key_secretkey_is_set \- interfaces to rpc keyserver daemon
9 .SH SYNOPSIS
10 .B "#include <rpc/rpc.h>"
11 .sp
12 .BI "int key_decryptsession(const char *" remotename ,
13 .BI "des_block *" deskey );
14 .sp
15 .BI "int key_encryptsession(const char *" remotename ,
16 .BI "des_block *" deskey );
17 .sp
18 .BI "int key_gendes(des_block *" deskey );
19 .sp
20 .BI "int key_setsecret(const char *" key );
21 .sp
22 .B "int key_secretkey_is_set(void);"
23 .SH DESCRIPTION
24 The functions here are used within the RPC's secure authentication
25 mechanism (AUTH_DES).
26 There should be no need for user programs to
27 use this functions.
28
29 The function
30 .BR key_decryptsession ()
31 uses the (remote) server netname and takes the DES key
32 for decrypting.
33 It uses the public key of the server and the
34 secret key associated with the effective UID of the calling process.
35
36 The function
37 .BR key_encryptsession ()
38 is the inverse of
39 .BR key_decryptsession ().
40 It encrypts the DES keys with the public key of the server and
41 the secret key associated with the effective UID of the calling process.
42
43 The function
44 .BR key_gendes ()
45 is used to ask the keyserver for a secure conversation key.
46
47 The function
48 .BR key_setsecret ()
49 is used to set the key for the effective UID of the calling process.
50
51 The function
52 .BR key_secretkey_is_set ()
53 can be used to determine whether a key has been
54 set for the effective UID of the calling process.
55 .SH "RETURN VALUE"
56 These functions return 1 on success and 0 on failure.
57 .SH NOTES
58 Note that we talk about two types of encryption here.
59 One is asymmetric using a public and secret key.
60 The other is symmetric, the
61 64-bit DES.
62 .PP
63 These routines were part of the Linux/Doors-project, abandoned by now.
64 .SH "SEE ALSO"
65 .BR crypt (3)