Anonymous authentication method and system for intelligent electric meter

By introducing a key generation center in smart meters and aggregators and using anonymous authentication methods and hash functions to generate public and private key pairs, the problems of low computational efficiency and insufficient privacy protection in existing smart meter authentication schemes are solved, and efficient and secure user authentication and key management are achieved.

CN120602159APending Publication Date: 2025-09-05STATE GRID LIAONING ELECTRIC POWER CO LTD +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510777353.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Existing smart meter authentication schemes have deficiencies in computational efficiency and privacy protection. In particular, they place excessive computational burden on resource-constrained smart meters and aggregator devices, and user identity information may be tracked and leaked during multiple authentication processes.

Method used

A key generation center is introduced. Smart meters and aggregators register when they first join the smart grid, generate public and private key pairs, and use anonymous authentication methods to authenticate and establish shared session keys. Hash functions and random numbers are used to generate temporary public keys, and security analysis is performed in combination with BAN logic and random oracle models.

Benefits of technology

It simplifies the key management process, improves computing efficiency and security, ensures user privacy, reduces computing burden and communication delay, has high scalability and anti-attack capabilities, and adapts to the rapid registration and authentication of devices in smart grids.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602159A_ABST
    Figure CN120602159A_ABST
Patent Text Reader

Abstract

The invention provides an anonymous method and system for a smart electric meter, and the method comprises the steps: building a key generation center, and enabling the smart electric meter and an aggregator to carry out the registration of the key generation center when the smart electric meter and the aggregator join a smart power grid for the first time; the intelligent electric meter encrypts an identity label and a timestamp of the intelligent electric meter by using an intelligent electric meter public key, generates an authentication request message according to the encrypted identity label and timestamp of the intelligent electric meter, and sends the authentication request message to the aggregator; the aggregator verifies the authentication request message after receiving the authentication request message, and generates an authentication response message and sends the authentication response message to the intelligent electric meter under the condition that the verification result is successful; and after receiving the authentication response message, the intelligent electric meter verifies the authentication response message, and under the condition that the verification result is successful, the two parties establish a shared session key to complete the authentication process. According to the method, the problems of low calculation efficiency, insufficient privacy protection, complex authentication process and the like in the prior art are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart grid security protection technology, and in particular to an anonymous authentication method and system for smart meters. Background Art

[0002] With the widespread adoption of smart grids and smart meters, protecting user data privacy and ensuring data transmission security have become increasingly important. The electricity usage data collected by smart meters contains a wealth of user behavior information. Unprotected data can lead to privacy leaks. Therefore, strengthening smart meter authentication mechanisms can effectively protect user identity information and prevent data tampering and leakage. Key establishment mechanisms prevent malicious devices from accessing the grid, ensuring the secure and stable operation of the power system.

[0003] While the existing Tsai-Lo and Odelu schemes offer a degree of secure authentication, they still have room for improvement in terms of computational efficiency and privacy protection. While the Tsai-Lo scheme, through the use of ECC, offers a high level of security while reducing key length and storage requirements, and enabling bidirectional authentication to ensure the authenticity of both communicating parties, its computational overhead remains high, particularly for resource-constrained smart meters. Each authentication process requires multiple elliptic curve multiplications, which poses a challenge for devices with limited processing power. Furthermore, the Tsai-Lo scheme fails to fully protect user privacy during authentication, potentially allowing user identity information to be tracked across multiple authentication processes. The Odelu scheme is another authentication scheme for smart grids, designed to provide a secure identity authentication and key agreement mechanism. The Odelu scheme requires multiple complex cryptographic operations and key exchanges during the authentication process, placing high demands on the device's computational power. The Odelu scheme still has the potential to leak some user privacy information during the authentication process, particularly in the face of active attackers, where the anonymity of user identity information cannot be fully guaranteed. In addition, the Odelu scheme's authentication process is relatively complex, increasing the burden of communication and computation, which is a significant bottleneck for resource-constrained smart meters and aggregators. Therefore, although the existing Tsai-Lo and Odelu schemes have made progress in the security authentication of smart meters, there is still room for improvement in improving computational efficiency and strengthening privacy protection. Summary of the Invention

[0004] To address the deficiencies in the prior art, the present invention provides an anonymous authentication method and system for smart meters. By changing the registration method, the problem of private key leakage is more effectively avoided, the computational burden is reduced, and security is improved.

[0005] The present invention adopts the following technical solutions.

[0006] A first aspect of the present invention provides an anonymous authentication method for a smart meter, comprising:

[0007] Establish a key generation center. When smart meters and aggregators first join the smart grid, they each register with the key generation center. After successful registration, the smart meters and aggregators obtain a smart meter public key-private key pair and an aggregator public key-private key pair, respectively. The smart meter public key-private key pair is calculated by combining the smart meter's first public key-private key pair and the key generation center's second public key and second private key. The aggregator public key-private key pair is calculated by combining the aggregator's third public key-private key pair and the key generation center's fourth public key and second private key.

[0008] The smart meter encrypts the identity and timestamp of the smart meter using the smart meter public key, generates an authentication request message according to the encrypted identity and timestamp of the smart meter, and sends the message to the aggregator;

[0009] After receiving the authentication request message, the aggregator verifies the authentication request message. If the verification result is successful, the aggregator generates an authentication response message and sends it to the smart meter;

[0010] After receiving the authentication response message, the smart meter verifies the authentication response message. If the verification result is successful, the two parties establish a shared session key to complete the authentication process.

[0011] Optionally, a key generation center is established. When a smart meter first joins the smart grid, it registers with the key generation center. After successful registration, the smart meter obtains the smart meter public key and private key pair, including:

[0012] When a smart meter first joins the smart grid, it generates a registration request message according to the identity identifier of the smart meter, the first public key of the smart meter, the first signature information and the timestamp, and sends the generated registration request message to the key generation center;

[0013] After receiving the registration request message sent by the smart meter, the key generation center uses the first public key of the smart meter to verify the first signature information and the timestamp;

[0014] If both the first signature information and the timestamp verification results are successful, the key generation center generates an initial registration response message and signs the initial registration response message using the second private key of the key generation center, and adds the signature result to the initial registration response message to generate a registration response message and sends it to the smart meter;

[0015] After receiving the registration response message, the smart meter uses the second public key of the key center to verify the signature of the registration response message. If the signature verification result is successful, the smart meter public key and private key pair are calculated based on the registration response parameters in the registration response message, combined with the first public key and private key pair of the smart meter and the second public key and second private key of the key generation center to complete the registration.

[0016] Optionally, when the smart meter first joins the smart grid, the smart meter generates a registration request message according to the identity identifier of the smart meter, the first public key of the smart meter, the first signature information, and the timestamp, including:

[0017] Smart meters from a randomly generated set Randomly select the first random number And calculate the first public key R of the smart meter according to the following formula u :

[0018] R u =k u P1

[0019] Among them, R u is the first public key, k u is the first random number, and P1 is the first generator predefined by the smart meter;

[0020] The smart meter connects the identity of the smart meter, the first public key of the smart meter and the timestamp, and uses the first private key to sign the connected data according to the following formula to obtain the first signature information

[0021]

[0022] Among them, SM i is the i-th smart meter, Sign is the signature function, Id i For Smart MeterSM i The identity of R u For Smart MeterSM i The first public key, TS is the timestamp, For Smart MeterSM i The first private key of , || is the bit string concatenation operation;

[0023] The smart meter will identify its ID i , the first public key R u , first signature information Generate a registration request message with timestamp TS

[0024] Optionally, the key generation center generates an initial registration response message including:

[0025] The key generation center calculates the second public key according to the following formula:

[0026] R n =k n P2

[0027] Among them, R n is the second public key, P2 is the second generator predefined by the key generation center, k n A second random number generated by the key generation center;

[0028] The key generation center calculates an intermediate value based on the second public key and the first public key of the smart meter;

[0029] The key generation center uses a hash function to combine the intermediate value and the identity of the smart meter to generate a hash value;

[0030] The key generation center calculates the intermediate private key using the hash value and the second private key of the key generation center;

[0031] An initial registration response message is generated according to the second public key, the hash value, and the intermediate private key.

[0032] Optionally, the key generation center calculates an intermediate value according to the second public key and the first public key of the smart meter using the following formula:

[0033] R in =R u +R n

[0034] Among them, R in is the middle value, R u For smart meter M i The first public key, R n The second public key of the key generation center.

[0035] Optionally, the key generation center calculates the intermediate private key using the hash value and the second private key of the key generation center according to the following formula:

[0036] s i =e i ·k n +k x

[0037] Among them, s i is the intermediate private key, e i is the hash value, k n The second random number generated by the key generation center, k x It is the second private key of the key generation center.

[0038] Optionally, the public key and private key pair of the smart meter are calculated according to the registration response parameters in the registration response message in combination with the first public key and private key pair of the smart meter and the second public key and private key pair of the key generation center according to the following formula:

[0039] k i =s i +e i ·k u

[0040] R i =e i ·R in +R n

[0041] Among them, k i is the private key of the smart meter, R i is the public key of the smart meter, s i is the intermediate private key, e i is the hash value, k u is the first random number, R in is the middle value, R n It is the second public key of the key generation center.

[0042] Optionally, the aggregator registers with the key generation center when it first joins the smart grid. After successful registration, the aggregator obtains the aggregator public key and private key pair, including:

[0043] When the aggregator first joins the smart grid, it generates a registration request message based on the aggregator's identity, the aggregator's third public key, the second signature information, and the timestamp;

[0044] The aggregator sends the generated registration request message to the key generation center;

[0045] After receiving the registration request message sent by the aggregator, the key generation center uses the aggregator's third public key to verify the second signature information and timestamp;

[0046] If both the second signature information and the timestamp verification results are successful, the key generation center calculates the registration response parameters and signs the initial registration response message using the second private key of the key generation center, and adds the signature result to the initial registration response message to generate a registration response message and sends it to the aggregator;

[0047] After receiving the registration response message, the aggregator uses the fourth public key of the key center to verify the signature of the registration response message. If the signature verification result is successful, the aggregator public key and private key pair are calculated based on the registration response parameters in the registration response message, combined with the aggregator's third public key and private key pair and the key generation center's fourth public key and second private key pair to complete the registration.

[0048] Optionally, the smart meter encrypts the identity and timestamp of the smart meter using a public key of the smart meter, and generates an authentication request message according to the encrypted identity and timestamp of the smart meter, including:

[0049] The smart meter generates a third random number r SM and use the third random number to calculate the fifth public key P of the smart meter SM =r SM ·G SM , where G SM A third generator predefined for smart meters;

[0050] The smart meter uses the public key of the smart meter to encrypt its identity and timestamp to obtain the encrypted identity ID of the smart meter. SM and timestamp TS SM ;

[0051] The smart meter generates the first authentication hash value H according to the following formula SM :

[0052] H(P SM ||ID SM ||TS SM )

[0053] Among them, H is the hash function, P SM The fifth public key of the smart meter, ID SM TS is the identity of the smart meter. SM is the timestamp;

[0054] The smart meter uses the fifth public key P SM , smart meter ID SM , timestamp TS SM and the first authentication hash value H SM Generate authentication request message M1 = {P SM ,ID SM ,TS SM ,H SM}.

[0055] Optionally, after receiving the authentication request message, the aggregator verifies the authentication request message. If the verification result is successful, the aggregator generates an authentication response message and sends it to the smart meter, including:

[0056] After receiving the authentication request message, the aggregator verifies the timestamp and identity ID in the authentication request message SM If the verification result is successful, the aggregator generates a fourth random number r AG and use the fourth random number to calculate the aggregator's sixth public key P AG =rAG ·G AG , where G AG A predefined fourth generator for the aggregator;

[0057] The aggregator uses the fifth public key P of the smart meter in the authentication request message SM and the fourth random number r AG Calculate the first intermediate value of the shared session key K=H(P SM ·r AG ), where H is a hash function;

[0058] The aggregator generates the second authentication hash value H according to the following formula AG :

[0059] H AG =H(P SM ||P AG ‖ID AG ‖TS SM )

[0060] Among them, H is the hash function, P SM is the fifth public key of the smart meter, P AG The sixth public key of the aggregator, ID AG is the identity of the aggregator, TS SM is the timestamp;

[0061] The aggregator uses the aggregator's sixth public key P AG , the second authentication hash value H AG , aggregator timestamp TS AG Generate authentication response message M2 = {P AG ,H AG ,TS AG}, and sends the authentication response message M2 to the smart meter.

[0062] Optionally, after receiving the authentication response message, the smart meter verifies the authentication response message. If the verification result is successful, both parties establish a shared session key, including:

[0063] After receiving the authentication response message, the smart meter verifies the validity of the timestamp in the authentication response message;

[0064] After successful verification, the smart meter calculates the third authentication hash value H′ AG =H(P SM ‖P AG ‖ID AG ||TS SM ), and determine the third authentication hash value H′ AG The H in the authentication response message AG Is it consistent?

[0065] If they are consistent, the identity of the aggregator is confirmed by the smart meter, and the smart meter uses the aggregator's sixth public key P AG and the third random number r SM Calculate the second intermediate value of the shared session key K′=H(P AG ·r SM );

[0066] Determine whether the second intermediate value K′ of the shared session key is consistent with the first intermediate value K of the shared session key. If they are consistent, the smart meter and the aggregator complete the authentication, establish the shared session key, and use the hash value of the first intermediate value K of the shared session key as the final shared session key.

[0067] Optionally, the method further includes:

[0068] Security analysis of smart meter and aggregator authentication using BAN logic and stochastic language models.

[0069] A second aspect of the present invention provides an anonymous authentication system, comprising:

[0070] A key generation module, used to establish a key generation center;

[0071] A registration module is configured to register a smart meter and an aggregator with a key generation center when they first join the smart grid. Upon successful registration, the smart meter and the aggregator obtain a smart meter public key-private key pair and an aggregator public key-private key pair, respectively. The smart meter public key-private key pair is calculated by combining a first public key-private key pair of the smart meter and a second public key and a second private key of the key generation center. The aggregator public key-private key pair is calculated by combining a third public key-private key pair of the aggregator and a fourth public key and a second private key of the key generation center.

[0072] An authentication module, configured to authenticate the smart meter and the aggregator to each other and establish a shared session key, the authentication module comprising an authentication request module, an authentication response module, and a session establishment module;

[0073] The authentication request module is used for the smart meter to encrypt the identity and timestamp of the smart meter using the smart meter public key, and generate an authentication request message according to the encrypted identity and timestamp of the smart meter, and send it to the aggregator;

[0074] The authentication response module is used for the aggregator to verify the authentication request message after receiving the authentication request message. If the verification result is successful, the aggregator generates an authentication response message and sends it to the smart meter;

[0075] The session establishing module is used for the smart meter to verify the authentication response message after receiving the authentication response message. If the verification result is successful, both parties establish a shared session key to complete the authentication process.

[0076] A third aspect of the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the above-mentioned anonymous authentication method for a smart meter when loaded into the processor.

[0077] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program implements the above-mentioned anonymous authentication method for a smart meter when executed by a processor.

[0078] Compared with the prior art, the beneficial effects of the present invention include at least:

[0079] This invention establishes a key generation center, responsible for the registration of smart meters and aggregators. The introduction of the key generation center not only simplifies the key management process and improves the system's computational efficiency and security, but also provides a flexible and reliable key management solution for the smart grid, ensuring user privacy and data security, and enhancing the overall security and reliability of the smart grid.

[0080] This invention enables secure mutual authentication between two parties without revealing their identities, while also establishing a shared key to ensure the security of subsequent communications. It also offers significant advantages in improving system performance and reducing computational overhead. Traditional authentication schemes often require significant computing resources and communication overhead, making them difficult to operate efficiently on resource-constrained smart meters and aggregators. The design of this invention takes these limitations into account. Through optimized algorithms and protocols, it makes the authentication process more streamlined and efficient, reducing computational burden and communication latency.

[0081] Furthermore, the present invention is highly scalable, adapting to the increasing number of devices and complex network environments in smart grids. As smart grids develop, more and more smart meters and aggregators are connected to the network. Through its flexible design, the present invention can support the rapid registration and authentication of large-scale devices, ensuring the system's scalability and adaptability.

[0082] This paper also demonstrates the security of this scheme through security analysis using BAN logic and a random oracle model. BAN logic (Burrows-Abadi-Needham logic) is a formal method for analyzing and verifying the security properties of authentication protocols. Using BAN logic, rigorous security analysis of anonymous authentication is performed, ensuring that the protocol is designed to withstand various potential attacks, such as replay attacks, man-in-the-middle attacks, and impersonation attacks. The random oracle model provides a framework for proving the security of cryptographic protocols, ensuring their security under the random oracle model and further verifying their robustness and reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort. Among them:

[0084] Figure 1 A flowchart of a smart meter and aggregator registration process provided by an embodiment of the present invention;

[0085] Figure 2 A flowchart of a smart meter and aggregator authentication process provided by an embodiment of the present invention;

[0086] Figure 3 A flow chart of a security analysis phase provided by an embodiment of the present invention;

[0087] Figure 4 A flowchart of attack defense analysis provided by an embodiment of the present invention;

[0088] Figure 5 This is a general flow chart of a smart meter anonymous authentication and key establishment solution provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0089] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0090] Existing smart meter authentication schemes require multiple complex cryptographic operations and key exchanges, placing an excessive computational burden on resource-constrained smart meters and aggregators, impacting authentication speed and system performance. These schemes also offer inadequate privacy protection, potentially allowing user identity information to be tracked and leaked during multiple authentication processes, failing to fully safeguard user privacy. An aggregator is a device in the smart grid, typically located between smart meters and the power company, responsible for collecting and processing data from multiple smart meters. Its primary functions include data collection and aggregation, communication bridging, security and privacy protection, and network management.

[0091] Combine Figure 1 and Figure 5 As shown, embodiment 1 of the present invention provides an anonymous authentication method for a smart meter, comprising the following steps:

[0092] S1. Establish a key generation center. When smart meters and aggregators first join the smart grid, they register with the KGC (Key Generation Center). After successful registration, the smart meters and aggregators obtain the smart meter public key and private key pair and the aggregator public key and private key pair respectively.

[0093] The public key and private key pair of the smart meter are calculated by combining the first public key and private key pair of the smart meter and the second public key and private key pair of the key generation center. The public key and private key pair of the aggregator are calculated by combining the third public key and private key pair of the aggregator and the second public key and private key pair of the key generation center.

[0094] KGC generates and distributes keys to ensure the security and reliability of the system. Smart meters and aggregators send their identity information and public keys to KGC, which calculates and returns the corresponding registration parameters to ensure the uniqueness and security of the private key and prevent it from being leaked. Figure 1 As shown, S1 specifically includes:

[0095] S1.1. When a smart meter joins the smart grid for the first time, a registration request message is generated according to the identity identifier of the smart meter, the first public key of the smart meter, the first signature information and the timestamp.

[0096] Smart MeterSM i When joining the smart grid for the first time, you need to register with KGC. Smart meters have corresponding IDs. i , which uniquely identifies the device. The identity can be a unique serial number or other unique identifier of the smart meter, used to distinguish different devices in the system.

[0097] S1.1 includes:

[0098] S1.1.1. Identity is Id iThe smart meter randomly selects the first random number from the randomly generated set And calculate the first public key R of the smart meter according to the following formula u :

[0099] R u =k u ·P1 (1)

[0100] Among them, R u is the first public key, k u is the first random number, P1 is the first generator predefined by the smart meter, is a set based on the size of the population, which is a randomly generated set, k u The generation of ensures that the public key of each smart meter is unique.

[0101] It can be understood that the generators mentioned in the embodiment of the present invention are elliptic curve base points.

[0102] S1.1.2. The smart meter connects the identity of the smart meter, the first public key of the smart meter, and the timestamp, and uses the first private key to sign the connected data according to the following formula. The signature can be expressed as:

[0103]

[0104] Among them, SM i is the i-th smart meter, Sign is the signature function, Id i For Smart MeterSM i The identity of R u For Smart MeterSM i The first public key, TS is the timestamp, For Smart MeterSM i The first private key of , || is the bit string concatenation operation.

[0105] Specifically used to represent the connection between different data items (such as identity ID i , first public key R u , timestamp TS, etc. This means that when performing the signing operation, the smart meter concatenates these data items into a large bit string and then signs this concatenated data using the private key. This further improves communication security by signing this information, and the timestamp TS is added to prevent replay attacks.

[0106] S1.1.3, the smart meter will identify its ID i , first public key R u , first signature information Generate a registration request message with timestamp TS

[0107] S1.2. The smart meter sends a registration request message to KGC.

[0108] The smart meter will send its identity information i , the first public key R u and signature Sent to KGC to form a registration request message The message contains the smart meter's identity information, first public key, timestamp, and signature, ensuring the authenticity of the registration request and preventing replay attacks.

[0109] S1.3. After receiving the registration request message sent by the smart meter, the KGC verifies the registration request message.

[0110] After receiving the registration request message from the smart meter, KGC first verifies the signature to ensure the authenticity and integrity of the request. The verification process is performed using the first public key of the smart meter:

[0111]

[0112] Verifying the signature ensures that the message has not been tampered with and indeed comes from the corresponding smart meter.

[0113] Then verify the timestamp TS to ensure the timeliness of the request and prevent replay attacks. The timestamp check is to ensure that the message is sent and received within a reasonable time range. If the signature verification and timestamp verification are successful, KGC generates a second random number k n , and calculate the corresponding second public key R n :

[0114] R n =k n ·P2 (4)

[0115] Among them, R n is the second public key, P2 is the second generator predefined by the key generation center, k n The second random number generated by the key generation center; this random number k n The generation of ensures that the response generated by KGC for each smart meter is unique.

[0116] S1.4. KGC calculates the registration response parameters and forms a complete response message, and sends the registration response.

[0117] S1.4.1. KGC calculates the intermediate value R based on the second public key and the first public key of the smart meter in :

[0118] R in =R u +R n(5)

[0119] Among them, R u is the first public key sent by the smart meter, R n Is the second public key generated by KGC. This intermediate value R in The combination of the public key information of the smart meter and KGC provides a basis for subsequent calculations. in It not only ensures that the public keys of both parties participate in the calculation, but also provides sufficient randomness and security for the generation of hash values, preventing attackers from guessing private keys through replay attacks or other means.

[0120] S1.4.2. Calculate the hash value e i KGC uses the hash function H to convert the intermediate value R in and the smart meter's ID i Combined together, a unique hash value e is generated i :

[0121] e i =H(R in ||Id i ) (6)

[0122] The input of the hash function H is R in and Id i The concatenation of the output is a fixed-length hash value e i Specifically, a secure hash function (such as SHA-256) can be selected because it provides strong collision resistance and pre-mapping resistance, ensuring that the generated hash value is unique and unpredictable. i The uniqueness and unpredictability of the private key are the key to the security of subsequent private key generation.

[0123] S1.4.3. Calculate the intermediate private key s i KGC uses the generated hash value e i and its own second private key k x Calculate the intermediate private key s i :

[0124] s i =e i ·k n +k x (7)

[0125] Among them, k n is the second random number generated by KGC, k x Is the second private key of KGC. Intermediate private key s i Combined with the hash value e i and KGC's private key information, ensuring the uniqueness and security of the private key. i With kn Multiply and add k x , the generated intermediate private key s i It depends not only on the private key of KGC, but also on the dynamically generated random number k n and the identity information of smart meters, further enhancing the security of the system.

[0126] S1.4.4. Generate a response message. KGC will calculate the initial registration response message {e i ,s i ,R n} is sent back to the smart meter. To ensure the integrity and authenticity of the response message, KGC signs the initial response message:

[0127] Sign KGC =Sign(e i ||s i ||R n ,k x ) (8)

[0128] KGC uses its second private key k x Sign the initial response message and append the signature result to the initial response message to form a complete registration response message:

[0129] {e i ,s i ,R n ,Sign KGC}(9)

[0130] This signing mechanism ensures that the message has not been tampered with during transmission and that the recipient can verify the authenticity of the message.

[0131] S1.4.5. Secure message transmission. The KGC sends the registration response message to the smart meter through a secure communication channel. Ensure the security of the communication channel (such as using TLS encryption) to prevent the message from being intercepted or tampered with during transmission. This step is critical to preventing man-in-the-middle attacks and replay attacks. If an error occurs at any step (such as signature verification failure or invalid timestamp), the KGC should immediately terminate the registration process and send an error message to the smart meter. The error handling mechanism should include detailed error logging to facilitate subsequent security audits and troubleshooting.

[0132] S1.5, the smart meter receives and verifies the registration response KGC. After receiving the registration response message from KGC, the smart meter first verifies the signature of KGC to ensure the authenticity and integrity of the response. The verification process uses the public key publickey of KGC. KGC conduct:

[0133] Verify(SignKGC ,e i ||s i ||R n ,publickey KGC )(10)

[0134] Verifying the signature ensures that the message is indeed from KGC and has not been tampered with. If the signature verification is successful, the smart meter calculates its own complete private key ki and public key Ri:

[0135] k i =s i +e i ·k u (11)

[0136] R i =e i ·R in +R n (12)

[0137] Among them, k i is the private key of the smart meter, R i is the public key of the smart meter, s i is the intermediate private key, e i is the hash value, k u is the first random number, R in is the middle value, R n It is the second public key of the key generation center.

[0138] After the calculation is completed, the smart meter obtains the complete private key and public key for subsequent communication and authentication.

[0139] S1.7. The smart meter completes registration and holds a unique private key k i and the corresponding public key R i This step ensures the uniqueness and security of the smart meter private key and prevents the private key from being leaked.

[0140] The following is the registration process for the aggregator, which is the same as the smart meter registration process. The following is a brief description:

[0141] S1.8, Aggregator generates a registration request. Aggregator AG j Generate a random number k c , and calculate the aggregator's third public key R c :

[0142] R c =k c ·P (12)

[0143] The generated random number k c Ensures that the aggregator's public key is unique. Aggregator generates identity IDj , which uniquely identifies the device. The aggregator uses the third private key to sign the registration message and appends a timestamp TS to prevent replay attacks. The signature is represented as:

[0144]

[0145] The signing process ensures the integrity and authenticity of the message.

[0146] S1.9, the aggregator sends a registration request. The aggregator sends its identity information Id j , the third public key R c and the second signature information Sent to KGC to form a registration request message:

[0147]

[0148] The message contains the aggregator's identity information, the third public key, a timestamp, and the second signature information, ensuring the authenticity of the registration request and preventing replay attacks.

[0149] S1.10. KGC receives and verifies the aggregator's registration request. After receiving the aggregator's registration request, KGC first verifies the signature to ensure the authenticity and integrity of the request. The verification process is performed using the aggregator's third public key:

[0150]

[0151] Verifying the signature ensures that the message has not been tampered with and that it actually comes from the corresponding aggregator. Then verifying the timestamp TS to ensure the timeliness of the request and prevent replay attacks. The timestamp check is to ensure that the message is sent and received within a reasonable time frame. If the signature verification and timestamp verification are successful, KGC generates a random number k m , and calculate the corresponding fourth public key R m :

[0152] R m =k m ·P (16)

[0153] The generation of this random number ensures that the response generated by KGC for each aggregator is unique.

[0154] S1.11, KGC calculates the aggregator registration response parameters. First calculate the intermediate value R jm =R c +R m This intermediate value combines the third public key of the aggregator and the fourth public key of KGC, providing a basis for subsequent calculations. Then calculate the hash value e j =H(R jm ||Idj ), the hash function H converts the intermediate value R jm and the aggregator's identity information Id j Combined together, a unique hash value e is generated j , used for subsequent private key calculation. Calculate partial private key s j :

[0155] s j =e j ·k m +k x (17)

[0156] Among them, k x Is the second private key of KGC. Partial private key s j Combined with the hash value e j and KGC's private key information, ensuring the uniqueness and security of the private key.

[0157] S1.12, KGC sends aggregator registration response. KGC calculates {s j ,e j ,R m}Send back to the aggregator and sign the response message to ensure its integrity and authenticity: Sign KGC =Sign(s j ||e j ||R m ,k x ). KGC appends the signature to the response message to form a complete response message: {s j ,e j ,R m ,Sign KGC}

[0158] S1.13. Aggregator receives and verifies registration response After the aggregator receives the response message from KGC, it first uses KGC's public key publickey KGC Sign KGC Verification is performed to ensure the authenticity and integrity of the message. The verification process is as follows:

[0159] Verify(Sign KGC ,s j ||e j ||R m ,publickey KGC )(18)

[0160] After successfully verifying the signature, the aggregator confirms that the message is indeed from KGC and has not been tampered with. Next, the aggregator calculates its own complete private key k j and public key R j :

[0161] k j =s j +e j ·k c (19)

[0162] R j =e j ·R jm +R m (20)

[0163] Among them, R m is the fourth public key of KGC. Through these calculations, the aggregator generates the private key and public key used for subsequent communication and authentication.

[0164] S1.14. After the above steps, the aggregator successfully completes the registration and obtains the unique private key k j and the corresponding public key R j , ensuring its uniqueness and security in the system.

[0165] The KGC not only enables centralized key management and generation but also provides a unified trust foundation throughout the registration and authentication process. The introduction of the KGC significantly simplifies key distribution, enabling smart meters and aggregators to quickly and securely complete registration and authentication. Furthermore, the KGC enables the system to more flexibly address various key management challenges. For example, the KGC can regularly update keys, ensuring long-term system security and preventing security risks associated with persistent use of the same key. The KGC also provides key recovery. If a smart meter or aggregator experiences a malfunction or key loss, the key can be securely restored through the KGC, ensuring rapid resumption of normal operation. Centralized key management also improves system scalability. As the smart grid continues to expand and new devices are added, the KGC can efficiently handle the registration and authentication needs of a large number of devices, avoiding the complexity and potential risks associated with distributed key management.

[0166] During the authentication process, the smart meter and aggregator authenticate each other through an anonymous mutual authentication scheme and establish a shared key. The smart meter generates an authentication request and sends it to the aggregator. The aggregator verifies the request and generates a response, which it returns to the smart meter. After the smart meter verifies the response, both parties establish a shared key, completing the authentication process.

[0167] Combine Figure 2 As shown, S2 specifically includes:

[0168] S2.1. The smart meter generates an authentication request. i When preparing to start the authentication process, a third random number r is generatedSM This random number is used as the basis for this authentication session. It is not only used to generate the session key, but also ensures the uniqueness of each authentication session, making each authentication process independent and secure, and preventing malicious users from forging identities through replay attacks.

[0169] After generating the random number, the smart meter uses this random number to calculate the fifth public key P SM =r SM ·G SM , where G SM This fifth public key is a temporary public key used to establish a shared key with the aggregator.

[0170] In order to further protect identity privacy, the smart meter uses the public key of the smart meter registered by S1 to verify its identity ID. SM and the current timestamp TS SM Encrypted. Encrypted identity information ID SM This prevents the true identity of the meter from being directly exposed during communication, and the timestamp TS SM Used to ensure the freshness of the authentication request and prevent expired messages from being maliciously replayed. To ensure message integrity, the smart meter generates the first authentication hash value as follows:

[0171] H SM =H(P SM ||ID SM ||TS SM ) (twenty one)

[0172] This hash value can be used to ensure that the message has not been tampered with in subsequent verification.

[0173] Finally, the smart meter combines all the information (including temporary public key, encrypted identity information, timestamp and hash value) into an authentication request message M1 = {P SM ,ID SM ,TS SM ,H SM} and is ready to be sent to the aggregator.

[0174] S2.2, the smart meter sends an authentication request. After generating the authentication request M1, the smart meter sends it to the aggregator AG. The message contains the fifth public key P of the smart meter. SM , encrypted identity ID SM , timestamp TS SM and the authentication hash value H SM ,Each field plays a different role in ensuring security and privacy.

[0175] When sending this message, the smart meter relies on the integrity and security of the transmission to ensure that it is not tampered with or intercepted during the communication process. SM The privacy of the meter is protected, and the timestamp TS SM This gives the message timeliness, thereby enhancing the reliability of the authentication process.

[0176] S2.3. After the aggregator AG receives and verifies the request from the smart meter, the first step is to verify the timestamp TS SM This step is key to preventing replay attacks, as malicious attackers may intercept previous authentication requests and resend them to forge authentication. SM If the allowed time window is exceeded, the aggregator will directly reject the request.

[0177] After confirming that the timestamp is valid, the aggregator will proceed to authentication to ensure that the message is indeed sent by a legitimate smart meter. SM The integrity of the message can be verified by the aggregator. After the authentication is passed, the aggregator can confirm the source of the message. i It is an authorized device within the system and can continue to complete the subsequent authentication process.

[0178] S2.4, the aggregator generates a response parameter. After successfully verifying the identity of the smart meter, the aggregator AG will generate a new fourth random number r AG , used to calculate the sixth public key of the aggregator (i.e. the temporary public key of the aggregator) P AG =r AG ·G AG , where G AG The fourth generator is predefined for the aggregator. Generating new random numbers and temporary public keys ensures that the keys for each authentication session are independent, preventing key leakage or reuse attacks in subsequent communications.

[0179] Next, the aggregator uses the smart meter's fifth public key P SM and its fourth random number r AG The first intermediate value of the shared session key is calculated as follows:

[0180] K=H(P SM ·r AG ) (twenty two)

[0181] H is the system's secure hash function. By using both parties' temporary public keys and a secret random number to calculate a shared key, this intermediate value generates a unique and secure key between the two parties, ensuring the security of subsequent encrypted communications.

[0182] S2.5. The aggregator generates and sends a response message. The aggregator generates a second authentication hash value: H AG =H(P SM ‖P AG ‖ID AG ||TS SM ), where H is the hash function, P SM is the fifth public key of the smart meter, P AG The sixth public key of the aggregator, ID AG is the identity of the aggregator, TS SM is the timestamp.

[0183] This hash value not only ensures the authenticity of the aggregator's identity but also verifies the integrity of the message. After the message is returned to the smart meter, the smart meter can confirm the identity of the aggregator by comparing the hash value.

[0184] The aggregator will use the temporary public key P AG , authentication hash value H AG and the new timestamp TS AG Composition response message M2 = {P AG ,H AG ,TS AG} and sends this response to the smart meter. This step not only completes the identity confirmation of the aggregator, but also provides a basis for verification for the smart meter.

[0185] S2.6, the smart meter receives and verifies the response information of the aggregator. i After receiving the response message M2 from the aggregator, first verify the timestamp TS AG Whether it is within the specified time window. This verification ensures the freshness and validity of the response information and prevents possible replay attacks. If the timestamp verification passes, the smart meter continues with the authentication process.

[0186] The smart meter then uses the aggregator’s temporary public key P AG and its own third random number r SM Calculate the second intermediate value of the shared session key K′=H(P AG ·r SM ) If the calculated result K' is consistent with the K calculated by the aggregator, the session key generation process is confirmed to be correct, ensuring that both parties have the same shared key.

[0187] S2.7, the smart meter verifies the identity of the aggregator. The smart meter calculates the third authentication hash value H′ AG =H(P SM ‖P AG ‖ID AG ‖TS SM ) and H sent by the aggregatorAG If the two hash values ​​match, the smart meter can confirm that the aggregator is a legitimate device. This authentication ensures that the aggregator is not a forgery and verifies that the response message has not been tampered with during transmission.

[0188] The success of this authentication means that the identity of the aggregator has been confirmed by the smart meter, laying the foundation for the establishment of a shared key between the two parties.

[0189] S2.8. Establish a shared key and complete authentication. After authentication is complete, the smart meter and aggregator both possess the same session key intermediate value, K. They then hash this intermediate value to generate the final shared session key, SK = H(K). This shared session key, SK, serves as the encryption key between the smart meter and aggregator, ensuring confidentiality and data integrity in subsequent communications.

[0190] The establishment of a shared key completes the authentication process, marking the completion of authentication and the start of encrypted communication between the two parties in a secure environment. This shared key ensures the confidentiality and integrity of subsequent data, preventing data leakage and tampering, thereby achieving anonymous authentication and data protection.

[0191] The embodiments of the present invention fully consider the limitations of computing resources of smart meters and aggregators. The encryption and authentication methods provided by the embodiments of the present invention can improve the computing efficiency of smart meters and reduce computing and communication overhead while ensuring privacy. Through hash functions, random numbers, timestamps, and two-way authentication, the present invention excels in resisting replay attacks, man-in-the-middle attacks, and forgery attacks. The use of temporary public keys and encrypted identity identification mechanisms effectively prevents identity tracking and sensitive information leakage. Therefore, the embodiments of the present invention fully achieve the goals of anonymous authentication and secure communication, from authentication requests to response verification and then to the establishment of shared keys.

[0192] S3. Security analysis of smart meter and aggregator authentication using BAN logic and a random oracle model ensures the solution is robust against replay, man-in-the-middle, and impersonation attacks. BAN logic verifies the protocol's security properties, while the random oracle model proves the protocol's security under the random oracle model, ensuring the solution's robustness and reliability.

[0193] Combine Figure 3 As shown, S3 specifically includes:

[0194] S3.1. Protocol modeling based on BAN logic. Core objectives, including identity authentication, shared key security, and privacy protection, are formally verified through BAN logic. In BAN logic analysis, the protocol modeling process involves identifying protocol participants and assumptions, modeling the protocol, and deriving its objectives.

[0195] S3.1.1. Protocol Participants and Assumptions. Smart meters and aggregators operate under the KGC trust framework. The following are system assumptions: Smart meters and aggregators each have a public-private key pair {P SM ,k SM} and {P AG ,k AG},KGC distributes keys to ensure uniqueness and security; KGC is trustworthy and private keys will not be leaked; smart meters and aggregators do not directly trust each other and must implement identity authentication and shared key generation through protocols.

[0196] S3.1.2 Protocol Modeling: BAN logic describes communication and trust relationships through formal symbols.

[0197]

[0198] Formula (23) means that the smart meter believes that KGC is trustworthy; Formula (24) means that the smart meter believes that the aggregator's public key is valid through verification; Formula (25) means that the aggregator believes that the shared key SK is unique and secure.

[0199] S3.1.3. The protocol ultimately concludes that the smart meter and aggregator authenticate each other and trust each other as legitimate. They also trust that the shared key SK is unique and secure for subsequent communications. By verifying the trust relationship in message passing, the BAN logic demonstrates that the protocol meets its designed authentication and privacy protection goals.

[0200] S3.2. Use the random oracle model for security analysis. The random oracle model assumes that the hash function is an ideal random oracle and analyzes the mathematical security of the encryption operations and shared key generation in the protocol. This includes verifying the security of the hash function, the security of the shared key, and the ability to defend against attacks.

[0201] Combine Figure 4 As shown, S3.2 specifically includes:

[0202] S3.2.1. Security of Hash Functions The hash function (such as H) in the protocol is abstracted into a random oracle. The random oracle returns a random output for each input to ensure unpredictability. Hash functions are used to generate shared keys, verify message integrity, etc. H(P SM ||ID SM ||TS SM ) is used to verify whether the message has been tampered with, SK=H(P SM ·r AG ||P AG ·r SM ) is used to generate a shared key to ensure that the key is unpredictable.

[0203] S3.2.2 The security of the shared key is guaranteed by the Diffie-Hellman assumption. The generation of the shared key SK relies on the random number and public-private key pair of both the smart meter and the aggregator to ensure its uniqueness and unbreakability. Specifically, in each session, the smart meter and the aggregator each generate a random number r SM and r AG , and calculate the temporary public key P through them and the system generator G SM =r SM ·G SM and P AG =r AG ·G AG .

[0204] The security of the shared key relies on the Diffie-Hellman assumption, which states that given a generator G, a·G, and b·G, calculating ab·G is mathematically complex. Even if an attacker intercepts the temporary public key, the random number is private to both communicating parties, preventing them from deriving the shared key. Furthermore, the dynamic nature of the random number ensures that the key generation process is independent for each session. Even if an old message is replayed, the attacker's authentication attempt will fail due to the difference in the temporary public key.

[0205] At the same time, the protocol ensures the correctness and consistency of the key through shared key consistency verification. The smart meter and the aggregator each calculate the shared key and verify whether its hash value matches, for example:

[0206] H1(SK||TS SM )=H2(SK||TS AG ) (26)

[0207] If the hash values ​​match, authentication succeeds; if they don't, authentication terminates immediately. In summary, the security of the shared key is guaranteed by the Diffie-Hellman assumption and the mathematical properties of hash functions. The shared key generation process resists man-in-the-middle and replay attacks, ensuring the identity authentication and data privacy of both communicating parties. Attackers cannot crack or forge the shared key, further enhancing the robustness and security of the protocol.

[0208] S3.2.3 Analysis of Resisting Replay Attacks. The timestamp verification mechanism, random number mechanism, and message integrity verification are used to effectively resist replay attacks. Replay attacks are attacks in which attackers attempt to deceive both parties in the communication to complete authentication by capturing and resending old messages. In this solution, the smart meter sends the authentication request with the timestamp TS. SM After receiving the request, the aggregator first verifies the timeliness of the timestamp, specifically checking whether it satisfies the following formula:

[0209] TScurrent -TS SM ≤ΔT (27)

[0210] Among them, ΔT is the time window allowed by the system, TS SM TS is the timestamp of the smart meter in the authentication request message. current The current timestamp of the aggregator. Timestamp verification ensures that messages are processed within a reasonable timeframe. Messages outside this range are rejected, preventing attackers from resending old messages.

[0211] In addition, the generation of random numbers and further enhances the uniqueness of each authentication. The smart meter and the aggregator generate random numbers and use them to calculate the temporary public key P SM =r SM G and P AG =r AG G. The introduction of these random numbers makes each authentication session independent. Even if an attacker captures and tries to replay old messages, the authentication process will still fail due to the difference in random numbers.

[0212] The message integrity verification of the protocol is implemented through a hash function. For example, a smart meter will attach a hash value to the authentication message as shown below:

[0213] H SM =H(P SM ||ID SM ||TS SM ) (28)

[0214] After receiving a message, the aggregator recalculates the hash value and compares it with the received value. If an attacker tampers with the message content or resends an old message, the hash value will not match, and the authentication process will be immediately terminated. This mechanism ensures message integrity and effectively protects against replay attacks.

[0215] S3.2.4 Analysis of Man-in-the-Middle Attack Protection. Through the security of shared key generation, a two-way authentication mechanism, and temporary public key protection, man-in-the-middle attacks are effectively protected. A man-in-the-middle attack is an attack in which an attacker attempts to insert themselves between two communicating parties and disguise themselves as a legitimate participant. In this invention, the shared key SK between the smart meter and the aggregator is calculated using the random numbers and temporary public keys of both parties using the formula:

[0216] SK=H(P SM ·r AG ||P AG ·r SM ) (29)

[0217] Since the calculation of the shared key depends on the random number and temporary public key of both parties, the middleman cannot have both r SM and rAG , so it is impossible to forge a valid shared key. Even if an attacker intercepts part of the communication, they cannot break the mathematical relationship between the random number and the temporary public key.

[0218] The two-way authentication mechanism in the protocol further ensures security. During the authentication process, the smart meter and the aggregator verify the consistency of the shared key, for example:

[0219] H1(SK||TS SM )=H2(SK||TS AG ) (30)

[0220] If a middleman attempts to tamper with the shared key or insert a forged message, the hash values ​​calculated by both parties will not match and the authentication process will fail immediately. SM and P AG It is generated using a random number and a private key. Even if an attacker intercepts the public key, they cannot mathematically derive the private key and random number. Therefore, a man-in-the-middle cannot participate in an effective authentication process, and attacks will be detected and terminated in a timely manner.

[0221] S3.2.5 Analysis of defense against impersonation attacks. Through authentication, hash verification and session key protection, it is possible to effectively defend against impersonation attacks. Impersonation attacks refer to an attacker attempting to impersonate a smart meter or aggregator to forge communications with another party. In this scheme, each message carries the sender's identity (such as ID SM or ID AG ) and digital signature. For example, when a smart meter sends an authentication request, the message structure is:

[0222] M SM ={P SM ,ID SM ,TS SM ,Sign SM} (31)

[0223] After receiving the message, the aggregator will verify the digital signature Sign SM To ensure that the message is indeed from a legitimate smart meter. In addition, the protocol's hash verification mechanism further enhances defense capabilities. Each message contains an integrity verification hash value, such as:

[0224] H message =H(P SM ||ID SM ||TS SM ) (32)

[0225] The recipient recalculates the hash value and compares it with the received value. If an attacker attempts to forge a message or tamper with the content, the hash verification will fail, and the authentication process will terminate immediately. The protocol also protects communication security by generating and verifying a shared key. The generation of the shared key SK relies on the private keys and random numbers of the smart meter and aggregator. An attacker attempting to impersonate a smart meter or aggregator must generate a valid shared key. However, since the attacker lacks access to the private keys and random numbers of both parties, they cannot forge a valid SK. Therefore, impersonation attacks cannot succeed, and the protocol effectively ensures the authenticity of both parties.

[0226] In summary, the proposed method demonstrates its robustness against attacks through the designed BAN logic and random oracle model, effectively defending against replay attacks, man-in-the-middle attacks, and spoofing attacks. Furthermore, this solution ensures the uniqueness of the shared key and data privacy, providing reliable guarantees for secure communication between smart meters and aggregators.

[0227] In this embodiment, smart meters and aggregators register their identities with a key generation center when they first connect to the smart grid. A secure key distribution and random number generation mechanism ensures the uniqueness of identity authentication and key security during the registration process. The smart meters and aggregators complete identity authentication and establish a shared key using an anonymous authentication protocol. The protocol is formally verified using BAN logic and a random oracle model to ensure that it meets the requirements for identity authentication, shared key security, and attack resistance. Based on the Diffie-Hellman assumption, the generation of the shared key is proven to be highly secure, enhancing the robustness of the protocol. This embodiment of the present invention effectively addresses the problems of low computational efficiency, insufficient privacy protection, and complex authentication processes in existing technologies.

[0228] Embodiment 2 of the present invention provides an anonymous authentication system that runs the anonymous authentication method for a smart meter as described in embodiment 1. The system includes:

[0229] A key generation module, used to establish a key generation center;

[0230] A registration module is configured to register a smart meter and an aggregator with a key generation center when they first join the smart grid. Upon successful registration, the smart meter and the aggregator obtain a smart meter public key-private key pair and an aggregator public key-private key pair, respectively. The smart meter public key-private key pair is calculated by combining a first public key-private key pair of the smart meter and a second public key and a second private key of the key generation center. The aggregator public key-private key pair is calculated by combining a third public key-private key pair of the aggregator and a fourth public key and a second private key of the key generation center.

[0231] An authentication module, configured to authenticate the smart meter and the aggregator to each other and establish a shared session key, the authentication module comprising an authentication request module, an authentication response module, and a session establishment module;

[0232] The authentication request module is used for the smart meter to encrypt the identity and timestamp of the smart meter using the smart meter public key, and generate an authentication request message according to the encrypted identity and timestamp of the smart meter, and send it to the aggregator;

[0233] The authentication response module is used for the aggregator to verify the authentication request message after receiving the authentication request message. If the verification result is successful, the aggregator generates an authentication response message and sends it to the smart meter;

[0234] The session establishing module is used for the smart meter to verify the authentication response message after receiving the authentication response message. If the verification result is successful, both parties establish a shared session key to complete the authentication process.

[0235] Optionally, the system further includes:

[0236] Security analysis module for security analysis of smart meter and aggregator authentication using BAN logic and stochastic language models.

[0237] Embodiment 3 of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method described in embodiment 1 when loaded into the processor.

[0238] Embodiment 4 of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the method according to embodiment 1 is implemented.

[0239] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0240] The present disclosure may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0241] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.

[0242] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.

[0243] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, and conventional procedural programming languages ​​such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions. The electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0244] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.

Claims

1. An anonymous authentication method for a smart meter, characterized in that: include: Establish a key generation center. When smart meters and aggregators first join the smart grid, they each register with the key generation center. After successful registration, the smart meters and aggregators obtain a smart meter public key-private key pair and an aggregator public key-private key pair, respectively. The smart meter public key-private key pair is calculated by combining the smart meter's first public key-private key pair and the key generation center's second public key and second private key. The aggregator public key-private key pair is calculated by combining the aggregator's third public key-private key pair and the key generation center's fourth public key and second private key. The smart meter encrypts the identity and timestamp of the smart meter using the smart meter public key, generates an authentication request message according to the encrypted identity and timestamp of the smart meter, and sends the message to the aggregator; After receiving the authentication request message, the aggregator verifies the authentication request message. If the verification result is successful, the aggregator generates an authentication response message and sends it to the smart meter; After receiving the authentication response message, the smart meter verifies the authentication response message. If the verification result is successful, the two parties establish a shared session key to complete the authentication process.

2. The method for intelligent anonymous authentication according to claim 1, characterized in that: A key generation center is established. When a smart meter first joins the smart grid, it registers with the key generation center. After successful registration, the smart meter obtains the public key and private key pair, including: When a smart meter first joins the smart grid, it generates a registration request message according to the identity identifier of the smart meter, the first public key of the smart meter, the first signature information and the timestamp, and sends the generated registration request message to the key generation center; After receiving the registration request message sent by the smart meter, the key generation center uses the first public key of the smart meter to verify the first signature information and the timestamp; If both the first signature information and the timestamp verification results are successful, the key generation center generates an initial registration response message and signs the initial registration response message using the second private key of the key generation center, and adds the signature result to the initial registration response message to generate a registration response message and sends it to the smart meter; After receiving the registration response message, the smart meter uses the second public key of the key center to verify the signature of the registration response message. If the signature verification result is successful, the smart meter public key and private key pair are calculated based on the registration response parameters in the registration response message, combined with the first public key and private key pair of the smart meter and the second public key and second private key of the key generation center to complete the registration.

3. The method for intelligent anonymous authentication according to claim 2, characterized in that: When the smart meter first joins the smart grid, the smart meter generates a registration request message according to the identity identifier of the smart meter, the first public key of the smart meter, the first signature information and the timestamp, including: Smart meters from a randomly generated set Randomly select the first random number And calculate the first public key R of the smart meter according to the following formula u : R u =k u ·P1 Among them, R u is the first public key, k u is the first random number, and P1 is the first generator predefined by the smart meter; The smart meter connects the identity of the smart meter, the first public key of the smart meter and the timestamp, and uses the first private key to sign the connected data according to the following formula to obtain the first signature information Among them, SM i is the i-th smart meter, Sign is the signature function, Id i For Smart MeterSM i The identity of R u For Smart MeterSM i The first public key, TS is the timestamp, For Smart MeterSM i The first private key of , || is the bit string concatenation operation; The smart meter will identify its ID i , first public key R u , first signature information Generate a registration request message with timestamp TS 4. The method for intelligent anonymous authentication according to claim 3, characterized in that: The key generation center generates an initial registration response message, including: The key generation center calculates the second public key according to the following formula: R n =k n ·P2 Among them, R n is the second public key, P2 is the second generator predefined by the key generation center, k n A second random number generated by the key generation center; The key generation center calculates an intermediate value based on the second public key and the first public key of the smart meter; The key generation center combines the intermediate value and the identity of the smart meter using a hash function to generate a hash value; The key generation center calculates the intermediate private key using the hash value and the second private key of the key generation center; An initial registration response message is generated according to the second public key, the hash value, and the intermediate private key.

5. The method for intelligent anonymous authentication according to claim 4, characterized in that: The key generation center calculates the intermediate value according to the second public key and the first public key of the smart meter according to the following formula: R in =R u +R n Among them, R in is the middle value, R u For smart meter M i The first public key, R n The second public key of the key generation center.

6. The method for intelligent anonymous authentication according to claim 4, characterized in that: The key generation center calculates the intermediate private key using the hash value and the second private key of the key generation center according to the following formula: s i =e i ·k n +k x Among them, s i is the intermediate private key, e i is the hash value, k n The second random number generated by the key generation center, k x It is the second private key of the key generation center.

7. The method for intelligent anonymous authentication according to claim 4, characterized in that: The public key and private key pair of the smart meter are calculated according to the registration response parameters in the registration response message, the first public key and private key pair of the smart meter, and the second public key and private key pair of the key generation center according to the following formula: k i =s i +e i ·k u R i =e i ·R in +R n Among them, k i is the private key of the smart meter, R i is the public key of the smart meter, s i is the intermediate private key, e i is the hash value, k u is the first random number, R in is the middle value, R n It is the second public key of the key generation center.

8. The anonymous authentication method for a smart meter according to claim 1, characterized in that: When an aggregator first joins the smart grid, it registers with the key generation center. After successful registration, the aggregator obtains the aggregator public key and private key pair, including: When the aggregator first joins the smart grid, it generates a registration request message based on the aggregator's identity, the aggregator's third public key, the second signature information, and the timestamp; The aggregator sends the generated registration request message to the key generation center; After receiving the registration request message sent by the aggregator, the key generation center uses the aggregator's third public key to verify the second signature information and timestamp; If both the second signature information and the timestamp verification results are successful, the key generation center calculates the registration response parameters and signs the initial registration response message using the second private key of the key generation center, and adds the signature result to the initial registration response message to generate a registration response message and sends it to the aggregator; After receiving the registration response message, the aggregator uses the fourth public key of the key center to verify the signature of the registration response message. If the signature verification result is successful, the aggregator public key and private key pair are calculated based on the registration response parameters in the registration response message, combined with the aggregator's third public key and private key pair and the key generation center's fourth public key and second private key pair to complete the registration.

9. The anonymous authentication method for a smart meter according to any one of claims 1 to 8, characterized in that: The smart meter encrypts the identity and timestamp of the smart meter using the smart meter public key, and generates an authentication request message according to the encrypted identity and timestamp of the smart meter, including: The smart meter generates a third random number r SM and use the third random number to calculate the fifth public key P of the smart meter SM =r SM ·G SM , where G SM A third generator predefined for smart meters; The smart meter uses the public key of the smart meter to encrypt its identity and timestamp to obtain the encrypted identity ID of the smart meter. SM and timestamp TS SM ; The smart meter generates the first authentication hash value H according to the following formula SM : H(P SM ||ID SM ||TS SM ) Among them, H is the hash function, P SM The fifth public key of the smart meter, ID SM TS is the identity of the smart meter. SM is the timestamp; The smart meter uses the fifth public key P SM , smart meter ID SM , timestamp TS SM and the first authentication hash value H SM Generate authentication request message M1 = {P SM ,ID SM ,TS SM ,H SM }.

10. The anonymous authentication method for a smart meter according to claim 9, characterized in that: After receiving the authentication request message, the aggregator verifies the authentication request message. If the verification result is successful, the aggregator generates an authentication response message and sends it to the smart meter, including: After receiving the authentication request message, the aggregator verifies the timestamp and identity ID in the authentication request message SM If the verification result is successful, the aggregator generates a fourth random number r AG and use the fourth random number to calculate the aggregator's sixth public key P AG =r AG ·G AG , where G AG A fourth generator predefined for the aggregator; The aggregator uses the fifth public key P of the smart meter in the authentication request message SM and the fourth random number r AG Calculate the first intermediate value of the shared session key K=H(P SM ·r AG ), where H is a hash function; The aggregator generates the second authentication hash value H according to the following formula AG : H AG =H(P SM ||P AG ||ID AG ||TS SM ) Among them, H is the hash function, P SM is the fifth public key of the smart meter, P AG The sixth public key of the aggregator, ID AG is the identity of the aggregator, TS SM is the timestamp; The aggregator uses the aggregator's sixth public key P AG , the second authentication hash value H AG , aggregator timestamp TS AG Generate authentication response message M2 = {P AG ,H AG ,TS AG }, and sends the authentication response message M2 to the smart meter.

11. The anonymous authentication method for a smart meter according to claim 10, characterized in that: After receiving the authentication response message, the smart meter verifies it. If the verification result is successful, both parties establish a shared session key, including: After receiving the authentication response message, the smart meter verifies the validity of the timestamp in the authentication response message; After successful verification, the smart meter calculates the third authentication hash value H′ AG =H(P SM ||P AG ||ID AG ||TS SM ), and determine the third authentication hash value H′ AG The H in the authentication response message AG Is it consistent? If they are consistent, the identity of the aggregator is confirmed by the smart meter, and the smart meter uses the aggregator's sixth public key P AG and the third random number r SM Calculate the second intermediate value of the shared session key K′=H(P AG ·r SM ); Determine whether the second intermediate value K′ of the shared session key is consistent with the first intermediate value K of the shared session key. If they are consistent, the smart meter and the aggregator complete the authentication, establish the shared session key, and use the hash value of the first intermediate value K of the shared session key as the final shared session key.

12. The method for intelligent anonymous authentication according to claim 1, characterized in that: The method further comprises: Security analysis of smart meter and aggregator authentication using BAN logic and stochastic language models.

13. An anonymous authentication system for smart meters, characterized in that: The system comprises: A key generation module, used to establish a key generation center; A registration module is configured to register a smart meter and an aggregator with a key generation center when they first join the smart grid. Upon successful registration, the smart meter and the aggregator obtain a smart meter public key-private key pair and an aggregator public key-private key pair, respectively. The smart meter public key-private key pair is calculated by combining a first public key-private key pair of the smart meter and a second public key and a second private key of the key generation center. The aggregator public key-private key pair is calculated by combining a third public key-private key pair of the aggregator and a fourth public key and a second private key of the key generation center. An authentication module, configured to authenticate the smart meter and the aggregator to each other and establish a shared session key, the authentication module comprising an authentication request module, an authentication response module, and a session establishment module; The authentication request module is used for the smart meter to encrypt the identity and timestamp of the smart meter using the smart meter public key, and generate an authentication request message according to the encrypted identity and timestamp of the smart meter, and send it to the aggregator; The authentication response module is used for the aggregator to verify the authentication request message after receiving the authentication request message. If the verification result is successful, the aggregator generates an authentication response message and sends it to the smart meter; The session establishing module is used for the smart meter to verify the authentication response message after receiving the authentication response message. If the verification result is successful, both parties establish a shared session key to complete the authentication process.

14. An electronic device comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1 to 12.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.