PROVIDER-KEYMGMT(7SSL)
π PROVIDER-KEYMGMT π (that's the 7SSL manual, bestie)
okay so this is the OpenSSL page for provider-keymgmt, and no cap, it is the page about the KEYMGMT library <-> provider functions. it's giving internal plumbing, but the plumbing is iconic β¨
β¨ SYNOPSIS β¨
#include <openssl/core_dispatch.h>
/*
* None of these are actual functions, but are displayed like this for
* the function signatures for functions that are offered as function
* pointers in OSSL_DISPATCH arrays.
*/
/* Key object (keydata) creation and destruction */
void *OSSL_FUNC_keymgmt_new(void *provctx);
void *OSSL_FUNC_keymgmt_new_ex(void *provctx, const OSSL_PARAM params[]);
void OSSL_FUNC_keymgmt_free(void *keydata);
/* Generation, a more complex constructor */
void *OSSL_FUNC_keymgmt_gen_init(void *provctx, int selection,
const OSSL_PARAM params[]);
int OSSL_FUNC_keymgmt_gen_set_template(void *genctx, void *template);
int OSSL_FUNC_keymgmt_gen_get_params(void *genctx, OSSL_PARAM params[]);
int OSSL_FUNC_keymgmt_gen_set_params(void *genctx, const OSSL_PARAM params[]);
const OSSL_PARAM *OSSL_FUNC_keymgmt_gen_gettable_params(void *genctx,
void *provctx);
const OSSL_PARAM *OSSL_FUNC_keymgmt_gen_settable_params(void *genctx,
void *provctx);
void *OSSL_FUNC_keymgmt_gen(void *genctx, OSSL_CALLBACK *cb, void *cbarg);
void OSSL_FUNC_keymgmt_gen_cleanup(void *genctx);
/* Key loading by object reference, also a constructor */
void *OSSL_FUNC_keymgmt_load(const void *reference, size_t reference_sz);
/* Key object information */
int OSSL_FUNC_keymgmt_get_params(void *keydata, OSSL_PARAM params[]);
const OSSL_PARAM *OSSL_FUNC_keymgmt_gettable_params(void *provctx);
int OSSL_FUNC_keymgmt_set_params(void *keydata, const OSSL_PARAM params[]);
const OSSL_PARAM *OSSL_FUNC_keymgmt_settable_params(void *provctx);
/* Key object content checks */
int OSSL_FUNC_keymgmt_has(const void *keydata, int selection);
int OSSL_FUNC_keymgmt_match(const void *keydata1, const void *keydata2,
int selection);
/* Discovery of supported operations */
const char *OSSL_FUNC_keymgmt_query_operation_name(int operation_id);
/* Key object import and export functions */
int OSSL_FUNC_keymgmt_import(void *keydata, int selection, const OSSL_PARAM params[]);
const OSSL_PARAM *OSSL_FUNC_keymgmt_import_types(int selection);
const OSSL_PARAM *OSSL_FUNC_keymgmt_import_types_ex(void *provctx, int selection);
int OSSL_FUNC_keymgmt_export(void *keydata, int selection,
OSSL_CALLBACK *param_cb, void *cbarg);
const OSSL_PARAM *OSSL_FUNC_keymgmt_export_types(int selection);
const OSSL_PARAM *OSSL_FUNC_keymgmt_export_types_ex(void *provctx, int selection);
/* Key object duplication, a constructor */
void *OSSL_FUNC_keymgmt_dup(const void *keydata_from, int selection);
/* Key object validation */
int OSSL_FUNC_keymgmt_validate(const void *keydata, int selection, int checktype);
π¦ DESCRIPTION π¦
okay so real talk β the KEYMGMT operation doesn't really have much public visibility in the OpenSSL libraries. she's lowkey an internal operation, designed to work in tandem with operations that use private/public key pairs. behind-the-scenes main character energy π
and because KEYMGMT shares knowledge with the operations it works with in tandem, they must belong to the same provider. the OpenSSL libraries will make sure that they do. no mixing, no matching, periodt.
the primary responsibility of the KEYMGMT operation is to hold the provider side key data for the OpenSSL library EVP_PKEY structure. that's the whole gig β¨
all the "functions" mentioned here are passed as function pointers between libcrypto and the provider in OSSL_DISPATCH(3) arrays via OSSL_ALGORITHM(3) arrays that get returned by the provider's provider_query_operation() function (peep "Provider Functions" in provider-base(7)).
and every single one of these "functions" has a matching function type definition named OSSL_FUNC_{name}_fn, plus a helper function to grab the function pointer from an OSSL_DISPATCH(3) element named OSSL_FUNC_{name}. like, for example, the "function" OSSL_FUNC_keymgmt_new() has these:
typedef void *(OSSL_FUNC_keymgmt_new_fn)(void *provctx);
static ossl_inline OSSL_FUNC_keymgmt_new_fn
OSSL_FUNC_keymgmt_new(const OSSL_DISPATCH *opf);
OSSL_DISPATCH(3) arrays are indexed by numbers that are provided as macros in openssl-core_dispatch.h(7), and they line up like this:
OSSL_FUNC_keymgmt_new OSSL_FUNC_KEYMGMT_NEW
OSSL_FUNC_keymgmt_free OSSL_FUNC_KEYMGMT_FREE
OSSL_FUNC_keymgmt_gen_init OSSL_FUNC_KEYMGMT_GEN_INIT
OSSL_FUNC_keymgmt_gen_set_template OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE
OSSL_FUNC_keymgmt_gen_get_params OSSL_FUNC_KEYMGMT_GEN_GET_PARAMS
OSSL_FUNC_keymgmt_gen_gettable_params OSSL_FUNC_KEYMGMT_GEN_GETTABLE_PARAMS
OSSL_FUNC_keymgmt_gen_set_params OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS
OSSL_FUNC_keymgmt_gen_settable_params OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS
OSSL_FUNC_keymgmt_gen OSSL_FUNC_KEYMGMT_GEN
OSSL_FUNC_keymgmt_gen_cleanup OSSL_FUNC_KEYMGMT_GEN_CLEANUP
OSSL_FUNC_keymgmt_load OSSL_FUNC_KEYMGMT_LOAD
OSSL_FUNC_keymgmt_get_params OSSL_FUNC_KEYMGMT_GET_PARAMS
OSSL_FUNC_keymgmt_gettable_params OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS
OSSL_FUNC_keymgmt_set_params OSSL_FUNC_KEYMGMT_SET_PARAMS
OSSL_FUNC_keymgmt_settable_params OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS
OSSL_FUNC_keymgmt_query_operation_name OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME
OSSL_FUNC_keymgmt_has OSSL_FUNC_KEYMGMT_HAS
OSSL_FUNC_keymgmt_validate OSSL_FUNC_KEYMGMT_VALIDATE
OSSL_FUNC_keymgmt_match OSSL_FUNC_KEYMGMT_MATCH
OSSL_FUNC_keymgmt_import OSSL_FUNC_KEYMGMT_IMPORT
OSSL_FUNC_keymgmt_import_types OSSL_FUNC_KEYMGMT_IMPORT_TYPES
OSSL_FUNC_keymgmt_import_types_ex OSSL_FUNC_KEYMGMT_IMPORT_TYPES_EX
OSSL_FUNC_keymgmt_export OSSL_FUNC_KEYMGMT_EXPORT
OSSL_FUNC_keymgmt_export_types OSSL_FUNC_KEYMGMT_EXPORT_TYPES
OSSL_FUNC_keymgmt_export_types_ex OSSL_FUNC_KEYMGMT_EXPORT_TYPES_EX
OSSL_FUNC_keymgmt_dup OSSL_FUNC_KEYMGMT_DUP
π Key Objects π
a key object is a collection of data for an asymmetric key, and in this manual it gets called keydata. cute, right?
the exact contents of a key object are defined by the provider, and it's assumed that different operations in one and the same provider use the exact same structure to represent this collection of data. so like, a key object that was created using the KEYMGMT interface we're documenting right here can be passed as-is to other provider operations, such as OP_signature_sign_init() (see provider-signature(7)). sharing is caring π«Ά
with some of the KEYMGMT functions, it's possible to select a specific subset of data to handle, governed by the bits in a selection indicator. the bits are:
OSSL_KEYMGMT_SELECT_PRIVATE_KEYβ indicating that the private key data in a key object should be considered.OSSL_KEYMGMT_SELECT_PUBLIC_KEYβ indicating that the public key data in a key object should be considered.OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERSβ indicating that the domain parameters in a key object should be considered.OSSL_KEYMGMT_SELECT_OTHER_PARAMETERSβ indicating that other parameters in a key object should be considered.
other parameters are key parameters that don't fit any other classification. in other words, this particular selector bit works as a last resort bit bucket selector. it's the catch-all bestie π
some selector bits have also been combined for easier use:
OSSL_KEYMGMT_SELECT_ALL_PARAMETERSβ indicating that all key object parameters should be considered, regardless of their more granular classification.
this is a combination of OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS and OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS.
OSSL_KEYMGMT_SELECT_KEYPAIRβ indicating that both the whole key pair in a key object should be considered, i.e. the combination of public and private key.
this is a combination of OSSL_KEYMGMT_SELECT_PRIVATE_KEY and OSSL_KEYMGMT_SELECT_PUBLIC_KEY.
OSSL_KEYMGMT_SELECT_ALLβ indicating that everything in a key object should be considered.
the exact interpretation of those bits or how they combine is left to each function where you can specify a selector. it's also left to the provider implementation to decide what's reasonable to do with regards to received selector bits and how to do it. among others, an implementation of OSSL_FUNC_keymgmt_match() might opt to not compare the private half if it has already compared the public half, since a match of one half implies a match of the other half. efficient! we love to see it π
π Constructing and Destructing Functions π
OSSL_FUNC_keymgmt_new()should create a provider side key object. the provider contextprovctxis passed and may be incorporated in the key object, but that is not mandatory.OSSL_FUNC_keymgmt_new_ex()may optionally be defined and does the same asOSSL_FUNC_keymgmt_new(), but also accepts an array of parameters. currently no parameters are defined for this function.OSSL_FUNC_keymgmt_free()should free the passedkeydata.OSSL_FUNC_keymgmt_gen_init(),OSSL_FUNC_keymgmt_gen_set_template(),OSSL_FUNC_keymgmt_gen_get_params(),OSSL_FUNC_keymgmt_gen_gettable_params(),OSSL_FUNC_keymgmt_gen_set_params(),OSSL_FUNC_keymgmt_gen_settable_params(),OSSL_FUNC_keymgmt_gen()andOSSL_FUNC_keymgmt_gen_cleanup()work together as a more elaborate context based key object constructor. it's a whole squad fr fr β¨OSSL_FUNC_keymgmt_gen_init()should create the key object generation context and initialize it withselections, which will determine what kind of contents the key object to be generated should get. theparams, if notNULL, should be set on the context in a manner similar to usingOSSL_FUNC_keymgmt_set_params().OSSL_FUNC_keymgmt_gen_set_template()should addtemplateto the contextgenctx. thetemplateis assumed to be a key object constructed with the same KEYMGMT, and from which content that the implementation chooses can be used as a template for the key object to be generated. typically, the generation of a DSA or DH key would get the domain parameters from this template.OSSL_FUNC_keymgmt_gen_get_params()should retrieve parameters intoparamsin the key object generation contextgenctx.OSSL_FUNC_keymgmt_gen_gettable_params()should return a constant array of descriptorOSSL_PARAM(3), for parameters thatOSSL_FUNC_keymgmt_gen_get_params()can handle.OSSL_FUNC_keymgmt_gen_set_params()should set additional parameters fromparamsin the key object generation contextgenctx.OSSL_FUNC_keymgmt_gen_settable_params()should return a constant array of descriptorOSSL_PARAM(3), for parameters thatOSSL_FUNC_keymgmt_gen_set_params()can handle.
πΈ okay bestie that's part 1! there's more coming, don't go anywhere π
OSSL_FUNC_keymgmt_gen() is the one that actually β¨does the thingβ¨ β it's the whole key object generation moment, bestie. It generates the key object itself and hands back the result. And the cb callback? You're calling that at regular intervals to spill how far along the generation is, like a little progress bar for your bestie π
OSSL_FUNC_keymgmt_gen_cleanup() handles the β¨aftermathβ¨ β it cleans up and frees the key object generation context genctx. Say thank you and let it go π
OSSL_FUNC_keymgmt_load() builds a provider-side key object from a reference object that's reference_sz bytes big. Only the provider knows how to interpret it, but listen β that reference can come from other operations too. Outside the provider? It's literally just an array of bytes. Nothing more, nothing less π¦
β οΈ Mandatory-functions vibe check: you need at least one ofOSSL_FUNC_keymgmt_new(),OSSL_FUNC_keymgmt_gen()andOSSL_FUNC_keymgmt_load()β that's non-negotiable. AlsoOSSL_FUNC_keymgmt_free()andOSSL_FUNC_keymgmt_has()are required, periodt. And if you've gotOSSL_FUNC_keymgmt_gen()in the mix, thenOSSL_FUNC_keymgmt_gen_init()andOSSL_FUNC_keymgmt_gen_cleanup()must be there too. Package deal, no exceptions π
π§ Key Object Information Functions π
OSSL_FUNC_keymgmt_get_params() pulls out the info data attached to the given keydata β go check out "Common Information Parameters" for the deets π
OSSL_FUNC_keymgmt_gettable_params() returns a constant array of descriptor OSSL_PARAM(3), covering all the parameters that OSSL_FUNC_keymgmt_get_params() can handle β¨
Ok so ifOSSL_FUNC_keymgmt_gettable_params()is present, thenOSSL_FUNC_keymgmt_get_params()must be present too β and vice versa. They're a package deal, they do not go anywhere without each other π
OSSL_FUNC_keymgmt_set_params() updates the info data attached to the given keydata β again, see "Common Information Parameters" πΈ
OSSL_FUNC_keymgmt_settable_params() returns a constant array of descriptor OSSL_PARAM(3), covering all the parameters that OSSL_FUNC_keymgmt_set_params() can handle β¨
Same rule, different duo: ifOSSL_FUNC_keymgmt_settable_params()is present,OSSL_FUNC_keymgmt_set_params()must be present too β and vice versa. Iconic symmetry tbh π«Ά
π Key Object Checking Functions π
OSSL_FUNC_keymgmt_query_operation_name() should return the name of the supported algorithm for the operation_id operation. It's lowkey similar to provider_query_operation() (peep provider-base(7)), but it only works as an advisory. So if this function isn't there, or it returns NULL? The caller is totally free to assume there's an algorithm from the same provider, with the same name as the one used to fetch the keymgmt, and just try to use that. Casual π
OSSL_FUNC_keymgmt_has() checks whether the given keydata contains the subsets of data indicated by the selector. And careful β a combination of several selector bits has to consider all those subsets, not just one of them. That said, an implementation is free to consider an empty subset of data as still being a valid subset β¨
For algorithms where some selection isn't meaningful β likeOSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERSfor RSA keys β the function should justreturn 1, because that selected subset isn't really missing from the key. No drama needed π
OSSL_FUNC_keymgmt_validate() checks if the keydata contains valid data subsets indicated by selection. Some combined selections of data subsets may trigger validation of the combined data. For example, the combination of OSSL_KEYMGMT_SELECT_PRIVATE_KEY and OSSL_KEYMGMT_SELECT_PUBLIC_KEY (or OSSL_KEYMGMT_SELECT_KEYPAIR for short) is expected to check that the pairwise consistency of keydata is valid. The checktype parameter controls what type of check gets performed on the subset of data. Two types of check are defined: OSSL_KEYMGMT_VALIDATE_FULL_CHECK and OSSL_KEYMGMT_VALIDATE_QUICK_CHECK. How much checking actually happens in a full check versus a quick check is key type specific β some providers straight up have no distinction between the two. And for algorithms where some selection isn't meaningful, like OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS for RSA keys, the function should just return 1, because there's literally nothing to validate for that selection π
OSSL_FUNC_keymgmt_match() checks if the data subset indicated by selection in keydata1 and keydata2 match. And it's assumed that the caller already made sure keydata1 and keydata2 are both owned by the implementation of this function. That's a you problem, not a me problem π
π¦ Key Object Import, Export and Duplication Functions π
OSSL_FUNC_keymgmt_import() imports data indicated by selection into keydata, with the values taken from the OSSL_PARAM(3) array params β¨
OSSL_FUNC_keymgmt_export() extracts the values indicated by selection from keydata, builds an OSSL_PARAM(3) array with them, then calls param_cb with that array plus the given cbarg π
OSSL_FUNC_keymgmt_import_types() and OSSL_FUNC_keymgmt_import_types_ex() return a constant array of descriptor OSSL_PARAM(3) for the data indicated by selection β for the parameters that OSSL_FUNC_keymgmt_import() can handle.
Fr fr, this matters: eitherOSSL_FUNC_keymgmt_import_types()orOSSL_FUNC_keymgmt_import_types_ex()must be implemented. IfOSSL_FUNC_keymgmt_import_types_ex()is implemented, then it is preferred overOSSL_FUNC_keymgmt_import_types(). And providers that are supposed to be backward compatible with OpenSSL 3.0 or 3.1 must continue to implementOSSL_FUNC_keymgmt_import_types(). No skipping π€
OSSL_FUNC_keymgmt_export_types() and OSSL_FUNC_keymgmt_export_types_ex() return a constant array of descriptor OSSL_PARAM(3) for the data indicated by selection, which is data that the OSSL_FUNC_keymgmt_export() callback can expect to receive.
Same energy here: eitherOSSL_FUNC_keymgmt_export_types()orOSSL_FUNC_keymgmt_export_types_ex()must be implemented. IfOSSL_FUNC_keymgmt_export_types_ex()is implemented, it is preferred overOSSL_FUNC_keymgmt_export_types(). And providers that need to stay backward compatible with OpenSSL 3.0 or 3.1 must continue to implementOSSL_FUNC_keymgmt_export_types()π«Ά
OSSL_FUNC_keymgmt_dup() duplicates the data subsets indicated by selection, or the whole key data keydata_from, and creates a new provider-side key object with that data. Copy-paste but make it β¨legitβ¨ π¦
π Common Information Parameters πΈ
Peep OSSL_PARAM(3) for the full rundown on the parameters structure π
The common information parameters that are currently recognised by all built-in keymgmt algorithms are, as follows:
"bits"(OSSL_PKEY_PARAM_BITS)<integer>β the value should be the cryptographic length of the cryptosystem the key belongs to, in bits. And how "cryptographic length" is defined is specific to that key cryptosystem, iykyk β¨"max-size"(OSSL_PKEY_PARAM_MAX_SIZE)<integer>β the value should be the maximum size a caller should allocate to safely store a signature (that'ssiginprovider-signature(7)), the result of asymmetric encryption / decryption (outinprovider-asym_cipher(7)), a derived secret (secretinprovider-keyexch(7)), and similar data.
Providers need to implement this parameter in order to properly support various use cases such as CMS signing π₯
Because an EVP_KEYMGMT method is always tightly bound to another method (signature, asymmetric cipher, key exchange, ...) and has to be from the same provider, this number only needs to be synchronised with the dimensions handled in the rest of the same provider. Stay in your lane bestie π
"security-bits"(OSSL_PKEY_PARAM_SECURITY_BITS)<integer>β the value should be the number of security bits of the given key. Bits of security is defined in SP800-57 π"security-category"(OSSL_PKEY_PARAM_SECURITY_CATEGORY)<integer>β the value is the NIST post-quantum security category (link:https://nvlpubs.nist.gov/nistpubs/ir/2024/NIST.IR.8547.ipd.pdf) for the algorithm. It's an integer value in the range[0, 5], inclusive π¦"mandatory-digest"(OSSL_PKEY_PARAM_MANDATORY_DIGEST)<UTF8 string>β if there's a mandatory digest for performing a signature operation with keys from this keymgmt, this parameter should get its name as value.
When EVP_PKEY_get_default_digest_name() queries this parameter and the implementation fills it in, its return value will be 2 β¨
If the keymgmt implementation fills in the value "" or "UNDEF", then EVP_PKEY_get_default_digest_name(3) will place the string "UNDEF" into its argument mdname. That signifies no digest should be specified with the corresponding signature operation π
"default-digest"(OSSL_PKEY_PARAM_DEFAULT_DIGEST)<UTF8 string>β if there's a default digest for performing a signature operation with keys from this keymgmt, this parameter should get its name as value.
When EVP_PKEY_get_default_digest_name(3) queries this parameter and the implementation fills it in, its return value will be 1. But heads up β if OSSL_PKEY_PARAM_MANDATORY_DIGEST gets responded to as well, then EVP_PKEY_get_default_digest_name(3) ignores the response to this parameter. Sorry not sorry π
If the keymgmt implementation fills in the value "" or "UNDEF", then EVP_PKEY_get_default_digest_name(3) will place the string "UNDEF" into its argument mdname. That signifies no digest has to be specified with the corresponding signature operation, though it may still be specified as an option. Optional queen behavior π
"ri-type"(OSSL_PKEY_PARAM_CMS_RI_TYPE)<integer>β the value should be the CMS RecipientInfo type for the given key, likeCMS_RECIPINFO_KEMorCMS_RECIPINFO_AGREE. The values you can pass through this parameter live in<openssl/cms.h>, and the macros all have names starting with"CMS_RECIPINFO_"πΈ
CMS will query this parameter first to work out the RecipientInfo type. If this parameter isn't filled in, CMS will check for known key types and map them to the appropriate RecipientInfo type. Otherwise, CMS will default to using CMS_RECIPINFO_TRANS. Default behavior, we love to see it π
"kemri-kdf-alg"(OSSL_PKEY_PARAM_CMS_KEMRI_KDF_ALGORITHM)<UTF8 string>β the value should be the DER-encodedX509_ALGORfor the default KDF for this key, if it supports the KEMRecipientInfo (CMS_RECIPINFO_KEM) type π₯
Any KDF that takes OSSL_KDF_PARAM_KEY and OSSL_KDF_PARAM_INFO parameters and is otherwise fully defined by its OID can be used β for example, HKDF-SHA256 β¨
If OSSL_PKEY_PARAM_CMS_KEMRI_KDF_ALGORITHM isn't implemented, then HKDF-SHA256 will be used as the default KDF π
The OpenSSL FIPS provider also supports the following parameters:
"fips-indicator"(OSSL_PKEY_PARAM_FIPS_APPROVED_INDICATOR)<integer>β a getter that returns1if the operation is FIPS approved, or0otherwise. This may be used after calling theOSSL_FUNC_keymgmt_gen()function. It may return0if either the"key-check"or"sign-check"are set to0π"key-check"(OSSL_PKEY_PARAM_FIPS_KEY_CHECK) <integer> β bestie, if you need this one, set it withOSSL_FUNC_keymgmt_gen_set_params()orOSSL_FUNC_keymgmt_gen_init(). The default is1, which means if your key ain't FIPS approved (think: security strength under 112 bits π) you get an error right at init. Set it to0and the error justβ¦ gets ignored, and the approved"fips-indicator"flips to0. Heads up: this option breaks FIPS compliance if it makes that"fips-indicator"return0. Not the vibe you want in a compliance audit π"sign-check"(OSSL_PKEY_PARAM_FIPS_SIGN_CHECK) <integer> β if you need it, set this before theOSSL_FUNC_keymgmt_gen()function runs. Also ngl, not every keygen algorithm supports it. Default is1, which throws an error if the freshly generated key isn't allowed to sign. Set it to0and the error is ignored and the approved"fips-indicator"gets set to0. Same warning as above, no cap: this option breaks FIPS compliance if that"fips-indicator"ends up returning0.
β¨ RETURN VALUES β¨
Okay so here's the receipts on what each function hands back π
OSSL_FUNC_keymgmt_new()andOSSL_FUNC_keymgmt_dup()β should return a valid reference to the brand new provider side key object you just made, orNULLif it flopped.OSSL_FUNC_keymgmt_import(),OSSL_FUNC_keymgmt_export(),OSSL_FUNC_keymgmt_get_params()andOSSL_FUNC_keymgmt_set_params()β return1for slay,0on error.OSSL_FUNC_keymgmt_validate()β1when validation succeeds,0when it doesn't.OSSL_FUNC_keymgmt_has()β1if all the selected data subsets are sitting inside the given keydata,0if not.OSSL_FUNC_keymgmt_query_operation_name()β returns a pointer to a string matching the requested operation, orNULLif the same name you used to fetch the keymgmt applies.OSSL_FUNC_keymgmt_gettable_params()andOSSL_FUNC_keymgmt_settable_params(),OSSL_FUNC_keymgmt_import_types(),OSSL_FUNC_keymgmt_import_types_ex(),OSSL_FUNC_keymgmt_export_types(),OSSL_FUNC_keymgmt_export_types_ex()β should always return a constantOSSL_PARAM(3)array. Always. Periodt.
πΈ NOTES πΈ
LMS support is disabled by default at compile-time, fr fr. If you want it, specify the enable-lms build configuration option. That's the whole trick bestie π«Ά
π SEE ALSO π
EVP_PKEY_get_size(3), EVP_PKEY_get_bits(3), EVP_PKEY_get_security_bits(3), provider(7), EVP_PKEY-X25519(7), EVP_PKEY-X448(7), EVP_PKEY-ED25519(7), EVP_PKEY-ED448(7), EVP_PKEY-EC(7), EVP_PKEY-RSA(7), EVP_PKEY-DSA(7), EVP_PKEY-DH(7), EVP_PKEY-LMS(7), EVP_PKEY-ML-DSA(7), EVP_PKEY-ML-KEM(7), EVP_PKEY-SLH-DSA(7).
π¦ HISTORY π¦
The lore, in order β¨
- The KEYMGMT interface was introduced in OpenSSL 3.0.
- Functions
OSSL_FUNC_keymgmt_import_types_ex()andOSSL_FUNC_keymgmt_export_types_ex()were added with OpenSSL 3.2. - The functions
OSSL_FUNC_keymgmt_gen_get_params()andOSSL_FUNC_keymgmt_gen_gettable_params()were added in OpenSSL 3.4. - The parameters
"sign-check"and"fips-indicator"were added in OpenSSL 3.4. - Support for the ML-DSA, ML-KEM and SLH-DSA algorithms was added in OpenSSL 3.5.
- Support for the LMS algorithm was added in OpenSSL 3.6.
π COPYRIGHT π
Copyright 2019-2026 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>.
That's a wrap on the whole page bestie π This part shipped as version 4.0.3, dated 2026-09-29, and it lives in the man page PROVIDER-KEYMGMT(7SSL). Go read the whole thing top to bottom, you ate this π
β¨
π¦ where this page comes from
- ubuntu stonking: openssl 4.0.3-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms