An Efficient Lightweight Authentication Scheme for Smart Meter

: With the rapid development of the information age, smart meters play an important role in the smart grid. However, there are more and more attacks on smart meters, which mainly focus on the identity authentication of smart meters and the security protection of electricity consumption data. In this paper, an efficient lightweight smart meter authentication scheme is proposed based on the Chinese Remainder Theorem (CRT), which can realize the revocation of a single smart meter user by publishing a secret random value bound to the smart meter identity. The proposed scheme not only protects the security of smart meter electricity consumption data by using encryption, but also resists identity attacks from both internal and external adversaries by using hash functions and timestamps. Experiment shows that the proposed scheme has lower computation overhead and communication overhead than other authentication schemes and is more suitable for smart meter authentication.


Introduction
With the rapid development of the information age, the smart grid has become more and more popular in our lives.The smart meter has an important application in smart grid.Power companies can plan production and allocation of power resources based on the data of smart meters, which is conducive to the efficient use of power resources and ensures the stable operation of the power grid.In the data transmission process between smart meters and power companies, there are frequent incidents of illegal users impersonating legal identities to steal electricity resources.Therefore, effective identity authentication for both parties is extremely important.Additionally, attackers may exploit users' personal habits and privacy to attack their electricity data, so the security protection of electricity usage data is also crucial.Current technologies for privacy protection in identity authentication mainly include HMAC [1], Zero-Knowledge Proofs [2], the Chinese Remainder Theorem (CRT) [3], Blind Signatures [4], Group Signatures [5], and Certificates [6].Compared to other technologies, identity authentication schemes based on the CRT are relatively less demanding in terms of computation overhead, transmission consumption, and memory usage, making them more suitable for smart meter identity authentication.Compared to other technologies, identity authentication schemes constructed based on the CRT have relatively small computation overhead and communication overhead, making them more suitable for identity authentication of smart meters.
In 2016, Jiang et al. [7] proposed an efficient anonymous batch authentication scheme using HMAC, ensuring the security and confidentiality of Vehicular Ad hoc Networks (VANETs).By using hash functions to check message integrity before batch processing, the scheme efficiently handled invalid request messages, making the batch authentication more effective.In 2019, Amine et al. [8] proposed a lightweight HMAC mutual authentication protocol specifically for IoT.Considering the resource constraints of IoT devices, this protocol, employing HMAC functions and XOR operations, ensures secure communication between IoT devices and fog nodes.This lightweight HMAC protocol addresses the challenge of secure communication on resource-limited devices, particularly against common network threats like replay and man-in-the-middle attacks.In 2017, Tian et al. [9] proposed a smart meter identity authentication scheme based on the CRT, which has low computational and memory requirements and allows dynamic user management through secret value updates.In 2019, Rasheed et al. [2] introduced a new, lightweight, adaptive group-based VANET zero-knowledge proof protocol.Using zero-knowledge proof technology, vehicles can prove their identity to base stations without revealing any sensitive information.In 2021, Dwivedi et al. [10] proposed a privacy-preserving identity authentication scheme using non-interactive zero-knowledge proofs, suitable for various IoT-based applications.For enhanced security, a password-authenticated key exchange protocol was used to create each session.Utilizing zero-knowledge proofs in this scheme ensures that if the statement is correct, the verifier cannot learn anything other than that the statement is true.
In 2019, Zhang et al. [11] designed a conditionally privacy-preserving authentication based on CRT.This scheme ensured communication security while also reducing the probability of personal information, including real identities, being leaked.Using the CRT significantly lowered the computational complexity for the trusted center.In 2020, Kong et al. [12] proposed an efficient and privacy-preserving solution suitable for resourcelimited environments, especially in smart grids.Blind signature technology played an important role in this scheme which allows data to be authenticated and signed while maintaining user anonymity, enabling fine-grained analysis of consumption data without revealing user identities.In 2020, Jiang et al. [13] proposed a scheme named AAAS for anonymous authentication in VANETs.This scheme aimed to allow vehicles in VANETs to authenticate each other and communicate with roadside infrastructure while protecting the driver's privacy.The scheme combined alias mechanisms with group signature mechanisms to achieve a distributed solution, where no single authority could directly resolve the real identity of the vehicles.In 2021, Pathak et al. [14] proposed an identity verification scheme based on zero-knowledge proofs which can prove ownership of an identity to a verifier without revealing any sensitive information.In 2023, Zhu et al. [15] proposed a privacy-preserving data aggregation scheme based on the CRT and homomorphic encryption technology, effectively balancing communication and computation overhead.In this scheme, any entity can verify the integrity of data, effectively preventing data tampering, and abandoned bilinear and point-to-point hash functions, thus enhancing efficiency.In 2023, Sui et al. [4] employed blind signatures and anonymous authentication to propose a privacy protection scheme for smart grids.This scheme could not only track electricity thieves but also effectively protect the security of the electricity purchasing process using smart meters.In 2023, Lu et al. [16] constructed a new certificateless group signature scheme to achieve the vehicle identity hiding and secure communication between vehicles, thereby protecting the privacy of vehicle information.
In the smart meter authentication scheme proposed by Tian et al. [9], because each smart meter user has private (X, n i ), and these smart meter users have the same X, and n 1 , . . ., n n are mutual coprime.Thus, when some users (assume n 1 , . . ., n n ) collude to attack the legal user identity, there is a high probability of guessing n j ∈ {n 1 , . . . ,n n }, j ̸ = 1, . . ., k.Therefore, they can take on user identity n j to forge electricity consumption data.In addition, since the region managers know the user's authentication information (X, n i ), a dishonest region manager can take on user identity and forge electricity consumption information.Therefore, internal users of scheme [9] can carry out a collusion attack on identity, and the dishonest region managers can take on the smart meters identities and tamper with power usage data.An efficient lightweight authentication scheme for a smart meter is proposed in this paper, which has the following specific contributions: (1) In order to meet lightweight requirements, each smart meter has a hash value H(n i , a i ) and a random number n i .According to the randomness, unidirectionality, and collision resistance of the hash function, even if multiple smart meter users conspire to know multiple n i and H(n i , a i ), they cannot guess the random number or hash values of other smart meters.Therefore, the scheme can resist collision attack by internal users on identity.(2) Due to the fact that the user's random number a i is hidden in the hash function h = H(a i , P ow , T ′ s ) during the electricity consumption data charging phase, RM cannot obtain the corresponding a i and therefore cannot calculate a valid hash value.Even if RM forges the bill, the OC can verify the authenticity of the electricity consumption data and detect false bills from RM through comparison of hash values.Therefore, the scheme can resist attacks from dishonest region managers who forge electricity consumption data.
(3) Because OC knows the secret random value a i corresponding to the user, when a smart meter is revoked, OC can disclose its a i .Thus, during the authentication phase, RM can verify whether the corresponding hash values H(n i , a i ) are equal through a i .If equal, reject user authentication, achieving authentication revocation for the user.Therefore, the scheme can efficiently achieve authentication revocation for a single user.(4) Experiment shows that the proposed authentication scheme has lower communication and computation overhead compared to other schemes.
The remainder of this paper is organized as follows: Section 2 introduces preliminaries such as the CRT and elliptic curves.Section 3 describes the system model and threat model.Section 4 details the proposed authentication scheme for smart meter.Section 5 discusses the correctness and security of the scheme.Section 6 presents the performance analysis.Finally, Section 7 concludes the paper.

Preliminaries
This section mainly introduces CRT, elliptic curve, and ECDSA signature algorithms.CRT is used to assign shared secret values to smart meters, while elliptic curve and ECDSA signature algorithms are used to protect the security of transmitted data and verify the sender, respectively.

Chinese Remainder Theorem
If the numbers m 1 , m 2 , . . ., m n are mutual prime, then for any numbers a 1 , a 2 , . . ., a n , the system of congruent equations The method to construct the solution is described as follows: (1) The total modulus M is calculated as the product of all moduli.(2) For each modulus m i , M i = M/m i is calculated.(3) The multiplicative inverse t i of M i is calculated such that M i t i ≡ 1(modm i ).
(4) The solution x can be found as a weighted sum x = ∑ n i=1 a i M i t i modulo M.An example to further illustrate this theorem involves solving a system of three equations: . The following steps are performed: (1) (3) Find the multiplicative inverses t i of M i such that M i t i ≡ 1(modm i ), that is 20 −1 ≡ 2(mod3), 15 −1 ≡ 3(mod4), 12 −1 ≡ 3(mod5).(4) Calculate the solution x = (a 1 M 1 t 1 + a 2 M 2 t 2 + a 3 M 3 t 3 ) mod M to get x ≡ 11 mod 60.

Elliptic Curves
An elliptic curve over a finite field F p of prime order p is the Weierstrass equation y 2 = x 3 + ax + b(mod p), where a, b ∈ F p and (4a 3 + 27b 2 ) mod p ̸ = 0, which ensures the absence of singular points.A group on the elliptic curve E over F p , denoted as G = E p (a, b), includes a generator P of the group, the order q of the group, and the infinity point O.
The point addition and scalar multiplication operations on elliptic curve are defined as follows: (1) Point addition: Elliptic curve operations have the following properties.For any P, Q, R ∈ G, there are (1)

ECDSA Signature Algorithm
The ECDSA (Elliptic Curve Digital Signature Algorithm) [17] includes key generation, signing, and verification processes.The steps of the ECDSA signature algorithm are illustrated in Figure 2 and constructed as follows: (1) Key generation.Let F p be a finite field, E be the elliptic curve on GF(p).Choose Randomly G ∈ E. Let the order of Gbe prime n.

System Model and Threat Model
The smart meter authentication system includes four parties, as shown in Figure 3.
(1) Trust Authority (TA).There is only one TA in the system, who is responsible for initializing the system and injecting identity information into OC, RM, and SM.(2) Operation Center (OC).There is only one OC in the system, which is responsible for billing the electricity consumption data forwarded by RMs and verifying the identity of SMs.(3) Region Manager (RM).The system includes multiple RMs.The number of RMs is set by OC according to actual needs, for example, it can be divided by region, and each region has an RM.The RM is tasked with verifying the identity authentication of SMs in its region and forwarding their electricity consumption data to the OC.(4) Region Manager (RM).The system includes multiple SMs, but each RM can manage up to n SMs.SM authenticate their identity with the RM and connect to the power grid.It should be noted that in large-scale smart grids environments, identity authentication is required for millions of smart meters.Therefore, SMs can be registered according to their respective regions, meaning that the smart meter can communicate with the local RM instead of directly communicating with the OC.The proposed smart meter authentication system is a simplified one with only one layer of the RM.In practical deployment, the RM can be divided into multiple levels, which can reduce the burden of centralized authentication servers and improve the scalability of the system.In addition, the SM's identity authentication scheme needs to be deployed in actual power infrastructure and integrated with existing power systems.This may involve multiple stakeholders, technical standards, and security requirements, such as encryption algorithm standards, as well as management and maintenance, such as updating, monitoring, and troubleshooting authentication servers and smart meter software.
The threat model for smart meter authentication system is based on the threat model of [18].In the smart grid, security issues may arise due to system compromises or vulnerabilities.Threats come from internal SM, dishonest RM, and external attacker.The following are threats related to smart meter authentication scheme.
(1) Passive Attack.Attackers illegally monitor data transmitted on the smart grid, compromising data confidentiality.(2) Replay attack.The attacker repeatedly sends data that the receiver has already received, in order to deceive the receiver into accepting the message and disrupt the identity authentication.(3) Collusion Attack.Internal SMs collude to attack the identity of other smart meters and then use that identity to carry out attacks.(4) Forging Electricity Ledger Attack.The dishonest RM takes on SM identity and forges electricity consumption data for attacks.(5) Identity Spoofing Attack.Attackers take on an identity that has been successfully authenticated and carry out attacks.

The Authentication Scheme for Smart Meter
The authentication scheme is divided into six phases: system initialization, key generation, smart meter registration, smart meter authentication, electricity consumption data charging, and smart meter revocation.
➀ TA selects an elliptic curve: E : y 2 ≡ x 3 + ax + b(mod p) and an elliptic group E p (a, b), and randomly choose a generator G ∈ E p (a, b).Suppose the order of G is n.Randomly choose a hash function H{01} * → E p (a, b).Output public parameters pp = {E p (a, b), G, H, n}.➁ TA chooses randomly mutual prime numbers n 1 , n 2 , . . ., n n , a secret value S, and numbers a 1 , a 2 , . . ., a n , computes , and uses the CRT to compute the solution X.

•
Encode the message X, n i , P ow , T ′ S as point to the OC.➂ OC performs the following operations.

•
The OC verifies the validity of the signature C 3

′
, and exits if it is invalid.Otherwise, proceed with the following operations.• By using (X, n i , a i ), the real identity of the SM i can be confirmed, thereby completing the electricity consumption data charging.
(6) SM revocation phase.When a i is leaked or SM i logs out of the system, the OC can revoke SM i by broadcasting a i to the RM.If a revoked user SM i registers with RM, SM i needs to send registration information (X, n i , H(n i , a i ), T s ) to the RM.After receiving the registration information, the RM can use the received revocation message a i from the OC and n i from SM i to calculate the hash value H(n i , a i ).If the hash value is equal to the hash value sent by SM i , then the authentication is refused, indicating that the SM i has been revoked.

Correctness and Security Analysis
The correctness and security of the proposed scheme are analyzed in this section.

The Correctness Analysis
The correctness of the scheme includes the correctness of smart meter authentication, electricity consumption data charging, and smart meter revocation.
(1) In the smart meter authentication phase, the smart meter sends a ciphertext C i = {k SM G, P m + k SM pk RM } to the RM, The RM calculates Thus ) and h are equal can confirm the validity of the ledger and the real identity of the smart meter SM i , thereby completing the billing of ID i electricity consumption P ow .
(3) In the smart meter revocation phase, the OC can revoke SM i by broadcasting a i to RM.During the smart meter authentication phase, RM can obtain (X, n i , H(n i , a i ), T s ).
RM calculates the hash value by a i and n i , and compares it with H(a i , n i ).If the hash values are equal, the authentication of SM i is rejected, resulting in SM i being revoked.
The OC deletes the relevant information of a i from the local database, thereby revoking the SM i .

The Security Analysis
The smart meter authentication scheme involves six phases.Since the system initialization phase and the smart meter registration phase are completed offline or through secure channel transmission, there is no need to consider adversary.Smart meter revocation phase is operated by OC and does not require consideration of adversary.In the remaining three phases, security analysis is required because the information is transmitted over an open network.We analyze the security of the constructed scheme from two aspects: internal and external adversaries.
(1) Resist passive attack, coming from the internal SM or dishonest RM or external adversary.In the smart meter authentication phase, the message sent by the smart meter is the ciphertext C i .In electricity consumption data charging phase, the message transmitted over the open network is the hash value H and the ciphertext From the security of the ECC (discrete logarithm problem on elliptic curve) and the property of the hash value (unidirectionality and collision resistance), it is known that the adversary cannot obtain any useful message from the hash value and the ciphertext, and thus the authentication scheme is secure for passive attack.
(2) Resist replay attack, coming from internal dishonest SM or dishonest RM or external adversary.In the smart meter authentication phase and electricity consumption data charging phase, if the smart meter forwards the intercepted ciphertext (3) Resist collusion attack, coming from the internal dishonest SM and external adversary.
In the smart meter authentication phase, the smart meter SM i needs to provide the hash value H(n i , a i ) additionally when performing authentication.Because even if smart meter users collude to attack and obtain n j , due to the unidirectionality and collision resistance of the hash function, they cannot guess a i or the hash value.Therefore, it can resist collusion attack.(4) Resist forging electricity ledger attack, coming from the dishonest RM.In the electricity consumption data charging phase, the dishonest RM takes on the identity of the successfully authenticated smart meter and forges the smart meter electricity consumption data P ow to send to the OC.Due to the unidirectionality of the hash function, a i cannot be calculated from h = H(a i , P ow , T ′ s ).Therefore, the RM does not know the secret value a i of the smart meter that has been successfully authenticated, and cannot calculate the corresponding hash value h.Therefore, RM can only randomly select a hash value to send to the OC.When the OC searches for corresponding to (X, n i ) in the local database, it can calculate that H(a i , P ow , T ′ S ) and h are not equal, thus rejecting the ledger and resisting the forging electricity ledger attack.
(5) Resist identity spoofing attack, coming from internal SM or external adversary.An unauthenticated smart meter takes on the identity of a successfully authenticated smart meter and forges the smart meter electricity consumption data P ow sent to the RM.Because the unauthenticated smart meter does not know the secret value a i of the authenticated smart meter, it cannot calculate the real hash value h = H(a i , P ow , T ′ s ).Similar to the forging electricity ledger attack, when the OC searches for a i corresponding to (X, n i ) in the local database, it can calculate that H(a i , P ow , T ′ S ) and h are not equal, thus rejecting the ledger and resisting identity spoofing attack.Specifically, in the proposed scheme, when illegal users want to enter the system, they first need to perform identity authentication.In the identity authentication phase, smart meter users need to send registration information (X, n i , H(n i , a i ), T s ) to RM.However, the message is sent in ciphertext form during the sending process, so the adversary cannot obtain valid information (in this case, it is a passive attack, that is, even if the attacker intercepts the ciphertext message, they cannot decipher the valid information).If the adversary replays the intercepted message, it is known from the timestamp T s that the system will reject it (in this case, it is a replay attack).
If the adversary wants to impersonate other legitimate users for identity authentication, the adversary needs to know the secret random number a i of the legitimate user or its corresponding hash value H(n i , a i ).However, the user's a i is hidden in the hash function, and the one-way and anti-collision properties of the hash function indicate that the secret random number a i of other legitimate users cannot be found.Therefore, it is not possible to impersonate other users (at this time, it is an identity spooning attack).
If the adversary conspires with some dishonest users to impersonate other legitimate users, then the adversary and dishonest users also need to conspire to calculate the secret random number a i or its corresponding hash value H(n i , a i ) of other legitimate users.Although there is a high probability of calculating mutually prime integers n i , the input to the hash function still has an a i , and the random number a i is hidden in the hash function, with each user's a i being independent of each other, resulting in the failure of the collusion attack.
Even if the adversary is very powerful and obtains all the registration information (X, n i , H(n i , a i ), T s ), that is, the adversary has obtained a valid hash value H(n i , a i ) and passed identity authentication (because the hash value is random, this probability can be ignored unless the attacker is dishonest RM).However, according to the unidirectionality of the hash function, adversaries cannot obtain the true a i , and, therefore, cannot calculate h = H(a i , P ow , T ′ s ).Therefore, adversaries cannot forge electricity ledger, and, therefore, cannot cause economic losses to users within the system (in this case, it is forging electricity ledger attack).

Performance Analysis and Comparison
This section compares the proposed scheme with some related schemes in terms of property and performance.

Property Comparison
At present, the identity authentication schemes for smart meters include [9,[19][20][21][22].Table 1 compares these schemes from six aspects: Passive Attack, Replay attack, Collusion attack, Forging Electricity Ledger Attack, Identity Spoofing Attack, and Revoke a single user.Due to the use of ciphertext or hash values for transmission and the use of timestamps, these schemes can resist passive attack and replay attacks.Except for scheme [9], all other schemes can resist identity spooning attack.Refs.[20,21] and the proposed scheme can resist collusion attacks, but only the proposed scheme has the property of revoking a single user.
"✓" represents the scheme with this property, " × " represents the scheme without this property, and " − " represents the scheme without considering this property.

Computational Overhead
The proposed authentication scheme involves operations such as congruent equations, ECC encryption/signature algorithm, and hash functions.The solution of the congruence equation system based on the CRT can be carried out offline by the TA.Therefore, in efficiency analysis, we only need to consider the ECC encryption/signature algorithm and hash function in the online authentication phase.The efficiency of these algorithms determines the computational efficiency of our scheme.In the data transmission process, only the hash h and ciphertext , are included.Therefore, compared to authentication schemes based on HMAC, zero-knowledge proofs, blind signatures, group signatures and certificates techniques, our proposed scheme has less computational and communication overhead, and is more suitable for smart meter authentication.
For comparison, the time required for the execution of operations in [11,23] is used, which was obtained by running the Windows 7 operating system on a hardware platform with an Intel I7-4770 processor, a clock frequency of 3.40 GHz, and 4 GB of memory using the library MIRACL, as shown in Table 2. Compared with the authentication scheme based on the CRT, such as the schemes of Xiong et al. [3] and Zhang et al. [11], our scheme also has advantages in terms of computation and communication overhead, as shown in Table 3.In the scheme of Xiong et al. [3], one elliptic curve scalar multiplication, three smallscale multiplications, and three hash functions are required in the message signature phase, and four scalar multiplications and four point additions on elliptic curve, and one small-scale multiplication are required in the single-message authentication phase.Therefore, the total time cost is 5T sm + 4T s−sm + 4T pa + 3T h ≈ 2.2727 ms.In the scheme of Tian et al. [9], the identity authentication phase for the electricity meter requires four elliptic curve scalar multiplications and one hash operation.Therefore, the total time cost is 4T sm + T h ≈ 1.7681 ms.In the scheme of Zhang et al. [11], two elliptic curve scalar multiplications as well as two hash functions are required in the anonymous identity and signature phases, and three elliptic curve scalar multiplications, two elliptic curve point additions as well as one hash function are required in the single-message authentication phase.Therefore, the total time cost is 5T sm + 3T h + 2T pa ≈ 2.2139 ms.In the scheme introduced by Garg et al. [21], the identity authentication phase involves five elliptic curve scalar multiplications and three hash operations.Therefore, the total time cost is 5T sm + 3T h ≈ 2.2103 ms.In the scheme of Sureshkumar et al. [22], the authentication phase needs four elliptic curve scalar multiplications and eight hash operations.Therefore, the total time cost is 4T sm + 8T h ≈ 1.7688 ms.In our scheme, four elliptic curve scalar multiplications, one hash function, and one modulo computation are required in the smart meter authentication phase.Therefore, the total time cost is 4T sm + T h ≈ 1.7681 ms.As shown in Figure 6, our proposed scheme has the lowest Computation overhead in the identity authentication phase.

Communication Overhead
The comparison of the communication overhead during the identity authentication phase is shown in Table 3, where |G| represents the bit length of the group on the elliptic curve and |q| represents the element bit length in Z q .We adopt the same assumption as in [11], i.e., the size of p is 20 bytess, hence the size of elements in G is 40 bytess.As shown in Figure 6, compared to other schemes, our proposed scheme also has the smallest communication overhead in the identity authentication phase.In the scheme of Xiong et al. [3], vehicles are required to send (M i , PSID i k , ID i k , T i , σ i ) to the roadside unit during the authentication phase, including three elements on the elliptic curve and one element in an integer group, hence the communication overhead is approximately 3|G| + |q| ≈ 140 bytess.In the scheme of Tian et al. [9], the smart meter's authentication phase needs the sending of one elliptic curve element and a one-bit message, resulting in a communication overhead of approximately |G| + 1 ≈ 41 bytess.In the scheme of Zhang et al. [11], vehicles need to send to the roadside unit for identity authentication, including one elliptic curve element and two elements in integer groups, hence the communication overhead is approximately |G| + 2|q| ≈ 80 bytes.In the scheme of Garg et al. [21], smart meters are required to send (I SM , r SM , R SM , T SM ) to the gateway, including one elliptic curve element and one element in an integer group, and the gateway sends (r N AN , R N AN , T N AN , Auth N AN ) to the smart meter, including one elliptic curve element and one element in an integer group, leading to a communication overhead of approximately 2|G| + 2|q| ≈ 120 bytes.In the scheme by Sureshkumar et al. [22], smart meters are required to send (D 2 , D 4 , D 5 , TS2 k ), including two elliptic curve elements, thus the communication overhead is approximately 2|G| ≈ 80 bytes.In the proposed scheme, during the meter's authentication phase, message C ′ 1 along with a one-bit confirmation message is required to be sent, leading to a communication overhead of approximately |G| + 1 ≈ 41 bytes.The communication overhead is shown in the Figure 7.

Energy Consumption
Ref. [21] showed the energy consumption calculation formula vol × cur × T, where vol represents voltage and cur represents current, with (vol = 3 V, cur = 1.8 µA) .The energy consumed for sending and receiving one-bit messages is 0.72 µJ and 0.81 µJ, respectively.

Conclusions
A lightweight authentication scheme for smart meters is proposed in this paper, which uses the Chinese Remainder Theorem for identity authentication, reduces the computation and communication overhead during the authentication phase, and effectively revokes a single smart meter user by exposing the random secret number in the hash function.In addition, the ECC encryption algorithm is used for confidential transmission of electricity consumption data.The security of the proposed scheme was analyzed from both internal and external adversaries, which shows that the proposed scheme can resist passive attack, replay attack, collusion attack, false electronic ledger attack, and identity deception attack.However, the mutual authentication was not considered in the authentication phase.In our future work, we will consider more robust system models and stronger security requirements, such as mutual authentication and hierarchical authentication, to adapt to more complex real-world requirements.

addition is illustrated in Figure 1 .
The red solid line represents the elliptical curve, while the black dashed line represents the demonstration of the addition operation on the elliptical curve.(2)Scalar multiplication: mP = P + P + . . .+ P m , where m ∈ Z * q .

Figure 2 .
Figure 2. Flowchart of the ECDSA signature algorithm.

Figure 3 .
Figure 3.The smart meter authentication system.
OC randomly selects number n OC ∈ [1, n − 1] as its private key and computes its public key pk OC = n OC G. OC outputs the public key pk OC and keeps the private key sk OC = n OC secret.➁RMrandomlyselects number n RM ∈ [1, n − 1] as its private key and calculates its public key pk RM = n RM G. RM outputs the public key pk RM and keeps the private key sk RM = n RM secret.(X,ni, a i , ID i ) into the smart meter SM i .Then, TA secretly sends (X, n i , a i , ID i ) to OC, and finally secretly sends (X, n i ) to the corresponding RM. (4) Smart meter authentication phase.➀TheSMi authentication process to the RM is shown in Figure4.SM i performs the following operations.• Encode the registration information (X, n i , H(n i , a i ), T s ) into point P m ∈ E p (a, b), where T s is the timestamp selected by the SM i .• Randomly select the number k SM ∈ [1, n − 1], compute C i = {k SM G, P m + k SM pk RM }, and send C i to RM. ➁ After receiving C i , the RM performs the following operations.• Compute P m = P m + k SM pk RM − sk RM k SM G by sk RM and get (X, n i , H(n i , a i ), T s ) by decoding P m .• Check if the timestamp T s is valid, If it is invalid, return δ = 0, indicating that the authentication of the SM to the RM has failed.If it is valid, compute p i = X mod n i and S, n i = D sk RM (p i − H(n i , a i )).• Compare whether S is equal to the system preset, and whether n i is equal to n i .If both are equal, return δ = 1, indicating that SM i has successfully authenticated to RM.Otherwise, return δ = 0.
(3)Smart meter registration phase.When the i-th smart meter SM i is registered with TA, TA loads (X, n i , a i ) into SM i if (X, n i , a i , ID i ) exists in TA's database.Otherwise, TA randomly selects (X, n i , a i ), loads (5) Electricity consumption data charging phase.➀Electricityconsumption data charging is shown in Figure 5.The SM performs the following operations.•summarizethe electricity consumption data over a period of time (usually one month) and obtains P ow .•Choose a timestamp T ′ s and encode T ′ s , p ow as a point P m ′ ∈ E p (a, b).• Compute h = H(a i , P ow , T ′ s ).• Choose randomly number k ′ RM ∈ [1, n − 1] and compute C ′ • Compute P ′ m = P ′ m + k ′ SM pk RM − sk RM k ′ SM Gby sk RM and get T ′ s , p ow by decoding P ′ m .• Check if the timestamp T ′ s is valid, and exit if it is not.Otherwise, do the following.
•Compute P ′′ m = P ′′ m + k RM pk OC − sk OC k RM G by sk OC and get X, n i , P ow , T i corresponding to (X, n i ) in the local database and calculate whether H(a i , P ow , T ′ S ) and h are consistent.If they are consistent, it indicates that the Electricity consumption data are valid.
, the RM can get (X, n i , H(n i , a i ), T s ) by decoding P m , and compute p i = X mod n i .Because p i = E pk RM (S, n i ) + H(n i , a i ), the RM can decrypt E pk RM (S, n i ) = p i − H(n i , a i ) and get S, n i .Therefore, is possible to correctly output δ ∈ {0, 1} based on whether S and S, n i and n i are equal.(2)In the electricity consumption data charging phase, the RM can similarly decrypt the ciphertext C The OC can verify the validity of C 3 ′ by the validity verification of the signature and can decrypt it to get (X, n i , P ow , T Because the hash function has collision resistance, verifying whether H(a i , P ow , T ′ 1 to get (T ′ S , P ow ).′ S ).′ S the RM can obtain timestamp T s and T ′s by decoding P m and P m ′ , which are get by decrypting C i andC ′ 1 .Since the RM needs to check the validity of timestamps T s and T ′ s , it can resist replay attacks.

Table 1 .
Comparison of properties.

Table 2 .
Time cost of referring cryptographics.

Table 3 .
Comparison of computational overhead and communication overhead.