# Secure D2D Group Authentication Employing Smartphone Sensor Behavior Analysis
## 4 Proposed Secure Certificateless Group Authentication Scheme for D2D Communication
### Offline Registration Phase  
The offline registration phase is designed for the D2D initialization, which can be divided into the essential key information management and UE registration.  
Initially, on inputting the security parameter \(\lambda\), SN first generates a bilinear group \((\mathcal{P},\mathbb{G},\mathbb{G}_{\mathcal{S}},\hat{e})\), where \(\mathcal{P}\) is defined as a \(\lambda\)-bit prime, \(\mathbb{G}\) and \(\mathbb{G}_{\mathbb{S}}\) denote two multiplicative cyclic groups with the prime order \(\mathcal{P}\). Hence the bilinear map \(\hat{e}\) is constructed in the form of \(\hat{e}:\mathbb{G}\times\mathbb{G}\rightarrow\mathbb{G}_{\mathcal{S}}\). SN selects the generator \(g,w\in\mathbb{G}\) and randomly chooses \(mk\in\mathbb{Z}_{\mathcal{P}}\) as the system master key. Note that \(\mathbb{Z}_{\mathcal{P}}\) is defined as a non-negative integer set less than the prime number \(\mathcal{P}\).  
Subsequently, each UE is a prerequisite to register to SN in offline mode, where the confidential user information including name, address, phone number are correspondingly recorded in SN server securely. Meanwhile, the unique license \(ID_{i}\) is assigned to each legitimate UE and stored in the tamper-resistant module constantly during the entire operation. Note that \(ID_{i}\in\{0,1\}^{*}\) and \(i\in[1,t]\), where \(t\) is defined as the total number of the registered UEs for the D2D network. Hence the D2D device set is defined as \(S=\{ID_{1},\ldots,ID_{t}\}\). Moreover, the secure cryptographic hash functions \(H_{1}:\{0,1\}^{*}\rightarrow\mathbb{G}\), \(H_{2}:\mathbb{G}\times\mathbb{G}\times\mathbb{G}_{\mathcal{S}}\rightarrow \mathbb{Z}_{\mathcal{P}}\), \(H_{3}:\mathbb{G}_{\mathcal{S}}\times\mathbb{G}_{\mathcal{S}}\rightarrow \mathbb{G}_{\mathcal{P}}\) and \(H_{4}:\mathbb{G}\times\{0,1\}^{*}\rightarrow\mathbb{Z}_{\mathcal{P}}\) are defined.  
For each \(ID_{i}\in S\), SN first computes \(\zeta_{i}=H_{1}(ID_{i})\), then randomly chooses \(X_{i}\in\mathbb{G}\) and \(r_{i}\in\mathbb{Z}_{\mathcal{P}}\), where \(i\in[1,t]\). The following computations regarding \(\mathcal{U}_{i}\) and \(\mathcal{V}_{i}\) are conducted in SN side:  
\[\left\{\begin{array}{l}\mathcal{U}_{i}=X_{i}\xi_{i}^{r_{i}}\\ \mathcal{V}_{i}=\hat{e}(\zeta_{i},\xi^{-r_{i}})^{mk}\end{array}\right.. \tag{1}\]  
Thereafter, the confidential message \(\langle X_{i},\mathcal{U}_{i},\mathcal{V}_{i}\rangle\) is allocated to specific UE with identity \(ID_{i}\). It is worth noting that in our design the delivered \(X_{i}\) for \(ID_{i}\) are considered as the partial key generated by SN, while the generated \(r_{i}\) is not revealed to any other entities during the entire authentication process. In this case, for \(ID_{i}\in S\), the key set \(\{(X_{1},r_{1}),(X_{2},r_{2}),\ldots,(X_{t},r_{t})\}\) regrading \(t\) participating UEs will be one-to-one corresponded to the concerning \(ID_{i}\), which will be securely recorded in SN side.  
In this way, the offline registration for D2D authentication is completed. All the registered UEs store the unique partial secret key \(X_{i}\), and the intermediate value \(\langle\mathcal{U}_{i},\mathcal{V}_{i}\rangle\) for following authentication in the next phase.