# A Watermark-Based In-Situ Access Control Model for Image Big Data
## 4 Proposed Scheme
### Hierarchical Key-Role-Area Access Control Model  
The encryption (and decryption) of various areas in a single image can be conducted by the following proposed hierarchical models. \(HKRAGraph::=\langle V,E\rangle\);  
\(V=\{KEY,ROLE,AREA\}\);  
\(E=\{E_{\text{12k}},E_{\text{72k}},E_{\text{42r}}\}\);  
\(E_{\text{12k}}=\langle from,to\rangle,from,to\in KEY\);  
\(E_{\text{72k}}=\langle from,to\rangle,from\in ROLE,to\in KEY\);  
\(E_{\text{42r}}=\langle from,to\rangle,from\in AREA,to\in ROLE\). 1. Hierarchical Keys 1. \(KEY::=\langle l,c\rangle\), where \(l\in\mathbb{N}\) is a key level, and \(c\in\mathbb{N}\) is a key column. Keys should be classified into different levels. In other words, a key has two metrics: one is key level denoted as \(l\), and the other is key column denoted as \(c\). 2. \(K2L:k\in KEY\to l\in\mathbb{N}\), where \(KEY\) is a set of keys; \(l\) is a natural number representing key level. It is a function. It does not need to be not one-to-one. That is, multiple keys may map to one level. It is on-to. We denote the \(k\in KEY\) with level \(l\) as \(k[l,\cdot]\). If multiple keys map to the same level \(l\), we distinguish them as \(k[l,c],c\in\mathbb{N}\). 3. \(K2C:k\in KEY\to c\in\mathbb{N}\), where \(KEY\) is a set of keys; \(c\) is a natural number representing key column. It is a function. It does not need to be one-to-one. That is, multiple keys may map to one column index. It is on-to. We denote the \(k\in KEY\) with index \(c\) as \(k[\cdot,c]\). If multiple keys map to the same column \(c\), we distinguish them as \(k[l,c],l,c\in\mathbb{N}\). 4. \(k[l+1,c]\Leftarrow g(k[l,c])\), where \(k[l,c]\in KEY\) and \(\forall l\in\mathbb{N}\). That is, \(\forall l\in Set_{l}=\{\ell|\ell=K2L(k[l,c]\in KEY)\}\), \(c\in Set_{c}=\{c^{\prime}|c^{\prime}=K2C(k[l,c])\}\). \(g(\cdot)\) is a one-way function. It is computationally infeasible to obtain \(x\) from \(g(x)\), where \(x\in KEY\). 5. \(k[j,c]\) can be computed from any \(k[i,c]\) (\(i<j\)) by \(k[j,c]=g^{j-i}(k[i,c])\), where \(\forall i,j\in Set_{l},c\in Set_{c}\), \(g^{m+1}(\cdot)=g(g^{m}(\cdot)),m\in Set_{l},g^{1}(\cdot)=g(\cdot)\). Similarly, \(\forall j>i\), \(k[j,c]\) can be computed from \(k[i,c]\) by \(k[j,c]=g^{j-i}(k[i,c])\), where \(\forall i,j\in Set_{l},c\in Set_{c}\), \(g^{m+1}(\cdot)=g(g^{m}(\cdot)),m\in Set_{l},g^{1}(\cdot)=g(\cdot)\). Simply speaking, a key with a larger key level can be derived from any key with smaller key levels in the same key column. If accessors possess a key of a smaller level, they can derive all keys with larger key levels in the same key column. Thus, a larger-level key can decrypt the data encrypted by a smaller-level key, but not inversely. 2. Hierarchical Roles 1. \(ROLE::=\langle l,c,u\rangle\), where \(l\) is a key level, \(c\) is a key column, and \(u\) is an identification to distinguish multiple roles for the same key. As multiple roles may map to the same key with \(k[l,c]\), multiple identifications (e.g., \(u\)) are required for the distinction of multiple roles. 2. \(R2K:r\in ROLE\to k\in KEY\), where \(ROLE\) is a set of roles; \(KEY\) is a set of keys. It is a function. It does not need to be one-to-one. That is, multiple roles may map to one key. We denote \(r\in ROLE\) that maps to the same key \(k[l,c]\) as \(r[l,c,u],l,c,u\in\mathbb{N}\). \(R2K(\cdot)\) is on-to. Simply speaking, multiple roles may be related to one key. Regarding the privileges for images, the mainly one is \"read\". A role with smaller (higher) levels can access all objects that can be accessed by roles with larger (lower) levels. Each role will be mapped to a key. 3. \(R2L:r\in ROLE\to l\in\mathbb{N}\), where \(ROLE\) is a set of roles; \(l\) is a natural number representing a key level. Note that \(\forall r\in ROLE,R2L(r)\Leftarrow K2L(R2K(r))\). That is, roles are also hierarchically classified into different levels. * \(R2C:r\in ROLE\to c\in\mathbb{N}\), where \(ROLE\) is a set of roles; \(c\) is a natural number representing a column number. Note that \(\forall r\in ROLE,R2C(r)\Leftarrow K2C(R2K(r))\).