EVP_SKEYMGMT(3ossl)
π EVP_SKEYMGMT(3ossl) β EVP key management routines for opaque symmetric keys π
okay bestie, sit down, hydrate, and let me tell you about the EVP_SKEYMGMT glow-up β¨ this is from the OpenSSL manuals, and it's giving serious provider-side main character energy π«Ά
πΈ NAME πΈ
EVP_SKEYMGMT, EVP_SKEYMGMT_fetch, EVP_SKEYMGMT_up_ref, EVP_SKEYMGMT_free, EVP_SKEYMGMT_get0_provider, EVP_SKEYMGMT_is_a, EVP_SKEYMGMT_get0_description, EVP_SKEYMGMT_get0_name, EVP_SKEYMGMT_do_all_provided, EVP_SKEYMGMT_names_do_all, EVP_SKEYMGMT_get0_gen_settable_params, EVP_SKEYMGMT_get0_imp_settable_params β EVP key management routines for opaque symmetric keys. iykyk π
β¨ SYNOPSIS β¨
#include <openssl/evp.h>
typedef struct evp_sskeymgmt_st EVP_SKEYMGMT;
EVP_SKEYMGMT *EVP_SKEYMGMT_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
const char *properties);
int EVP_SKEYMGMT_up_ref(EVP_SKEYMGMT *skeymgmt);
void EVP_SKEYMGMT_free(EVP_SKEYMGMT *skeymgmt);
const OSSL_PROVIDER *EVP_SKEYMGMT_get0_provider(const EVP_SKEYMGMT *skeymgmt);
int EVP_SKEYMGMT_is_a(const EVP_SKEYMGMT *skeymgmt, const char *name);
const char *EVP_SKEYMGMT_get0_name(const EVP_SKEYMGMT *skeymgmt);
const char *EVP_SKEYMGMT_get0_description(const EVP_SKEYMGMT *skeymgmt);
void EVP_SKEYMGMT_do_all_provided(OSSL_LIB_CTX *libctx,
void (*fn)(EVP_SKEYMGMT *skeymgmt, void *arg),
void *arg);
int EVP_SKEYMGMT_names_do_all(const EVP_SKEYMGMT *skeymgmt,
void (*fn)(const char *name, void *data),
void *data);
const OSSL_PARAM *EVP_SKEYMGMT_get0_gen_settable_params(const EVP_SKEYMGMT *skeymgmt);
const OSSL_PARAM *EVP_SKEYMGMT_get0_imp_settable_params(const EVP_SKEYMGMT *skeymgmt);
π¦ DESCRIPTION π¦
EVP_SKEYMGMT is a method object that represents symmetric key management implementations for all the different cryptographic algorithms out there. lowkey iconic. π« This method object is the plug that lets providers import key material from the outside, and also export key material to the outside.
ngl, most of the functionality can only be used internally and has no public interface β this opaque object just gets passed into other functions whenever it's needed. it's the quiet friend who shows up to every party but never posts π΅
Here's the full roster, bestie, one by one π
EVP_SKEYMGMT_fetch()β goes looking for an algorithm inside a provider that's been loaded into theOSSL_LIB_CTXgiven byctx, matching the name given byalgorithmand the properties given byproperties.EVP_SKEYMGMT_up_ref()β bumps up the reference count for the givenEVP_SKEYMGMTskeymgmt. β¬οΈEVP_SKEYMGMT_free()β drops the reference count for the givenEVP_SKEYMGMTskeymgmt, and when that count hits zero, it frees it. and if the argument isNULL? nothing happens, we simply do not engage πEVP_SKEYMGMT_get0_provider()β returns the provider that has this particular implementation. πEVP_SKEYMGMT_is_a()β checks ifskeymgmtis an implementation of an algorithm that's identified byname. vibe check βEVP_SKEYMGMT_get0_name()β returns the algorithm name from the provided implementation for the givenskeymgmt. heads up though: theskeymgmtmay have multiple synonyms associated with it, and in that case the first name from the algorithm definition is the one that comes back. Ownership of the returned string stays with theskeymgmtobject, so do not free it yourself, that's not your job π«EVP_SKEYMGMT_names_do_all()β traverses all names for theskeymgmt, and callsfnwith each name anddata. πΆβοΈπΆβοΈπΆβοΈEVP_SKEYMGMT_get0_description()β returns a description of theskeymgmt, meant for display and human consumption. the description is entirely at the discretion of theskeymgmtimplementation, so it can be as extra as it wants πEVP_SKEYMGMT_do_all_provided()β traverses all keyskeymgmtimplementations by all activated providers in the library contextlibctx, and for each of those implementations, callsfnwith the implementation method anddataas arguments. full tour, no skips πEVP_SKEYMGMT_get0_gen_settable_params()andEVP_SKEYMGMT_get0_imp_settable_params()β get a constantOSSL_PARAM(3)array that describes the settable parameters that can be used withEVP_SKEY_generate()andEVP_SKEY_import()correspondingly. π
π NOTES π
EVP_SKEYMGMT_fetch() may be called implicitly by other fetching functions, using the same library context and properties. any other API that uses symmetric keys will typically do this too. so like, it might already be in the group chat without you adding it π
π― RETURN VALUES π―
EVP_SKEYMGMT_fetch()β returns a pointer to the key management implementation represented by anEVP_SKEYMGMTobject, orNULLon error. πEVP_SKEYMGMT_up_ref()β returns1on success, or0on error.EVP_SKEYMGMT_names_do_all()β returns1if the callback was called for all names. a return value of0means the callback was not called for any names.EVP_SKEYMGMT_free()β doesn't return any value. it just β¨existsβ¨EVP_SKEYMGMT_get0_provider()β returns a pointer to a provider object, orNULLon error.EVP_SKEYMGMT_is_a()β returns1ifskeymgmtwas identifiable, otherwise0.EVP_SKEYMGMT_get0_name()β returns the algorithm name, orNULLon error.EVP_SKEYMGMT_get0_description()β returns a pointer to a description, orNULLif there isn't one.
π SEE ALSO π
EVP_SKEY(3), EVP_MD_fetch(3), OSSL_LIB_CTX(3)
go read those next, bestie, they're all connected fr fr π
π°οΈ HISTORY π°οΈ
The EVP_SKEYMGMT structure and the functions EVP_SKEYMGMT_fetch(), EVP_SKEYMGMT_up_ref(), EVP_SKEYMGMT_free(), EVP_SKEYMGMT_get0_provider(), EVP_SKEYMGMT_is_a(), EVP_SKEYMGMT_get0_description(), EVP_SKEYMGMT_get0_name(), EVP_SKEYMGMT_do_all_provided(), EVP_SKEYMGMT_names_do_all(), EVP_SKEYMGMT_get0_gen_settable_params(), EVP_SKEYMGMT_get0_imp_settable_params() were added in OpenSSL 3.5. a whole era was born π
βοΈ COPYRIGHT βοΈ
Copyright 2025 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 one's stamped 3.5.9 and dated 2026-09-29, straight from the EVP_SKEYMGMT(3ossl) OpenSSL manual. now go forth and manage those symmetric keys like the icon you are πβ¨π¦
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms