LIFE_CYCLE-MAC(7ossl)
π 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βnewedEVP_MAC_initβnewedβinitialised;initialisedβinitialised;updatedβinitialised;finaledβinitialisedEVP_MAC_updateβinitialisedβupdated;updatedβupdatedEVP_MAC_finalβupdatedβfinaledEVP_MAC_finalXOFβupdatedβfinaledEVP_MAC_CTX_freeβstartβfreed;newedβfreed;initialisedβfreed;updatedβfreed;finaledβfreedEVP_MAC_CTX_get_paramsβnewedβnewed;initialisedβinitialised;updatedβupdatedEVP_MAC_CTX_set_paramsβnewedβnewed;initialisedβinitialised;updatedβupdatedEVP_MAC_CTX_gettable_paramsβnewedβnewed;initialisedβinitialised;updatedβupdatedEVP_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 π
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
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms