# DCAGS-IoT: Dynamic Cross-Domain Authentication Scheme Using Group Signature in IoT
## 3 Proposed Dynamic Cross-Domain Authentication Scheme
### Our Scheme
#### 3.3.2 Registration Stage  
When a new group member joins the trust domain, it first registers with the GM. The specific steps for the user are as follows:  
1. \(\mathrm{M}_{1(U\to BC)}:(T_{1},\mathrm{ID}_{\mathrm{GM}},\mathrm{Request}_{1})\): Before sending the registration request to the user, the user requests the BC to query the gpk at the time T1, which is convenient for generating the user's own public and private key pair. 2. \(\mathrm{M}_{2(BC\to U)}:(T_{2},\mathrm{gpk},\mathrm{Respond}_{1})\): The blockchain returns gpk to user U at T2. 3. \(\mathrm{GKgen}_{\mathrm{U}}(\mathrm{gpk})\rightarrow(\mathrm{upk},\mathrm{ usk})\): After the user receives the group public key gpk of the domain and the Respond1, enter the gpk, and perform the following operations: the user randomly selects \(x\in R^{m}\) and calculates \(p=B\cdot x\in R_{q}\). Then, the user's own key pair is \((\mathrm{upk}=p,\mathrm{usk}=x)\). Figure 3: Scheme flowchart. \(\mathrm{M}_{3(U\to GM_{i})}:(T_{3},\mathrm{upk},\mathrm{Request}_{2})\): After the key pair is generated, the user sends a join request at \(T_{3}\) to \(\mathrm{GM_{i}}\). 5. \(\mathrm{Join}(\mathrm{gpk},\mathrm{upk},\mathrm{pp})\to\mathrm{gsk}\): When a user with public key \(\mathrm{upk}=\mathrm{p}\) sends a request to join the trust domain, \(\mathrm{GM_{i}}\) first checks whether the user with \(\mathrm{upk}=\mathrm{p}\) has been registered before, if not, register the user in the trust domain to which they belongs, and the user becomes a group member. Finally, output the user's group signature key gsk. 1. Set label \(\mathrm{t}=\left(\mathrm{t}_{0},\mathrm{t}_{1}\ldots,\mathrm{t}_{\mathrm{c}_{d -1}}\right)^{\top}\in\mathcal{T}_{d}\), calculate \(\mathrm{A}_{\mathrm{t}}=\left[\mathrm{A}\mid\mathrm{A}_{[0]}+\sum_{i=1}^{  
\(\mathrm{Open}(\mathrm{gpk},\mathrm{ok},\mathrm{reg},\mathrm{M},\Sigma)\to\left( \mathrm{p}/\Pi_{\mathrm{open}}\right)\) : After the tracking administrator receives the request, execute the Open algorithm, which takes the group public key gpk, ok, Reg, message \(\mathrm{M}\), and signature as input, and returns the proof of the user. If the algorithm cannot attribute the signature to a specific group member, it will return (\(\bot\),), indicating that the signature is the signature of an illegal user, and set the attribute. Specific steps are as follows: (1) Set \(\mathrm{ok}=(\mathrm{s}_{1},\mathrm{e}_{1})\), \(\Sigma=\left(\Pi_{\mathrm{gs}},\mathrm{c}_{1},\mathrm{c}_{2}\right)\); (2) Use \(\mathrm{s}_{1}\) to \(\mathrm{decrypt}\mathrm{c}_{1}=(\mathrm{c}_{1,1},\mathrm{c}_{2})\) according to the following steps; 1. Calculate \(\mathrm{p}^{\prime\prime}=\frac{\mathrm{c}_{1,2}-\mathrm{c}_{1,1}\cdot\mathrm{ s}_{1}}{\left|\mathrm{q}/4\right|}\), 2. For each coefficient of \(\mathrm{p}^{\prime\prime}\), Returns 0 if it is closer to 0 than \(-1\) and 1; Returns \(-1\) if it is closer to \(-1\) than to 0 and 1; Returns 1 if it is closer to 1 than \(-1\) and 0, 3. \(\mathrm{p}^{\prime\prime}\) is the coefficient of \(\mathrm{p}^{\prime}\in\mathrm{R}^{\ell}_{\mathrm{q}}\), 4. Set \(\mathrm{p}^{\prime}\in\mathrm{R}_{\mathrm{q}}\) and make \(\mathrm{\tau}(\mathrm{p}^{\prime})=\mathrm{H}\cdot\mathrm{\tau}(\mathrm{p}^{ \prime})\). (3) If Reg does not include \(\mathrm{p}^{\prime}\), return \((\bot,\bot)\). (4) Otherwise, generate \(\Pi_{\mathrm{open}}\) for proving possession \((\mathrm{s}_{1},\mathrm{e}_{1},\mathrm{y})\in\mathrm{R}_{\mathrm{q}}\times \mathrm{R}^{\ell}_{\mathrm{q}}\times\mathrm{R}^{\ell}_{\mathrm{q}}\). (5) Output \(\left(\mathrm{p}^{\prime},\Pi_{\mathrm{Open}}\right)\). 7. \(\mathrm{Judge}(\mathrm{gpk},\mathrm{M},\Sigma,\mathrm{p}^{\prime},\Pi_{\mathrm{ Open}})\to 1/0\): This algorithm is used by the TM to check the validity of the signature \(\Pi_{\mathrm{Open}}\). The output is 1 for valid and 0 for invalid. 8.