# Methodology of Testing the Security of Cryptographic Protocols Using the CMMTree Framework
## 4 Description of the Methodology
### Predicate Function: Searching for the Best Possible Solution
The tree building time was almost 1005 s, and the entire CMMTree structure took 50.7 GB of RAM. This graph clearly shows the exponential increase in the number of nodes at each tree level. Each level has an average of 10 times more nodes than the previous level. The tree grows almost symmetrically. Up to level 5, each node has descendants. This is obvious because the \(\Lambda_{l}\), and consequently \(\Lambda_{l}/N_{l}\) measures (see Table 4, part 1), have values equal to zero. As can be seen, the measure \(\Phi_{l}/N_{l}\) runs nearby values of 0.1, so each node has an average of 10 children. A careful analysis of the \(\Phi_{l}/N_{l}\) and \(\Delta\Phi/(\Phi_{l}+\Phi_{l-1})\) measures shows a slight decrease in the tree's growth dynamics, but this tendency is practically insignificant. Most of the leaves appeared on level 9. This is directly due to the activation of the safety mechanism against the unlimited growth of the tree. Figure 5b presents a tree image obtained during the evaluation of one of the variants of the PF using a lexicographically sorted set of input data. As in the previous case, the tree construction was terminated at level 10. This time, however, it resulted from activating one of the \"for not\" conditions, one of the applied pruning conditions (PCs). The tree contains 11,139 nodes. It was built in 65 milliseconds. Four expected attack paths were found in this tree. Comparing Figure 5a,b, we can immediately see that the use of a few other PCs significantly changes the size and shape of the ET that is created. If we look at the measure \(\Phi_{l}/N_{l}\), we can see that from level 3, its value is greater than 0.5, meaning that from level 2, the average parent node has no more than two children. By analyzing the \(\Lambda_{l}/N_{l}\) measure, it can be seen that pruning at levels 2 and 3 proved to be the most important. Thirty-seven percent of level 2 nodes and almost thirteen percent of level 3 nodes are leaves. The identified four leaves at level 6 (see Table 4, part 2) correspond to the four executions of the protocol with a successful attack. Figure 4: Illustration of the CMMTree pruning process. Despite finding attack paths (also for shuffled data) and a huge reduction in the number of tree nodes and their construction time, the examined PF could not be considered satisfactory by us for two main reasons. First, if the condition interrupting the tree's construction at level \(l=10\) had not been applied, it could have continued to grow. No leaf was identified for the next three levels of the tree; the \(\Lambda_{l}\) and \(\Lambda_{l}/N_{l}\) measures have values equal to zero. This means that none of the tree's other branches have been pruned, i.e., none of the remaining paths have been terminated. The second reason was the change in the parameters of the tree shape description after applying the input data shuffle operation. Figure 5c shows a table of the parameters of the CMMTree shape description for sorted data and three samples of shuffled data. We can see that changing the processing order of chains of the protocol executions caused (small, but noticeable) changes in parameters \(N_{l}\), \(\Phi_{l}\), and \(\Lambda_{l}\). Nevertheless, this should not be the case when processing the same data. Figure 5d presents the description of the CMMTree shape obtained using the final form of PF. This tree contains 369 nodes. It was built in about 5 milliseconds, and the parametric description of its shape does not depend on the order in which the input data are processed. Its construction was completed at level \(l=6\) after exhausting the possibilities of connecting further nodes without using any additional PCs that would be conditions of a safeguard nature. This graph shows that parameter \(N_{l}\) reaches its maximum value at level \(l=4\) and then decreases. From level \(l=3\), measure \(\Lambda_{l}/N_{l}\) takes on increasing values, meaning that more nodes of a given level become leaves.