1gnutls_prf(3)                       gnutls                       gnutls_prf(3)
2
3
4

NAME

6       gnutls_prf - derive pseudo-random data using the TLS PRF
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int  gnutls_prf(gnutls_session_t session, size_t label_size, const char
12       * label, int  server_random_first,  size_t  extra_size,  const  char  *
13       extra, size_t outsize, char * out);
14

ARGUMENTS

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       int server_random_first
26                   non-0 if server random field should be first in seed
27
28       size_t extra_size
29                   length of the extra variable.
30
31       const char * extra
32                   optional extra data to seed the PRF with.
33
34       size_t outsize
35                   size of pre-allocated output buffer to hold the output.
36
37       char * out  pre-allocate buffer to hold the generated data.
38

DESCRIPTION

40       Apply  the  TLS Pseudo-Random-Function (PRF) using the master secret on
41       some data, seeded with the client and server random fields.
42
43       The label variable usually contain a string denoting  the  purpose  for
44       the  generated  data.   The  server_random_first  indicate  whether the
45       client random field or the server random field should be first  in  the
46       seed.  Non-0 indicate that the server random field is first, 0 that the
47       client random field is first.
48
49       The extra variable can be used to add more data to the seed, after  the
50       random variables.  It can be used to tie make sure the generated output
51       is strongly connected to some additional data (e.g., a string  used  in
52       user authentication).
53
54       The output is placed in *OUT, which must be pre-allocated.
55

RETURN VALUE

57       Return 0 on success, or an error code.
58

REPORTING BUGS

60       Report bugs to <bug-gnutls@gnu.org>.
61
63       Copyright © 2006 Free Software Foundation.
64       Permission  is  granted  to make and distribute verbatim copies of this
65       manual provided the copyright notice and  this  permission  notice  are
66       preserved on all copies.
67

SEE ALSO

69       The  full  documentation  for gnutls is maintained as a Texinfo manual.
70       If the info and gnutls programs are properly installed  at  your  site,
71       the command
72
73              info gnutls
74
75       should give you access to the complete manual.
76
77
78
79gnutls                               1.6.3                       gnutls_prf(3)
Impressum