LIFE_CYCLE-MAC(7ossl)
π LIFE_CYCLE-MAC
bestie, welcome to LIFE_CYCLE-MAC(7ossl) β the glow-up timeline of every MAC out there π
πΈ NAME
life_cycle-mac β the MAC algorithm life-cycle. yes it's a whole journey, and honestly? it's giving character development β¨
π¦ DESCRIPTION
okay so every single message authentication code (MAC) goes through a bunch of stages in its life, like literal eras. here's the whole roster π
startβ this state is the MAC before it's been allocated. it's the starting state for any life-cycle transitions. the pre-fame era, if you will πnewedβ this state is the MAC after it's been allocated. it exists now!! iconic π¦initialisedβ this state is the MAC when it's set up and capable of processing input. ready to slay πupdatedβ this state is the MAC when it's set up and capable of processing additional input or generating output. the grind never stops π₯finaledβ this state is the MAC when it has generated output. it ate and left no crumbs β¨freedβ this state is entered when the MAC is freed. it's the terminal state for all life-cycle transitions. rest in peace queen ππ
β¨ State Transition Diagram
the usual life-cycle of a MAC is illustrated here, and ngl the diagram is kind of a work of art π:
+-------------------+
| 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 |
+-------------------+
like, look at those arrows go π§β¨
π Formal State Transitions
this section defines all of the legal state transitions. it's the canonical list β the receipts, the source of truth, periodt π―
Function Call --------------------- Current State
-----------------------
start newed initialised updated
finaled freed
EVP_MAC_CTX_new newed
EVP_MAC_init initialised initialised
initialised initialised
EVP_MAC_update updated updated
EVP_MAC_final finaled
EVP_MAC_finalXOF finaled
EVP_MAC_CTX_free freed freed freed freed
freed
EVP_MAC_CTX_get_params newed initialised updated
EVP_MAC_CTX_set_params newed initialised updated
EVP_MAC_CTX_gettable_params newed initialised updated
EVP_MAC_CTX_settable_params newed initialised updated
π NOTES
so at some point the EVP layer will begin enforcing the transitions described herein. not a vibe check you can skip, bestie β it's coming π«Ά
fr fr, don't count on the wild-west behaviour lasting forever.
π SEE ALSO
go read those too, iykyk π
β HISTORY
the provider MAC interface was introduced in OpenSSL 3.0 π a historic moment, honestly.
π COPYRIGHT
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>.
no cap β read the license, it's not optional π
okay that's the whole page!! this was LIFE_CYCLE-MAC(7ossl) from OpenSSL 3.5.6, dated 2026-04-07 β mwah, go forth and manage your MAC life-cycles responsibly π
ππ¦
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms