## 3 Proposed System
### System Operation  
The proposed system is capable of controlling secondary users' access using delegation and withdrawal of access rights based on attribute-based encryption. The proposed system generates data from equipment such as smart cars and smart traffic lights. The generated data are transmitted through the peripheral infrastructure through V2X. The transmitted data include personal information. Encryption is in progress to prevent the leakage of personal information. At this time, the infrastructure does not have enough resources for calculation. Therefore, we try to solve this problem using the structure of fog computing. The notation for understanding this paper is shown in Table 1.  
Figure 6 shows the operation of the proposed system based on a virtual scenario. The configured system consists of an authorized certification authority, a data generator, a data collection and authority examiner, and a secondary user of the data. The proposed system will be explained focusing on the scenario of the vehicle monitoring system for violating traffic laws. The procedure of the encryption algorithm capable \begin{table}
\begin{tabular}{c c} \hline \hline
**Terms** & **Definition** \\ \hline \(pk\) & The public key \\ \(mk\) & The master key \\ \(w\) & The delegator attribute set \\ \(\widehat{w}\) & The attribute set defined by the delegator \\ \(\tau\) & The access structure \\ \(l_{u}\) & The delegator identifier \\ \(l_{j}\) & The delegate identifier \\ \(m\) & The collected general data \\ \(c_{r}\) & The ciphertext \\ \(\hat{c_{r}}\) & The re-ciphertext \\ \(sk_{wl_{1},1}\) & The first secret distribution key \\ \(sk_{wl_{2},2}\) & The second secret distribution key \\ \(sk_{\widehat{w}1,1}\) & The first secret distributed key for the delegate \\ \(sk_{\widehat{w}2}\) & The second secret distributed key for delegate \\ \(g^{r^{\prime}}\) & The attribute conversion key \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The notation. Figure 6: The configuration of the scenario. of delegating and withdrawing attributes consists of seven steps. Detailed methods of each step are described in Section 3.4. The Traffic Control Center, an authorized certification body, proceeds with the preparation stage and the key generation stage. The vehicle, which is a data generator and a delegator of authority, performs an encryption step and a delegation step. In the fog server in charge of collecting and processing data with the policy management agency, a secondary delegation step and a secondary decryption step are performed. The police, who are the data user and the delegator of authority, proceed with the decryption step. It is assumed that all vehicles have completed the delegate stage at the time of registration of the vehicle. On public roads, police (delegate) find suspicious vehicles. When the police want to view information on a vehicle (delegator), they organize a scenario in which access rights are reviewed and approved by the government. 1. When the vehicle is first registered, the transportation center proceeds with an algorithm of the preparation step. In this step, the public key (\(pk\)) and the master key (\(mk\)) are generated using the system parameter. The algorithm of the key generation step is performed in the following order to generate a distributed key. Two distribution keys are generated using vehicle attribute (\(w\)) and identifier (\(I_{u}\)). The generated distribution keys (\(sk_{w_{lk},1}\), \(sk_{w_{lk},2}\)) are delivered to the Fog server and the vehicle, respectively;
2. The vehicle generates a ciphertext (\(c_{\tau}\)) by performing an algorithm of the encryption step. The generated ciphertext is stored in the Fog server database. The vehicle delegates the decoding authority to the police through the algorithm of the delegation step. In this step, the secret distribution key (\(sk_{\tilde{w}|I,2}\)) for the police is generated and transmitted to the police using the attribute set (\(\tilde{w}\)) defined by the vehicle and the identifier (\(I_{j}\)) of the police.