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

NAME

6       gnutls_prf - API function
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-zero 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-allocated buffer to hold the generated data.
38

DESCRIPTION

40       Applies  the  TLS Pseudo-Random-Function (PRF) on the master secret and
41       the provided data, seeded with the client and server random fields.
42
43       The output of this function is identical to RFC5705 extractor if  extra
44       and   extra_size  are set to zero. Otherwise,  extra should contain the
45       context value prefixed by a two-byte length.
46
47       The  label variable usually contains a string denoting the purpose  for
48       the  generated  data.   The   server_random_first indicates whether the
49       client random field or the server random field should be first  in  the
50       seed.  Non-zero indicates that the server random field is first, 0 that
51       the client random field is first.
52
53       The  extra variable can be used to add more data to the seed, after the
54       random  variables.  It can be used to make sure the generated output is
55       strongly connected to some additional data (e.g., a string used in user
56       authentication).
57
58       The output is placed in  out , which must be pre-allocated.
59

RETURNS

61       GNUTLS_E_SUCCESS on success, or an error code.
62

REPORTING BUGS

64       Report bugs to <bugs@gnutls.org>.
65       Home page: http://www.gnutls.org
66
67
69       Copyright © 2001-2014 Free Software Foundation, Inc..
70       Copying  and  distribution  of this file, with or without modification,
71       are permitted in any medium  without  royalty  provided  the  copyright
72       notice and this notice are preserved.
73

SEE ALSO

75       The  full  documentation  for gnutls is maintained as a Texinfo manual.
76       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
77       visit
78
79       http://www.gnutls.org/manual/
80
81gnutls                              3.3.29                       gnutls_prf(3)
Impressum