OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man3 / key_setsecret.3
1 .\"  Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
2 .\"
3 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
4 .\" Distributed under GPL
5 .\" %%%LICENSE_END
6 .\"
7 .\"  I had no way the check the functions out
8 .\"  be careful
9 .TH KEY_SETSECRET 3 2014-05-28 "" "Linux Programmer's Manual"
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
14 .B "#include <rpc/rpc.h>"
15 .sp
16 .BI "int key_decryptsession(char *" remotename ,
17 .BI "des_block *" deskey );
18 .sp
19 .BI "int key_encryptsession(char *" remotename ,
20 .BI "des_block *" deskey );
21 .sp
22 .BI "int key_gendes(des_block *" deskey );
23 .sp
24 .BI "int key_setsecret(char *" key );
25 .sp
26 .B "int key_secretkey_is_set(void);"
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
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
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
47 The function
48 .BR key_gendes ()
49 is used to ask the keyserver for a secure conversation key.
50
51 The function
52 .BR key_setsecret ()
53 is used to set the key for the effective UID of the calling process.
54
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 NOTES
62 Note that we talk about two types of encryption here.
63 One is asymmetric using a public and secret key.
64 The other is symmetric, the
65 64-bit DES.
66 .PP
67 These routines were part of the Linux/Doors-project, abandoned by now.
68 .SH SEE ALSO
69 .BR crypt (3)
70 .SH COLOPHON
71 This page is part of release 3.79 of the Linux
72 .I man-pages
73 project.
74 A description of the project,
75 information about reporting bugs,
76 and the latest version of this page,
77 can be found at
78 \%http://www.kernel.org/doc/man\-pages/.