LIFE_CYCLE-KDF(7ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

okay bestie, welcome to LIFE_CYCLE-KDF(7ossl) β€” the OpenSSL manual page for the KDF algorithm life-cycle, and it’s giving cryptographic coming-of-age arc πŸ‘‘βœ¨

πŸŽ€ NAME πŸŽ€

life_cycle-kdf β€” the KDF algorithm life-cycle. That’s literally the whole vibe. πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

All key derivation functions (KDFs) and pseudo random functions (PRFs) go through a number of stages in their life-cycle, like a little glow-up journey πŸŒ±βž‘οΈπŸ‘‘:

  • start β€” the KDF/PRF before it has been allocated. This is the starting state for any life-cycle transitions. Pre-allocation era, no cap.
  • newed β€” the KDF/PRF after it has been allocated. It has entered the chat 🫢
  • deriving β€” the KDF/PRF when it is set up and capable of generating output. Main character energy: it can actually cook πŸ”₯
  • freed β€” entered when the KDF/PRF is freed. This is the terminal state for all life-cycle transitions. The finale, the end credits, no going back πŸ’€

πŸ’« State Transition Diagram πŸ’«

The usual life-cycle of a KDF/PRF is illustrated:

                            +-------------------+
                            |       start       |
                            +-------------------+
                              |
                              | EVP_KDF_CTX_new
                              v
                            +-------------------+
                            |       newed       | <+
                            +-------------------+  |
                              |                    |
                              | EVP_KDF_derive     |
                              v                    | EVP_KDF_CTX_reset
           EVP_KDF_derive   +-------------------+  |
         + - - - - - - - -  |                   |  |
         '                  |     deriving      |  |
         + - - - - - - - -> |                   | -+
                            +-------------------+
                              |
                              | EVP_KDF_CTX_free
                              v
                            +-------------------+
                            |       freed       |
                            +-------------------+

πŸ“‹ Formal State Transitions πŸ“‹

This section defines all of the legal state transitions. This is the canonical list, bestie β€” no improvising, this is the official choreography πŸ’ƒ:

  • EVP_KDF_CTX_new β€” from start β†’ newed
  • EVP_KDF_derive β€” from newed β†’ deriving; from deriving β†’ deriving
  • EVP_KDF_CTX_free β€” from start β†’ freed; from newed β†’ freed; from deriving β†’ freed
  • EVP_KDF_CTX_reset β€” from newed β†’ newed; from deriving β†’ newed
  • EVP_KDF_CTX_get_params β€” from newed β†’ newed; from deriving β†’ deriving
  • EVP_KDF_CTX_set_params β€” from newed β†’ newed; from deriving β†’ deriving
  • EVP_KDF_CTX_gettable_params β€” from newed β†’ newed; from deriving β†’ deriving
  • EVP_KDF_CTX_settable_params β€” from newed β†’ newed; from deriving β†’ deriving

🌸 NOTES 🌸

At some point the EVP layer will begin enforcing the transitions described herein. So like, future EDP said β€œbestie, follow the state transitions” β€” don’t be messy 😭

🫢 SEE ALSO 🫢

πŸ•°οΈ HISTORY πŸ•°οΈ

The provider KDF interface was introduced in OpenSSL 3.0. Historic moment, honestly ✨

Copyright 2021 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>.


This iconic page is from OpenSSL 3.5.0, dated 2026-09-25, and its manual name is LIFE_CYCLE-KDF(7ossl) β€” slay, bye πŸ’–πŸŒˆ

πŸ“¦ where this page comes from