## 3 TR-AC: Token-Revocation Access Control
Consider \(g\in\mathbb{G}\). Randomly compute \(\{\alpha_{k},\beta_{k},\textit{and }\gamma_{k}\}_{\forall k\in K}\in\mathbb{Z}_{p}^{*}\). Let \(MK=(\beta_{k},g^{\alpha_{k}})\). Consider \(H:\{0,1\}^{*}\rightarrow\mathbb{G}_{1}\) as a hash function. It has four sub-algorithms:

\(\bullet\)**OiC-Setup. **: It initializes \(\textit{OiC}\). In addition, it shares \(S_{0}\) among the system authorities. \(w_{k,i}\in[0,1]\) is selected for each \(k\) in \(K\) and \(i\in[1,n]\). \((a_{m,k}=a_{k,i})\) is an attribute \(\forall AID\). Each attribute has a weight \((wa_{m,k}=\lfloor w_{k,i}\cdot 11^{s}\rfloor,\) and \(s\in\mathbb{Z}_{q}^{*})\). A parameter \((SPK=e(g,g)^{S_{0}})\) is initialized here. An initial threshold is \(\tilde{N}_{t}=[b_{\tilde{N}},d_{\tilde{N}},u_{\tilde{S}}]_{t}\) at time \(t\). \(\bullet\)**UID-Setup. **: The user is assigned a unique ID (\(UID\)), and \(PK_{UID}=g^{s_{UID}}\). The secret key is \(SK_{UID}=v_{UID}\) with \(s_{UID},v_{UID}\in\mathbb{Z}_{p}^{*}\). \(\bullet\)**AID-Setup. **: Each authority is assigned a unique Authority ID (\(AID\)) by \(\textit{OiC}\). It generates two keys:

* **Attribute-secret key (\(\{aSK_{a_{i}}^{k}\}_{\forall a_{i}\in At_{k}\}\)): \(\{aSK_{a_{i}}^{k}\}_{\forall a_{i}\in At_{k}}=\{(\alpha_{k},\beta_{k},\gamma_{ k})\}_{\forall k\in K}.\)** It will be used by the organizations. Figure 2: The detailed flow diagram for a user requesting access to the cloud-hosted services and data. **Attribute-public key (\(\{aPK_{a_{i}}^{k}\}_{\forall a_{i}\in At_{k}}\)):**\(\{aPK_{a_{i}}^{k}\}_{\forall a_{i}\in At_{k}}\). It will be used by the users. \(\{aPK_{a_{i}}^{k}\}_{\forall a_{i}\in At_{k}}=(g^{\alpha_{m_{k}}}\cdot H(a_{m_{k} }))^{\gamma_{k}}\) by implicitly choosing \(\upsilon_{a_{m_{k}}}=g^{\alpha_{m_{k}}}\). ### Key Generation

Each authority identified by a unique \(AID\) generates two keys (\(aSK_{a_{i}}^{k}\forall a_{i}\in At_{k}\) and \(aPK_{a_{i}}^{k}\forall a_{i}\in At_{k}\)). Each \(AID\) chooses \(\{a_{k},\beta_{k},\gamma_{k}\}_{\forall k\in K}\in\mathbb{Z}_{p}^{*}\) randomly. **Gen-PK. ** Each authority generates a public key as follows:

\[\{PK_{k}=(e(g,g)^{a_{k}},g^{\frac{1}{\beta_{k}}},g^{\frac{1}{\beta_{k}}})\}_{ \forall k\in K}.\]

**Gen-SK. ** Each managing authority \(AID\) generates a secret key (\(SK_{c_{j}}^{k}\)) for each user \(UID\) after verifying the \(UID\) provided attributes, as follows:

\[\{K_{c_{j},k}=g^{\frac{a_{k}}{\gamma_{j}}}\cdot g^{a\cdot c_{j}}\cdot g^{\frac {a_{k}}{\gamma_{k}}l_{j}k}\}_{\forall j\
eq k},\]

\[\{R_{c_{j},k}=g^{a_{i},l_{j}}\}_{\forall j\
eq k},\text{ and }\{L_{c_{j},k}=g^{ \frac{\beta_{k}}{l_{j}}l_{j}}\}.\]

\(\forall\{a_{j,k}\in At_{j}^{k}\}\) with value \(\upsilon_{a_{j,k}}\in\mathbb{Z}_{p}^{*}\),

compute:

\[\{K_{c_{j},a_{j,k}}=g^{\frac{\beta_{k}\gamma_{k}}{\gamma_{j}}l_{j}k}\cdot(g^{ \upsilon_{a_{j,k}}}\cdot H(a_{j,k}))^{\gamma_{k}\beta_{k}c_{j}}\}_{\forall j \
eq k}\]

The secret key is:

\[\{SK_{c_{j}}^{k}=(K_{j,k},L_{j,k},R_{j,k},K_{j,a_{j,k}})\}_{\forall j\
eq k}\]

### Encryption

The used encryption access structure is \(\mathcal{AC}=(M,\rho)\). The encryption algorithm is introduced in Algorithm 3.