# DOSS Protocol for Data Caching and Sharing Security in a 5G Network
## 5 Modelling of DCSS Protocol
### Protocol Message Exchange  
We now give an overview of DCSS protocol execution and message exchange illustrating the protocol's full execution. It involves the following parties, UE, SPAAA, and SS and consists of cache and share authorization phase. The UE is granted access to the SP services using federated authorization protocol [4], which is when the access token \(AcT\) and \(K_{UIESS}\) are generated before. The \(K_{UIESA}\) is a preshared key between the \(UE\) and \(SPAAA\), the \(UE\) is in possession of the access token \(AcT\) before this proposed protocol is run. In addition, the \(UE\) and \(SS\) would also know each other's ID, public key, and shared session key from the previous message exchange of the authentication and authorization protocol that granted the UE access to the service. The use of signed digested messages is to provide message authenticity, integrity, and non-repudiation. The protocol messages between the parties are illustrated in Figure 3, with reference to notations in Table 2 and described in detail below:  
**Caching Authorization**  
Msg1.UE\(\rightarrow\)SPAAA: ({(EachTokenReq),{KUE3A}})  
After the UE is granted access to the data, it sends a cache request _CachTokenReq_ for a \begin{table}
\begin{tabular}{c c} \hline \hline
**Notation** & **Description** \\ \hline SPID & SP identifier \\ SID & session ID \\ SSID & authorization server ID \\ DNN & service code:SPID \\ R1 & nonce \\ EID & UE permanent identifier \\ \(PK_{SP}\) & SPAAA public key \\ \(K_{UE3A}\) & UE and SPAAA preshared key \\ \(K_{UE5S}\) & UE and SS session key \\ Ack\_1 & acknowledgement \\ Hack\_1 & hash for Ack\_1 \\ Ack\_2 & acknowledgement \\ Hack\_2 & hash for Ack\_2 \\ Exp & expiry date \\ D1 & dataname \\ Ts & timestamp \\ label & capabilities strings \\ ACT & access token \\ ChT & cache token \\ ShT & share token \\ h(x) & hash value (h) of message (x) \\ \([\chi]\{k\}\) & message (x) encrypted with key K \\ \hline \hline \end{tabular}
\begin{tabular}{c} \hline \hline
**UE** \\ \hline UE sends its ID, preshared cache access token \& dstname \\ \hline
**1. Cache token request ((EachTokenReq) [KUE3A])** \\ \hline
**2. Cache token response ((EachTokenReq) [KUE3A])** \\ \hline
**3. Cache request ((EachReq) [KUE5S])** \\ \hline
**4. Cache acknowledgement ((EachReq) [KUE5S])** \\ \hline
**5. Share token request ((ShaTokenReq) [KUE3A])** \\ \hline
**6. Share token response [ShaTokenReq] [KUE3A])** \\ \hline UE sends a Cache Token to SS \\ \hline
**7. Share request ((ShaReq) [KUE5S])** \\ \hline
**8. Share acknowledgement ((ShaReq) [KUE5S])** \\ \hline \hline \end{tabular}
\begin{tabular}{c} \hline \hline
**SN verifies the Share Token, generates an Acknowledgment and sends it to UE** \\ \hline
**8. Share acknowledgement ((ShaReq) [KUE5S])** \\ \hline \hline \end{tabular}
\end{table} 
Table 2: DCSS Protocol Notation and Description. Figure 3: DCSS Protocol Message Exchange Flow. cache token. It includes the \(UE\)'s IDs (\(EID/FID\)), data name \(DataName\), access token \(AcT\), the hash of the access token \(hat\) signed by the \(SPAAA\) private key \(SK_{AAA}\) and key \(K_{UESS}\) to \(SPAAA\) encrypted with preshared key \(K_{UES3A}\). The \(Act\), \(hAcT\), \(SK_{AAA}\), \(K_{UES3A}\) and \(K_{UESS}\) are generated during the authentication and authorization procedure between \(UE\) and \(SPAAA\) to grant the \(UE\) access to the service. Key \(K_{UESS}\) is included if it was not sent during the previous authentication and authorization procedure, while the access token \(AcT\) supports verification of the user's ID and subscription since it includes the \(UE\) subscription details. Msg2.SPAAA\(\rightarrow\)UE: ({CachTokenResp},{KUE3A}) When the \(SPAAA\) receives message 1, the authorization server verifies the \(AcT\). If the subscription policy includes caching rights, \(SPAAA\) creates cache token \(ChT\) and sends it with a hash of the cache token \(hChT\) signed with its private key \(SK_{AAA}\) in cache response \(CachResp\) message encrypted with session key \(K_{UES3A}\).