Charging pile authentication method, charging system, vehicle-mounted equipment, charging pile, cloud server and computer program product
By storing the root key and root key offset in the charging pile and cloud server, and using these keys to generate random numbers for authentication, the problem that the existing charging pile authentication method is easily stolen or tampered is solved, and the Greater security and uniqueness.
Patent Information
- Application Number
- CN202410627625.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2024-09-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The authentication method of existing charging piles can easily lead to the theft or tampering of authentication information, affecting charging safety.
By storing the root key and root key offset in the charging pile and cloud server respectively, these keys and offsets are used to generate random numbers for authentication, ensuring that new random numbers are used in each authentication process, and Avoid transmitting this sensitive information during the transmission process, thereby improving the uniqueness and security of authentication.
It effectively prevents the theft and tampering of authentication information, ensures the uniqueness and safety of the charging authority of the charging pile, and enhances the security of the system.
Smart Images

Figure CN118590877A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of electric vehicles, and in particular to an authentication method for a charging pile, a charging system, an on-board device, a charging pile, a cloud server, and a computer program product. Background Art
[0002] With the continuous advancement of electric vehicle technology, more and more users choose electric vehicles as a means of transportation. Charging piles, as charging equipment for electric vehicles, are becoming more and more popular, and more and more users choose to use private charging piles. Private charging piles are usually installed in users' private parking spaces; when users use charging piles to charge, in order to ensure that the charging piles are not used by others, the charging piles usually authenticate the vehicle before charging the vehicle; only after the authentication is passed will the corresponding charging service be provided to the vehicle. The current authentication method makes the authentication information easy to be stolen or tampered with, thus affecting the charging safety of the charging piles. Summary of the invention
[0003] The embodiments of the present disclosure at least provide a charging pile authentication method, a charging system, a vehicle-mounted device, a charging pile, a cloud server, and a computer program product.
[0004] In a first aspect, an embodiment of the present disclosure provides a charging pile authentication method, which is applied to a terminal device; the terminal device is associated with a target vehicle; the method comprises:
[0005] Obtaining the first authentication password data and the first authentication key of the charging pile from the cloud; wherein the first authentication password data and the first authentication key are generated by performing an encryption operation using the root key and the root key offset corresponding to the charging pile;
[0006] Generate an authentication request based on a locally generated first random number and the first authentication password data, and send the authentication request to the charging pile;
[0007] Receiving the session password data and the third random number returned by the charging pile according to the authentication request; wherein the session password data is generated by using the first authentication password data carried in the authentication request, and the root key and the root key offset stored in the terminal device;
[0008] The session password data is verified using the first authentication key, the first random number and the third random number, and if the verification passes, response data is sent to the charging pile; the response data is used by the charging pile to determine whether to open the charging service to the target vehicle associated with the terminal device.
[0009] In a possible implementation manner, the method further includes: generating a key pair, the key pair including a public key and a private key;
[0010] Generate a data acquisition request based on the public key, and send the data acquisition request to the cloud;
[0011] The step of obtaining the first authentication password data and the first authentication key of the charging pile from the cloud includes:
[0012] Receive the first encrypted data returned by the cloud according to the data acquisition request, decrypt the first encrypted data using the private key, and obtain the first authentication password data and the first authentication key.
[0013] In a possible implementation manner, the method further includes:
[0014] Acquire the charging pile identifier of the charging pile, and perform target processing on the charging pile identifier to obtain first matching information; and receive a broadcast signal of the charging pile;
[0015] When the first matching information successfully matches the second matching information carried in the broadcast signal, a wireless connection with the charging pile is established; wherein the second matching information is obtained by the charging pile performing target processing on its own charging pile identifier.
[0016] In a possible implementation manner, the first authentication password data is generated by performing a first encryption process on the second random number and the first concatenated data of the first target data using the root key corresponding to the charging pile and the root key offset;
[0017] The first authentication key is generated by performing a second encryption process on the second random number and the second concatenated data of the first target data using the root key and the root key offset corresponding to the charging pile;
[0018] The first encryption process and the second encryption process correspond to different first target data respectively.
[0019] In a possible implementation manner, the method further includes:
[0020] Acquire the charging pile identifier of the charging pile, and perform target processing on the charging pile identifier to obtain first matching information; and receive a broadcast signal of the charging pile;
[0021] When the first matching information successfully matches the second matching information carried in the broadcast signal, a wireless connection with the charging pile is established; wherein the second matching information is obtained by the charging pile performing target processing on its own charging pile identifier.
[0022] In a second aspect, the embodiment of the present disclosure also provides another authentication method for a charging pile, which is used for a charging pile; the authentication method includes:
[0023] Receiving an authentication request sent by a terminal device; the authentication request includes first authentication password data and a first random number;
[0024] Decrypting the first authentication password data using the locally stored root key and the root key offset to obtain the second random number, and performing a second encryption process on the second random number and the first target data using the root key and the root key offset to generate a second authentication key;
[0025] Generate session password data using the second authentication key, the first random number, and a third random number generated by the charging pile; and send the session password data and the third random number to the terminal device;
[0026] In response to receiving the response data returned by the terminal device, the response data is verified; if the verification passes, the charging service is opened to the target vehicle associated with the terminal device.
[0027] In a possible implementation manner, the method further includes: sending a broadcast signal;
[0028] In response to receiving a connection request sent by the terminal device according to the broadcast signal, a wireless connection with the terminal device is established.
[0029] In a possible implementation manner, the step of generating session password data by using the second authentication key, the first random number, and a third random number generated by the charging pile includes:
[0030] Performing a third splicing process on the third random number and the first random number to obtain third spliced data; and performing a fourth splicing process on the third random number and the first random number to obtain fourth spliced data; the splicing positions of the third random number in the third spliced data and the fourth spliced data are different;
[0031] Using the third concatenated data as an authentication key offset, and using the second authentication key and the authentication key offset to encrypt the third concatenated data to obtain a first session key;
[0032] And, using the fourth spliced data as the session key offset, using the first session key and the session key offset, encrypting the fifth spliced data to obtain the session password data; wherein the fifth spliced data is obtained by performing the fifth splicing process using the first random number and the second target data.
[0033] In a possible implementation, the second random number and the first target data are subjected to a second encryption process using the root key and the root key offset to generate a second authentication key, including: performing a second splicing process on the second random number and the first target data to obtain second spliced data; and encrypting the second spliced data using the root key and the root key offset to obtain the second authentication key.
[0034] In a possible implementation manner, the verifying the response data includes:
[0035] Decrypting the second encrypted data carried in the response data based on the locally generated first session key and the session key offset to obtain a second decryption result;
[0036] Matching the second decryption result with the locally stored target character string;
[0037] When the second decryption result is consistent with the locally stored target character string, the response data is verified successfully.
[0038] In a third aspect, the disclosed embodiment also provides another authentication method for a charging pile, which is applied to a cloud, and the method includes: in response to receiving a data acquisition request corresponding to the charging pile sent by a terminal device, generating a second random number;
[0039] Using the root key and the root key offset corresponding to the charging pile, perform the first encryption processing on the second random number to obtain the first authentication password data, and using the root key and the root key offset to perform the second encryption processing on the second random number to obtain the first authentication key;
[0040] Sending the first authentication password data and the first authentication key to the terminal device;
[0041] The first authentication password data and the first authentication key are used to authenticate the charging pile to the terminal device.
[0042] In a possible implementation manner, the step of performing the first encryption processing on the second random number using the root key and the root key offset corresponding to the charging pile to obtain the first authentication password data includes:
[0043] Performing a first concatenation process on the second random number and the first target data to obtain first concatenated data; performing the first encryption process on the first concatenated data using the root key and the root key offset to obtain the first authentication password data;
[0044] and / or,
[0045] Using the root key and the root key offset to perform the second encryption process on the second random number to obtain the first authentication key, including: performing a second concatenation process on the second random number and the first target data to obtain second concatenated data; using the root key and the root key offset to perform the second encryption process on the second concatenated data to obtain the first authentication key;
[0046] The first encryption process and the second encryption process correspond to different first target data respectively.
[0047] In a fourth aspect, an embodiment of the present disclosure further provides a charging system, including: a terminal device, and a charging pile;
[0048] The charging pile is used to, after receiving the authentication request, decrypt the first authentication password data using the root key and the root key offset stored in the charging pile to obtain the second random number, and perform a second encryption process on the second random number using the root key and the root key offset to generate a second authentication key; generate session password data using the second authentication key, the first random number, and a third random number generated by the charging pile; and send the session password data and the third random number to the terminal device;
[0049] The terminal device is further configured to verify the session password data using the first authentication key of the charging pile, the first random number and the third random number obtained from the cloud after receiving the session password data and the third random number; and send response data to the charging pile if the verification passes; wherein the first authentication key is obtained by performing the second encryption processing on the second random number using the root key and the root key offset;
[0050] The charging pile is further used to verify the response data after receiving the response data; if the verification is successful, the charging service is opened to the target vehicle associated with the terminal device.
[0051] In a fifth aspect, an embodiment of the present disclosure further provides a vehicle-mounted device, comprising a processor; the processor executes the authentication method for the charging pile as described in the first aspect or any one of the first aspects.
[0052] In a sixth aspect, an embodiment of the present disclosure further provides a charging pile, the charging pile comprising a controller, the controller executing the authentication method of the charging pile as described in the second aspect or any one of the second aspects.
[0053] In a seventh aspect, an embodiment of the present disclosure further provides a cloud server, the cloud server comprising a processor, the processor executing the authentication method for the charging pile as described in the third aspect or any one of the third aspects.
[0054] In an eighth aspect, an embodiment of the present disclosure further provides a computer program product, which carries a program code, and the instructions included in the program code can be used to execute the steps of the charging pile authentication method as described in the first aspect, or any item of the first aspect, or the second aspect, or any item of the second aspect, or the third aspect, or any item of the third aspect.
[0055] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present disclosure.
[0056] The authentication method, charging system, vehicle-mounted equipment, charging pile, cloud server and computer program product of the charging pile provided by the embodiments of the present disclosure store the root key and root key offset corresponding to the charging pile in the cloud server and the charging pile respectively; during the authentication process, the root key and root key offset are used to generate random numbers for the cloud, the terminal device and the charging pile respectively to implement the authentication process, thereby ensuring that each authentication process is implemented by generating a new random number, and the root key and root key offset will not be transmitted during the authentication process, thereby ensuring the uniqueness and security of the charging authority opened by the charging pile each time.
[0057] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0059] Figure 1 A schematic diagram of a charging system provided by some embodiments of the present disclosure is shown;
[0060] Figure 2 An example of a specific authentication process provided by some embodiments of the present disclosure is shown;
[0061] Figure 3A flowchart of a charging pile authentication method provided by some embodiments of the present disclosure is shown;
[0062] Figure 4 A flowchart of another charging pile authentication method provided by some embodiments of the present disclosure is shown;
[0063] Figure 5 A flowchart of another charging pile authentication method provided by some embodiments of the present disclosure is shown;
[0064] Figure 6 A schematic diagram of a computer device provided by some embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. The components of the embodiments of the present disclosure generally described and shown here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure is not intended to limit the scope of the present disclosure claimed for protection, but merely represents selected embodiments of the present disclosure.
[0066] Research has found that when charging piles authenticate vehicles, they usually use password data to log in; password data can be easily stolen or tampered with, causing illegal users to use the user's private charging piles for charging, thus affecting the charging safety of the charging piles.
[0067] Based on the above research, the present disclosure provides an authentication method for a charging pile, in which the root key and root key offset corresponding to the charging pile are stored in a cloud server and a charging pile respectively; during the authentication process, the root key and root key offset are used to generate random numbers for the cloud, terminal device, and charging pile respectively to implement the authentication process, thereby ensuring that each authentication process is implemented by generating a new random number, and the root key and root key offset will not be transmitted during the authentication process, thereby ensuring the uniqueness and security of the charging authority opened by the charging pile each time.
[0068] The defects existing in the above solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.
[0069] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0070] To facilitate understanding of this embodiment, a charging pile authentication method disclosed in the embodiment of the present disclosure is first introduced in detail. The authentication method provided in the embodiment of the present disclosure can be used for the authentication of charging piles as well as for the authentication process of other devices.
[0071] The following is an explanation of the authentication method of the charging pile provided in the embodiment of the present disclosure.
[0072] See also Figure 1 , which is a schematic diagram of the structure of the charging system of the charging pile provided in an embodiment of the present disclosure, includes: a terminal device 10 and a charging pile 20.
[0073] The terminal device 10 is used to generate an authentication request based on a locally generated first random number and first authentication password data of the charging pile obtained from the cloud, and send the authentication request to the charging pile; the first authentication password data is generated by performing a first encryption process on the second random number using the root key corresponding to the charging pile and the root key offset;
[0074] The charging pile 20 is used to, after receiving the authentication request, decrypt the first authentication password data using the root key and the root key offset stored in the charging pile to obtain the second random number, and perform a second encryption process on the second random number using the root key and the root key offset to generate a second authentication key; generate session password data using the second authentication key, the first random number, and a third random number generated by the charging pile; and send the session password data and the third random number to the terminal device;
[0075] The terminal device 10 is further configured to verify the session password data using the first authentication key of the charging pile, the first random number and the third random number obtained from the cloud after receiving the session password data and the third random number; and send response data to the charging pile if the verification passes; wherein the first authentication key is obtained by performing the second encryption processing on the second random number using the root key and the root key offset;
[0076] The charging pile 20 is further used to verify the response data after receiving the response data; if the verification is successful, the charging service is opened to the target vehicle associated with the terminal device.
[0077] The terminal device 10 and the charging pile 20 are described in detail below.
[0078] The terminal device 10 in the embodiment of the present disclosure includes, for example, an on-board device on the target vehicle; in addition, the terminal device 10 may also be a user's mobile terminal, such as a mobile phone, a personal digital assistant, a wearable device, etc., and the mobile terminal is associated with the target vehicle. An application for providing a charging function corresponding to the charging pile may be installed in the terminal device 10; during the operation of the application in the terminal device 10, a charging service page may be displayed to the user, and the user may trigger the authentication process of the charging pile through the charging service page.
[0079] During the authentication process, the terminal device 10 can, for example, first obtain the first authentication cipher data CipherData_1 and the first authentication key charger_key_1 generated by the cloud from the cloud. In the disclosed embodiment, the cloud generates the first authentication key charger_key_1 and the first authentication cipher data CipherData_1 using the second random number T generated by itself; the second random number T will be transmitted from the cloud to the terminal device, and then transmitted by the terminal device to the charging pile. The charging pile generates the second authentication key charger_key_2 and the second authentication cipher data CipherData_2 using the second random number T transmitted by the terminal device. The cloud and the terminal device generate authentication keys and authentication cipher data in the same way. In theory, when there is no problem, the first authentication key charger_key_1 and the second authentication key charger_key_2 are the same; the first authentication cipher data CipherData_1 and the second authentication cipher data CipherData_2 are the same.
[0080] Specifically, the charging system provided in another embodiment of the present disclosure further includes: a cloud server (referred to as the cloud), and specifically the present disclosure embodiment provides a specific process of the terminal device 10 obtaining the first authentication password data and the first authentication key from the cloud 30, including:
[0081] The terminal device 10 sends the data acquisition request to the cloud 30;
[0082] After receiving the data acquisition request, the cloud 30 uses the root key and the root key offset corresponding to the charging pile to perform the first encryption processing on the second random number to obtain the first authentication password data, and uses the root key and the root key offset to perform the second encryption processing on the second random number to obtain the first authentication key; and sends the first authentication password data and the first authentication key to the terminal device;
[0083] The terminal device 10 receives the first authentication password data and the first authentication key sent by the cloud 30 .
[0084] Specifically, when the terminal device 10 sends a data acquisition request to the cloud, it can generate a key pair, the key pair including a public key and a private key, generate a data acquisition request based on the public key, and send the data acquisition request to the cloud. The public key is carried in the data acquisition request.
[0085] After generating the first authentication password data and the first authentication key, the cloud 30 uses the public key to encrypt the first authentication password data and the first authentication key to obtain first encrypted data; and sends the first encrypted data to the terminal device;
[0086] After receiving the first encrypted data sent by the cloud, the terminal device 110 uses the private key to decrypt the first encrypted data to obtain the first authentication password data and the first authentication key.
[0087] In a specific implementation, the user can trigger the authentication process through the control for triggering authentication provided in the charging service page. In response to the control being triggered, the terminal device will generate a corresponding key pair; the key pair includes a public key and a private key matching the public key; wherein, after the data is encrypted with the public key, it can be decrypted with the private key. After generating the key pair, the terminal device carries the public key in the data acquisition request and sends the data acquisition request to the cloud.
[0088] After receiving the data acquisition request, the cloud generates a second random number T. Then, the second random number is subjected to the first encryption process and the second encryption process to obtain the first authentication cipher data CipherData_1 and the first authentication key charger_key_1, and the first authentication cipher data CipherData_1 and the first authentication key charger_key_1 are encrypted using the public key carried in the data acquisition request to obtain the first encrypted data S1, and the first encrypted data S1 is sent to the terminal device.
[0089] After receiving the first encrypted data S1, the terminal device 10 uses the private key to decrypt the first encrypted data S1, and then obtains the first authentication cipher data CipherData_1 and the first authentication key charger_key_1.
[0090] Here, the algorithm for encrypting and decrypting the authentication cipher data CipherData (including the first authentication cipher data generated by the cloud and the second authentication cipher data generated by the charging pile) and the authentication key charger_key (including the first authentication key generated by the cloud and the second authentication key generated by the charging pile) using the public key and the private key can adopt any asymmetric encryption algorithm, which is not limited in the embodiments of the present disclosure.
[0091] Specifically, the first authentication password data, for example, the first authentication password data is generated by performing a first encryption process on the second random number and the first concatenated data of the first target data using the root key corresponding to the charging pile and the root key offset;
[0092] The first authentication key is generated by performing a second encryption process on the second random number and the second concatenated data of the first target data using the root key and the root key offset corresponding to the charging pile, wherein the first encryption process and the second encryption process correspond to different first target data respectively.
[0093] In the embodiment of the present disclosure, performing the first encryption process on the second random number may include, for example:
[0094] Performing a first concatenation process on the second random number and the first target data to obtain first concatenated data; encrypting the first concatenated data using the root key and the root key offset to obtain authentication password data;
[0095] Performing a second encryption process on the second random number may include, for example: performing a second concatenation process on the second random number and the first target data to obtain second concatenated data; encrypting the second concatenated data using the root key and the root key offset to obtain an authentication key;
[0096] Among them, the first target data includes at least one of the following: an identification mark of the charging pile, a type mark of the charging pile, a user mark of the terminal device, a device mark of the terminal device, and a vehicle mark of a target vehicle associated with the charging pile; the first encryption processing and the second encryption processing correspond to different first target data respectively.
[0097] The types of charging piles include public charging piles (shared piles) and private charging piles (private piles).
[0098] Here, the root key charger_root_key and the root key offset charger_root_key_iv of the charging pile are stored in both the cloud and the charging pile. The root key charger_root_key and the root key offset charger_root_key_iv stored in the charging pile can be burned into a fixed storage space corresponding to the chip of the charging pile, for example; during the authentication process, the charging pile can directly read the root key charger_root_key and the root key offset charger_root_key_iv from the fixed storage space where the above data is burned. The cloud, as a system for managing charging piles, can pre-store the root key charger_root_key and the root key offset charger_root_key_iv corresponding to each charging pile.
[0099] The data acquisition request sent by the terminal device 10 may, for example, carry identification information for identifying the user of the terminal device, such as the user account for logging into the terminal device, the license plate of the target vehicle, the charging pile identification of the charging pile bound to the terminal device, etc. When the cloud stores the root key charger_root_key and the root key offset charger_root_key_iv of the charging pile, it usually directly or indirectly associates and stores the identification information of the terminal device user with the above-mentioned root key and root key offset. Therefore, after receiving the data acquisition request, the cloud can read the root key and root key offset corresponding to the charging pile that the user wants to authenticate based on the identification information carried in the data acquisition request.
[0100] In addition, after receiving the data acquisition request, the cloud 30 will also randomly generate a second random number. Then, the first target data and the second random number corresponding to the first encryption process and the second encryption process are spliced to obtain the first spliced data corresponding to the first encryption process and the second spliced data corresponding to the second encryption process; then, the first spliced data is encrypted using the root key and the root key offset corresponding to the charging pile read to obtain the first authentication password data, and the second spliced data is encrypted to obtain the first authentication key.
[0101] Exemplarily, the terminal device 10 generates a set of key pairs, including a public key K1 and a private key K2, and carries the public key K1 in the data acquisition request A1, and sends it to the cloud 30.
[0102] After receiving the data acquisition request A1, the cloud 30 generates a second random number T. The first target data corresponding to the first encryption process is the charging pile type E. The second random number T and the charging pile type E are spliced to obtain the first spliced data M1 (E||T, or T||E, where "||" represents splicing); then the first spliced data M1 is encrypted using the root key charger_root_key and the root key offset charger_root_key_iv to obtain the first authentication password data CipherData_1.
[0103] The first target data corresponding to the second encryption process is the charging pile identification ID; after splicing the second random number and the charging pile identification ID, the first spliced data M2 (ID||T, or T||ID) is obtained; then, the first spliced data M2 is encrypted using the root key charger_root_key and the root key offset charger_root_key_iv to obtain the first authentication key charger_key.
[0104] The first authentication key charger_key_1 of the charging pile and the first authentication cipher data CipherData_1 are encrypted using the public key K1 carried in the data acquisition request A1 to obtain the first encrypted data S1, and then the cloud 30 returns the first encrypted data S1 to the terminal device 10.
[0105] After receiving the first encrypted data S1 sent from the cloud, the terminal device 19 uses the private key K2 to decrypt the first encrypted data S1 to obtain the first authentication key charger_key_1 of the charging pile and the first authentication cipher data CipherData_1.
[0106] In the above embodiment, the concatenated data is encrypted using the root key charger_root_key and the root key offset charger_root_key_iv. For example, the Advanced Encryption Standard-Galois / Counter Mode (AES-GCM) encryption algorithm or other algorithms that encrypt data using the root key and the root key offset may be used.
[0107] In this way, by burning the root key and key offset into the charging pile hardware and storing them in the cloud, the root key and root key offset are not transmitted during the authentication process, which can avoid the risk of these sensitive information being stolen or leaked during the transmission process. At the same time, the core data stored in the database in the cloud will not be transmitted, further enhancing the security of the system.
[0108] In another embodiment of the present disclosure, the process of establishing a connection between the terminal device and the charging pile is also included. The process of establishing a connection may occur, for example, before the terminal device obtains the authentication key charger_key and the authentication cipher data CipherData of the charging pile from the cloud, or after the terminal device obtains the authentication key charger_key and the authentication cipher data CipherData, which is not limited in the embodiment of the present disclosure.
[0109] Specifically, in order to implement the process of establishing the connection, the terminal device 10 is further used to: obtain the charging pile identifier of the charging pile, and perform target processing on the charging pile identifier to obtain first matching information; and receive the broadcast signal of the charging pile;
[0110] When the first matching information and the second matching information carried in the broadcast signal match successfully, a wireless connection with the charging pile 30 is established; wherein the second matching information is obtained by the charging pile 30 performing target processing on its own charging pile identification.
[0111] In a specific implementation, in the case where the charging pile is a private charging pile, a binding relationship may be established in advance between the charging pile and the terminal device, and the charging pile identification may be pre-stored in the terminal device. The terminal device may directly read the pre-stored charging pile identification locally.
[0112] In case that the charging pile is a public charging pile, for example, a QR code logo may be set on the charging pile; the QR code is scanned by a terminal device to obtain the charging pile logo.
[0113] After acquiring the charging pile identifier, the terminal device 10 performs target processing on the charging pile identifier to obtain first matching information, and receives the broadcast signal of the charging pile 20 .
[0114] At the same time, the charging pile 20 also sends a short-range wireless communication broadcast signal to the outside world, such as a Bluetooth signal, a wireless LAN (Wireless Fidelity, WiFi) signal, etc. The broadcast signal carries the second matching information. The second matching information is generated by the charging pile 20 according to its own charging pile identification.
[0115] After receiving the broadcast signal of the charging pile, the terminal device 10 matches the first matching information and the second matching information carried in the broadcast signal for consistency; if the two are consistent, it is determined that the first matching information and the second matching information are matched successfully, and a wireless connection with the charging pile is established; after the wireless connection is established, the wireless connection can be used to exchange data to complete the authentication process. If the two are inconsistent, the matching fails.
[0116] The above-mentioned target processing of the charging pile identification includes, for example: performing digital signature processing on the charging pile identification to obtain a digital signature result, and then intercepting the data of the target position from the digital signature result to obtain the second matching information, or the second matching information. Exemplarily, the terminal device and the charging pile perform SHA256 calculation on the charging pile identification respectively, and take the first 16 bytes (bits) of the HEX string as the first matching information and the second matching information respectively.
[0117] When establishing a wireless connection with the charging pile, the terminal device 10 sends a connection request to the charging pile 20. After receiving the connection request sent by the terminal device 10, the charging pile 20 establishes a wireless connection with the terminal device.
[0118] The terminal device 10 also generates a first random number A. After establishing a connection with the charging pile in the above manner and obtaining the first authentication password data of the charging pile from the cloud, the first random number A and the first authentication password data are carried in the authentication request and sent to the charging pile using the wireless connection established with the charging pile. Here, the first random number A is carried in the authentication request in plain text, for example.
[0119] After receiving the authentication request, the charging pile 20 uses the root key and the root key offset to encrypt the data. Since the charging pile 20 locally stores the root key and the root key offset corresponding to the charging pile, and the first authentication cipher data CipherData_1 is obtained by the cloud using the root key and the root key offset to perform the first encryption process on the second random number, here, the charging pile can decrypt the first authentication cipher data CipherData_1 according to the root key and the root key offset stored therein, thereby obtaining the second random number. Then, the root key charger_root_key and the root key offset charger_root_key_iv are used to perform the second encryption process on the obtained second random number to obtain the second authentication key charger_key_2. Here, the specific process of the second encryption process can be referred to the above embodiment, and will not be repeated here.
[0120] In the case where only the root key is used to encrypt data, the charging pile 20 locally stores the root key corresponding to the charging pile; the authentication cipher data CipherData is obtained by the cloud using the root key to perform a first encryption process on the second random number, and then the charging pile can decrypt the authentication cipher data CipherData according to the locally stored root key to obtain the second random number. Then, the root key charger_root_key is used to perform a second encryption process on the obtained second random number to obtain the authentication key charger_key. Here, the specific process of the second encryption process can be referred to the above embodiment, and will not be repeated here.
[0121] In addition, the charging pile will also generate a third random number C, and use the second authentication key, the first random number A, and the third random number C to generate session password data.
[0122] Specifically, the charging pile 20 may, for example, generate session password data by using the second authentication key, the first random number, and the third random number generated by the charging pile in the following manner:
[0123] Performing a third splicing process on the third random number C and the first random number A to obtain third splicing data; and performing a fourth splicing process on the third random number C and the first random number A to obtain fourth splicing data; the splicing positions of the third random number C in the third splicing data and the fourth splicing data are different;
[0124] Using the third concatenated data as the authentication key offset charger_key_iv, and using the second authentication key charger_key_2 and the authentication key offset charger_key_iv to encrypt the third concatenated data to obtain a first session key charger_session_key_1;
[0125] And, using the fourth spliced data as the session key offset charger_session_key_iv, using the first session key charger_session_key_1 and the session key offset charger_session_key_iv, the fifth spliced data is encrypted to obtain the session password data; wherein the fifth spliced data is obtained by performing the fifth splicing process using the first random number A and the second target data.
[0126] In a specific implementation, the charging pile 20 performs a third splicing process on the third random number C and the first random number A to obtain the third spliced data, for example, the third random number C and the first random number A are spliced with the third random number C in front and the first random number A in the back, to obtain the third spliced data C||A. The third spliced data C||A is used as the authentication key offset charger_key_iv, and the third spliced data C||A is encrypted using the locally generated second authentication key charger_key_2 and the authentication key offset charger_key_iv to obtain the session key charger_session_key.
[0127] The charging pile 20 also concatenates the first random number A and the third random number C with A in front and C in the back to obtain fourth concatenated data A||C, and uses the fourth concatenated data A||C as the session key offset charger_session_key_iv.
[0128] The charging pile 20 will also perform a fifth splicing process on the first random number A and the second target data to obtain the fifth splicing data. The second target data may include, for example, any one of: an identification mark of the charging pile, a type mark of the charging pile, a user mark of the terminal device, a device mark of the terminal device, and a vehicle mark of a target vehicle associated with the charging pile. Taking the identification mark ID of the charging pile of the second target data packet as an example, the fifth splicing data obtained includes, for example, A||ID, and then the fifth splicing data A||ID is encrypted using the session key charger_session_key and the session key offset charger_session_key_iv to obtain the session password data S2.
[0129] In other embodiments of the present disclosure, when the third random number C and the first random number A are spliced (third splicing process or fourth splicing process), other splicing methods may be used, such as splicing the third random number to the head and tail of the first random number to obtain spliced data C||A||C, or splicing the first random number to the head and tail of the third random number to obtain spliced data A||C||A, or repeating the first random number once and splicing it to the front of the third random number to obtain spliced data A||A||C. In addition, there may be other splicing methods, which are not limited in the embodiments of the present disclosure.
[0130] When the third spliced data is encrypted using the second authentication key and the authentication key offset to obtain the session key, for example, the AES-GCM encryption algorithm or other algorithms that use keys and key offsets to encrypt data may be used, which is not limited in the embodiments of the present disclosure.
[0131] After the charging pile 20 generates the session password data in the above manner, it sends the session password data S2 and the third random number to the terminal device 10 according to the wireless connection established between the charging pile 20 and the terminal device 10. Here, the third random number is transmitted to the terminal device in plain text.
[0132] After receiving the session password data and the third random number sent by the charging pile, the terminal device 10 will use the first authentication key of the charging pile obtained from the cloud, the first random number A generated locally, and the third random number C sent by the charging pile to verify the session password data sent by the charging pile.
[0133] Specifically, the embodiment of the present disclosure provides a specific method for verifying session password data, including:
[0134] The terminal device 10 performs a third splicing process on the third random number sent by the charging pile and the first random number to obtain third splicing data; and performs a fourth splicing process on the third random number and the first random number to obtain fourth splicing data;
[0135] Using the locally generated third concatenated data as an authentication key offset, and using the first authentication key obtained from the cloud and the authentication key offset to encrypt the locally generated third concatenated data to obtain a second session key;
[0136] Using the fourth concatenated data as a session key offset, using the session key offset and the second session key, decrypting the session password data to obtain a first decryption result, and matching the first decryption result with the sixth concatenated data; wherein the sixth concatenated data is obtained by the terminal device performing a fifth concatenation process using the first random number and the second target data;
[0137] If the first decryption result is consistent with the sixth concatenated data, the session password data is verified.
[0138] In a specific implementation, the way in which the terminal device 10 performs the third splicing processing on the third random number and the first random number is the same as the way in which the charging pile 20 performs the third splicing processing on the third random number and the first random number; and the way in which the terminal device 10 performs the fourth splicing processing on the third random number and the first random number is also the same as the way in which the charging pile 20 performs the fourth splicing processing on the third random number and the first random number.
[0139] The way in which the terminal device 10 generates the second session key is the same as the way in which the charging pile 20 generates the first session key.
[0140] The terminal device 10 generates the sixth splicing data in the same manner as the charging pile 20 generates the fifth splicing data. Therefore, the above process can refer to the above embodiment and will not be described again.
[0141] Theoretically, the second session key is the same as the first session key; therefore, the terminal device can use the session key offset and the second session key to successfully decrypt the session cipher data, and the obtained sixth spliced data is consistent with the fifth spliced data generated by the charging pile.
[0142] If the first decryption result obtained by the terminal device 10 is consistent with the sixth concatenated data generated locally, the verification of the session password data is successful.
[0143] In this case, the terminal device will send response data to the charging pile.
[0144] Specifically, the terminal device 10 may generate the response data in the following manner, for example:
[0145] The terminal device encrypts the target character string using the second session key and the session key offset to obtain second encrypted data;
[0146] The second encrypted data is carried in the response data and sent to the charging pile.
[0147] Here, the target character string may be, for example, a character string pre-agreed upon by the terminal device and the charging pile, such as "1111", "abcd", etc., which is not limited in the embodiment of the present disclosure.
[0148] After receiving the response data sent by the terminal device, the charging pile 20 can verify the response data in the following manner, for example:
[0149] The charging pile decrypts the second encrypted data carried in the response data based on the first session key generated locally and the session key offset to obtain a second decryption result;
[0150] Matching the second decryption result with the locally stored target character string;
[0151] When the second decryption result is consistent with the locally stored target character string, the response data is verified successfully.
[0152] After the verification is passed, the charging pile opens the charging service to the target vehicle associated with the terminal device, completing the authentication process of the charging pile.
[0153] See also Figure 2 As shown, the embodiment of the present disclosure also provides a specific example of an authentication process, including:
[0154] Cloud and charging pile: store the root key charger_root_key of the charging pile and the root key offset charger_root_key_iv of the charging pile.
[0155] S201: Cloud: Use the root key charger_root_key and the root key offset charger_root_key_iv to encrypt the concatenated data M1 (ID||T, or T||ID) of the charging pile identification ID and the random number T to generate the first authentication key charger_key_1 of the charging pile, and encrypt the concatenated data M2 (E||T, or T||E) of the random number T and the charging pile type E (public pile, private pile) to generate the first authentication cipher data CipherData_1 of the charging pile.
[0156] S202: The terminal device generates a key pair, including a public key K1 and a private key K2.
[0157] S203: Send a data acquisition request A1 to the cloud, and the acquisition request A1 carries the public key K1.
[0158] S204: Cloud: After receiving the data acquisition request A1 sent by the terminal device, the first authentication key charger_key_1 and the first authentication password data CipherData_1 of the charging pile are encrypted using the public key K1 carried in the acquisition request A1 to obtain the first encrypted data S1.
[0159] S205: The cloud returns the first encrypted data S1 to the terminal device.
[0160] S206: The terminal device receives the first encrypted data S1 sent from the cloud, and decrypts the encrypted data S1 using the private key K2 to obtain the first authentication key charger_key_1 of the charging pile and the first authentication cipher data CipherData_1.
[0161] S207: Charging pile: perform SHA256 calculation on the charging pile ID, take the first 16 bytes of HEX string H1, and use string H1 as the second matching information.
[0162] S208: Broadcast the second matching information.
[0163] S209: The terminal device performs SHA256 calculation on the charging pile ID, obtains the first 16 bytes of the HEX string H2, and uses the string H2 as the first matching information. The Bluetooth connection with the charging pile is established by matching the string H1 carried in the acquired broadcast signal with the string H2.
[0164] S210: Terminal device: After establishing a Bluetooth connection with the charging pile, an authentication request A2 is generated. The authentication request carries a random number A generated by the terminal device, the charging pile ID, and the authentication password data CipherData of the charging pile. The authentication request A2 is sent to the charging pile using the blue bar connection established between the terminal device and the charging pile.
[0165] S211: Charging pile: After receiving the authentication request A2 sent by the terminal device, the first authentication cipher data CipherData_1 carried in the authentication request A2 is decrypted through the locally stored root key charger_root_key of the charging pile and the root key offset charger_root_key_iv to obtain the random number T, and then the root key charger_root_key and the root key offset charger_root_key_iv are used to encrypt the spliced data of the charging pile ID and the random number T to obtain the second authentication key charger_key_2.
[0166] S212: Charging pile: Generate a random number C, concatenate the random number C and the random number A carried in the authentication request A2 to obtain C||A, use C||A as the authentication key offset charger_key_iv, use the second authentication key charger_key_2 and the authentication key offset charger_key_iv to encrypt C||A to obtain the first session key charger_session_key_1.
[0167] S213, charging pile: A and C are spliced in front and C in the back to obtain A||C, which is used as the session key offset charger_session_key_iv. The spliced data M4(A||ID) obtained by splicing the random number A and the charging pile ID is encrypted using the second session key charger_session_key_2 and the session key offset charger_session_key_iv to obtain the session password data S2.
[0168] S214: The charging pile sends the session password data S2 and the random number C to the terminal device.
[0169] S215: The terminal device concatenates the random number C sent by the charging pile and the random number A generated by itself to obtain C||A, and uses C||A as the charging pile key offset charger_key_iv, and uses the first charging pile authentication key charger_key_1 and the charging pile key offset charger_key_iv obtained from the remote end to encrypt C||A to obtain the charging pile session key charger_session_key. The charging pile session key charger_session_key and the session key offset charger_session_key_iv are used to decrypt the session password data S2 to obtain the first decryption result, and the first decryption result is used to verify (A||ID).
[0170] If the verification is correct: the target string "HR-ICN240013" is encrypted with the second session key charger_session_key_2 and the session key offset charger_session_key_iv to obtain the second encrypted data S3 (ie, the response data).
[0171] S216: The terminal device sends the second encrypted data S3 to the charging pile.
[0172] S217: After receiving the second encrypted data S3, the charging pile uses the first session key charger_session_key_1 and the charging pile session key offset charger_session_key_iv to decrypt the second encrypted data S3, obtains a first decryption result, and uses the first decryption result to verify the target string. If the verification is successful, the negotiation is completed.
[0173] The obtained session key charger_session_key and session key offset charger_session_key_iv are used as data encryption and decryption in subsequent sessions.
[0174] The above process is used to complete the authentication of the charging pile.
[0175] The authentication method provided in the embodiment of the present disclosure has higher security:
[0176] In the disclosed embodiment, the root key and key offset of the charging pile are burned into the charging pile hardware by the factory, and stored in the database in the cloud, and the above core data is not transmitted. This design can increase the security of the charging pile system. By burning the root key and key offset into the charging pile hardware instead of transmitting them by data transmission, the risk of these sensitive information being stolen or leaked during the transmission process can be avoided. At the same time, the core data stored in the database in the cloud will not be transmitted, further enhancing the security of the system.
[0177] The transmission of critical data (authentication password data and authentication key) between the terminal device and the cloud is encrypted using a dynamically generated asymmetric key. The public key is sent to the cloud for encryption, and the terminal device uses the private key for decryption. The use of dynamically generated asymmetric key encryption can ensure the security of the above critical data during transmission; at the same time, a new asymmetric key pair can be used for each encryption, which increases security and prevents replay attacks.
[0178] Each time the terminal device is connected to the charging pile, the cloud generates a second random number T, the terminal device generates a first random number A, and the charging pile generates a third random number C. These random numbers play a key role in the generation of authentication keys and session keys. In this way, a new session key and authentication key are generated each time a connection is made, thereby ensuring the uniqueness and security of each connection. At the same time, using random numbers to verify ciphertext can ensure the integrity and authenticity of data transmission.
[0179] The authentication process provided by the embodiment of the present disclosure has higher efficiency:
[0180] 1. Preprocessing and calculation: Before the user establishes a connection, some complex calculations and time-consuming operations are completed in advance to reduce the overall time consumption during the formal connection. Nearly 50% of the calculations and time-consuming operations in the entire process occur before the connection is established. This greatly reduces the process time. This strategy can improve the system's response speed and user experience.
[0181] 2. Low frequency of data exchange: The core data (authentication password data, random number A, random number C) in the authentication process is transmitted only three times (twice from the terminal device to the charging pile, and once from the charging pile to the terminal device). By reducing the number of data transmissions, the time required for data transmission can be greatly shortened. In the authentication process, the number of core data transmissions is reduced to three times, so the overall authentication process will be more efficient and faster.
[0182] 3. The length of a single business data is short: Using the above authentication process, the key calculated and obtained can ensure data security even if a shorter data transmission is used during business data transmission, thereby reducing data transmission, while also reducing transmission delay and improving transmission efficiency.
[0183] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0184] Based on the same inventive concept, see Figure 3 As shown, the embodiment of the present disclosure also provides an authentication method corresponding to the above charging system, which is applied to a terminal device and includes:
[0185] S301: Obtaining first authentication password data and a first authentication key of a charging pile from the cloud; wherein the first authentication password data and the first authentication key are generated by performing an encryption operation using a root key and a root key offset corresponding to the charging pile;
[0186] S302: Generate an authentication request based on a locally generated first random number and the first authentication password data, and send the authentication request to the charging pile;
[0187] S303: Receive the session password data and the third random number returned by the charging pile according to the authentication request; wherein the session password data is generated by using the first authentication password data carried in the authentication request, and the root key and the root key offset stored in the terminal device;
[0188] S304: Use the first authentication key, the first random number and the third random number to verify the session password data, and if the verification passes, send response data to the charging pile; the response data is used by the charging pile to determine whether to open the charging service to the target vehicle associated with the terminal device.
[0189] In a possible implementation manner, the method further includes:
[0190] Generate a key pair, the key pair comprising a public key and a private key;
[0191] Generate a data acquisition request based on the public key, and send the data acquisition request to the cloud;
[0192] The step of obtaining the first authentication password data and the first authentication key of the charging pile from the cloud includes:
[0193] Receive the first encrypted data returned by the cloud according to the data acquisition request, decrypt the first encrypted data using the private key, and obtain the first authentication password data and the first authentication key.
[0194] In a possible implementation manner, the method further includes:
[0195] Acquire the charging pile identifier of the charging pile, and perform target processing on the charging pile identifier to obtain first matching information; and receive a broadcast signal of the charging pile;
[0196] When the first matching information successfully matches the second matching information carried in the broadcast signal, a wireless connection with the charging pile is established; wherein the second matching information is obtained by the charging pile performing target processing on its own charging pile identifier.
[0197] In a possible implementation manner, the first authentication password data is generated by performing a first encryption process on the second random number and the first concatenated data of the first target data using the root key corresponding to the charging pile and the root key offset;
[0198] The first authentication key is generated by performing a second encryption process on the second random number and the second concatenated data of the first target data using the root key and the root key offset corresponding to the charging pile;
[0199] The first encryption process and the second encryption process correspond to different first target data respectively.
[0200] In a possible implementation manner, the method further includes:
[0201] Acquire the charging pile identifier of the charging pile, and perform target processing on the charging pile identifier to obtain first matching information; and receive a broadcast signal of the charging pile;
[0202] When the first matching information successfully matches the second matching information carried in the broadcast signal, a wireless connection with the charging pile is established; wherein the second matching information is obtained by the charging pile performing target processing on its own charging pile identifier.
[0203] Reference Figure 4 As shown, the embodiment of the present disclosure also provides another authentication method for a charging pile, which is applied to a charging pile, and the authentication method includes:
[0204] S401: receiving an authentication request sent by a terminal device; the authentication request includes first authentication password data and a first random number;
[0205] S402: using the locally stored root key and the root key offset to decrypt the first authentication password data to obtain the second random number, and using the root key and the root key offset to perform a second encryption process on the second random number and the first target data to generate a second authentication key;
[0206] S403: Generate session password data using the second authentication key, the first random number, and a third random number generated by the charging pile; and send the session password data and the third random number to the terminal device;
[0207] S404: In response to receiving the response data returned by the terminal device, verify the response data; if the verification passes, open the charging service to the target vehicle associated with the terminal device.
[0208] In a possible implementation manner, the method further includes: sending a broadcast signal;
[0209] In response to receiving a connection request sent by the terminal device according to the broadcast signal, a wireless connection with the terminal device is established.
[0210] In a possible implementation manner, the step of generating session password data by using the second authentication key, the first random number, and a third random number generated by the charging pile includes:
[0211] Performing a third splicing process on the third random number and the first random number to obtain third spliced data; and performing a fourth splicing process on the third random number and the first random number to obtain fourth spliced data; the splicing positions of the third random number in the third spliced data and the fourth spliced data are different;
[0212] Using the third concatenated data as an authentication key offset, and using the second authentication key and the authentication key offset to encrypt the third concatenated data to obtain a first session key;
[0213] And, using the fourth spliced data as the session key offset, using the first session key and the session key offset, encrypting the fifth spliced data to obtain the session password data; wherein the fifth spliced data is obtained by performing the fifth splicing process using the first random number and the second target data.
[0214] In a possible implementation, the second random number and the first target data are subjected to a second encryption process using the root key and the root key offset to generate a second authentication key, including: performing a second splicing process on the second random number and the first target data to obtain second spliced data; and encrypting the second spliced data using the root key and the root key offset to obtain the second authentication key.
[0215] In a possible implementation manner, the verifying the response data includes:
[0216] Decrypting the second encrypted data carried in the response data based on the locally generated first session key and the session key offset to obtain a second decryption result;
[0217] Matching the second decryption result with the locally stored target character string;
[0218] When the second decryption result is consistent with the locally stored target character string, the response data is verified to be successful.
[0219] Reference Figure 5 As shown, the embodiment of the present disclosure also provides another authentication method for a charging pile, which is applied to the cloud, and the authentication method includes:
[0220] S501: In response to receiving a data acquisition request corresponding to a charging pile sent by a terminal device, generating a second random number;
[0221] S502: using the root key and the root key offset corresponding to the charging pile, performing the first encryption processing on the second random number to obtain the first authentication password data, and using the root key and the root key offset to perform the second encryption processing on the second random number to obtain the first authentication key;
[0222] S503: Send the first authentication password data and the first authentication key to the terminal device; wherein the first authentication password data and the first authentication key are used by the terminal device to authenticate the charging pile.
[0223] In a possible implementation manner, the step of performing the first encryption processing on the second random number using the root key and the root key offset corresponding to the charging pile to obtain the first authentication password data includes:
[0224] Performing a first concatenation process on the second random number and the first target data to obtain first concatenated data; performing the first encryption process on the first concatenated data using the root key and the root key offset to obtain the first authentication password data;
[0225] and / or,
[0226] Using the root key and the root key offset to perform the second encryption process on the second random number to obtain the first authentication key, including: performing a second concatenation process on the second random number and the first target data to obtain second concatenated data; using the root key and the root key offset to perform the second encryption process on the second concatenated data to obtain the first authentication key;
[0227] The first encryption process and the second encryption process correspond to different first target data respectively.
[0228] The embodiment of the present disclosure also provides a vehicle-mounted device, which includes a processor; the processor executes the authentication method of the charging pile described in the embodiment of the present disclosure.
[0229] The embodiment of the present disclosure further provides a charging pile, which includes a controller; the controller executes the authentication method of the charging pile described in the embodiment of the present disclosure.
[0230] The embodiment of the present disclosure further provides a cloud server, which includes a processor, and the processor executes the authentication method of the charging pile as described in the embodiment of the present disclosure.
[0231] The present disclosure also provides a computer device, such as Figure 6 FIG. 1 is a schematic diagram of a computer device structure provided in an embodiment of the present disclosure, including:
[0232] A processor 61 and a memory 62; the memory 62 stores machine-readable instructions executable by the processor 61, and the processor 61 is used to execute the machine-readable instructions stored in the memory 62. When the machine-readable instructions are executed by the processor 61, the processor 61 performs the following steps:
[0233] Obtaining the first authentication password data and the first authentication key of the charging pile from the cloud; wherein the first authentication password data and the first authentication key are generated by performing an encryption operation using the root key and the root key offset corresponding to the charging pile;
[0234] Generate an authentication request based on a locally generated first random number and the first authentication password data, and send the authentication request to the charging pile;
[0235] Receiving the session password data and the third random number returned by the charging pile according to the authentication request; wherein the session password data is generated by using the first authentication password data carried in the authentication request, and the root key and the root key offset stored in the terminal device;
[0236] The session password data is verified using the first authentication key, the first random number and the third random number, and if the verification passes, response data is sent to the charging pile; the response data is used by the charging pile to determine whether to open the charging service to the target vehicle associated with the terminal device.
[0237] Or follow these steps:
[0238] Receiving an authentication request sent by a terminal device; the authentication request includes first authentication password data and a first random number;
[0239] Decrypting the first authentication password data using the locally stored root key and the root key offset to obtain the second random number, and performing a second encryption process on the second random number and the first target data using the root key and the root key offset to generate a second authentication key;
[0240] Generate session password data using the second authentication key, the first random number, and a third random number generated by the charging pile; and send the session password data and the third random number to the terminal device;
[0241] In response to receiving the response data returned by the terminal device, the response data is verified; if the verification passes, the charging service is opened to the target vehicle associated with the terminal device.
[0242] Or perform the following steps: in response to receiving a data acquisition request corresponding to the charging pile sent by the terminal device, generate a second random number;
[0243] Using the root key and the root key offset corresponding to the charging pile, perform the first encryption processing on the second random number to obtain the first authentication password data, and using the root key and the root key offset to perform the second encryption processing on the second random number to obtain the first authentication key;
[0244] Sending the first authentication password data and the first authentication key to the terminal device;
[0245] The first authentication password data and the first authentication key are used by the terminal device to authenticate the charging pile.
[0246] The above-mentioned memory 62 includes internal memory 621 and external memory 622; the memory 621 here is also called internal memory, which is used to temporarily store the calculation data in the processor 61, as well as the data exchanged with the external memory 622 such as the hard disk. The processor 61 exchanges data with the external memory 622 through the internal memory 621.
[0247] The specific execution process of the above instructions can refer to the steps of the charging pile authentication method described in the embodiment of the present disclosure, which will not be repeated here.
[0248] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the charging pile authentication method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0249] The embodiments of the present disclosure also provide a computer program product, which carries a program code. The instructions included in the program code can be used to execute the steps of the charging pile authentication method described in the above method embodiment. Please refer to the above method embodiment for details, which will not be repeated here.
[0250] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0251] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways.
[0252] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0253] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A charging pile authentication method, characterized in that: Applied to terminal equipment; The terminal device is associated with a target vehicle; the method comprises: Obtaining the first authentication password data and the first authentication key of the charging pile from the cloud; wherein the first authentication password data and the first authentication key are generated by performing an encryption operation using the root key and the root key offset corresponding to the charging pile; Generate an authentication request based on a locally generated first random number and the first authentication password data, and send the authentication request to the charging pile; Receiving the session password data and the third random number returned by the charging pile according to the authentication request; wherein the session password data is generated by using the first authentication password data carried in the authentication request, and the root key and the root key offset stored in the terminal device; The session password data is verified using the first authentication key, the first random number and the third random number, and if the verification passes, response data is sent to the charging pile; the response data is used by the charging pile to determine whether to open the charging service to the target vehicle associated with the terminal device.
2. The authentication method according to claim 1, characterized in that: The method further comprises: Generate a key pair, the key pair comprising a public key and a private key; Generate a data acquisition request based on the public key, and send the data acquisition request to the cloud; The step of obtaining the first authentication password data and the first authentication key of the charging pile from the cloud includes: Receive the first encrypted data returned by the cloud according to the data acquisition request, decrypt the first encrypted data using the private key, and obtain the first authentication password data and the first authentication key.
3. The authentication method according to claim 1 or 2, characterized in that: The method further comprises: Acquire the charging pile identifier of the charging pile, and perform target processing on the charging pile identifier to obtain first matching information; and receive a broadcast signal of the charging pile; When the first matching information successfully matches the second matching information carried in the broadcast signal, a wireless connection with the charging pile is established; wherein the second matching information is obtained by the charging pile performing target processing on its own charging pile identifier.
4. The authentication method according to any one of claims 1 to 3, characterized in that: The first authentication password data is generated by performing a first encryption process on the second random number and the first spliced data of the first target data using the root key corresponding to the charging pile and the root key offset; The first authentication key is generated by performing a second encryption process on the second random number and the second concatenated data of the first target data using the root key and the root key offset corresponding to the charging pile; The first encryption process and the second encryption process correspond to different first target data respectively.
5. The authentication method according to any one of claims 1 to 4, characterized in that: The method further comprises: Acquire the charging pile identifier of the charging pile, and perform target processing on the charging pile identifier to obtain first matching information; and receive a broadcast signal of the charging pile; When the first matching information successfully matches the second matching information carried in the broadcast signal, a wireless connection with the charging pile is established; wherein the second matching information is obtained by the charging pile performing target processing on its own charging pile identifier.
6. A charging pile authentication method, characterized in that: For charging piles; the authentication method includes: Receiving an authentication request sent by a terminal device; the authentication request includes first authentication password data and a first random number; Decrypting the first authentication password data using the locally stored root key and the root key offset to obtain the second random number, and performing a second encryption process on the second random number and the first target data using the root key and the root key offset to generate a second authentication key; Generate session password data using the second authentication key, the first random number, and a third random number generated by the charging pile; and send the session password data and the third random number to the terminal device; In response to receiving the response data returned by the terminal device, the response data is verified; if the verification passes, the charging service is opened to the target vehicle associated with the terminal device.
7. The authentication method according to claim 6, characterized in that: The method further comprises: transmitting a broadcast signal; In response to receiving a connection request sent by the terminal device according to the broadcast signal, a wireless connection with the terminal device is established.
8. The authentication method according to claim 6 or 7, characterized in that: The step of generating session password data by using the second authentication key, the first random number, and the third random number generated by the charging pile includes: Performing a third splicing process on the third random number and the first random number to obtain third spliced data; and performing a fourth splicing process on the third random number and the first random number to obtain fourth spliced data; the splicing positions of the third random number in the third spliced data and the fourth spliced data are different; Using the third concatenated data as an authentication key offset, and using the second authentication key and the authentication key offset to encrypt the third concatenated data to obtain a first session key; And, using the fourth spliced data as the session key offset, using the first session key and the session key offset, encrypting the fifth spliced data to obtain the session password data; wherein the fifth spliced data is obtained by performing the fifth splicing process using the first random number and the second target data.
9. The authentication method according to claim 6, characterized in that: The second random number and the first target data are subjected to a second encryption process using the root key and the root key offset to generate a second authentication key, including: the second random number and the first target data are subjected to a second splicing process to obtain second spliced data; the second spliced data is encrypted using the root key and the root key offset to obtain the second authentication key.
10. The authentication method according to claim 6, characterized in that: The verifying the response data includes: Decrypting the second encrypted data carried in the response data based on the locally generated first session key and the session key offset to obtain a second decryption result; Matching the second decryption result with the locally stored target character string; When the second decryption result is consistent with the locally stored target character string, the response data is verified to be successful.
11. A charging pile authentication method, characterized in that: Applied to the cloud, the method includes: In response to receiving a data acquisition request corresponding to the charging pile sent by the terminal device, generating a second random number; Using the root key and the root key offset corresponding to the charging pile, perform the first encryption processing on the second random number to obtain the first authentication password data, and using the root key and the root key offset to perform the second encryption processing on the second random number to obtain the first authentication key; Sending the first authentication password data and the first authentication key to the terminal device; The first authentication password data and the first authentication key are used to authenticate the charging pile.
12. The method according to claim 11, characterized in that The step of performing the first encryption process on the second random number by using the root key and the root key offset corresponding to the charging pile to obtain the first authentication password data includes: Performing a first concatenation process on the second random number and the first target data to obtain first concatenated data; performing the first encryption process on the first concatenated data using the root key and the root key offset to obtain the first authentication password data; and / or, Using the root key and the root key offset to perform the second encryption process on the second random number to obtain the first authentication key, including: performing a second concatenation process on the second random number and the first target data to obtain second concatenated data; using the root key and the root key offset to perform the second encryption process on the second concatenated data to obtain the first authentication key; The first encryption process and the second encryption process correspond to different first target data respectively.
13. A charging system, characterized in that: include: Terminal equipment and charging piles; The terminal device is used to generate an authentication request based on a first random number generated locally and first authentication password data of the charging pile obtained from the cloud, and send the authentication request to the charging pile; The first authentication password data is generated by performing a first encryption process on the second random number using the root key corresponding to the charging pile and the root key offset; The charging pile is used to, after receiving the authentication request, decrypt the first authentication password data using the root key and the root key offset stored in the charging pile to obtain the second random number, and perform a second encryption process on the second random number using the root key and the root key offset to generate a second authentication key; and generate session password data using the second authentication key, the first random number, and a third random number generated by the charging pile; Sending the session password data and the third random number to the terminal device; The terminal device is further configured to verify the session password data using the first authentication key of the charging pile, the first random number and the third random number obtained from the cloud after receiving the session password data and the third random number; If the verification is passed, the response data is sent to the charging pile; wherein the first authentication key is obtained by performing the second encryption process on the second random number using the root key and the root key offset; The charging pile is further used to verify the response data after receiving the response data; if the verification is successful, the charging service is opened to the target vehicle associated with the terminal device.
14. A vehicle-mounted device, characterized in that: The vehicle-mounted device includes a processor; the processor executes the authentication method of the charging pile as described in any one of claims 1-5.
15. A charging pile, characterized in that: The charging pile includes a controller, and the controller executes the authentication method of the charging pile as described in any one of claims 6-10.
16. A cloud server, characterized in that: The cloud server includes a processor, and the processor executes the authentication method of the charging pile as described in any one of claims 11-12.
17. A computer program product, characterized in that The computer program product carries a program code, and the instructions included in the program code can be used to execute the steps of the charging pile authentication method as described in any one of claims 1-12.
Citation Information
Patent Citations
Vehicle charging method based on domestic charging pile, mobile terminal and server
CN110406414A
Vehicle charging safety management method and system
CN112019326A
Authentication method, device, vehicle, charging pile and system
CN117382472A
Charging control method and device, computer equipment and storage medium
CN117962678A
Cited By
Charging method and device, electronic equipment, storage medium and program product
CN119233248A
Wireless charging method and system for inspection robot
CN120287870A
Wireless charging method and system for inspection robots
CN120287870B
