## 5 Evaluation
### Case One: Tencent QQ Mail System Version 2017  
Tencent QQ mail system version 2017 [38] was analyzed because of its worldwide use in digital society. Because the HTTPS protocol was implemented in Tencent QQ mail system version 2017, the communication messages were encrypted, which were difficult to parse just with SPIA. To address this problem, the certificate of Burp suite was imported to the Firefox browser, which was set to trust the certificate. Therefore, the communication messages of HTTPS could be parsed. In Tencent QQ mail system version 2017 system, its client-side implementations mainly consist of four source code files that are JsonMsg.js, TCaplframeApi.js, and c_login_2.js, and c_login_2.js was the implementation file in which we were interested. For Tencent QQ mail system version 2017, firstly, we extracted c_login_2.js from client-side implementations. After that, we obtained API traces and parsed them with SPIA. Apart from that, we generated dependencies of traced cryptographic functions based on c_login_2.js, which were used to locate and reconstruct outputs of traced cryptographic functions. Next, we intercepted with Burp suite and parsed it to generate message tokens. Then, we located message tokens, reconstructed the outputs of traced functions, and replaced the located message tokens with reconstructed outputs to generate constructed request messages. Finally, we intercepted and parsed response messages to generate the abstract model of the server to evaluate the secrecy of Tencent QQ mail system. According to the client-side JavaScript implementation \"c_login_2.js\", dependencies of cryptographic functions were generated, as shown in Figure 22, where the return value of function u was encrypted by function \"_RSA.encrypt_\" with RSA public key. The ciphertext was transformed to an ASCII value by the function btoa. The output of function _btoa_ was the value of _i.p_ in Figure 22, which was a part of the request message. In Figure 22, \"_pt.plogin.armSafeEdit.isSafe_\" is the security ActiveX. Dependencies among MD5 functions \(c\), \(u\), and \(i\) are \(u(i(c(t)+b)+vocde.upper)\), where variable \"_vocde.upper_\" stores the upper case of the value in _verifycode_ and the value of b is \"_0028_\". Arguments of function \(c\) are the salt value and user password. Return value of \(c\) is the MD5 value of salt and user password. In function \(i\), the argument is the return value of function \(c\), and the return value is the MD5 sequence of \(b\) and return value of \(c\). In function \(u\), the arguments are the _verifycode_ and the return value of function \(i\), and the output is an MD5 sequence. In Figure 23, the Get method was used to send the request message from the client to the server in the QQ mail system. Besides that, the key parts of this request message were some information returned by the server, such as user account \(u\), _verifycode!_\(ESF\), value of \(p\), salt value and json token-_pt_\(j\)stoken_, etc. In Figure 24, function _phiCB_ did not receive any successful logon information, such as server's URL, user account, and login type, which means that the request message in Figure 23 was incorrect. In order to generate message tokens and locate tokens, we parsed the intercepted request message in Figure 23 with SPIA. Part of the result is shown in Figure 25.  
We matched the original output of the traced functions with message tokens, and the matched message token is the located token in Figure 26.  
The located token was the value of _\"i.p\"_ according to Figures 23 and 25, which was replaced by the reconstructed output of the traced functions. In order to reconstruct the output of the traced functions, we re-executed the traced functions (Figure 22) with the corresponding modified arguments to generate the reconstructed output (Figure 27). Figure 27: The reconstructed output of the traced functions. Figure 25: Parse result of the intercepted request message.