1EVP_KDF-TLS13_KDF(7ossl)            OpenSSL           EVP_KDF-TLS13_KDF(7ossl)
2
3
4

NAME

6       EVP_KDF-TLS13_KDF - The TLS 1.3 EVP_KDF implementation
7

DESCRIPTION

9       Support for computing the TLS 1.3 version of the HKDF KDF through the
10       EVP_KDF API.
11
12       The EVP_KDF-TLS13_KDF algorithm implements the HKDF key derivation
13       function as used by TLS 1.3.
14
15   Identity
16       "TLS13-KDF" is the name for this implementation; it can be used with
17       the EVP_KDF_fetch() function.
18
19   Supported parameters
20       The supported parameters are:
21
22       "properties" (OSSL_KDF_PARAM_PROPERTIES) <UTF8 string>
23       "digest" (OSSL_KDF_PARAM_DIGEST) <UTF8 string>
24       "key" (OSSL_KDF_PARAM_KEY) <octet string>
25       "salt" (OSSL_KDF_PARAM_SALT) <octet string>
26           These parameters work as described in "PARAMETERS" in EVP_KDF(3).
27
28       "prefix" (OSSL_KDF_PARAM_PREFIX) <octet string>
29           This parameter sets the label prefix on the specified TLS 1.3 KDF
30           context.  For TLS 1.3 this should be set to the ASCII string "tls13
31           " without a trailing zero byte.  Refer to RFC 8446 section 7.1 "Key
32           Schedule" for details.
33
34       "label" (OSSL_KDF_PARAM_LABEL) <octet string>
35           This parameter sets the label on the specified TLS 1.3 KDF context.
36           Refer to RFC 8446 section 7.1 "Key Schedule" for details.
37
38       "data" (OSSL_KDF_PARAM_DATA) <octet string>
39           This parameter sets the context data on the specified TLS 1.3 KDF
40           context.  Refer to RFC 8446 section 7.1 "Key Schedule" for details.
41
42       "mode" (OSSL_KDF_PARAM_MODE) <UTF8 string> or <integer>
43           This parameter sets the mode for the TLS 1.3 KDF operation.  There
44           are two modes that are currently defined:
45
46           "EXTRACT_ONLY" or EVP_KDF_HKDF_MODE_EXTRACT_ONLY
47               In this mode calling EVP_KDF_derive(3) will just perform the
48               extract operation. The value returned will be the intermediate
49               fixed-length pseudorandom key K.  The keylen parameter must
50               match the size of K, which can be looked up by calling
51               EVP_KDF_CTX_get_kdf_size() after setting the mode and digest.
52
53               The digest, key and salt values must be set before a key is
54               derived otherwise an error will occur.
55
56           "EXPAND_ONLY" or EVP_KDF_HKDF_MODE_EXPAND_ONLY
57               In this mode calling EVP_KDF_derive(3) will just perform the
58               expand operation. The input key should be set to the
59               intermediate fixed-length pseudorandom key K returned from a
60               previous extract operation.
61
62               The digest, key and info values must be set before a key is
63               derived otherwise an error will occur.
64

NOTES

66       This KDF is intended for use by the TLS 1.3 implementation in libssl.
67       It does not support all the options and capabilities that HKDF does.
68
69       The OSSL_PARAM array passed to EVP_KDF_derive(3) or
70       EVP_KDF_CTX_set_params(3) must specify all of the parameters required.
71       This KDF does not support a piecemeal approach to providing these.
72
73       A context for a TLS 1.3 KDF can be obtained by calling:
74
75        EVP_KDF *kdf = EVP_KDF_fetch(NULL, "TLS13-KDF", NULL);
76        EVP_KDF_CTX *kctx = EVP_KDF_CTX_new(kdf);
77
78       The output length of a TLS 1.3 KDF expand operation is specified via
79       the keylen parameter to the EVP_KDF_derive(3) function.  When using
80       EVP_KDF_HKDF_MODE_EXTRACT_ONLY the keylen parameter must equal the size
81       of the intermediate fixed-length pseudorandom key otherwise an error
82       will occur.  For that mode, the fixed output size can be looked up by
83       calling EVP_KDF_CTX_get_kdf_size() after setting the mode and digest on
84       the EVP_KDF_CTX.
85

CONFORMING TO

87       RFC 8446
88

SEE ALSO

90       EVP_KDF(3), EVP_KDF_CTX_new(3), EVP_KDF_CTX_free(3),
91       EVP_KDF_CTX_get_kdf_size(3), EVP_KDF_CTX_set_params(3),
92       EVP_KDF_derive(3), "PARAMETERS" in EVP_KDF(3), EVP_KDF-HKDF(7)
93
95       Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
96
97       Licensed under the Apache License 2.0 (the "License").  You may not use
98       this file except in compliance with the License.  You can obtain a copy
99       in the file LICENSE in the source distribution or at
100       <https://www.openssl.org/source/license.html>.
101
102
103
1043.0.5                             2022-11-01          EVP_KDF-TLS13_KDF(7ossl)
Impressum