# 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.2 Confidentiality  
**Theorem 1** (Confidentiality under Adversary \(A_{1}\)). : _In the case of a stochastic prediction model and ECDHP difficulty, adversary \(A_{1}\) can win IND-CCA2 with a non-negligible advantage \(\epsilon_{11}\), then there exists a challenger C who can solve the ECDHP difficulty problem with at least a non-negligible probability \(\left(1-\frac{q_{k}}{2^{k}}\right)\left(1-\frac{q_{3}}{2^{k}}\right)\frac{ \epsilon_{11}}{\epsilon\left(q_{k}+q_{k}+1\right)}\) in finite polynomial time, where \(e\) is the base of the natural logarithm and \(k\) is a safety parameter._  
Proof of Theorem 1.: Challenger C is given an ECDHP challenge instance \(\left(P,aP,bP\right)\), where \(a,b\in Z_{q}^{*}\) and its values are all unknown, and [PERSON]'s goal is to calculate the value \(abP\) by adversary \(A_{1}\). Initial stage: [PERSON] performs system initialization, generates system parameters, and sends them to adversary \(A_{1}\), who cannot obtain system master key \(s\). [PERSON] randomly chooses \(ID_{i}^{*}\) as the challenger. In addition, [PERSON] maintains five lists to record query data extracted by \(A_{1}\) from oracle \(H_{1},\ H_{2},\ H_{3}\), partial private key, and public key, respectively. All lists are initialized to empty. Query stage: Adversary \(A_{1}\) executes a polynomial bounded query as follows:  
\(H_{1}\) query: Challenger C maintains a list of \(L_{1}=\left(ID_{CP_{i}},X_{i},Y_{i},h_{1i}\right)\), and when receiving an \(H_{1}\) query \(\left(ID_{CP_{i}},X_{i},Y_{i}\right)\) from adversary \(A_{1}\), if the inquiry already exists in the list, returns the corresponding \(h_{1i}\) to \(A_{1}\). Otherwise, challenger C randomly selects \(h_{1i}\in Z_{q}^{*}\) and returns to \(A_{1}\), and adds the item \(\left(ID_{CP_{i}},X_{i},Y_{i},h_{1i}\right)\) to the list \(L_{1}\). \(H_{2}\) query: Challenger C maintains a list of \(L_{2}=\left(ID_{CP_{i}},X_{c},Y_{c},R_{i},C_{i},TS_{i},h_{2i}\right)\), and when receiving an \(H_{2}\) query \(\left(ID_{CP_{i}},X_{c},Y_{c},R_{i},C_{i},TS_{i}\right)\) from adversary \(A_{1}\), if the inquiry already exists in the list, returns the corresponding \(h_{2i}\) to \(A_{1}\). Otherwise, challenger C randomly selects \(h_{2i}\in Z_{q}^{*}\) and returns to \(A_{1}\), and adds the item \(\left(ID_{CP_{i}},X_{c},Y_{c},R_{i},C_{i},TS_{i},h_{2i}\right)\) to the list \(L_{2}\). \(H_{3}\) query: Challenger C maintains a list of \(L_{3}=\left(PID_{i},ID_{CP_{i}},X_{i},Y_{i},U_{i},R_{i},h_{3i}\right)\), and when receiving an \(H_{3}\) query \(\left(PID_{i},ID_{CP_{i}},X_{i},Y_{i},U_{i},R_{i}\right)\) from adversary \(A_{1}\), if the inquiry already exists in the list, returns the corresponding \(h_{3i}\) to \(A_{1}\). Otherwise, C randomly selects \(h_{3i}\in Z_{q}^{*}\) and returns to \(A_{1}\), and adds the item \(\left(PID_{i},ID_{CP_{i}},X_{i},Y_{i},U_{i},R_{i},h_{3i}\right)\) to the list \(L_{3}\). Partial private key query: When challenger C receives a query from \(A_{1}\) about \(ID_{i}\), if \(ID_{i}=ID_{i}^{*}\), the simulation operation is terminated. If \(ID_{i}\
eq ID_{i}^{*}\), challenger C queries the list \(L_{psk}\), and if there is a corresponding item, returns \((d_{i},Y_{i})\) to \(A_{1}\). Otherwise, challenger C randomly selects \(a_{i},b_{i}\in Z_{q}^{*}\), so that \(d_{i}=a_{i}\), \(H_{1}(ID_{i},X_{i},Y_{i})=b_{i}\), then \(Y_{i}=a_{i}P-b_{i}P_{pub}\). C adds \(\left(ID_{i},X_{i},Y_{i},b_{i}\right)\) and \(\left(ID_{i},d_{i},Y_{i}\right)\) to \(L_{1}\) and \(L_{psk}\), respectively, and returns \((d_{i},Y_{i})\) to \(A_{1}\). Create user query: When challenger C receives a query from \(A_{1}\) about \(ID_{i}\), [PERSON] queries the list \(L_{user}\).