EVP_PKEY_CTX_SET1_PBE_PASS(3ossl)
π EVP_PKEY_CTX_SET1_PBE_PASS π
okay so bestie, welcome to the 3ossl manual page for EVP_PKEY_CTX_set1_pbe_pass β yes that's a whole mouthful, yes I promise it's actually cute once you get it π
β¨ NAME β¨
EVP_PKEY_CTX_set1_pbe_pass β the generic KDF support functions, aka the little helpers that every KDF algorithm gets to share π
πΈ SYNOPSIS πΈ
#include <openssl/kdf.h>
int EVP_PKEY_CTX_set1_pbe_pass(EVP_PKEY_CTX *pctx, unsigned char *pass,
int passlen);
like, that's it. that's the whole vibe. π¦
π§ DESCRIPTION π§
okay so these functions are generic support functions for all KDF algorithms β no cap, they're the shared bestie squad that every KDF gets to borrow from β¨
EVP_PKEY_CTX_set1_pbe_pass()β sets the password to thepasslenfirst bytes frompass. literally just the firstpasslenbytes. not more, not fewer. the way that it's so precise?? obsessed π
π STRING CTRLS π
there's also support for string based control operations via EVP_PKEY_CTX_ctrl_str(3) β and ngl this part is kinda iconic π
so you can hand over the password in two different ways:
"pass"β the type parameter used to specify the password directly, like just type it out bestie π"hexpass"β the type parameter used to give the password in hex encoding, for when you're feeling extra hexadecimal π
π RETURN VALUES π
all these functions return 1 for success and 0 or a negative value for failure. like yes, 0 is a fail, don't @ me π
and listen β in particular a return value of-2indicates the operation is not supported by the public key algorithm. so if you get-2, it's not you, it's the algorithm. it just doesn't do that π
π₯ SEE ALSO π₯
go read them fr fr, they're the supporting cast and they ate π
β HISTORY β
EVP_PKEY_CTX_set1_pbe_pass() was converted from a macro to a function in OpenSSL 3.0. glow-up era honestly π§ββοΈβ¨
π COPYRIGHT π
Copyright 2018-2020 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>.
and that's the whole page bestie π«Ά this was OpenSSL 3.5.6, dated 2026-04-07 β mwah, stan 3ossl, see you in the next manpage ππ
π¦ 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