LIFE_CYCLE-MAC(7ossl)

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

πŸŽ€ life_cycle-mac (7ossl) β€” the MAC algorithm life-cycle πŸŽ€

🌸 NAME 🌸

life_cycle-mac β€” the MAC algorithm life-cycle. Bestie, it's literally the whole glow-up timeline for a MAC. πŸ’…


✨ DESCRIPTION ✨

Okay so every single message authentication code (MAC) goes through a bunch of stages in its life-cycle. Think of it like the MAC's main character arc, fr fr:

  • start β€” this is the MAC before it's been allocated. It's the starting state for, like, every life-cycle transition ever. The origin story. 🌱
  • newed β€” this is the MAC after it's been allocated. It exists now. Iconic. ✨
  • initialised β€” the MAC is set up and ready to process input. It's giving prepared. πŸŽ€
  • updated β€” the MAC is set up and ready to process additional input or generate output. Multi-tasking queen. πŸ’…
  • finaled β€” the MAC has generated output. She ate and left no crumbs. πŸ”₯
  • freed β€” entered when the MAC is freed. This is the terminal state for all life-cycle transitions. The end, periodt. πŸ’€

πŸ¦‹ State Transition Diagram πŸ¦‹

The usual life-cycle of a MAC is illustrated here, and yes it's giving flowchart couture:

                    +-------------------+
                    |       start       |
                    +-------------------+
                      |
                      | EVP_MAC_CTX_new
                      v
                    +-------------------+
                    |       newed       |
                    +-------------------+
                      |
                      | EVP_MAC_init
                      v
                    +-------------------+
                 +> |    initialised    | <+
                 |  +-------------------+  |
                 |    |                    |
                 |    | EVP_MAC_update     | EVP_MAC_init
                 |    v                    |
    EVP_MAC_init |  +-------------------+  |
                 |  |      updated      | -+
                 |  +-------------------+
                 |    |               |
                 |    | EVP_MAC_final | EVP_MAC_finalXOF
                 |    v               v
                 |  +-------------------+
                 +- |      finaled      |
                    +-------------------+
                      |
                      | EVP_MAC_CTX_free
                      v
                    +-------------------+
                    |       freed       |
                    +-------------------+

πŸ‘‘ Formal State Transitions πŸ‘‘

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

Current state on the left, next state on the right:

  • EVP_MAC_CTX_new β€” start β†’ newed
  • EVP_MAC_init β€” newed β†’ initialised; initialised β†’ initialised; updated β†’ initialised; finaled β†’ initialised
  • EVP_MAC_update β€” initialised β†’ updated; updated β†’ updated
  • EVP_MAC_final β€” updated β†’ finaled
  • EVP_MAC_finalXOF β€” updated β†’ finaled
  • EVP_MAC_CTX_free β€” start β†’ freed; newed β†’ freed; initialised β†’ freed; updated β†’ freed; finaled β†’ freed
  • EVP_MAC_CTX_get_params β€” newed β†’ newed; initialised β†’ initialised; updated β†’ updated
  • EVP_MAC_CTX_set_params β€” newed β†’ newed; initialised β†’ initialised; updated β†’ updated
  • EVP_MAC_CTX_gettable_params β€” newed β†’ newed; initialised β†’ initialised; updated β†’ updated
  • EVP_MAC_CTX_settable_params β€” newed β†’ newed; initialised β†’ initialised; updated β†’ updated

🫢 NOTES 🫢

Heads up, bestie: at some point the EVP layer is gonna begin enforcing the transitions described herein. Like, for real. So don't be out here testing the universe. 😭


🌈 SEE ALSO 🌈


🧚 HISTORY 🧚

The provider MAC interface was introduced in OpenSSL 3.0. A whole era. ✨


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


okay bye bestie πŸ’– this was LIFE_CYCLE-MAC(7ossl), from OpenSSL 3.5.0, dated 2026-09-25. slay and stay safe 🫢

πŸ“¦ where this page comes from