EVP_KDF-PKCS12KDF(7ossl)
π EVP_KDF-PKCS12KDF β the PKCS#12 KDF, but make it readable
okay so this is a page from the OpenSSL manual, section 7ossl, and it's all about the PKCS#12 password-based KDF. Bestie, it's literally the key-derivation glow-up you didn't know you needed. Let's get into it π
β¨ NAME β¨
EVP_KDF-PKCS12KDF β The PKCS#12 EVP_KDF implementation. That's the whole vibe. She's a KDF and she's implemented through EVP. Periodt. π
π¦ DESCRIPTION π¦
So this is the support for computing the PKCS#12 password-based KDF through the EVP_KDF API. Yes, THE EVP_KDF API. She's official. π
The EVP_KDF-PKCS12KDF algorithm implements the PKCS#12 password-based key derivation function, as described in appendix B of RFC 7292 (PKCS #12: Personal Information Exchange Syntax). It derives a key from a password using a salt, iteration count and the intended usage. That's the whole recipe β password, salt, iterations, usage. Slay. π§π
πΈ Identity πΈ
"PKCS12KDF" is the name for this implementation. That's her name, use it. It can be used with the EVP_KDF_fetch() function. No cap, that's how you get her. π
β¨ Supported parameters β¨
Here's the full menu of supported parameters β none skipped, all iconique:
"pass"(OSSL_KDF_PARAM_PASSWORD)<octet string>β your password, as bytes."salt"(OSSL_KDF_PARAM_SALT)<octet string>β your salt, also bytes."iter"(OSSL_KDF_PARAM_ITER)<unsigned integer>β how many iterations. More on this later π"properties"(OSSL_KDF_PARAM_PROPERTIES)<UTF8 string>β the properties string."digest"(OSSL_KDF_PARAM_DIGEST)<UTF8 string>β the digest to use.
These parameters work as described in "PARAMETERS" in EVP_KDF(3) β so if you need the deets on those five, that's where they live, bestie.
"id"(OSSL_KDF_PARAM_PKCS12_ID)<integer>β this parameter is used to specify the intended usage of the output bits, as per RFC 7292 section B.3. So like, what are these bits FOR?idknows. π«Ά
π₯ NOTES π₯
Heads up: this algorithm is not available in the FIPS provider as it is not FIPS approvable. Like, she's iconic but she's not FIPS-certified, and that's just the reality. π«
A typical application of this algorithm is to derive keying material for an encryption algorithm from a password in "pass", a salt in "salt", and an iteration count. That's the classic use case β password in, keying material out. π«
Increasing the "iter" parameter slows down the algorithm, which makes it harder for an attacker to perform a brute force attack using a large number of candidate passwords. So yes, more iterations = more pain for the attackers. We love to see it. π‘οΈ
No assumption is made regarding the given password; it is simply treated as a byte sequence. She does not judge your password. She just sees bytes. Fr fr. π§
π CONFORMING TO π
RFC7292 β that's the one. She conforms and she's proud of it. β
π SEE ALSO π
Go check these out, iykyk:
EVP_KDF(3)EVP_KDF_CTX_new(3)EVP_KDF_CTX_free(3)EVP_KDF_CTX_set_params(3)EVP_KDF_derive(3)"PARAMETERS"inEVP_KDF(3)OSSL_PROVIDER-FIPS(7)
π HISTORY π
This functionality was added in OpenSSL 3.0. So she's been here since 3.0, serving looks. π
π COPYRIGHT π
Copyright 2020-2023 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
okay that's the whole page, bestie β every flag, every param, every caveat, all of it, untouched factually and fully served π
Sign-off: this was EVP_KDF-PKCS12KDF(7ossl) from OpenSSL 3.5.6, dated 2026-04-07. Drink some water, rotate your salts, and go derive some keys responsibly. πβ¨π¦
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms