| 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 "EVP_KDF-PBKDF2 7SSL" |
| 58 |
.TH EVP_KDF-PBKDF2 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 |
EVP_KDF\-PBKDF2 \- The PBKDF2 EVP_KDF implementation |
| 65 |
.SH DESCRIPTION |
| 66 |
.IX Header "DESCRIPTION" |
| 67 |
Support for computing the \fBPBKDF2\fR password-based KDF through the \fBEVP_KDF\fR |
| 68 |
API. |
| 69 |
.PP |
| 70 |
The EVP_KDF\-PBKDF2 algorithm implements the PBKDF2 password-based key |
| 71 |
derivation function, as described in SP800\-132; it derives a key from a password |
| 72 |
using a salt and iteration count. |
| 73 |
.PP |
| 74 |
The output is considered to be a cryptographic key. |
| 75 |
.SS Identity |
| 76 |
.IX Subsection "Identity" |
| 77 |
"PBKDF2" is the name for this implementation; it |
| 78 |
can be used with the \fBEVP_KDF_fetch()\fR function. |
| 79 |
.SS "Supported parameters" |
| 80 |
.IX Subsection "Supported parameters" |
| 81 |
The supported parameters are: |
| 82 |
.IP """pass"" (\fBOSSL_KDF_PARAM_PASSWORD\fR) <octet string>" 4 |
| 83 |
.IX Item """pass"" (OSSL_KDF_PARAM_PASSWORD) <octet string>" |
| 84 |
.PD 0 |
| 85 |
.IP """salt"" (\fBOSSL_KDF_PARAM_SALT\fR) <octet string>" 4 |
| 86 |
.IX Item """salt"" (OSSL_KDF_PARAM_SALT) <octet string>" |
| 87 |
.IP """iter"" (\fBOSSL_KDF_PARAM_ITER\fR) <unsigned integer>" 4 |
| 88 |
.IX Item """iter"" (OSSL_KDF_PARAM_ITER) <unsigned integer>" |
| 89 |
.PD |
| 90 |
This parameter has a default value of 2048. |
| 91 |
.IP """properties"" (\fBOSSL_KDF_PARAM_PROPERTIES\fR) <UTF8 string>" 4 |
| 92 |
.IX Item """properties"" (OSSL_KDF_PARAM_PROPERTIES) <UTF8 string>" |
| 93 |
.PD 0 |
| 94 |
.IP """digest"" (\fBOSSL_KDF_PARAM_DIGEST\fR) <UTF8 string>" 4 |
| 95 |
.IX Item """digest"" (OSSL_KDF_PARAM_DIGEST) <UTF8 string>" |
| 96 |
.PD |
| 97 |
These parameters work as described in "PARAMETERS" in \fBEVP_KDF\fR\|(3). |
| 98 |
.IP """pkcs5"" (\fBOSSL_KDF_PARAM_PKCS5\fR) <integer>" 4 |
| 99 |
.IX Item """pkcs5"" (OSSL_KDF_PARAM_PKCS5) <integer>" |
| 100 |
This parameter can be used to enable or disable SP800\-132 compliance checks. |
| 101 |
Setting the mode to 0 enables the compliance checks. |
| 102 |
.Sp |
| 103 |
The checks performed are: |
| 104 |
.RS 4 |
| 105 |
.IP "\- the iteration count is at least 1000." 4 |
| 106 |
.IX Item "- the iteration count is at least 1000." |
| 107 |
.PD 0 |
| 108 |
.IP "\- the salt length is at least 128 bits." 4 |
| 109 |
.IX Item "- the salt length is at least 128 bits." |
| 110 |
.IP "\- the derived key length is at least 112 bits." 4 |
| 111 |
.IX Item "- the derived key length is at least 112 bits." |
| 112 |
.RE |
| 113 |
.RS 4 |
| 114 |
.PD |
| 115 |
.Sp |
| 116 |
The default provider uses a default mode of 1 for backwards compatibility, |
| 117 |
and the FIPS provider uses a default mode of 0. |
| 118 |
This option breaks FIPS compliance if it causes the approved "fips-indicator" |
| 119 |
to return 0. |
| 120 |
.RE |
| 121 |
.IP """fips-indicator"" (\fBOSSL_KDF_PARAM_FIPS_APPROVED_INDICATOR\fR) <integer>" 4 |
| 122 |
.IX Item """fips-indicator"" (OSSL_KDF_PARAM_FIPS_APPROVED_INDICATOR) <integer>" |
| 123 |
This option is used by the OpenSSL FIPS provider. |
| 124 |
.Sp |
| 125 |
A getter that returns 1 if the operation is FIPS approved, or 0 otherwise. |
| 126 |
This may be used after calling EVP_KDF_derive. It returns 0 if "pkcs5" |
| 127 |
is set to 1 and the derived key length, salt length or iteration count test |
| 128 |
fails. |
| 129 |
.SH NOTES |
| 130 |
.IX Header "NOTES" |
| 131 |
A typical application of this algorithm is to derive keying material for an |
| 132 |
encryption algorithm from a password in the "pass", a salt in "salt", |
| 133 |
and an iteration count. |
| 134 |
.PP |
| 135 |
Increasing the "iter" parameter slows down the algorithm which makes it |
| 136 |
harder for an attacker to perform a brute force attack using a large number |
| 137 |
of candidate passwords. |
| 138 |
.PP |
| 139 |
No assumption is made regarding the given password; it is simply treated as a |
| 140 |
byte sequence. |
| 141 |
.SH "CONFORMING TO" |
| 142 |
.IX Header "CONFORMING TO" |
| 143 |
SP800\-132 |
| 144 |
.SH "SEE ALSO" |
| 145 |
.IX Header "SEE ALSO" |
| 146 |
\&\fBEVP_KDF\fR\|(3), |
| 147 |
\&\fBEVP_KDF_CTX_new\fR\|(3), |
| 148 |
\&\fBEVP_KDF_CTX_free\fR\|(3), |
| 149 |
\&\fBEVP_KDF_CTX_set_params\fR\|(3), |
| 150 |
\&\fBEVP_KDF_derive\fR\|(3), |
| 151 |
"PARAMETERS" in \fBEVP_KDF\fR\|(3) |
| 152 |
.SH HISTORY |
| 153 |
.IX Header "HISTORY" |
| 154 |
This functionality was added in OpenSSL 3.0. |
| 155 |
.SH COPYRIGHT |
| 156 |
.IX Header "COPYRIGHT" |
| 157 |
Copyright 2018\-2024 The OpenSSL Project Authors. All Rights Reserved. |
| 158 |
.PP |
| 159 |
Licensed under the Apache License 2.0 (the "License"). You may not use |
| 160 |
this file except in compliance with the License. You can obtain a copy |
| 161 |
in the file LICENSE in the source distribution or at |
| 162 |
<https://www.openssl.org/source/license.html>. |