# Unified Ciphertext-Policy Weighted Attribute-Based Encryption for Sharing Data in Cloud Computing
## 7 Evaluation of the Encryption Efficiency
### Efficiency Analysis Based on Encryption Methodologies  
\(C(\mathcal{G}_{i})\) denotes the operation in group \(\mathcal{G}_{i}(i=0,1)\). \(C_{\bar{c}}\) denotes the operation in \(\widehat{c}(\cdot)\). In order to analyse the efficiency conveniently, suppose the number of levels of \(\Gamma_{1}\) is equal to \(\Gamma_{2}\)'s and each level has the same number of attributes. Thus, \(\Gamma_{1},\Gamma_{2}\) have the same number of attributes, i.e., \(k_{1}=k_{2}\). Let \(B(*)\) be the bit size of an element of \(*\) and \(|*|\) be the number of elements of \(*\). Let \(\mathbb{S}(\Gamma_{1})\) denote the least node set that satisfies \(\Gamma_{1}\). The comprehensive comparison among CP-ABE [24], CP-WABE [16], and our proposed UCP-WABE is summarized in Table 2. Moreover, the hash computation cost does not have to be included because it is very small.  
As shown in Table 2, suppose the values of \(l_{i}\) are given. When \(k_{1}\) and \(\omega_{i}\) are fixed, the encryption time cost declines with \(k_{\epsilon}\) in UCP-WABE. In order to display the results more intuitively, we suppose all the attributes have the same weight in the access trees \(\Gamma_{1},\Gamma_{2}\) and all the maximum weights are the same in \(\mathcal{U}\). Therefore, the time cost of encryption linearly declines with \(k_{\epsilon}\), and the rate of  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Component** & **CP-ABE** & **CP-WABE** & **UCP-WABE** \\ \hline Public key size & \(3B(\mathcal{G}_{1})+B(\mathcal{G}_{2})\) & \((\sum\limits_{i=1}^{|\mathcal{U}|}l_{i}+2|\mathcal{U}|+1)B(\mathcal{G}_{1})+B( \mathcal{G}_{2})\) & \((\sum\limits_{i=1}^{|\mathcal{U}|}l_{i}+2|\mathcal{U}|+1)B(\mathcal{G}_{1})+B( \mathcal{G}_{2})\) \\ \hline Master key size & \(B(\mathbb{Z}_{p})+B(\mathcal{G}_{1})\) & \(B(\mathcal{G}_{1})\) & \(B(\mathcal{G}_{1})\) \\ \hline Secret key size & \((2|\mathbb{S}|+1)B(\mathcal{G}_{1})\) & \((5\sum\limits_{i=1}^{\mathcal{U}}\omega_{i}^{\prime}+2\sum\limits_{i=1}^{ \mathcal{U}}B(\mathcal{G}_{1})\) & \((5\sum\limits_{i=1}^{k_{1}}\omega_{i}^{\prime}+2\sum\limits_{i=1}^{ \mathcal{U}}B(\mathcal{G}_{1})\) \\ \hline Ciphertext size & \(\prod\limits_{i=1}^{k_{1}}(l_{i}-\omega_{i}+1)\cdot\) & \(4\sum\limits_{i=1}^{k_{1}}(\omega_{i}+1)B(\mathcal{G}_{1})+2B(\mathcal{G}_{2})\) & \(4\sum\limits_{i=1}^{k_{1}}(\omega_{i}+1)B(\mathcal{G}_{1})+2B(\mathcal{G}_{2})\) \\  & \([(4k_{1}+2)B(\mathcal{G}_{1})+2B(\mathcal{G}_{2})]\) & \((8\sum\limits_{i=1}^{k_{1}}\omega_{i}+8k_{1})C(\mathcal{G}_{1})+descent is \(4(\omega_{i}+1)C(\mathcal{G}_{1})\) in UCP-WABE. In CP-ABE and CP-WABE, the encryption time cost remains unchanged. When \(k_{\epsilon}\) and \(\omega_{i}\) are fixed, the encryption time cost linearly rises with \(k_{1}\), and the growth rate is \(8(\omega_{i}+1)C(\mathcal{G}_{1})\) in UCP-WABE. Although the growth rate of encryption time cost is also equal to \(8(\omega_{i}+1)C(\mathcal{G}_{1})\) in CP-WABE, it is always higher than that in UCP-WABE. The encryption time cost increases with \(k_{1}\) exponentially in CP-ABE. When \(k_{1}\) and \(k_{\epsilon}\) are fixed, the encryption time cost linearly rises with \(\omega_{i}\), and the growth rate is \((8k_{1}-4k_{\epsilon})C(\mathcal{G}_{1})\) in UCP-WABE. The encryption time cost also linearly rises with \(\omega_{i}\), and the growth rate is \(8k_{1}C(\mathcal{G}_{1})\) in CP-WABE. In spite of the encryption time cost declining with \(\omega_{i}\) in CP-ABE, it still remains far higher than UCP-WABE. In Table 2, one noteworthy fact is that the encryption time cost is a summation of the two data providers' encryption time.