## 3 Our TCVK Mechanism
### Pre-Checkups Phase  
When a registered user \(U_{i}\) attempts to forward physical examination records to \(RCRS\), it must be authenticated by the checkups station \(C_{j}\) first. After successfully completing the key agreement among \(U_{i^{\prime}},\ C_{j^{\prime}}\) and \(RCRS\), \(U_{i}\) can forward the encrypted medical examination records to \(RCRS\) via \(C_{j^{\prime}}\)  
1. \(U_{i}\) inserts the smart card into the card reader and imprints biometric \(B_{i^{\prime}}\). Then, it retrieves \(\text{Rep}(B_{i^{\prime}},\ P_{B})=X_{B}\) and computes \(UA_{i}\ =\ \text{h}(ID_{i}\oplus X_{B})\).
2. \(U_{i}\) produces a random nonce number \(R_{U}\) and computes \(M_{0}\)= \(\text{h}\left(R_{U}\oplus UA_{i}\oplus UC_{i}\right)\) and \(M_{1}=R_{U}\oplus UA_{i}\oplus E_{i}\). Finally, \(U_{i}\) forwards intermediate messages \(\{ID_{i^{\prime}},\ M_{0},M_{1}\}\) to \(C_{j}\) by public channel.  
* 3 While the \(C_{j}\) receives \(\{ID_{i},\ M_{0},M_{1}\}\) from \(U_{i}\), \(C_{j}\) selects a random nonce number \(R_{C}\) and computes \(M_{2}=R_{C}\oplus RCC_{j}\) and \(M_{3}\)= \(\mathsf{h}(ID_{Cj}\oplus R_{C})\). Furthermore, \(C_{j}\) sends \(\{M_{0},M_{1},\ M_{2},M_{3},ID_{Cj},ID_{i}\}\) to \(RCRS\) by public channel.
* 4 After RCRS receives the message \(\{M_{0},M_{1},\ M_{2},\ M_{3},ID_{Cj},ID_{i}\}\) from \(C_{j}\). RCRS first retrievals \(D_{i}\) from RCRS's database using \(\mathsf{ID}_{i}\)and computes \(r_{i}=D_{i}\oplus ID_{i}\oplus X_{s}\), \(R_{U}=M_{1}\oplus\mathsf{h}(ID_{i}\oplus X_{s})\), and \(R_{C}=M_{2}\oplus\mathsf{h}(ID_{Cj}\oplus X_{s})\). Then, RCRS checks whether \(M_{0}\) is equal to \(\mathsf{h}(R_{U}\oplus\mathsf{h}(r_{i}\oplus X_{s}))\) and whether \(M_{3}\) is equal to \(\mathsf{h}(ID_{Cj}\oplus R_{C})\). If the above are valid, the RCRS continues to deal with the requisition. On the contrary, the session process aborted.
* 5 \(RCRS\) produces a random nonce number \(R_{R}\) and computes \(SK\)=\(\mathsf{h}(R_{U}\oplus R_{C}\oplus R_{R})\), \(M_{4}=R_{R}\oplus R_{U}\oplus\mathsf{h}(X_{RCC_{j}}\oplus X_{s})\), \(M_{5}=\mathsf{h}(SK\oplus M_{4})\), and \(M_{6}=R_{C}\oplus\mathsf{h}(ID_{i}\oplus X_{s})\). Then, \(RCRS\) sends \(\{M_{4},M_{5},M_{6}\}\) back to \(C_{j}\). \(RCRS\) now owns the session key \(SK\) for this key agreement.
* 6 If \(C_{j}\) has received the message \(\{M_{4},M_{5},M_{6}\}\) from \(RCRS\), then \(G_{j}\) retrieves \(X_{RCC_{j}}\oplus X_{S}\) from database using \(ID_{Cj}\). \(C_{j}\) computes \(SK\) = \(\mathsf{h}(M_{4}\oplus\mathsf{h}\left(X_{RCC_{j}}\oplus X_{S}\right)\oplus R_{C})\)and \(M_{5}^{*}\)=\(\mathsf{h}(SK\oplus M_{4})\). \(C_{j}\) will verify whether or not \(M_{5}^{*}\) equals \(M_{5}\). If both are the same, then mutual authentication and session key agreement are completed. On the contrary, the session process is aborted. \(C_{j}\) now owns the session key \(SK\) for this key agreement.  
By the above steps, the key agreement process has finished and the secure tunnel between \(C_{j}\) and \(RCRS\) is created. Then, \(C_{j}\) produces an encrypted examination record \(UR_{i}\) from the checkups station. \(C_{j}\) computes \(M_{7}=RCC_{j}\oplus R_{C}\oplus M_{6}=RCC_{j}\oplus\mathsf{h}\left(ID_{i} \oplus X_{s}\right)\). \(C_{j}\) encrypts the \(UR_{i}\) using \(M_{7}\) to form the \(M_{8}\)= \(E_{M_{7}}(UR_{i})\) and sends \(\{M_{8}\}\) to RCRS by this secure session tunnel. Then, \(RCRS\) stores encrypted examination data of \(U_{i}\) to the database.