| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "PROVIDER-KDF 7SSL" |
| 58 |
.TH PROVIDER-KDF 7SSL 2026-04-07 3.6.2 OpenSSL |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
provider\-kdf \- The KDF library <\-> provider functions |
| 65 |
.SH SYNOPSIS |
| 66 |
.IX Header "SYNOPSIS" |
| 67 |
.Vb 2 |
| 68 |
\& #include <openssl/core_dispatch.h> |
| 69 |
\& #include <openssl/core_names.h> |
| 70 |
\& |
| 71 |
\& /* |
| 72 |
\& * None of these are actual functions, but are displayed like this for |
| 73 |
\& * the function signatures for functions that are offered as function |
| 74 |
\& * pointers in OSSL_DISPATCH arrays. |
| 75 |
\& */ |
| 76 |
\& |
| 77 |
\& /* Context management */ |
| 78 |
\& void *OSSL_FUNC_kdf_newctx(void *provctx); |
| 79 |
\& void OSSL_FUNC_kdf_freectx(void *kctx); |
| 80 |
\& void *OSSL_FUNC_kdf_dupctx(void *src); |
| 81 |
\& |
| 82 |
\& /* Encryption/decryption */ |
| 83 |
\& int OSSL_FUNC_kdf_reset(void *kctx); |
| 84 |
\& int OSSL_FUNC_kdf_derive(void *kctx, unsigned char *key, size_t keylen, |
| 85 |
\& const OSSL_PARAM params[]); |
| 86 |
\& void *OSSL_FUNC_kdf_derive_skey(void *ctx, const char *key_type, void *provctx, |
| 87 |
\& OSSL_FUNC_skeymgmt_import_fn *import, |
| 88 |
\& size_t keylen, const OSSL_PARAM params[]); |
| 89 |
\& |
| 90 |
\& /* KDF parameter descriptors */ |
| 91 |
\& const OSSL_PARAM *OSSL_FUNC_kdf_gettable_params(void *provctx); |
| 92 |
\& const OSSL_PARAM *OSSL_FUNC_kdf_gettable_ctx_params(void *kcxt, void *provctx); |
| 93 |
\& const OSSL_PARAM *OSSL_FUNC_kdf_settable_ctx_params(void *kcxt, void *provctx); |
| 94 |
\& |
| 95 |
\& /* KDF parameters */ |
| 96 |
\& int OSSL_FUNC_kdf_get_params(OSSL_PARAM params[]); |
| 97 |
\& int OSSL_FUNC_kdf_get_ctx_params(void *kctx, OSSL_PARAM params[]); |
| 98 |
\& int OSSL_FUNC_kdf_set_ctx_params(void *kctx, const OSSL_PARAM params[]); |
| 99 |
\& int OSSL_FUNC_kdf_set_skey(void *kctx, void *skeydata, const char *paramname); |
| 100 |
.Ve |
| 101 |
.SH DESCRIPTION |
| 102 |
.IX Header "DESCRIPTION" |
| 103 |
This documentation is primarily aimed at provider authors. See \fBprovider\fR\|(7) |
| 104 |
for further information. |
| 105 |
.PP |
| 106 |
The KDF operation enables providers to implement KDF algorithms and make |
| 107 |
them available to applications via the API functions \fBEVP_KDF_CTX_reset\fR\|(3), |
| 108 |
and \fBEVP_KDF_derive\fR\|(3). |
| 109 |
.PP |
| 110 |
All "functions" mentioned here are passed as function pointers between |
| 111 |
\&\fIlibcrypto\fR and the provider in \fBOSSL_DISPATCH\fR\|(3) arrays via |
| 112 |
\&\fBOSSL_ALGORITHM\fR\|(3) arrays that are returned by the provider's |
| 113 |
\&\fBprovider_query_operation()\fR function |
| 114 |
(see "Provider Functions" in \fBprovider\-base\fR\|(7)). |
| 115 |
.PP |
| 116 |
All these "functions" have a corresponding function type definition |
| 117 |
named \fBOSSL_FUNC_{name}_fn\fR, and a helper function to retrieve the |
| 118 |
function pointer from an \fBOSSL_DISPATCH\fR\|(3) element named |
| 119 |
\&\fBOSSL_FUNC_{name}\fR. |
| 120 |
For example, the "function" \fBOSSL_FUNC_kdf_newctx()\fR has these: |
| 121 |
.PP |
| 122 |
.Vb 3 |
| 123 |
\& typedef void *(OSSL_FUNC_kdf_newctx_fn)(void *provctx); |
| 124 |
\& static ossl_inline OSSL_FUNC_kdf_newctx_fn |
| 125 |
\& OSSL_FUNC_kdf_newctx(const OSSL_DISPATCH *opf); |
| 126 |
.Ve |
| 127 |
.PP |
| 128 |
\&\fBOSSL_DISPATCH\fR\|(3) array entries are identified by numbers that are provided as |
| 129 |
macros in \fBopenssl\-core_dispatch.h\fR\|(7), as follows: |
| 130 |
.PP |
| 131 |
.Vb 3 |
| 132 |
\& OSSL_FUNC_kdf_newctx OSSL_FUNC_KDF_NEWCTX |
| 133 |
\& OSSL_FUNC_kdf_freectx OSSL_FUNC_KDF_FREECTX |
| 134 |
\& OSSL_FUNC_kdf_dupctx OSSL_FUNC_KDF_DUPCTX |
| 135 |
\& |
| 136 |
\& OSSL_FUNC_kdf_reset OSSL_FUNC_KDF_RESET |
| 137 |
\& OSSL_FUNC_kdf_derive OSSL_FUNC_KDF_DERIVE |
| 138 |
\& OSSL_FUNC_kdf_derive_skey OSSL_FUNC_KDF_DERIVE_SKEY |
| 139 |
\& |
| 140 |
\& OSSL_FUNC_kdf_get_params OSSL_FUNC_KDF_GET_PARAMS |
| 141 |
\& OSSL_FUNC_kdf_get_ctx_params OSSL_FUNC_KDF_GET_CTX_PARAMS |
| 142 |
\& OSSL_FUNC_kdf_set_ctx_params OSSL_FUNC_KDF_SET_CTX_PARAMS |
| 143 |
\& |
| 144 |
\& OSSL_FUNC_kdf_gettable_params OSSL_FUNC_KDF_GETTABLE_PARAMS |
| 145 |
\& OSSL_FUNC_kdf_gettable_ctx_params OSSL_FUNC_KDF_GETTABLE_CTX_PARAMS |
| 146 |
\& OSSL_FUNC_kdf_settable_ctx_params OSSL_FUNC_KDF_SETTABLE_CTX_PARAMS |
| 147 |
\& OSSL_FUNC_kdf_set_skey OSSL_FUNC_KDF_SET_SKEY |
| 148 |
.Ve |
| 149 |
.PP |
| 150 |
A KDF algorithm implementation may not implement all of these functions. |
| 151 |
In order to be a consistent set of functions, at least the following functions |
| 152 |
must be implemented: \fBOSSL_FUNC_kdf_newctx()\fR, \fBOSSL_FUNC_kdf_freectx()\fR, |
| 153 |
\&\fBOSSL_FUNC_kdf_set_ctx_params()\fR, and at least one of |
| 154 |
\&\fBOSSL_FUNC_kdf_derive()\fR or \fBOSSL_FUNC_kdf_derive_skey()\fR. |
| 155 |
All other functions are optional. |
| 156 |
.SS "Context Management Functions" |
| 157 |
.IX Subsection "Context Management Functions" |
| 158 |
\&\fBOSSL_FUNC_kdf_newctx()\fR should create and return a pointer to a provider side |
| 159 |
structure for holding context information during a KDF operation. |
| 160 |
A pointer to this context will be passed back in a number of the other KDF |
| 161 |
operation function calls. |
| 162 |
The parameter \fIprovctx\fR is the provider context generated during provider |
| 163 |
initialisation (see \fBprovider\fR\|(7)). |
| 164 |
.PP |
| 165 |
\&\fBOSSL_FUNC_kdf_freectx()\fR is passed a pointer to the provider side KDF context in |
| 166 |
the \fIkctx\fR parameter. |
| 167 |
If it receives NULL as \fIkctx\fR value, it should not do anything other than |
| 168 |
return. |
| 169 |
This function should free any resources associated with that context. |
| 170 |
.PP |
| 171 |
\&\fBOSSL_FUNC_kdf_dupctx()\fR should duplicate the provider side KDF context in the |
| 172 |
\&\fIkctx\fR parameter and return the duplicate copy. |
| 173 |
.SS "Encryption/Decryption Functions" |
| 174 |
.IX Subsection "Encryption/Decryption Functions" |
| 175 |
\&\fBOSSL_FUNC_kdf_reset()\fR initialises a KDF operation given a provider |
| 176 |
side KDF context in the \fIkctx\fR parameter. |
| 177 |
.PP |
| 178 |
\&\fBOSSL_FUNC_kdf_derive()\fR performs the KDF operation after processing the |
| 179 |
\&\fIparams\fR as per \fBOSSL_FUNC_kdf_set_ctx_params()\fR. |
| 180 |
The \fIkctx\fR parameter contains a pointer to the provider side context. |
| 181 |
The resulting key of the desired \fIkeylen\fR should be written to \fIkey\fR. |
| 182 |
If the algorithm does not support the requested \fIkeylen\fR the function must |
| 183 |
return error. |
| 184 |
.PP |
| 185 |
\&\fBOSSL_FUNC_kdf_derive_skey()\fR is similar to \fBOSSL_FUNC_kdf_derive()\fR but uses an |
| 186 |
opaque object for storing the derived key. It accepts \fIkey_type\fR parameter to |
| 187 |
give a hint to the provider what type of the key (e.g. generic or AES) would be |
| 188 |
generated and \fIimport\fR function from the \fBEVP_SKEYMGMT\fR object to be |
| 189 |
associated with the key. The \fBEVP_SKEYMGMT\fR object comes from the same |
| 190 |
provider as the KDF itself. |
| 191 |
.SS "KDF Parameters" |
| 192 |
.IX Subsection "KDF Parameters" |
| 193 |
See \fBOSSL_PARAM\fR\|(3) for further details on the parameters structure used by |
| 194 |
these functions. |
| 195 |
.PP |
| 196 |
\&\fBOSSL_FUNC_kdf_get_params()\fR gets details of parameter values associated with the |
| 197 |
provider algorithm and stores them in \fIparams\fR. |
| 198 |
.PP |
| 199 |
\&\fBOSSL_FUNC_kdf_set_ctx_params()\fR sets KDF parameters associated with the given |
| 200 |
provider side KDF context \fIkctx\fR to \fIparams\fR. |
| 201 |
Any parameter settings are additional to any that were previously set. |
| 202 |
Passing NULL for \fIparams\fR should return true. |
| 203 |
.PP |
| 204 |
\&\fBOSSL_FUNC_kdf_get_ctx_params()\fR retrieves gettable parameter values associated |
| 205 |
with the given provider side KDF context \fIkctx\fR and stores them in \fIparams\fR. |
| 206 |
Passing NULL for \fIparams\fR should return true. |
| 207 |
.PP |
| 208 |
\&\fBOSSL_FUNC_kdf_gettable_params()\fR, \fBOSSL_FUNC_kdf_gettable_ctx_params()\fR, |
| 209 |
and \fBOSSL_FUNC_kdf_settable_ctx_params()\fR all return constant \fBOSSL_PARAM\fR\|(3) |
| 210 |
arrays as descriptors of the parameters that \fBOSSL_FUNC_kdf_get_params()\fR, |
| 211 |
\&\fBOSSL_FUNC_kdf_get_ctx_params()\fR, and \fBOSSL_FUNC_kdf_set_ctx_params()\fR |
| 212 |
can handle, respectively. \fBOSSL_FUNC_kdf_gettable_ctx_params()\fR and |
| 213 |
\&\fBOSSL_FUNC_kdf_settable_ctx_params()\fR will return the parameters associated |
| 214 |
with the provider side context \fIkctx\fR in its current state if it is |
| 215 |
not NULL. Otherwise, they return the parameters associated with the |
| 216 |
provider side algorithm \fIprovctx\fR. |
| 217 |
.PP |
| 218 |
\&\fBOSSL_FUNF_kdf_set_skey()\fR sets the input key for KDF functions that take a |
| 219 |
key as input. |
| 220 |
.PP |
| 221 |
Parameters currently recognised by built-in KDFs are as follows. Not all |
| 222 |
parameters are relevant to, or are understood by all KDFs: |
| 223 |
.IP """size"" (\fBOSSL_KDF_PARAM_SIZE\fR) <unsigned integer>" 4 |
| 224 |
.IX Item """size"" (OSSL_KDF_PARAM_SIZE) <unsigned integer>" |
| 225 |
Gets the output size from the associated KDF ctx. |
| 226 |
If the algorithm produces a variable amount of output, SIZE_MAX should be |
| 227 |
returned. |
| 228 |
If the input parameters required to calculate the fixed output size have not yet |
| 229 |
been supplied, 0 should be returned indicating an error. |
| 230 |
.IP """key"" (\fBOSSL_KDF_PARAM_KEY\fR) <octet string>" 4 |
| 231 |
.IX Item """key"" (OSSL_KDF_PARAM_KEY) <octet string>" |
| 232 |
Sets the key in the associated KDF ctx. |
| 233 |
.IP """secret"" (\fBOSSL_KDF_PARAM_SECRET\fR) <octet string>" 4 |
| 234 |
.IX Item """secret"" (OSSL_KDF_PARAM_SECRET) <octet string>" |
| 235 |
Sets the secret in the associated KDF ctx. |
| 236 |
.IP """pass"" (\fBOSSL_KDF_PARAM_PASSWORD\fR) <octet string>" 4 |
| 237 |
.IX Item """pass"" (OSSL_KDF_PARAM_PASSWORD) <octet string>" |
| 238 |
Sets the password in the associated KDF ctx. |
| 239 |
.IP """cipher"" (\fBOSSL_KDF_PARAM_CIPHER\fR) <UTF8 string>" 4 |
| 240 |
.IX Item """cipher"" (OSSL_KDF_PARAM_CIPHER) <UTF8 string>" |
| 241 |
.PD 0 |
| 242 |
.IP """digest"" (\fBOSSL_KDF_PARAM_DIGEST\fR) <UTF8 string>" 4 |
| 243 |
.IX Item """digest"" (OSSL_KDF_PARAM_DIGEST) <UTF8 string>" |
| 244 |
.IP """mac"" (\fBOSSL_KDF_PARAM_MAC\fR) <UTF8 string>" 4 |
| 245 |
.IX Item """mac"" (OSSL_KDF_PARAM_MAC) <UTF8 string>" |
| 246 |
.PD |
| 247 |
Sets the name of the underlying cipher, digest or MAC to be used. |
| 248 |
It must name a suitable algorithm for the KDF that's being used. |
| 249 |
.IP """maclen"" (\fBOSSL_KDF_PARAM_MAC_SIZE\fR) <octet string>" 4 |
| 250 |
.IX Item """maclen"" (OSSL_KDF_PARAM_MAC_SIZE) <octet string>" |
| 251 |
Sets the length of the MAC in the associated KDF ctx. |
| 252 |
.IP """properties"" (\fBOSSL_KDF_PARAM_PROPERTIES\fR) <UTF8 string>" 4 |
| 253 |
.IX Item """properties"" (OSSL_KDF_PARAM_PROPERTIES) <UTF8 string>" |
| 254 |
Sets the properties to be queried when trying to fetch the underlying algorithm. |
| 255 |
This must be given together with the algorithm naming parameter to be |
| 256 |
considered valid. |
| 257 |
.IP """iter"" (\fBOSSL_KDF_PARAM_ITER\fR) <unsigned integer>" 4 |
| 258 |
.IX Item """iter"" (OSSL_KDF_PARAM_ITER) <unsigned integer>" |
| 259 |
Sets the number of iterations in the associated KDF ctx. |
| 260 |
.IP """mode"" (\fBOSSL_KDF_PARAM_MODE\fR) <UTF8 string>" 4 |
| 261 |
.IX Item """mode"" (OSSL_KDF_PARAM_MODE) <UTF8 string>" |
| 262 |
Sets the mode in the associated KDF ctx. |
| 263 |
.IP """pkcs5"" (\fBOSSL_KDF_PARAM_PKCS5\fR) <integer>" 4 |
| 264 |
.IX Item """pkcs5"" (OSSL_KDF_PARAM_PKCS5) <integer>" |
| 265 |
Enables or disables the SP800\-132 compliance checks. |
| 266 |
A mode of 0 enables the compliance checks. |
| 267 |
.Sp |
| 268 |
The checks performed are: |
| 269 |
.RS 4 |
| 270 |
.IP "\- the iteration count is at least 1000." 4 |
| 271 |
.IX Item "- the iteration count is at least 1000." |
| 272 |
.PD 0 |
| 273 |
.IP "\- the salt length is at least 128 bits." 4 |
| 274 |
.IX Item "- the salt length is at least 128 bits." |
| 275 |
.IP "\- the derived key length is at least 112 bits." 4 |
| 276 |
.IX Item "- the derived key length is at least 112 bits." |
| 277 |
.RE |
| 278 |
.RS 4 |
| 279 |
.RE |
| 280 |
.IP """ukm"" (\fBOSSL_KDF_PARAM_UKM\fR) <octet string>" 4 |
| 281 |
.IX Item """ukm"" (OSSL_KDF_PARAM_UKM) <octet string>" |
| 282 |
.PD |
| 283 |
Sets an optional random string that is provided by the sender called |
| 284 |
"partyAInfo". In CMS this is the user keying material. |
| 285 |
.IP """cekalg"" (\fBOSSL_KDF_PARAM_CEK_ALG\fR) <UTF8 string>" 4 |
| 286 |
.IX Item """cekalg"" (OSSL_KDF_PARAM_CEK_ALG) <UTF8 string>" |
| 287 |
Sets the CEK wrapping algorithm name in the associated KDF ctx. |
| 288 |
.IP """n"" (\fBOSSL_KDF_PARAM_SCRYPT_N\fR) <unsigned integer>" 4 |
| 289 |
.IX Item """n"" (OSSL_KDF_PARAM_SCRYPT_N) <unsigned integer>" |
| 290 |
Sets the scrypt work factor parameter N in the associated KDF ctx. |
| 291 |
.IP """r"" (\fBOSSL_KDF_PARAM_SCRYPT_R\fR) <unsigned integer>" 4 |
| 292 |
.IX Item """r"" (OSSL_KDF_PARAM_SCRYPT_R) <unsigned integer>" |
| 293 |
Sets the scrypt work factor parameter r in the associated KDF ctx. |
| 294 |
.IP """p"" (\fBOSSL_KDF_PARAM_SCRYPT_P\fR) <unsigned integer>" 4 |
| 295 |
.IX Item """p"" (OSSL_KDF_PARAM_SCRYPT_P) <unsigned integer>" |
| 296 |
Sets the scrypt work factor parameter p in the associated KDF ctx. |
| 297 |
.IP """maxmem_bytes"" (\fBOSSL_KDF_PARAM_SCRYPT_MAXMEM\fR) <unsigned integer>" 4 |
| 298 |
.IX Item """maxmem_bytes"" (OSSL_KDF_PARAM_SCRYPT_MAXMEM) <unsigned integer>" |
| 299 |
Sets the scrypt work factor parameter maxmem in the associated KDF ctx. |
| 300 |
.IP """prefix"" (\fBOSSL_KDF_PARAM_PREFIX\fR) <octet string>" 4 |
| 301 |
.IX Item """prefix"" (OSSL_KDF_PARAM_PREFIX) <octet string>" |
| 302 |
Sets the prefix string using by the TLS 1.3 version of HKDF in the |
| 303 |
associated KDF ctx. |
| 304 |
.IP """label"" (\fBOSSL_KDF_PARAM_LABEL\fR) <octet string>" 4 |
| 305 |
.IX Item """label"" (OSSL_KDF_PARAM_LABEL) <octet string>" |
| 306 |
Sets the label string using by the TLS 1.3 version of HKDF in the |
| 307 |
associated KDF ctx. |
| 308 |
.IP """data"" (\fBOSSL_KDF_PARAM_DATA\fR) <octet string>" 4 |
| 309 |
.IX Item """data"" (OSSL_KDF_PARAM_DATA) <octet string>" |
| 310 |
Sets the context string using by the TLS 1.3 version of HKDF in the |
| 311 |
associated KDF ctx. |
| 312 |
.IP """info"" (\fBOSSL_KDF_PARAM_INFO\fR) <octet string>" 4 |
| 313 |
.IX Item """info"" (OSSL_KDF_PARAM_INFO) <octet string>" |
| 314 |
Sets the optional shared info in the associated KDF ctx. |
| 315 |
.IP """seed"" (\fBOSSL_KDF_PARAM_SEED\fR) <octet string>" 4 |
| 316 |
.IX Item """seed"" (OSSL_KDF_PARAM_SEED) <octet string>" |
| 317 |
Sets the IV in the associated KDF ctx. |
| 318 |
.IP """xcghash"" (\fBOSSL_KDF_PARAM_SSHKDF_XCGHASH\fR) <octet string>" 4 |
| 319 |
.IX Item """xcghash"" (OSSL_KDF_PARAM_SSHKDF_XCGHASH) <octet string>" |
| 320 |
Sets the xcghash in the associated KDF ctx. |
| 321 |
.IP """session_id"" (\fBOSSL_KDF_PARAM_SSHKDF_SESSION_ID\fR) <octet string>" 4 |
| 322 |
.IX Item """session_id"" (OSSL_KDF_PARAM_SSHKDF_SESSION_ID) <octet string>" |
| 323 |
Sets the session ID in the associated KDF ctx. |
| 324 |
.IP """type"" (\fBOSSL_KDF_PARAM_SSHKDF_TYPE\fR) <UTF8 string>" 4 |
| 325 |
.IX Item """type"" (OSSL_KDF_PARAM_SSHKDF_TYPE) <UTF8 string>" |
| 326 |
Sets the SSH KDF type parameter in the associated KDF ctx. |
| 327 |
There are six supported types: |
| 328 |
.RS 4 |
| 329 |
.IP EVP_KDF_SSHKDF_TYPE_INITIAL_IV_CLI_TO_SRV 4 |
| 330 |
.IX Item "EVP_KDF_SSHKDF_TYPE_INITIAL_IV_CLI_TO_SRV" |
| 331 |
The Initial IV from client to server. |
| 332 |
A single char of value 65 (ASCII char 'A'). |
| 333 |
.IP EVP_KDF_SSHKDF_TYPE_INITIAL_IV_SRV_TO_CLI 4 |
| 334 |
.IX Item "EVP_KDF_SSHKDF_TYPE_INITIAL_IV_SRV_TO_CLI" |
| 335 |
The Initial IV from server to client |
| 336 |
A single char of value 66 (ASCII char 'B'). |
| 337 |
.IP EVP_KDF_SSHKDF_TYPE_ENCRYPTION_KEY_CLI_TO_SRV 4 |
| 338 |
.IX Item "EVP_KDF_SSHKDF_TYPE_ENCRYPTION_KEY_CLI_TO_SRV" |
| 339 |
The Encryption Key from client to server |
| 340 |
A single char of value 67 (ASCII char 'C'). |
| 341 |
.IP EVP_KDF_SSHKDF_TYPE_ENCRYPTION_KEY_SRV_TO_CLI 4 |
| 342 |
.IX Item "EVP_KDF_SSHKDF_TYPE_ENCRYPTION_KEY_SRV_TO_CLI" |
| 343 |
The Encryption Key from server to client |
| 344 |
A single char of value 68 (ASCII char 'D'). |
| 345 |
.IP EVP_KDF_SSHKDF_TYPE_INTEGRITY_KEY_CLI_TO_SRV 4 |
| 346 |
.IX Item "EVP_KDF_SSHKDF_TYPE_INTEGRITY_KEY_CLI_TO_SRV" |
| 347 |
The Integrity Key from client to server |
| 348 |
A single char of value 69 (ASCII char 'E'). |
| 349 |
.IP EVP_KDF_SSHKDF_TYPE_INTEGRITY_KEY_SRV_TO_CLI 4 |
| 350 |
.IX Item "EVP_KDF_SSHKDF_TYPE_INTEGRITY_KEY_SRV_TO_CLI" |
| 351 |
The Integrity Key from client to server |
| 352 |
A single char of value 70 (ASCII char 'F'). |
| 353 |
.RE |
| 354 |
.RS 4 |
| 355 |
.RE |
| 356 |
.IP """constant"" (\fBOSSL_KDF_PARAM_CONSTANT\fR) <octet string>" 4 |
| 357 |
.IX Item """constant"" (OSSL_KDF_PARAM_CONSTANT) <octet string>" |
| 358 |
Sets the constant value in the associated KDF ctx. |
| 359 |
.IP """id"" (\fBOSSL_KDF_PARAM_PKCS12_ID\fR) <integer>" 4 |
| 360 |
.IX Item """id"" (OSSL_KDF_PARAM_PKCS12_ID) <integer>" |
| 361 |
Sets the intended usage of the output bits in the associated KDF ctx. |
| 362 |
It is defined as per RFC 7292 section B.3. |
| 363 |
.SH "RETURN VALUES" |
| 364 |
.IX Header "RETURN VALUES" |
| 365 |
\&\fBOSSL_FUNC_kdf_newctx()\fR and \fBOSSL_FUNC_kdf_dupctx()\fR should return the newly created |
| 366 |
provider side KDF context, or NULL on failure. |
| 367 |
.PP |
| 368 |
\&\fBOSSL_FUNC_kdf_derive()\fR, \fBOSSL_FUNC_kdf_derive_skey()\fR, \fBOSSL_FUNC_kdf_get_params()\fR, |
| 369 |
\&\fBOSSL_FUNC_kdf_get_ctx_params()\fR, \fBOSSL_FUNC_kdf_set_ctx_params()\fR and |
| 370 |
\&\fBOSSL_FUNC_kdf_set_skey()\fR should return 1 for success or 0 on error. |
| 371 |
.PP |
| 372 |
\&\fBOSSL_FUNC_kdf_gettable_params()\fR, \fBOSSL_FUNC_kdf_gettable_ctx_params()\fR and |
| 373 |
\&\fBOSSL_FUNC_kdf_settable_ctx_params()\fR should return a constant \fBOSSL_PARAM\fR\|(3) |
| 374 |
array, or NULL if none is offered. |
| 375 |
.SH NOTES |
| 376 |
.IX Header "NOTES" |
| 377 |
The KDF life-cycle is described in \fBlife_cycle\-kdf\fR\|(7). Providers should |
| 378 |
ensure that the various transitions listed there are supported. At some point |
| 379 |
the EVP layer will begin enforcing the listed transitions. |
| 380 |
.SH "SEE ALSO" |
| 381 |
.IX Header "SEE ALSO" |
| 382 |
\&\fBprovider\fR\|(7), \fBlife_cycle\-kdf\fR\|(7), \fBEVP_KDF\fR\|(3). |
| 383 |
.SH HISTORY |
| 384 |
.IX Header "HISTORY" |
| 385 |
The provider KDF interface was introduced in OpenSSL 3.0. |
| 386 |
.PP |
| 387 |
\&\fBOSSL_FUNC_kdf_derive_skey()\fR and \fBOSSL_FUNC_kdf_set_skey()\fR were added in OpenSSL 3.6. |
| 388 |
.SH COPYRIGHT |
| 389 |
.IX Header "COPYRIGHT" |
| 390 |
Copyright 2020\-2025 The OpenSSL Project Authors. All Rights Reserved. |
| 391 |
.PP |
| 392 |
Licensed under the Apache License 2.0 (the "License"). You may not use |
| 393 |
this file except in compliance with the License. You can obtain a copy |
| 394 |
in the file LICENSE in the source distribution or at |
| 395 |
<https://www.openssl.org/source/license.html>. |