## 3 TR-AC: Token-Revocation Access Control
```
1:- \(\quad\)Access structure \(\mathcal{AC}\)
2:- \(\quad\)\(UID\) attributes \(AT_{UID}\)
3:- \(\quad\)\(UID\) Weighted authentic \(WAL_{UID}=[wb_{UID},wd_{UID},ww_{UID}]t\)
4:- \(\quad\)Initial threshold vector \(\tilde{N}_{t}=[b_{\tilde{N}},d_{\tilde{N}},u_{\tilde{N}}]_{t}\)
5:Consider \(Authentic=0\)
6:if\((wb_{UID}>b_{\tilde{N}})\)then\(\triangleright\)\(UID\) is authentic
7:\(Authentic=1\)
8:elseif\((wb_{UID}=b_{\tilde{N}}\wedge wd_{UID}<d_{\tilde{N}})\)then\(\triangleright\)\(UID\) is authentic
9:\(Authentic=1\)
10:else\(\triangleright\)\(UID\) is authentic
11:\(Authentic=0\)
12:endif
13: Select \(\delta_{i}\in\mathbb{Z}_{p}^{*}\)
14:for\(i=1\) to \(|I|\)do
15:if\(\lambda_{i}\in\mathit{Share}(f)\)then
16: Reconstruct \(f=\sum\limits_{i\in I}\delta_{i}\lambda_{i}\)
17:endif
18:endfor
19:if\(AT_{UID}\vDash\mathcal{AC}\wedge Authentic\)then
20:\(DT=\prod\limits_{k=1}^{N_{A}}e(g,g)^{\frac{\alpha_{k}}{i}/f}\)
21:else
22:\(DT=rand(Hex)\)
23:endif
24:The authentic Decryption Token \(DT\)
```  
**Algorithm 1** Authentic token generation  
```
1:- \(\quad\)The ciphertext \(CT=\{CT_{k}\}\)
2:- \(\quad\)One component from the \(CT_{k}\)\(\{C_{k}=ck_{k}\cdot(\prod\limits_{k\in K}e(g,g)^{\alpha_{k}})^{f}\}\)
3:- \(\quad\)Authentic decryption token \(DT=\prod\limits_{k=1}^{N_{A}}e(g,g)^{\frac{\alpha_{k}}{i}/f}\)
4:- \(\quad\)\(UID\) secret key \(SK_{c_{j}}=z_{j}\)
5:for\(k=1\) to \(N\)do
6:\(ck_{k}=\frac{C}{DT^{\gamma}}\)
7: Calculate \(\mathcal{D}_{k}\) from \(CT_{k}\) using \(ck_{k}\)
8:endfor
9:Find \(\mathcal{D}\) using \(\{\mathcal{D}_{k}\}\)
10:Original data \(\mathcal{D}\)
```  
**Algorithm 2** Decryption  
```
1:- \(\quad\)The ciphertext \(CT=\{CT_{k}\}\)
2:- \(\quad\)One component from the \(CT_{k}\)\(\{C_{k}=ck_{k}\cdot(\prod\limits_{k\in K}e(g,g)^{\alpha_{k}})^{f}\}\)
3:- \(\quad\)Authentic decryption token \(DT=\prod\limits_{k=1}^{N_{A}}e(g,g)^{\frac{\alpha_{k}}{i}/f}\)
4:- \(\quad\)\(UID\) secret key \(SK_{c_{j}}=z_{j}\)
5:for\(k=1\) to \(N\)do
6:\(ck_{k}=\frac{C}{DT^{\gamma}}\)
7: Calculate \(\mathcal{D}_{k}\) from \(CT_{k}\) using \(ck_{k}\)
8:endfor
9:Find \(\mathcal{D}\) using \(\{\mathcal{D}_{k}\}\)
10:Original data \(\mathcal{D}\)
```  
**Algorithm 3** Decryption  
```
1:- \(\quad\)The ciphertext \(CT=\{CT_{k}\}\)
2:- \(\quad\)One component from the \(CT_{k}\)\(\{C_{k}=ck_{k}\cdot(\prod\limits_{k\in K}e(g,g)^{\alpha_{k}})^{f}\}\)
3:- \(\quad\)Authentic decryption token \(DT=\prod\limits_{k=1}^{N_{A}}e(g,g)^{\frac{\alpha_{k}}{i}/f}\)
4:- \(\quad\)\(UID\) secret key \(SK_{c_{j}}=z_{j}\)
5:for\(k=1\) to \(N\)do
6:\(ck_{k}=\frac{C}{DT^{\gamma}}\)
7: Calculate \(\mathcal{D}_{k}\) from \(CT_{k}\) using \(ck_{k}\)
8:endfor
9:Find \(\mathcal{D}\) using \(\{\mathcal{D}_{k}\}\)
10:Original data \(\mathcal{D}\)
```  
**Algorithm 4** Decryption  
```
1:- \(\quad\)The ciphertext \(CT=\{CT_{k}\}\)
2:- \(\quad\)One component from the \(CT_{k}\)\(\{C_{k}=ck_{k}\cdot(\prod\limits_{k\in K}e(g,g)^{\alpha_{k}})^{f}\}\)
3:- \(\quad\)Authentic decryption token \(DT=\prod\limits_{k=1}^{N_{A}}e(g,g)^{\frac{\alpha_{k}}{i}/f}\)
4:- \(\quad\)\(UID\) secret key \(SK_{c_{j}}=z_{j}\)
5:for\(k=1\) to \(N\)do
6:\(ck_{k}=\frac{C}{DT^{\gamma}}\)
7: Calculate \(\mathcal{D}_{k}\) from \(CT_{k}\) using \(ck_{k}\)
8:endfor
9:Find \(\mathcal{D}\) using \(\{\mathcal{D}_{k}\}\)
11:Original data \(\mathcal{D}\)
```  
**Algorithm 5** Decryption  
```
1:- \(\quad\)The ciphertext \(CT=\{CT_{k}\}\)
2:- \(\quad\)One component from the \(CT_{k}\)\(\{C_{k}=ck_{k}\cdot(\prod\limits_{k\in K}e(g,g)^{\alpha_{k}})^{f}\}\)
4:- \(\quad\)Authentic decryption token \(DT=\prod\limits_{k=1}^{N_{A}}e(g,g)^{\frac{\alpha_{k}}{i}/f}\)
5:- \(\quad\)\(UID\) secret key \(SK_{c_{j}}=z_{j}\)
6:for\(k=1\) to \(N\)do
7:\(ck_{k}=\frac{C}{DT^{\gamma}}\)
8: Calculate \(\mathcal{D}_{k}\) from \(CT_{k}\) using \(ck_{k}\)
9:endfor
10:Find \(\mathcal{D}\) using \(\{\mathcal{D}_{k}\}\)
11:Original data \(\mathcal{D}\)
```  
**Algorithm 5** Decryption  
```
1:- \(\quad\)The ciphertext \(CT=\{CT_{k}\}\)
2:- \(\quad\)One component from the \(CT_{k}\)\(\{C_{k}=ck_{k}\cdot(\prod\limits_{k\in K}e(g,g)^{\alpha_{k}})^{f}\}\)
3:- \(\quad\)Authentic decryption token \(DT=\prod\limits_{k=1}^{N_{A}}e(g,g)^{\frac{\alpha_{k}}{i}/f}\)
4:- \(\quad\)\(UID\) secret key \(SK_{c_{j}}=z_{j}\)
5:for\(k=1\) to \(N\)do
8:\(ck_{k}=\frac{C}{DT^{\gamma}}\)
9: Calculate \(\mathcal{D}_{k}\) from \(CT_{k}\) using \(ck_{k}\)
10:endfor
11:Find \(\mathcal{D}\) using \(\{\mathcal{D}_{k}\}\)
12:Original data \(\mathcal{D}\)
```  
**Algorithm 6** Decryption  
```
1:- \(\quad\)The ciphertext \(CT=\{CT_{k}\}\)
2:- \(\quad\)One component from the \(CT_{k}\)\(\{C_{k}=ck_{k}\cdot(\prod\limits_{k\in K}e(g,g)^{\alpha_{k}})^{f}\}\)
3:- \(\quad\)Authentic decryption token \(DT=\prod\limits_{k=1}^{N_{A}}e(g,g)^{\frac{\alpha_{k}}{i}/f}\)
4:- \(\quad\)\(UID\) secret key \(SK_{c_{j}}=z_{j}\)
5:for\(k=1\) to \(N\)do
13: Calculate \(\mathcal{D}_{k}\) from \(CT_{k}\) using \(ck_{k}\)
14:endfor
15:Find \(\mathcal{D}\) using \(\{\mathcal{D}_{k}\}\)



### Setup

Let the bilinear group \(\mathcal{B}=(p,\mathbb{G}_{1},\mathbb{G}_{2},\mathbb{G}_{T},e(\cdot,\cdot))\), where \((\mathbb{G}_{1}=\mathbb{G}_{2}=\mathbb{G})\).