]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/key_setsecret.3
ffix/wfix
[thirdparty/man-pages.git] / 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 .sp
11 .BR "#include <rpc/rpc.h>"
12 .sp
13 .BI "int key_decryptsession(const char *" remotename ,
14 .BI "des_block *" deskey );
15 .sp
16 .BI "int key_encryptsession(const char *" remotename ,
17 .BI "des_block *" deskey );
18 .sp
19 .BI "int key_gendes(des_block *" deskey );
20 .sp
21 .BI "int key_setsecret(const char *" key );
22 .sp
23 .B "int key_secretkey_is_set(void);"
24 .SH DESCRIPTION
25 The functions here are used within the RPC's secure authentication
26 mechanism (AUTH_DES).
27 There should be no need for user programs to
28 use this functions.
29
30 The function
31 .BR key_decryptsession ()
32 uses the (remote) server netname and takes the DES key
33 for decrypting.
34 It uses the public key of the server and the
35 secret key associated with the effective UID of the calling process.
36
37 The function
38 .BR key_encryptsession ()
39 is the inverse of
40 .BR key_decryptsession ().
41 It encrypts the DES keys with the public key of the server and
42 the secret key associated with the effective UID of the calling process.
43
44 The function
45 .BR key_gendes ()
46 is used to ask the keyserver for a secure conversation key.
47
48 The function
49 .BR key_setsecret ()
50 is used to set the key for the effective UID of the calling process.
51
52 The function
53 .BR key_secretkey_is_set ()
54 can be used to determine whether a key has been
55 set for the effective UID of the calling process.
56 .SH "RETURN VALUE"
57 These functions return 1 on success and 0 on failure.
58 .SH NOTES
59 Note that we talk about two types of encryption here.
60 One is asymmetric using a public and secret key.
61 The other is symmetric, the
62 64-bit DES.
63 .PP
64 These routines were part of the Linux/Doors-project, abandoned by now.
65 .SH "SEE ALSO"
66 .BR crypt (3)