# A Charging and Discharging Data Privacy Protection Scheme for V2G Networks Based on Cloud-Fog-End
## 4 Correctness and Security Analysis
### Security Analysis
#### 4.2.3 Unforgeability  
Theorem 3 (Unforgeability under Adversary \(A_{I}\)): _In the case of a stochastic prediction model and ECDLP difficulty, adversary \(A_{I}\) can win EUF-CMA with a non-negligible advantage \(\epsilon_{21}\), there exists C who can solve ECDLP difficulty problem with at least a non-negligible probability \(\left(1-\frac{q_{ab}}{2^{k}}\right)\frac{\epsilon_{21}}{en(q_{3}+q_{ab}+1)}\)._Proof of Theorem 3.: Challenger C is given a random ECDLP challenge instance \((P,aP)\), where \(a\in Z_{q}^{*}\) and its value is unknown, and [PERSON]'s goal is to calculate the value \(a\) by the adversary \(A_{I}\).  
Initial stage: Challenger C performs system initialization, generates system parameters, and sends them to adversary \(A_{I}\), who cannot obtain system master key \(s\).  
Forgery stage: When adversary \(A_{I}\) submits aggregate signcryption \(\varphi^{*}=(R_{1}^{*},R_{2}^{*}\ldots R_{n}^{*},\)\(C_{1}^{*},C_{2}^{*}\ldots C_{n}^{*},S^{*})\) of \(n\) users' message \(m_{I}^{*}\), Equation (11) holds if aggregate verification is valid. [PERSON] forges an aggregate signcryption \(\varphi^{\prime}=(R_{1}^{*},R_{2}^{*}\ldots R_{n}^{*},C_{1}^{*},C_{2}^{*}\ldots C _{n}^{*},S^{\prime})\) in the same way and sends it to \(A_{I}\).  
\[S^{*}P=\sum_{i=1}^{n}Y_{i}^{*}+P_{pub}\sum_{i=1}^{n}h_{1i}^{*}+\sum_{i=1}^{n}X _{i}^{*}h_{2i}^{*} \tag{11}\]  
If \(A_{I}\) receives \(\varphi^{\prime}\) and the aggregate signcryption verification passes, then Equation (12) is obtained by repeating the above steps and selecting a different \(H_{1}\) according to a bifurcation lemma.  
\[S^{\prime}P=\sum_{i=1}^{n}Y_{i}^{*}+P_{pub}\sum_{i=1}^{j-1}h_{1i}^{*}+P_{pub}h _{1j}^{\prime}+P_{pub}\sum_{i=j+1}^{n}h_{1i}^{*}+\sum_{i=1}^{n}X_{i}^{*}h_{2i} ^{*} \tag{12}\]  
After subtracting Equation (11) from Equation (12) to obtain the derived Formula (13), C outputs \(a=\frac{S^{\prime}-S^{*}}{h_{1j}^{*}-h_{1j}^{*}}\) as the solution to the ECDLP problem. Therefore, C solves the ECDLP problem by \(A_{I}\).  
\[\big{(}S^{\prime}-S^{*}\big{)}P=P_{pub}\sum_{i=1}^{j-1}h_{1i}^{*}+P_{pub}h_{1j} ^{\prime}+P_{pub}\sum_{i=j+1}^{n}h_{1i}^{*}-P_{pub}\sum_{i=1}^{n}h_{1i}^{*}=( h_{1j}^{\prime}-h_{1j}^{*})P_{pub}=(h_{1j}^{\prime}-h_{1j}^{*})aP \tag{13}\]  
**Theorem 4** (Unforgeability under Adversary \(A_{i}\)).: _In the case of a stochastic prediction model and ECDLP difficulty, adversary \(A_{II}\) can win EUF-CMA with a non-negligible advantage \(\varepsilon_{22}\), there exists \(C\) who can solve the ECDLP difficulty problem with at least a non-negligible probability \(\left(1-\frac{q_{ik}}{2^{k}}\right)\frac{\varepsilon_{22}}{en(q_{i}+q_{ik}+1)}\)._  
Proof of Theorem 4.: Challenger C is given a random ECDHP challenge instance \((P,aP)\), where \(a\in Z_{q}^{*}\) and its value is unknown, and [PERSON]'s goal is to calculate the value \(a\) by the adversary \(A_{II}\). The proof process is similar to Theorem 3 and will not be repeated here.  
In summary, challenger C has the ability to solve ECDLP, but this contradicts ECDLP, so the scheme satisfies unforgeability under the attack of adversaries \(A_{I}\) and \(A_{II}\).