1gnutls_prf_raw(3) gnutls gnutls_prf_raw(3)
2
3
4
6 gnutls_prf_raw - access the TLS PRF directly
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_prf_raw(gnutls_session_t session, size_t label_size, const
12 char * label, size_t seed_size, const char * seed, size_t outsize, char
13 * out);
14
16 gnutls_session_t session
17 is a gnutls_session_t structure.
18
19 size_t label_size
20 length of the label variable.
21
22 const char * label
23 label used in PRF computation, typically a short string.
24
25 size_t seed_size
26 length of the seed variable.
27
28 const char * seed
29 optional extra data to seed the PRF with.
30
31 size_t outsize
32 size of pre-allocated output buffer to hold the output.
33
34 char * out pre-allocate buffer to hold the generated data.
35
37 Apply the TLS Pseudo-Random-Function (PRF) using the master secret on
38 some data.
39
40 The label variable usually contain a string denoting the purpose for
41 the generated data. The seed usually contain data such as the client
42 and server random, perhaps together with some additional data that is
43 added to guarantee uniqueness of the output for a particular purpose.
44
45 Because the output is not guaranteed to be unique for a particular ses‐
46 sion unless seed include the client random and server random fields
47 (the PRF would output the same data on another connection resumed from
48 the first one), it is not recommended to use this function directly.
49 The gnutls_prf() function seed the PRF with the client and server ran‐
50 dom fields directly, and is recommended if you want to generate pseudo
51 random data unique for each session.
52
54 GNUTLS_E_SUCCESS on success, or an error code.
55
57 Report bugs to <bug-gnutls@gnu.org>. GnuTLS home page:
58 http://www.gnu.org/software/gnutls/ General help using GNU software:
59 http://www.gnu.org/gethelp/
60
62 Copyright © 2008 Free Software Foundation.
63 Copying and distribution of this file, with or without modification,
64 are permitted in any medium without royalty provided the copyright
65 notice and this notice are preserved.
66
68 The full documentation for gnutls is maintained as a Texinfo manual.
69 If the info and gnutls programs are properly installed at your site,
70 the command
71
72 info gnutls
73
74 should give you access to the complete manual.
75
76
77
78gnutls 2.8.6 gnutls_prf_raw(3)