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 type.
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       For the key expansion specified in RFC5705 see gnutls_prf_rfc5705().
43
44       The   label variable usually contains a string denoting the purpose for
45       the generated data.  The   server_random_first  indicates  whether  the
46       client  random  field or the server random field should be first in the
47       seed.  Non-zero indicates that the server random field is first, 0 that
48       the client random field is first.
49
50       The  extra variable can be used to add more data to the seed, after the
51       random variables.  It can be used to make sure the generated output  is
52       strongly connected to some additional data (e.g., a string used in user
53       authentication).
54
55       The output is placed in  out , which must be pre-allocated.
56

NOTE

58       This function produces identical output with gnutls_prf_rfc5705()  when
59       server_random_first  is  set to 0 and  extra is NULL. Under TLS1.3 this
60       function will only operate when these conditions are true, or otherwise
61       return GNUTLS_E_INVALID_REQUEST.
62

RETURNS

64       GNUTLS_E_SUCCESS on success, or an error code.
65

REPORTING BUGS

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

SEE ALSO

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