## 5 Evaluation
### Discussion  
In Sections 5.1 and 5.2, we analyzed the Tencent QQ mail system version 2017 and the RSAAuth system and found that the Tencent QQ mail system version 2017 held some security restrictions in a certain time window besides account password security check, such as check valid session time and the number of login attempts. However, the RSAAuth system was vulnerable and it did not hold some security restrictions besides password security check at its server-side. The results are shown in Table 2.  
Intuitively, our work is similar to existing application dialogue replay systems, such as PIP [22] and RolePlayer [39], which replay the server through aligning net-traces of security protocols and identifying and mutating some special field for application dialogue replay. Furthermore, our work is related to protocol reverse engineering, especially the ProDecoder [25] and FiledHunter [26], which focus on searching keywords and recovering message formats of security protocols based on net-traces  
Figure 38: Generated server-side abstract model of the RSAAuth system. Figure 39: Dependencies of server-side security-related implementations. without using client-side implementations. It is worth noticing that none of these systems focus on internal cryptographic primitive implementations of security protocols, which is the main concern of our work. In particular, SPIA is similar to AUTOFOGE [7], which discovers vulnerabilities for Android applications, while SPIA addresses the Windows platform to evaluate the security of security protocol implementations. It is worth noticing that both SPIA and AUTOFORGE take the internal structures of cryptographic primitive implementations into account to evaluate the security of security applications. However, there are several distinct differences between SPIA and AUTOFORGE; for example, regarding identified message tokens, AUTOFORGE uses the Needleman-Wunsch algorithm to identify message tokens, while SPIA identifies message tokens through directly matching output sequences of traced cryptographic functions with parsed message tokens, which is easier to implement and takes less computational cost. For the output, AUTOFORGE merely outputs the constructed request messages, while SPIA outputs both constructed valid request messages and the server-side abstract model, which is cogent enough to assist in accurately evaluating the security of implemented security protocols and to check the security restrictions when login attempts occur. As for the computational costs, SPIA and AUTOFORGE are mainly amortized by the token identified algorithm and message construction using out-of-the-box re-execution based on internal cryptographic primitive functions. For both SPIA and AUTOFORGE, it is not easy to accurately compute the cost of message construction because of the different cryptographic primitives. About the computational costs of the token identified algorithm, it is intuitive that the time and space complexity of the Needleman-Wunsch algorithm and our method are \(O(n*m)\), in which \(n\) and \(m\) are the length of two evaluated sequences. In practice, AUTOFORGE compares two protocol messages to identify the message token. However, our method matches the output of the cryptographic primitive with the protocol message to locate message tokens, in which the length of output of the cryptographic primitive is much shorter than a protocol message. Therefore, in this sense, SPIA has less computational cost than AUTOFORGE. In order to mitigate existing attacks, such as replay attacks and password brute force attacks, some technologies can be used, such as strong secure server-side restrictions, limitations on times of login, timestamps, challenge-response, and CAPATCHA [40]. The number of login attempts can be limited in a certain time window. Based on our test, we conclude that the RSAAuth system has no such technology in its server-side, so constructed request messages can be used to attempt to login to RSAAuth many times without any warning messages sent out.