## 6 Security and Performance Analysis
### Computational Analysis  
Exponential and bilinear pairing operations take up the majority of the execution time. Since the multiplication operation can be ignored, the exponential and bilinear pairing operations are investigated. In addition, Table 4 shows the computational complexity of the algorithms. The description for the symbols is written in Table 5. \begin{table}
\begin{tabular}{l l} \hline \hline
**Algorithm** & **Computational Complexity** \\ \hline GlobalSetup & \(O(1)\)P \\ AASetup & \(O(1)\)E \\ _Key-Gen._ & \(O(n_{k})\)E \\ Enc & \(O(n_{c})\)E \\ Dec & \(O(n_{d})\)E + \(O(n_{d})\)P \\ KeyUpdate & \(O(n_{r})\)E \\ CTUpdate & \(O(n_{c})\)E \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Computational complexity of different algorithms. We used the Ubuntu 16.04 operating system with a Core i5 Intel processor with 2.40 GHz and Charm encryption library packages from Stanford-based pairing cryptography [47]. The simulation experiment corresponds to the elliptic curve (\(y^{2}=x^{3}+x\)) with symmetrical bilinear pairings (SS512). We compare our method with the schemes in [13; 14]. The attributes are chosen between 2 and 20. We also considered five fog servers and twenty end users. The communication range between the fog servers and end users is 100 m. The path loss factor is considered as four. In the first experiment, we determine the computing overhead of the _Key-Gen._ algorithm based on the number of attribute authority (\(AA\)) figures and the number of attributes per attribute authority (\(AA\)) figure, as shown in Figure 3(a) and Figure 3(b), respectively. The proposed scheme is compared with the other two methods, i.e., the collision-avoidance CP-ABE scheme [14] and ABE-based attribute revocation [13]. As shown in Figure 3(a),b, the operation time of the _Key-Gen._ exhibits a linear growth relationship in all three schemes due to the increase in the number of attributes and number of attributes/\(AA\). As a result, the operating time of our proposed method outperforms the collision-avoidance CP-ABE scheme [14]. Nevertheless, the operation time is slightly higher than the scheme [13]. Our scheme generates group-key attributes in the _Key-Gen._ process. Therefore, the proposed scheme and ABE-based attribute-revocation scheme [13] are close to each other. We further analyze the proposed work's computing overhead in terms of the encryption algorithm based on the number of attribute authority (\(AA\)) figures and attributes per attribute authority (\(AA\)) figure. As shown in Figure 4(a),b, the encryption time increases linearly in the case of collusion-avoidance CP-ABE [14] and ABE-based attribute revocation [13], respectively. However, the running time for the encryption operation remains constant. It is found that the encryption time is less than 0.5 s even if the number of \(AA\) fig  
Figure 4: Computing overhead of the Key-Gen algorithm. \begin{table}
\begin{tabular}{l l} \hline \hline
**Notation** & **Description** \\ \hline E & Exponential operation \\ P & Pairing operation \\ \(n_{c}\) & Access policy attributes \\ \(n_{d}\) & Decryption attributes \\ \(n_{k}\) & End users’ attributes \\ \(n_{r}\) & Revoked attributes \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Description of Table 4’s computational complexity notations. ures and number of attributes/\(AA\) increases. This constant value is due to the outsourcing process of encryption. Hence, this work outperforms [13; 14]. We also find out the computing overhead of the decryption algorithm versus the number of \(AA\) figures and number of attributes/\(AA\), as shown in Figure 5(a),b. As observed from Figure 5(a), the operation time of the decryption algorithm of the collision-avoidance CP-ABE scheme [14] improves with the number of \(AA\) figures. Similarly, the operation time of the decryption algorithm of the collision-avoidance CP-ABE scheme [14] also increases with the number of attributes/\(AA\), as depicted in Figure 5(b).