Blame doc/functions/gnutls_prf_raw

Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
@deftypefun {int} {gnutls_prf_raw} (gnutls_session_t @var{session}, size_t @var{label_size}, const char * @var{label}, size_t @var{seed_size}, const char * @var{seed}, size_t @var{outsize}, char * @var{out})
Packit aea12f
@var{session}: is a @code{gnutls_session_t}  type.
Packit aea12f
Packit aea12f
@var{label_size}: length of the  @code{label} variable.
Packit aea12f
Packit aea12f
@var{label}: label used in PRF computation, typically a short string.
Packit aea12f
Packit aea12f
@var{seed_size}: length of the  @code{seed} variable.
Packit aea12f
Packit aea12f
@var{seed}: optional extra data to seed the PRF with.
Packit aea12f
Packit aea12f
@var{outsize}: size of pre-allocated output buffer to hold the output.
Packit aea12f
Packit aea12f
@var{out}: pre-allocated buffer to hold the generated data.
Packit aea12f
Packit aea12f
Apply the TLS Pseudo-Random-Function (PRF) on the master secret
Packit aea12f
and the provided data.
Packit aea12f
Packit aea12f
The  @code{label} variable usually contains a string denoting the purpose
Packit aea12f
for the generated data.  The  @code{seed} usually contains data such as the
Packit aea12f
client and server random, perhaps together with some additional
Packit aea12f
data that is added to guarantee uniqueness of the output for a
Packit aea12f
particular purpose.
Packit aea12f
Packit aea12f
Because the output is not guaranteed to be unique for a particular
Packit aea12f
session unless  @code{seed} includes the client random and server random
Packit aea12f
fields (the PRF would output the same data on another connection
Packit aea12f
resumed from the first one), it is not recommended to use this
Packit aea12f
function directly.  The @code{gnutls_prf()}  function seeds the PRF with the
Packit aea12f
client and server random fields directly, and is recommended if you
Packit aea12f
want to generate pseudo random data unique for each session.
Packit aea12f
Packit aea12f
@strong{Note:} This function will only operate under TLS versions prior to 1.3.
Packit aea12f
In TLS1.3 the use of PRF is replaced with HKDF and the generic
Packit aea12f
exporters like @code{gnutls_prf_rfc5705()}  should be used instead. Under
Packit aea12f
TLS1.3 this function returns @code{GNUTLS_E_INVALID_REQUEST} .
Packit aea12f
Packit aea12f
@strong{Returns:} @code{GNUTLS_E_SUCCESS}  on success, or an error code.
Packit aea12f
@end deftypefun