PROVIDER(7SSL)

πŸ’– NAME πŸ’–

okay bestie, so this page is all about provider β€” the OpenSSL operation implementation providers. that's the whole vibe. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <openssl/provider.h>

🌸 DESCRIPTION 🌸

✨ General ✨

so like, this page is literally here to help provider authors β€” hi, that's you, you gorgeous legend πŸ‘‘. everything on this page is info that's useful to you.

a provider, in OpenSSL language, is a unit of code that serves up one or more implementations for all sorts of operations across all sorts of algorithms you might wanna do. it's giving "one little module, so many talents" energy πŸ’…

an operation is a thing you wanna do β€” like encryption and decryption, key derivation, MAC calculation, signing and verification, etc. you know, the classics.

an algorithm is a named method to perform an operation. very often the algorithms revolve around cryptographic operations, but ngl they can also revolve around other types of operation too, like managing certain types of objects. versatile queen behavior 🌈

see crypto(7) for further details, if you want the extended lore.

πŸŽ€ Provider πŸŽ€

so a provider offers an initialization function, as a set of base functions in the form of an OSSL_DISPATCH(3) array, and by extension, a set of OSSL_ALGORITHM(3)s (peep openssl-core.h(7)). it can be a dynamically loadable module, OR it can be built-in β€” in the OpenSSL libraries or in the application. your choice, main character πŸ’–

  • if it's a dynamically loadable module, the initialization function must be named OSSL_provider_init and must be exported. no cap, that part is mandatory.
  • if it's built-in, the initialization function may have any name. free-spirited.

the initialization function must have this exact signature:

int NAME(const OSSL_CORE_HANDLE *handle,
         const OSSL_DISPATCH *in, const OSSL_DISPATCH **out,
         void **provctx);

okay let's break down these little guys 🫢

  • handle β€” this is the OpenSSL library object for the provider, and it works as a handle for everything the OpenSSL libraries need to know about the provider. for the provider itself, it gets passed to some of the functions given in the dispatch array in.
  • in β€” a dispatch array of base functions offered by the OpenSSL libraries. the available functions are described further in provider-base(7).
  • *out β€” must be assigned a dispatch array of base functions that the provider offers to the OpenSSL libraries. the functions that may be offered are described further in provider-base(7), and they are the central means of communication between the OpenSSL libraries and the provider. it's giving group-chat-DM energy, truly.
  • *provctx β€” should be assigned a provider specific context to allow the provider multiple simultaneous uses. this pointer will be passed to various operation functions offered by the provider. multitasking icon ⭐
note: the provider will not be made available for applications to use until the initialization function has completed and returned successfully. so don't be impatient, bestie, let it finish its lil journey πŸ™ˆ

one of the functions the provider offers to the OpenSSL libraries is the central mechanism for the OpenSSL libraries to get access to operation implementations for diverse algorithms. it's referred to with the number OSSL_FUNC_PROVIDER_QUERY_OPERATION and has the following signature:

const OSSL_ALGORITHM *provider_query_operation(void *provctx,
                                               int operation_id,
                                               const int *no_store);

and the parameters, bestie:

  • provctx β€” the provider specific context that was passed back by the initialization function.
  • operation_id β€” an operation identity (see "Operations" below πŸ‘‡).
  • no_store β€” a flag back to the OpenSSL libraries which, when nonzero, signifies that the OpenSSL libraries will not store a reference to the returned data in their internal store of implementations.

the returned OSSL_ALGORITHM(3) is the foundation of any OpenSSL library API that uses providers for their implementation, most commonly in the fetching type of functions (see "ALGORITHM FETCHING" in crypto(7)). it's literally the blueprint πŸ”₯

πŸ’œ Operations πŸ’œ

operations are referred to with numbers, via macros with names starting with "OSSL_OP_". memorise that prefix, iykyk.

with each operation comes a set of defined function types that a provider may or may not offer, depending on its needs. lowkey flexible like that.

currently available operations are:

πŸ“ Digests πŸ“

in the OpenSSL libraries, the corresponding method object is EVP_MD. the number for this operation is OSSL_OP_DIGEST. the functions the provider can offer are described in provider-digest(7).

🧚 Symmetric ciphers 🧚

in the OpenSSL libraries, the corresponding method object is EVP_CIPHER. the number for this operation is OSSL_OP_CIPHER. the functions the provider can offer are described in provider-cipher(7).

πŸ¦‹ Message Authentication Code (MAC) πŸ¦‹

in the OpenSSL libraries, the corresponding method object is EVP_MAC. the number for this operation is OSSL_OP_MAC. the functions the provider can offer are described in provider-mac(7).

πŸ’– Key Derivation Function (KDF) πŸ’–

in the OpenSSL libraries, the corresponding method object is EVP_KDF. the number for this operation is OSSL_OP_KDF. the functions the provider can offer are described in provider-kdf(7).

🌈 Key Exchange 🌈

in the OpenSSL libraries, the corresponding method object is EVP_KEYEXCH. the number for this operation is OSSL_OP_KEYEXCH. the functions the provider can offer are described in provider-keyexch(7).

πŸ‘‘ Asymmetric Ciphers πŸ‘‘

in the OpenSSL libraries, the corresponding method object is EVP_ASYM_CIPHER. the number for this operation is OSSL_OP_ASYM_CIPHER. the functions the provider can offer are described in provider-asym_cipher(7).

✨ Asymmetric Key Encapsulation ✨

in the OpenSSL libraries, the corresponding method object is EVP_KEM. the number for this operation is OSSL_OP_KEM. the functions the provider can offer are described in provider-kem(7).

πŸŽ€ Encoding πŸŽ€

in the OpenSSL libraries, the corresponding method object is OSSL_ENCODER. the number for this operation is OSSL_OP_ENCODER. the functions the provider can offer are described in provider-encoder(7).

🫢 Decoding 🫢

in the OpenSSL libraries, the corresponding method object is OSSL_DECODER. the number for this operation is OSSL_OP_DECODER. the functions the provider can offer are described in provider-decoder(7).

⭐ Random Number Generation ⭐

the number for this operation is OSSL_OP_RAND. the functions the provider can offer for random number generation are described in provider-rand(7).

πŸ’€ Key Management πŸ’€

the number for this operation is OSSL_OP_KEYMGMT. the functions the provider can offer for key management are described in provider-keymgmt(7).

🌸 Signing and Signature Verification 🌸

the number for this operation is OSSL_OP_SIGNATURE. the functions the provider can offer for digital signatures are described in provider-signature(7).

πŸ’… Store Management πŸ’…

the number for this operation is OSSL_OP_STORE. the functions the provider can offer for store management are described in provider-storemgmt(7).

🧚 Algorithm naming 🧚

okay so algorithm names are case insensitive. and literally any particular algorithm can have multiple aliases associated with it. the canonical OpenSSL naming scheme follows this format:

ALGNAME[VERSION?][-SUBNAME[VERSION?]?][-SIZE?][-MODE?]

breakdown time, bestie:

  • VERSION is only present if there are multiple versions of an algorithm (e.g. MD2, MD4, MD5). it may be omitted if there is only one version.
  • SUBNAME may be present where multiple algorithms are combined together, e.g. MD5-SHA1. fusion dance behavior.
  • SIZE is only present if multiple versions of an algorithm exist with different sizes (e.g. AES-128-CBC, AES-256-CBC).
  • MODE is only present where applicable.

other aliases may exist, for example where standards bodies or common practice use alternative names or names that OpenSSL has used historically. so don't be shocked if you see a name that looks vintage, it's intentional πŸ’œ

πŸŽ€ Provider dependencies πŸŽ€

providers may depend for their proper operation on the availability of (functionality implemented in) other providers.

and here's the thing β€” as there is no mechanism to express such dependencies towards the OpenSSL core, provider authors must take care that such dependencies are either:

  • completely avoided, or
  • made visible to users, e.g., by documentation and/or defensive programming, e.g., outputting error messages if required external dependencies are not available, e.g., when no provider implementing the required functionality has been activated.
in particular, provider initialization should not depend on other providers already having been initialized. fr fr, don't do it. 😭

πŸ™ˆ Note on naming clashes πŸ™ˆ

it is possible to register the same algorithm name from within different providers. users should note that if no property query is specified, or more than one implementation matches the property query, then it is unspecified which implementation of a particular algorithm will be returned. πŸ’€

such naming clashes may also occur if algorithms only differ in capitalization, as "Algorithm naming" is case insensitive. so like, watch your capitalization bestie, it matters here.


🌈 OPENSSL PROVIDERS 🌈

OpenSSL provides a number of its own providers. these are the default, base, fips, legacy and null providers. see crypto(7) for an overview of these providers. the whole squad, honestly πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹


⭐ HISTORY ⭐

the concept of providers and everything surrounding them was introduced in OpenSSL 3.0. a whole era, truly.


Copyright 2019-2022 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 a wrap on the whole page, bestie 🫢 this was PROVIDER(7SSL) from OpenSSL, version 4.0.3, dated 2026-09-29. go forth and write an iconic provider, you've got this πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from