A Robust, Low-Cost and Secure Authentication Scheme for IoT Applications †

: The edge devices connected to the Internet of Things (IoT) infrastructures are increasingly susceptible to piracy. These pirated edge devices pose a serious threat to security, as an adversary can get access to the private network through these non-authentic devices. It is necessary to authenticate an edge device over an unsecured channel to safeguard the network from being inﬁltrated through these fake devices. The implementation of security features demands extensive computational power and a large hardware/software overhead, both of which are difﬁcult to satisfy because of inherent resource limitation in the IoT edge devices. This paper presents a low-cost authentication protocol for IoT edge devices that exploits power-up states of built-in SRAM for device ﬁngerprint generations. Unclonable ID generated from the on-chip SRAM could be unreliable, and to circumvent this issue, we propose a novel ID matching scheme that alleviates the need for enhancing the reliability of the IDs generated from on-chip SRAMs. Security and different attack analysis show that the probability of impersonating an edge device by an adversary is insigniﬁcant. The protocol is implemented using a commercial microcontroller, which requires a small code overhead. However, no modiﬁcation of device hardware is necessary.


Introduction
The recent growth in Internet of Things (IoT) infrastructure has created an enormous potential for semiconductor design and manufacturing primarily to improve performance and enhance security. Billions of low-cost devices are connected to the Internet to provide seamless integration of computing systems to the physical world. These devices are commonly known as "things" or edge devices (EDs). The number of these connected devices has grown significantly and will continue growing at an astonishing rate in the near future [1][2][3]. As these devices are deployed in large geographic areas with limited energy resources and reachability, the power requirement becomes a significant issue for proper operations, which ultimately limits the usage of standard cryptographic schemes for secure operations [4]. Moreover, the cost of these devices requires them to have a low die area, which restricts the use of costly cryptographic primitives in the design. As a result, a majority of the EDs do not use computation and resource-heavy cryptographic schemes. HP mentioned in a report that 70% of the tested IoT devices communicate without encryption [5].
The use of cryptographic primitives does not necessarily ensure the authenticity of an ED, as the majority of them are manufactured offshore with limited trust and lack of government or other appropriate oversight. Moreover, as these devices travel through many distributors located across the globe, it is very difficult to determine their origin and the complete route in the supply chain. Many untrustworthy third party suppliers and distributors can introduce compromised devices, which look

Motivation
A recent study suggests that the IoT nodes are severely resource-constrained and they are not well equipped with standard cryptographic protocols [4,5,19]. It is essential for a user to authenticate an ED with very high confidence, as it may be cloned or tampered, and may have a secret backdoor, which can be exploited by an adversary. Traditionally, digital signatures [20] are widely used for end-point authentication, which generally uses Rivest-Shamir-Adleman (RSA) [21] or elliptic-curve cryptography (ECC) [22] crypto primitives. Implementing these primitives in EDs is too expensive due to severe resource constraints. A typical ED consists of an 8MHz microcontroller (MCU), a small (e.g., 128KB) flash memory, and a small (e.g., 10KB) RAM [23]. Software implantation may be preferred in case of hardware limitations; however, these crypto primitives are usually intensive in computation that may not be affordable for EDs as well.
The authentication of integrated circuits (ICs) can be performed using the use of physically unclonable functions (PUFs), as they can generate unique and unclonable bits for creating a unique identifier (ID). Uncontrollable and unpredictable manufacturing process variations are utilized in PUFs to generate random and unclonable bits. Over the years, researchers proposed different PUF architectures and they are the arbiter PUF [24], ring oscillator (RO) PUF [25], SRAM PUF [26], and a few others [27][28][29]. Every authentication can be unique if a unique challenge-response pair (CRP) is used for every communication between the EDs and the gateway. To authenticate an IoT device over an unsecured channel using PUF as an ID generation unit, it is essential to have a strong PUF, with a very large number of CRPs. However, a large number of CRPs management and storage can be another intricate problem to manage for billions of connected devices. In addition, a strong PUF requires hardware modification for EDs, which might not be feasible. Instead, we can exploit built-in SRAM and use software support to generate the ID.
Typically EDs have on-chip SRAM that can be used to design a PUF, which would offer a cost-effective solution to produce an unclonable device ID. However, there are several challenges to using SRAM-PUF to create device IDs. The bits generated from an SRAM may be unstable and create different IDs for the same device. Error correction codes needs to be used to increase the reliability of the SRAM-PUF response. However, error correction codes usually consume larger memory space, which may not be available in these resource-constraint EDs. It is, thus, required to design a low-cost authentication scheme to uniquely identify EDs over an unsecured channel.

Contributions
We present a lightweight authentication protocol that verifies the authenticity of a resource constraint edge device. The communication protocol is low-cost, as it uses the resources available in an ED, such as a processor and an on-chip SRAM memory. In addition, we have further developed a robust repeated ID matching scheme to authenticate an ED, where the ID is created from an on-chip SRAM memory. Our scheme is superior over the simple ID matching scheme, as SRAM PUFs are often found to be unreliable. The contributions of our paper are as follows. We:

•
Developed a low-cost and secure communication protocol: We propose a novel lightweight communication protocol that utilizes existing hardware resources of an edge device. A secure hash function [30] is used in our proposed protocol and it is implemented using an embedded processor and on-chip memory of an ED [31,32]. It is necessary to make sure that the unencrypted device ID does not leave the system. We show that the protocol is at least as secure as a hash function. We provide the security proof of our protocol in Section 5.3. In addition, the heuristic security evaluation shows that our proposed protocol is resistant to various known attacks. • Proposed repeated authentication for device identity verification: We propose a novel repeated ID matching technique (see details in Section 4) to address the reliability issues arisen from an SRAM PUF. Our proposed solution does not require expensive helper data and algorithms for error correction, and thus can be lightweight. If a noisy SRAM PUF is used in the ED, an adversary might get lucky to pass the authentication once. However, it is highly unlikely that he/she will pass the authentication a second time and successfully register a fake device using random guesses unless the communication protocol described in Section 3.1 is broken. The unreliable bits from the SRAM PUFs can be identified in the proposed repeated ID matching scheme and will be excluded during the ID matching process. We demonstrate that it is highly unlikely for an adversary to impersonate an ED (see the details in Section 1). An adversary can pass the simple ID matching scheme by random trial (see Section 4.1) if the PUF responses are noisy. However, an adversary cannot impersonate an edge device two times with random guesses. Note that one can also implement an authentication scheme that verifies an ED more than two times to further increase the difficulty of impersonating an authentic device.

•
Implemented the proposed protocol in low-cost devices: We have implemented this proposed protocol using Raspberry Pi as a gateway and Arduino as the edge devices. The EDs go through a registration process (see Algorithm 1), where the device signature is generated from the power-up states of the on-chip SRAM. We implemented the proposed protocol without any hardware modifications. The IDs generated from the Arduino EDs show good uniqueness properties (see the Hamming distance's analysis in Section 6.4).
The rest of the paper is organized as follows. Section 2 briefly surveys the literature. Section 3 describes our proposed lightweight communication protocol to verify the identity of an ED. We present the ID matching scheme by repeated authentication in Section 4. The security evaluation is performed in Section 5. The implementation detail is described in Section 6. Finally, the paper is concluded in Section 7.

Prior Work
Over the years, researchers have proposed several PUF-based authentication protocols for resource constraint applications. Most of these protocols consists of a prover node, and a verifier. The prover is a node (e.g. sensors), which responds to the verifier's (e.g., routers) query to confirm that it is an authorized node in the IoT system. To perform a verification, a random challenge is sent to the prover by a verifier, and the prover acknowledges by sending a valid response in return. The authors in [33] combined a delay PUF-based authentication protocol with an HB-based protocol (named after the authors) [34] to remove security vulnerabilities of these individual protocols. Later in their work, they proposed a protocol that reduces power and area overhead by using 2-level noisy PUF instead of using area and power-intensive cryptographic modules, such as hash functions [35]. Katzenbeisser et al. proposed a logically re-configurable PUF [36], which can be used to reduce excessive area requirement [37]. The above protocols use a CRP only once in order to prevent the replay attack.
Management and storage of CRPs at the verifier's end are pressing issues when it comes to millions of devices connected to the Internet. An adversary, listening to the communication among prover and verifier nodes, can model a PUF mathematically and predict the responses. Rührmair et al. presented a modeling attack for several PUF models including arbiter PUFs and ring oscillator PUFs [38]. To eliminate these issues, the converse PUF-based authentication protocol has been proposed in [39], where the verifier is considered a resource-constrained device, and the prover is considered a resource-rich server. A hardware and software co-verification based lightweight IoT authentication scheme is presented in [40]. The authors applied the hash of firmware along with PUF response to detect software and hardware impersonation attacks. Chatterjee et al. proposed an authentication scheme that combines the concepts of PUF, identity-based encryption (IBE), and keyed hash function to eliminate the need for explicitly storing CRPs [41]. Braeken et al. [42] proved that this protocol is vulnerable to the man-in-the-middle (MITM) attack, impersonation, and replay attacks [43].
A preshared key based host identity protocol is proposed in [44] to authenticate an IoT edge node. The primary shortcoming of the method is that adversary might gain access to the network if the shared key gets compromised. Kothmayr et al. proposed a two-way authentication protocol, entitled datagram transport layer security (DTLS) based on the X.509 certificate [45]. Porambage et al. proposed an implicit certificate-based two-phase authentication protocol [46]. Since the certificates are more lightweight than the protocol proposed in [45], distributed IoT applications are supported by this protocol. This implicit certificate-based protocol is suitable for highly resource-constrained devices. However, the protocol is vulnerable to replay attack, DoS attack, and man-in-the-middle (MITM) attack [47]. To mitigate these vulnerabilities, Turkanović et al. presented a four-step authentication model, which is suitable for the scenario where a remote user negotiates a session key with a sensor node without connecting to the gateway [48]. Challa et al. proposed a signature-based user authenticated key agreement scheme using Elgamal and ECC-based signature for IoT device authentication [47]. Although this protocol is advantageous in comparison to [46,48], it is computationally intensive. Hash function-based and chaos-based privacy-preserving schemes for IoT in a smart home system have been proposed in [49]. The authors used symmetric cryptosystem (e.g., Message Authentication Code or MAC) for both schemes. The heuristic suggests that the protocols are secure. Formal security analysis and verification would strengthen the contribution of the proposed method. Wazid et al. proposed three-factor-smart card, password, and personal biometrics-remote user authentication for a hierarchical IoT network called the user authenticated key management protocol [50].
The majority of these protocols use a strong-PUF that requires hardware modification which ultimately imposes a strain on the resource limitation of EDs. Mass production and remote deployment are among the primary features of IoT devices. Adding extra hardware could be very expensive in terms of run-time power consumption and production cost. Therefore, a better approach would be to utilize existing hardware to implement security features that would be secure but lightweight.

Proposed Authentication Scheme
One of the major constraints in implementing standard authentication protocol is limited resources available in an ED. It is essential for an ED to have a low die area, smaller memory, and lower power consumption which, in effect, limit the performance. These constraints ultimately prohibit EDs from using standard secure protocols such as TLS and IPsec [4]. Less stress was given on security during the development of IoT edge devices considering that the generated or transmitted data would have little value to the attackers. It has been proven otherwise because this seemingly trivial information can be exploited to break into complex systems [51,52]. Authentication of an ED in an IoT network could help avoid the potential threat posed by counterfeit or cloned devices. In this section, we propose an authentication technique for an ED by correctly identifying its origin. To prevent various run attacks, the device needs to encrypt its data. However, advanced encryption methods are only feasible for gateways, since they have higher resources. Our proposed scheme does not address authentication of the gateways and treats them as authentic. Figure 2 shows our proposed authentication approach. A true random number generator (TRNG) is necessary for the gateway device for random nonce (n) generation. We propose to use a cryptographically secure pseudo-random number generator (CSPRNG) such as [53] or [54] considering area efficiency in its implementation. A one-time-pad (OTP) [55,56] is employed to encrypt the key with n. Note that OTP is area efficient, as it only requires a simple XOR array. To authenticate the l th ED in the network, we employed a pair of keys, {K l , ID l }. K l is stored in an on-chip memory of an ED, and it is shared with the gateway. ID l is a unique device signature that can be generated from an SRAM PUF (see Section 4 for details). The proposed communication protocol for authenticating an ED is described in the following steps:
The gateway receives the secret device key-ID pair {K l ,ID l } from the trusted system integrator (SI) using an existing secure communication protocol (e.g., TLS [58]). Here, SI is an entity that produced ED. During production, every device needs to be registered in a secure database with a public ID, and a key-ID pair, Here, N is the length of the ID l and K l . Depending on the level of security one requires, N could vary. We analyzed the protocol for both N = 128 and N = 256, and implementation is only demonstrated for a 256 bit ID. The public ID is needed to locate the ED in the database. A tamper-proof memory in a gateway can also be used to store this data rather than transferring them from another database. However, since the gateway is always connected to the Internet, standard security measures can be implemented, as it typically does not have any resource limitations. However, it is recommended to receive the key-ID pair from the trusted integrator rather than store it into the gateway itself.

2.
The gateway stores {K l , ID l } in its on-chip (volatile or non-volatile) memory, but no information can be extracted through the input and output of the gateway. This will prevent an adversary from getting access to the {K l , ID l }, which was generated during the registration phase of the ED.

3.
An on-chip CSPRNG generates a unique nonce (n i ), which is stored in the memory of the gateway. This n i will be used later for decrypting the secret device ID. A one-time pad (OTP) now encrypts the key (K l ) with this random nonce. The gateway then sends this encrypted key (depicted as (m i ) in the figure) to the l th ED, ED l , to request for its identification.

4.
The nonce (n i ) is retrieved at the ED by XORing the m i with the shared secret key (K l ). A secure hash (e.g., SHA-2 or SHA-3 [30]) is computed on this nonce (n i ) to produce a 256/512 bit hash output (H i ). Existing hardware resources such as embedded processor and memory [31,32] of the EDs are sufficient to compute this hash. 5.
The device ID (ID l ) is created from the on-chip SRAM (extensive desription and analysis of SRAM PUF can be found in [59][60][61][62][63]) of the ED. Now, the ED encrypts ID l using N bits of computed H. The encrypted ID {r i } is sent to the gateway for authentication. 6.
The gateway computes the same hash (SHA-2 or SHA-3) using the n i after receiving r i . By this, the secret device ID is reconstructed in the gateway.
7. This reconstructed ID is then verified with the stored ID (see Section 4 for details). Steps 3-6 are repeated for the second stage of the authentication to increase the confidence of an authentic ED.

Security Proof
A protocol preserves the secrecy if an adversary cannot determine secret data, e.g., key, with absolute certainty just by interacting with the protocol. Therefore, the protocol analysis primarily tries to determine a protocol trace that would compromise the secrecy of the system [64]. In this section, we will provide detailed proof for our proposed protocol.
The proposed protocol employs a symmetric key encryption system. First, the gateway sends a nonce encrypted using a shared key to an ED, K. Then, the ED uses the same shared key to recover the nonce to transfer the ID to the gateway for authentication. Key freshness is ensured, since the nonce is transformed through a secure hash function before it is used again to encrypt the ID.
Let us assume that a probabilistic polynomial time adversary adv performs an authentication experiment Auth adv,π (n, H adv , m i , r i , r j ) and tries to find a difference between a random data and private information; e.g., key K of the protocol π. The adversary adv has the following information: 1.
The hash function H adv with the security parameter N, which is the length of shared key K.

2.
He/she can eavesdrop and collect message contents m i , r i , and r j .
To prove that the protocol is secured, we need to show that the probability of success in the Auth adv,π experiment is negligible. In other words, there exists a function negl(.) for every probabilistic polynomial time adversary such that: Definition 1. For a secure hash function H, it is computationally infeasible to calculate the two input messages . This property of hash function is commonly denoted as collision resistance [65].

Definition 2.
Given an N-bit output of a secure hash function H is z, it is computationally infeasible to calculate the input message x such that H(x) = z. This property of hash function is commonly denoted as preimage resistance [65].
The protocol π is secured from a polynomial time adversary such that it is not feasible to disintegrate H(a i ) ⊕ H(a j ) into H(a i ) and H(a j ). Here, a i,j is any variable of length N and a i = a j .
First, a zero string of length N is injected instead of n i ⊕ K to an authentic ED. Therefore, ED receives m i = [00...00] and calculates n i = m i ⊕ K = K. Then, the ED computes r i = H(K) ⊕ ID and sends r i to the adversary. Second, all one string of length N is passed to the same ED. Similar to the first attempt, ED receives m i = [11...11] and calculates n i = m i ⊕ K = K. Then, the ED computes r i = H(K) ⊕ ID and sends r i to the adversary. From these two transactions, the adversary can construct H(K) ⊕ H(K) which is a more specific case for any replay attack (See Equation (13)).
Considering more general case, adv can retrieve H(a i ) and H(a j ) if and only if H(a i ) ⊕ H(a j ) = 0; that is, H(a i ) = H(a j ). This is not computationally feasible because of the collision property (see Definition 1) of a secure hash function. Therefore, the protocol π is secured from a polynomial time adversary because it is not feasible to disintegrate H(a) ⊕ H(a) into H(a) and H(a). Now, we consider a more pessimistic case where the adversary identifies H(K) (and therefore violates the Theorem 1), yet we show that the protocol is secured by proving the following theorem.

Theorem 2.
If the preimage resistance definition holds, the proposed authentication protocol π is secured against an eavesdropping adversary.
Proof. Let us assume that a polynomial time adversary runs an algorithm A that can compute the inverse hash with a probability negl(N). The adversary constructs an efficient algorithm A using the algorithm A as a subroutine (see Figure 3). The new algorithm is entitled "reduction," and it attempts to solve preimage identification problem. This leads to an adversary; compute n i as follows: Here, A computes a shared key K using H(K). All future authentications can be impersonated using the Equation (7. Even though the protocol chooses a different nonce (n j = n i ) during future authentications, it can be retrieved using shared Key K. Revealing K particularly poses a major threat because any future authentication for that particular ED can be passed. This implies a direct contradiction to the preimage resistance property of a secure hash (see Definition 2) because the algorithm A needs to find K from its hashed value to execute this attack. The protocol π is secured if the preimage resistance property holds. From the above theorems, we conclude that the probability of success for Auth adv,π (n, H adv , m i , r i , r j ) is negligible.

Device Authentication by ID Matching
Authentication of an ED would be challenging if we consider applying SRAM PUF response as a device signature without any error correction codes. SRAM PUF outputs may vary because of temperature variation, aging degradation, and fluctuations in the supply voltage. Therefore, responses from a PUF could vary significantly if those are taken at different environmental conditions. How can we use a PUF to verify the identity of a device, if a PUF produces an unreliable ID? Response collected from a PUF during the registration phase and the response collected during authentication will necessarily match bit-by-bit. To identify a device, however, it is not imperative to match every bit of the stored and new responses. A decision can be reached if the majority of bits (above some predetermined threshold) match among these responses. If the PUF responses are too noisy, an adversary can get lucky to authenticate an illegitimate device. This vulnerability can be addressed by capturing multiple responses from the PUF in a very short duration under similar environmental conditions and perform authentication for once more. To utilize this idea we developed a repeated authentication scheme, where the gateway interrogates an ED more than once in a short duration (see details in Section 4.2). Note that this repeated authentication does not extract more stable bits to identify a device, rather than preventing an adversary to become successful in impersonating an authentic one by random guesses. We show that the probability of impersonating an authentic device twice is negligible.

Simple ID Matching
The uncertainty in the PUF output is mitigated in the proposed method primarily because the ID matching does not consider the bit-by-bit matching of the IDs during authentication. We propose to apply Hamming distance (HD) to calculate the similarity between stored ID S and received ID R . Note that, Hamming distance indicates how many bits are different between two binary numbers.
The authentication can be performed as follows: HD(ID S , ID R ) → ≤ HD T , The device is authentic > HD T , The device is counterfeit where HD T is the threshold that should be determined once the PUF is characterized. For instance, initially, we can set a threshold of 10 which would mean that as long as stored ID S and received ID R are mismatched at most 10 bit, the authentication will pass. At this point, we determine the probability of impersonating an authentic ED by an adversary. Let us assume that the size of the stored ID (PUF response) is of N-bits and HD T is of k-bits. Now, the probability of finding one vector with exactly (N − k)-bit match or k-bit mismatch is as follows: Thus, the probability of finding a vector with at most k-bit mismatch to pass the ID matching test becomes: From Equation (8, we conclude (see Table 1 for details) that the attacker has a low probability of authenticating an illegitimate device. Table 1. Probability of matching an ID. Although the success probability for adversaries passing authentication is indeed insignificant, this is not sufficient to prevent guessing an ID by random trials when there are many unreliable bits in an ID. This is not unlikely if an ED uses an SRAM PUF without any error correction code. Hence, it is essential to further improve the simple matching scheme.

Repeated ID Matching
It is not likely that an attacker will authenticate a fake device a second time consecutively, unless the communication protocol described in Section 3.1 is broken. This section describes a repeated ID matching scheme, where an ED is certified as authentic if it passes two consecutive ID verification tests. In addition, we can extract more stable bits from the PUF response during the second ID matching by discarding unreliable bits. Unreliable bits can be defined as the bits which flip during the first ID matching, are and computed using the following equation: where ID R and ID S are the received and stored PUF responses, respectively.
The repeated authentication scheme is described in the following steps: 1.
The gateway requests l th edge device (ED l ) for its device ID by sending n 1 ⊕ K l . The ED returns encrypted ID R (H(n 1 ) ⊕ ID R ). The gateway first decrypts the ID (see Equation (4), and then computes the mismatch locations of the received ID (ID R [i] = ID S [i]). A robust ID RID is created by discarding mismatch bits. Additionally, the gateway keeps track of the mismatch locations.
2. The gateway again requests ED l for its ID by sending n 2 ⊕ K l , (n 1 = n 2 ). Similar to the first authentication, ED l then returns the encrypted ID R , (H(n 2 ) ⊕ ID R ). This is decrypted in the gateway side using the Equation (4). Then, the gateway computes the new robust ID (RID * ) by using Equation (9). 3.
The two robust IDs are compared by using Hamming distance, which is described below: The device is counterfeit Note that PUF produces a similar response for similar conditions; therefore, HD † T is much less than HD T . It is important to keep in mind that depending on the expected security of the system one can implement an authentication scheme that uses more than two repeated IDs from the same device. Now, let us calculate the probability of authenticating a device twice by an adversary. We assume that the size of the stored ID is of N-bits, HD T is of k-bits, and HD † T is of r-bits (r < k). The probability of passing two repeated authentication becomes: It is clear from the Equation (10) that the probability of successful authentication is significantly reduced if repeated authentications are performed. Successive failed authentication can also be prevented simply by implementing a counter in the gateway to keep track of the failed attempts. If the count crosses some threshold, that can raise a flag.

Security Analysis
We provide a detailed security analysis in this section by showing the attack success probabilities and show that the proposed protocol is robust against known attacks, such as denial of service, the replay attack, and different physical attacks.

Probability Analysis for Proper ID Matching
For a fixed ID length, Hamming distance plays an important role that could reduce the chance of impersonating a device. A smaller Hamming distance makes it harder for an attacker to guess an ID by random trials. However, the reliability of a PUF determines the Hamming distance in this case. Simple ID matching should be enough for a reliable PUF to prevent cloning. However, repeated ID matching can provide the solution for even a very unreliable PUF. Table 1 lists the probabilities of matching IDs for both a simple ID matching scheme (see Section 4.1) and the proposed repeated ID matching scheme (see Section 4.2). The analysis here considered 128-bit and 256-bit device IDs. The Hamming distances (HD T s) chosen for the analysis are 1, 2, 4, 8, 16, 32, and 64. The PUFs are considered very reliable when HD T values are 1, 2, and 4. On the other hand, we also consider very noisy PUFs where 32 or 64 bits may be flipped during authentication. As expected, the probabilities of ID matching increase with an increase of HD T . This is intuitive, as an adversary has a lesser required effort for matching an ID. For a reliable PUF, an attacker has a significantly low probability of matching an authentic ID. For example, the probability of finding a match becomes 4.5 × 10 −27 and 3.7 × 10 −63 considering an HD T of 8, when the IDs are 128 bit and 256 bit respectively. However, the probability increases significantly to 5.4 × 10 −1 and 2.5 × 10 −16 considering HD T of 64 for an ID of 128 and 256 bits, respectively.
For the repeated ID matching scheme, the Hamming distances (HD † T s) chosen for the second stage of the authentication process were of 1, 2, 4, 8, and 16 bits. As before, the probability of ID matching is higher with an increase of HD † T s. However, it is much less when we compare it to the simple ID matching scheme. We now have a significant improvement of not finding an ID, as the probability has decreased significantly. For example, the probability of finding an ID is 1.9 × 10 −18 for a PUF that is heavily impacted by aging (64 out of 128 bits are unstable) assuming stable bits remain stable (HD † T is of 1). For a 128 bit ID, we also have a very low probability of 1.5 × 10 −10 and 2.1 × 10 −5 with HD † T of 8 and 16 bits, respectively. For a 256 bit ID, it is fairly impossible for an adversary to pass the repeated ID matching scheme even though PUF responses are unreliable.

Denial of Service (DoS) Attack
When an adversary intentionally stages a failed authentication for a genuine ED so that it cannot be in service, it is known as denial of service attack. For example, a security camera can be disabled by making it fail to register itself to the server. For the protocol presented in this paper, an attacker can eavesdrop the communication between ED and gateway G. Every authentication starts with a nonce n i generation in the G, and then n i is sent l th ED as m i = K l ⊕ n i . In response, the ED returns r i = H(n i ) ⊕ ID l to the G. At this point, an attacker can intercept r i and feed a modified version as r * i . This would certainly fail the authentication as G will fail to reconstruct the ID l . To prevent this attack, the proposed protocol needs the following modification:

First Authentication
• G generates a random nonce n i , and sends it as m i = K l ⊕ n i to ED l . • ED l returns r i = H(n i ) ⊕ ID l to the gateway as response. Attacker eavesdrops and replaces r i with r * i ( = r i ).
as the ID of ED l by computing ID l , the authentication fails.

Second Authentication
• G generates a random number n j ( = n i ) and sends m j = K l ⊕ n j to ED l . • ED l returns r j = H(n j ) ⊕ ID l back to the gateway. Similarly to the first authentication phase, an attacker may eavesdrop and send r * j ( = r j ) to the gateway.

•
Gateway retrieves ID (2) l = ID l as the ID of the ED is ID l and authentication fails.
• Finally, gateway verifies the ID (1) l and ID (2) l to determine whether an attack has been launched.
According to the Table 1, the probability of matching these two IDs is very low.

Replay Attack
An attacker attempts to authenticate an ED by impersonating the ID using prior communications. We assume that an attacker does not have access to the secret key (K l ), which is stored in the ED l . Let us assume that the attacker observes two prior communications. First, he/she observes n 1 ⊕ K l from the gateway and H n 1 ⊕ ID l from ED l . From this observation the attacker can compute K l ⊕ ID l ⊕ n 1 ⊕ H n 1 , which is shown below: From the second communication, the attacker observes n 2 ( = n 1 ) ⊕ K l from the gateway and H n 2 ⊕ ID l from ED l , and can compute K l ⊕ ID l ⊕ n 2 ⊕ H n 2 . Now the attacker can perform the following operations: (n 1 ⊕ K l ) ⊕ (n 2 ⊕ K l ) = n 1 ⊕ n 2 (12) (H n 1 ⊕ ID l ) ⊕ (H n 2 ⊕ ID l ) = H n 1 ⊕ H n 2 From Equation (13), it is obvious that an adversary successfully replays a prior communication if it becomes zero, when H n 1 = H n 2 . This would certainly contradict the collision property of a secure hash [30]. Thus, the communication protocol becomes is resistant to replay attack, when it has been implemented with a secure hash function (SHA-2 or SHA-3).

Physical Attacks
We need to use a tamper-proof memory to store the secret key K l in the ED. As discussed previously K l is shared between the gateway and ED, and so a breach in this information will break the security of the protocol. Reverse engineering and physical attack can be a way to steal this secret information. Nowadays, sophisticated optical microscopes can capture high-resolution 3D images of a microchip. Scanning electron microscopes and transmission electron microscopes can produce images of different inner layers of a microchip. Chipworks (now TechInsights) have performed such experiments legitimately for competitive analysis and patent research. The physical layout of a chip can be constructed from a legitimate chip through destructive physical attacks as well. Infrared backside imaging can reveal stored data in an NVM. All these physical attacks can be used to reveal secret information. Since our proposed protocol uses PUF for ID generation, this ID will be different for different EDs. Performing a physical attack will expose the unique key K l , and thus the PUF generated ID of ED l only and not any other devices. From the financial point of view, this does not provide a strong motivation for an adversary to launch physical attacks.

Implementation Details
In this section, we show that the proposed protocol can be efficiently implemented with low code overhead using commercial resource-constrained devices. Arduino Mega [66] and Raspberry Pi-3 model B (RPi) [67] have been used as the ED and gateway, respectively. Note that Arduino Mega is equipped with an ATMEGA2560 microcontroller [68] that contains 8KB SRAM and 256KB flash storage. We exploit the uninitialized power-up states of this SRAM to generate device signature (i.e., ID). Figure 4 shows the implementation setup. The proposed protocol is implemented into two phases, enrollment phase and authentication phase, which are described in the following.

Enrollment Phase
The objective of the enrollment phase is to read the unclonable device ID of an ED and store it in a secure database for future authentication. The uninitialized memory space between the stack pointer (SP) and the heap pointer (HP) is extracted to generate device ID. Figure 5 illustrates the memory space for a typical microcontroller. Note that the memory space between HP and SP shrinks or expands depending on the workload of a particular firmware. However, we can capture initial SP during the program start-up and keep track of the changes to get the SRAM data from the preset address range every time the ID is constructed. We present ID extraction and setup in Algorithm 1. The ID extraction flow and all data processing in the enrollment phase are written in Python, whereas the firmware for the ID extraction is written in C. All the operations involved in this implementation use 256-bit data. Algorithm 1 lists the steps to extract the signature of a device and is described as follows:

1.
A host computer starts executing Algorithm 1. fullRAMSpace firmware is loaded in the microcontroller, and it reads the available uninitialized memory between HP and SP. The uninitialized memory of the SRAM is shifted out through the serial port and captured on the host computer. These data are stored in a variable M (Line 1). Note that fullRAMSpace firmware contains only subroutines that extract SRAM data and communicates with the host computer.

2.
Authentication subroutine and user application subroutines, data acquisition, monitoring, etc., are combined in usableIDSpace firmware and loaded into the microcontroller. Here, e must be at least as large as the number of possible unstable bits in the address range selected for ID generation. Memory space for ID generation has been selected approximately in the middle of the matched string so that the processor does not read initialized values from the stack and static data segment during ID extraction. This is important because, during the execution of the user program, HP and SP grow toward each other and may interfere with the ID generation space. IDStart parameter changes depending on the relative position of HP and SP for each device. Line 4 calculates the starting index of the ID as L+H 2×8 . Here, 8 in the denominator indicates the bit width of the memory. Address range for ID generation will be M[IDStart] to M[IDStart + (e − 1)].

4.
Once the range M[IDStart] to M[IDStart + (e − 1)] is known with an initial value of e, unstableCellLocation() function is loaded in the ED, and unstable bits are identified with hardware support (e.g. power-up circuitry). unstableCellLocation() function returns the location of unstable bits and stable bits of the ID (Line 5-7). These unstable bit locations are stored in the MCU as an array usCells (Line 8). For this experiment, we selected e = 10 which initially assumes 76.2% stable uninitialized bits of the SRAM [69]. This parameter will vary based on the implementation platform, which can be selected with a few trials of power-ups or data reminiscence approach.

5.
The ID is extracted discarding the unstable bits in Lines 10-12. Then, usCell, IDStart, e, and shared key K are loaded into the MCU. Finally, the device ID is stored in the database for future authentication.
The approach described above makes each ED unique because of the inherent randomness in the power-up state of SRAM, inter-device variability of IDStart, and usCell array.

Authentication Phase
Authentication phase executes the protocol (Figure 2) in the gateway and edge devices connected to it.

1.
In this phase, gateway G starts authentication by sending a token to the ED. Since the token is specific (and public) to an ED, only a particular ED will respond to the authentication request from the G. Along with the token G also sends a nonce n i encrypted with shared key K.

2.
At ED, n i is retrieved and converted into a hash using the SHA-2 algorithm. Then, ED runs the ID extraction subroutine that constructs a 256-bit stable ID from SRAM using address range preset during the enrollment phase. ID and SH A − 2(n i ) strings are processed to get XOR'ed value r i . 3.
The encrypted ID retrieved from ED (r i ) is decrypted in the G as ID = SH A − 2(n i )) ⊕ r i and compared with a stored ID. A successful first authentication would trigger another authentication attempt as described in 4.2.

Overhead Analysis
As it is important to have low area and timing overhead in an IoT device, we present analysis in this subsection. The overall code overhead due to the authentication function is 3.65%. The overhead primarily comes from the hash algorithm and string processing. The hardware overhead is only from the memory requirement for storing the symmetric key (K), which is 256-bit in this implementation. Note that no additional hardware is needed to implement the PUF. Considering the importance of security in the IoT infrastructure, this overhead is quite insignificant. Note that no hardware modifications are necessary for EDs, which makes our solution feasible for adopting various low-cost applications. Note that the timing overhead will not throttle the performance of the IoT devices, as the proposed protocol is only used for authentication of an ED after the power-up of a device or at a large regular time interval. The implementation presented in the paper uses approximately a million cycles in ATMEGA2560 running at 16MHz for each authentication, which is practically within a few tens of milliseconds and can be ignored.

Reliability Analysis
Since ID generation would require randomness in the power-up states of SRAMs among different devices, we need to analyze the reliability of our proposed ID generation scheme. We analyzed the power-up states of built-in SRAM to show the probability of the authentication of a random device as genuine is rather negligible. The uniqueness and randomness of an SRAM-PUF are assured by the normal distribution of fractional inter-class Hamming distance (HD) [69] with a mean at 40.2%. We choose the minimum value of HD (HD min ) to calculate the collision probability of IDs between two different devices. For normal distribution, confidence interval (CI) for mean µ is of the form l ≤ µ ≤ u, where u and l are upper and lower confidence limits respectively. The limits are calculated asx ± z α/2 × σ √ s , where 1 − α is the confidence coefficient of a standard normal distribution [70]. Considering lowest limit of the mean µ, the probability of matching two IDs becomes 2 N * (1−l) −1 2 N −1 . For example, Figure 6 shows the distribution of HD min with sample meanx = 0.3436 and standard deviation σ = 0.024 with s = 500 samples. We can estimate that 99% CI is 0.3409 ≤ µ ≤ 0.3464 for 256-bit ID, and the probability of generating two devices with a same ID is 2 256(1−0.3464) −1 2 256 −1 ≈ 6.46 × 10 −27 , which is insignificant.

Conclusions
In this paper, a novel, low-cost authentication protocol has been proposed. Production cost reduction without sacrificing security for IoT applications is an extremely difficult task. In addition, a standard cryptographic scheme's implementation in ED is prohibitively expensive because of the limited resources (e.g., energy) available during operation. We presented a low-cost protocol that uses a secure hash function to authenticate an edge device in an IoT network. The protocol is designed to utilize already available on-chip resources, which fits it in the domain of low-cost applications, such as IoT. We exploited built-in SRAM to generate unclonable "digital fingerprint" of an IoT edge device and used firmware to extract the fingerprint. Aging degradation and temperature variation make it challenging to implement reliable SRAM-PUF. Our proposed repeated ID matching scheme that utilizes Hamming distance eliminates this inherent PUF unreliability. Thorough security analysis shows that the probability of ID impersonation by an attacker is extremely low. The protocol is implemented in a commercial microcontroller, and the overhead of implementation is only a small part of the memory for the firmware.
Author Contributions: Conceptualization, methodology, writing-original draft preparation, writing-review and editing, J.M. and U.G.; supervision, project administration, funding acquisition, U.G. All authors have read and agreed to the published version of the manuscript.
Funding: This work was supported in part by the National Science Foundation under grant number CNS-1755733 and Intramural Grants Program (IGP) from Auburn University. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The manuscript uses the following abbreviations: