xref: /freebsd/crypto/openssl/doc/life-cycles/cipher.dot (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1digraph cipher {
2    bgcolor="transparent";
3
4    begin [label=start, color="#deeaee", style="filled"];
5    newed [fontcolor="#c94c4c", style="solid"];
6
7    initialised [fontcolor="#c94c4c"];
8    updated [fontcolor="#c94c4c"];
9    finaled [fontcolor="#c94c4c"];
10    end [label="freed", color="#deeaee", style="filled"];
11
12    d_initialised [label="initialised\n(decryption)", fontcolor="#c94c4c"];
13    d_updated [label="updated\n(decryption)", fontcolor="#c94c4c"];
14    e_initialised [label="initialised\n(encryption)", fontcolor="#c94c4c"];
15    e_updated [label="updated\n(encryption)", fontcolor="#c94c4c"];
16
17    begin -> newed [label="EVP_CIPHER_CTX_new"];
18    newed -> initialised [label="EVP_CipherInit"];
19    initialised -> initialised [label="EVP_CipherInit\n(not required but allowed)",
20                                style=dashed];
21    initialised -> updated [label="EVP_CipherUpdate", weight=2];
22    updated -> updated [label="EVP_CipherUpdate"];
23    updated -> finaled [label="EVP_CipherFinal"];
24    finaled -> finaled [label="EVP_CIPHER_CTX_get_params\n(AEAD encryption)",
25                        style=dashed];
26    finaled -> end [label="EVP_CIPHER_CTX_free"];
27    newed -> d_initialised [label="EVP_DecryptInit"];
28    d_initialised -> d_initialised [label="EVP_DecryptInit\n(not required but allowed)",
29                                style=dashed];
30    d_initialised -> d_updated [label="EVP_DecryptUpdate", weight=2];
31    d_updated -> d_updated [label="EVP_DecryptUpdate"];
32    d_updated -> finaled [label="EVP_DecryptFinal"];
33    newed -> e_initialised [label="EVP_EncryptInit"];
34    e_initialised -> e_initialised [label="EVP_EncryptInit\n(not required but allowed)",
35                                style=dashed];
36    e_initialised -> e_updated [label="EVP_EncryptUpdate", weight=2];
37    e_updated -> e_updated [label="EVP_EncryptUpdate"];
38    e_updated -> finaled [label="EVP_EncryptFinal"];
39    most -> newed [label="EVP_CIPHER_CTX_reset", style=dashed,
40                      color="#034f84", fontcolor="#034f84"];
41    most [label="any of the initialised\nupdated or finaled states", style=dashed,
42                      color="#034f84", fontcolor="#034f84"];
43}
44
45/* This is a version with a single flavour which is easier to comprehend
46digraph cipher {
47    bgcolor="transparent";
48
49    begin [label=start, color="#deeaee", style="filled"];
50    newed [fontcolor="#c94c4c", style="solid"];
51    initialised [fontcolor="#c94c4c"];
52    updated [fontcolor="#c94c4c"];
53    finaled [fontcolor="#c94c4c"];
54    end [label="freed", color="#deeaee", style="filled"];
55
56    begin -> newed [label="EVP_CIPHER_CTX_new"];
57    newed -> initialised [label="EVP_CipherInit"];
58    initialised -> initialised [label="EVP_CipherInit\n(not required but allowed)",
59                                style=dashed];
60    initialised -> updated [label="EVP_CipherUpdate", weight=2];
61    updated -> updated [label="EVP_CipherUpdate"];
62    updated -> finaled [label="EVP_CipherFinal"];
63    finaled -> finaled [label="EVP_CIPHER_CTX_get_params\n(AEAD encryption)",
64                        style=dashed];
65    finaled -> end [label="EVP_CIPHER_CTX_free"];
66    finaled -> newed [label="EVP_CIPHER_CTX_reset", style=dashed,
67                      color="#034f84", fontcolor="#034f84"];
68    updated -> newed [label="EVP_CIPHER_CTX_reset", style=dashed,
69                      color="#034f84", fontcolor="#034f84"];
70}
71*/
72
73