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

NAME

6       life_cycle-digest - The digest algorithm life-cycle
7

DESCRIPTION

9       All message digests (MDs) go through a number of stages in their life-
10       cycle:
11
12       start
13           This state represents the MD before it has been allocated.  It is
14           the starting state for any life-cycle transitions.
15
16       newed
17           This state represents the MD after it has been allocated.
18
19       initialised
20           This state represents the MD when it is set up and capable of
21           processing input.
22
23       updated
24           This state represents the MD when it is set up and capable of
25           processing additional input or generating output.
26
27       finaled
28           This state represents the MD when it has generated output.
29
30       freed
31           This state is entered when the MD 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 MD is illustrated:
36                            +-------------------+
37                            |       start       |
38                            +-------------------+
39                              |
40                              | EVP_MD_CTX_new
41                              v
42                            +-------------------+         EVP_MD_CTX_reset
43                            |       newed       |
44       <------------------------------+
45                            +-------------------+
46       |
47                              |
48       |
49                              | EVP_DigestInit
50       |
51                              v
52       |
53                            +-------------------+
54       |
55                       +--> |    initialised    | <+ EVP_DigestInit
56       |
57                       |    +-------------------+  |
58       |
59                       |      |                    |      EVP_DigestUpdate
60       |
61                       |      | EVP_DigestUpdate   |    +------------------+
62       |
63                       |      v                    |    v                  |
64       |
65                       |    +------------------------------------------------+
66       |
67        EVP_DigestInit |    |                    updated                     |
68       --+
69                       |    +------------------------------------------------+
70       |
71                       |      |                    |
72       |
73                       |      | EVP_DigestFinal    | EVP_DigestFinalXOF
74       |
75                       |      v                    v
76       |
77                       |    +------------------------------------------------+
78       |
79                       +--- |                    finaled                     |
80       --+
81                            +------------------------------------------------+
82                              |
83                              | EVP_MD_CTX_free
84                              v
85                            +-------------------+
86                            |       freed       |
87                            +-------------------+
88
89   Formal State Transitions
90       This section defines all of the legal state transitions.  This is the
91       canonical list.
92        Function Call                --------------------- Current State
93       ----------------------
94                                     start   newed    initialised   updated
95       finaled   freed
96        EVP_MD_CTX_new               newed
97        EVP_DigestInit                    initialised initialised initialised
98       initialised
99        EVP_DigestUpdate                                updated     updated
100        EVP_DigestFinal                                             finaled
101        EVP_DigestFinalXOF                                          finaled
102        EVP_MD_CTX_free              freed   freed       freed       freed
103       freed
104        EVP_MD_CTX_reset                     newed       newed       newed
105       newed
106        EVP_MD_CTX_get_params                newed    initialised   updated
107        EVP_MD_CTX_set_params                newed    initialised   updated
108        EVP_MD_CTX_gettable_params           newed    initialised   updated
109        EVP_MD_CTX_settable_params           newed    initialised   updated
110

NOTES

112       At some point the EVP layer will begin enforcing the transitions
113       described herein.
114

SEE ALSO

116       provider-digest(7), EVP_DigestInit(3)
117
119       Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
120
121       Licensed under the Apache License 2.0 (the "License").  You may not use
122       this file except in compliance with the License.  You can obtain a copy
123       in the file LICENSE in the source distribution or at
124       <https://www.openssl.org/source/license.html>.
125
126
127
1283.0.5                             2022-07-05          LIFE_CYCLE-DIGEST(7ossl)
Impressum