1LIFE_CYCLE-MAC(7ossl)               OpenSSL              LIFE_CYCLE-MAC(7ossl)
2
3
4

NAME

6       life_cycle-mac - The MAC algorithm life-cycle
7

DESCRIPTION

9       All message authentication codes (MACs) go through a number of stages
10       in their life-cycle:
11
12       start
13           This state represents the MAC before it has been allocated.  It is
14           the starting state for any life-cycle transitions.
15
16       newed
17           This state represents the MAC after it has been allocated.
18
19       initialised
20           This state represents the MAC when it is set up and capable of
21           processing input.
22
23       updated
24           This state represents the MAC when it is set up and capable of
25           processing additional input or generating output.
26
27       finaled
28           This state represents the MAC when it has generated output.
29
30       freed
31           This state is entered when the MAC is freed.  It is the terminal
32           state for all life-cycle transitions.
33
34   State Transition Diagram
35       The usual life-cycle of a MAC is illustrated:
36                        +-------------------+
37                        |       start       |
38                        +-------------------+
39                          |
40                          | EVP_MAC_CTX_new
41                          v
42                        +-------------------+
43                        |       newed       |
44                        +-------------------+
45                          |
46                          | EVP_MAC_init
47                          v
48                        +-------------------+
49                     +> |    initialised    | <+
50                     |  +-------------------+  |
51                     |    |                    |
52                     |    | EVP_MAC_update     | EVP_MAC_init
53                     |    v                    |
54        EVP_MAC_init |  +-------------------+  |
55                     |  |      updated      | -+
56                     |  +-------------------+
57                     |    |               |
58                     |    | EVP_MAC_final | EVP_MAC_finalXOF
59                     |    v               v
60                     |  +-------------------+
61                     +- |      finaled      |
62                        +-------------------+
63                          |
64                          | EVP_MAC_CTX_free
65                          v
66                        +-------------------+
67                        |       freed       |
68                        +-------------------+
69
70   Formal State Transitions
71       This section defines all of the legal state transitions.  This is the
72       canonical list.
73        Function Call                   --------------------- Current State
74       ----------------------
75                                        start   newed    initialised   updated
76       finaled   freed
77        EVP_MAC_CTX_new                 newed
78        EVP_MAC_init                         initialised initialised
79       initialised initialised
80        EVP_MAC_update                                     updated     updated
81        EVP_MAC_final                                                  finaled
82        EVP_MAC_finalXOF                                               finaled
83        EVP_MAC_CTX_free                freed   freed       freed       freed
84       freed
85        EVP_MAC_CTX_get_params                  newed    initialised   updated
86        EVP_MAC_CTX_set_params                  newed    initialised   updated
87        EVP_MAC_CTX_gettable_params             newed    initialised   updated
88        EVP_MAC_CTX_settable_params             newed    initialised   updated
89

NOTES

91       At some point the EVP layer will begin enforcing the transitions
92       described herein.
93

SEE ALSO

95       provider-mac(7), EVP_MAC(3).
96

HISTORY

98       The provider MAC interface was introduced in OpenSSL 3.0.
99
101       Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
102
103       Licensed under the Apache License 2.0 (the "License").  You may not use
104       this file except in compliance with the License.  You can obtain a copy
105       in the file LICENSE in the source distribution or at
106       <https://www.openssl.org/source/license.html>.
107
108
109
1103.0.5                             2022-07-05             LIFE_CYCLE-MAC(7ossl)
Impressum