1gnutls_prf_raw(3)                   gnutls                   gnutls_prf_raw(3)
2
3
4

NAME

6       gnutls_prf_raw - API function
7

SYNOPSIS

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

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       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-allocated buffer to hold the generated data.
35

DESCRIPTION

37       Apply the TLS Pseudo-Random-Function (PRF) on the master secret and the
38       provided data.
39
40       The  label variable usually contains a string denoting the purpose  for
41       the generated data.  The  seed usually contains 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 includes 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 seeds 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

NOTE

54       This  function  will  only operate under TLS versions prior to 1.3.  In
55       TLS1.3 the use of PRF is replaced with HKDF and the  generic  exporters
56       like  gnutls_prf_rfc5705()  should  be  used instead. Under TLS1.3 this
57       function returns GNUTLS_E_INVALID_REQUEST.
58

RETURNS

60       GNUTLS_E_SUCCESS on success, or an error code.
61

REPORTING BUGS

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

SEE ALSO

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