# A Secure CDM-Based Data Analysis Platform (SCAP) in Multi-Centered Distributed Setting
## 4 Results
### Implementation for CS
When the data analysis is complete, the SS stores the analysis results, AR, in a compressed file type, such as a zip file. (3) The SS may notify the user of the CDM data analysis status. The data analysis process is time consuming (typically several hours). In addition, there may be differences in the execution times of the AC for each institution. Because the user cannot wait for the data analysis of all hospitals to be completed, the user should periodically check the analysis status of each hospital. When the user requests the analysis status, the SS responds with a \"Waiting for execution\", \"Running\", or \"Analysis complete\" message. If the SS is in full-automation mode, the AC is immediately executed without going through the execution standby state. (4) The SS may notify the user of the AR export status. As in the AC execution, the SS receives instructions from the custodian regarding whether to provide the results of the CDM data analysis to the user. When the user requests the SS where AR replies are possible, the SS responds with either \"available for download\" or \"waiting for approval\". Users can only obtain the AR if they are \"available for download\". As with function 3, when the SS is in full-automation mode, the \"waiting for export\" state is not used. ```
1 Procedure request_to_issue_ticket(token, \(sig^{AC}\))
2\(M_{C-TGS}\leftarrow\) make a message with token and \(sig^{AC}\)
3\(sig_{MC-TGS}\leftarrow\) generate a signature for \(M_{C-TGS}\)
4\(M_{TGS-C},sig_{M_{TGS-C}}\leftarrow\) request to TGS for issuing ticket with \(M_{C-TGS}||sig_{MC-TGS}\)
5
6 sig_check\(\leftarrow\) verify \(sig_{M_{TGS-C}}\)
7 ifsig_check failedthen
8 returnERROR
9
10 end if
11 ticket\(\leftarrow\) get a ticket from \(M_{TGS-C}\)
12 returnticket
13 end if
```
**Algorithm 5**The ticket issuing algorithm on the user side
```
1 Procedurequest_to_analyze_CDM_data(token, \(AC\), \(sig^{AC}\), ticket)
2\(M_{C-RS}\leftarrow\) make a message with token, \(AC\), \(sig^{AC}\), and ticket
3\(sig_{M_{C-RS}}\leftarrow\) generate a signature for \(M_{C-RS}\)
4 response \(\leftarrow\) request to RS for distributing AC to analyze the CDM data with \(M_{C-RS}||sig_{M_{C-RS}}\)
5
6 ifrequest successthen // user can download AR after CDM data analysis is complete returnSUCCESS
7
8 else
9 returnERROR
10
11 end if
```
**Algorithm 6**The ticket issuing algorithm on the TGS side
```
1 Procedure handle_distributing_AC_request(\(M_{C-RS},sig_{M_{C-RS}}\))
2 sig_check\(\leftarrow\)verify\(sig_{M_{C-RS}}\)
3 ifsig_checkfailedthen
4 returnERROR
5 end if
6
7 token\(\leftarrow\) get a token from \(M_{C-RS}\)
8 token\(\leftarrow\) verify token
9 iftoken_checkfailedthen
10 returnERROR
11 end if
12
13 AC\(\leftarrow\) get the analyzing codes from \(M_{C-RS}\)
14\(sig^{AC}\leftarrow\) get the signature for AC from \(M_{C-RS}\)
15 ticket\(\leftarrow\) get the ticket from \(M_{C-RS}\)
16
17\(M_{RS-SS}\leftarrow\) make a message with AC, \(sig^{AC}\), and ticket
18\(sig_{M_{RS-SS}}\leftarrow\) generate a signature for \(M_{RS-SS}\)
19 result\(\leftarrow\) distribute the analyzing codes with \(M_{RS-SS}||sig_{M_{RS-SS}}\)
20 ifdistribution successthen
21 returnSUCCESS
22 else
23 returnERROR
24
25 end if
```
**Algorithm 8**The AC distributing algorithm on the RS side

Figure 7: Architecture of SS. ```
1 Procedure handle_analyzing_CDM_data_request(\(M_{RS-SS}\), \(sig_{M_{RS-SS}}\))
2 sig_check\(\leftarrow\)verify \(sig_{M_{RS-SS}}\)
3 ifsig_checkfailedthen
4 returnERROR
5 end if
6
7 ticket\(\leftarrow\)get the ticket from \(M_{RS-SS}\)
8 ticket_check\(\leftarrow\)verify ticket
9 if ticket_check_check_failedthen
10 returnERROR
11 end if
12
13\(sig^{AC}\leftarrow\)get the signature for AC
14 sig_AC_check\(\leftarrow\)verify the signature for AC
15 ifsig_AC_check_failedthen
16 returnERROR
17
18
19 result\(\leftarrow\)append AC to the thread pool
20 ifresult_successthen // AC will be executed to analyze the CDM data by the thread scheduler and AR will be saved.