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