• Aucun résultat trouvé

Lightweight Authentication

Dans le document Security and privacy in RFID systems (Page 67-72)

3.3 RFID Authentication Protocols

3.3.1 Lightweight Authentication

Lightweight primitives require RFID tags to only compute bit-wise operations such as “⊕”,

“∨” and “∧”, and to store relatively short keying material, which suit perfectly the constrained computational resources of RFID tags. As a result, the design of secure lightweight primitives was the focus of a lot of work on secure and privacy preserving RFID authentication, cf.

(18,29,66,91,130,131,157). However, most of these protocols were shown to be vulnerable to key recovery attacks see, (14,64,108,109,128).

In this section, we first survey the HB+ protocol (91) and some of its variants (29, 66).

Then, we describe the Ff protocol (18) which we were able to break using an attack of 239 steps.

3. RFID SECURITY AND PRIVACY

Among the well-investigated lightweight RFID authentication protocols there are the HB protocols (HB+(91), HB++(29) , HB#(66)), whose security and privacy rely on thelearning parity with noise (LPN for short) problem.

Definition 3.8. Let U be a random q×k binary matrix, let xbe a random k-bit vector, let η∈ ]0,1

2[be a constant noise parameter, and letν be a random q-bit vector whose hamming weight hamm(ν)≤ηq.

The learning parity with noise (LPN) problem is defined as:

Given U, η, and z=Ux⊕ν, find ak-bit vector x such that: hamm(Ux⊕z)≤ηq.

The LPN problem is known to be NP-complete (13). The best known algorithms to solve the LPN problem have a complexity of 2O(log(k)k ). The first algorithm to reach this complexity was proposed by Blum et al. (20), further optimizations were introduced later by Levieil and Fouque (107), but they only led to slight improvements to the above complexity of solving the LPN problem.

The first protocol in the HB family is HB+ (91), see Fig. 3.2. This protocol is a mod-ification of the HB protocol (80) which is a protocol that addresses the problem of secure identification by humans without the assistance of trusted hardware or software. A tagT in the HB+ protocol shares a secret keyKT = (x,y)∈ {0,1}k× {0,1}k with readerR. In each round of the protocol execution, tagT generates a randomk-bit vectorb∈ {0,1}k and sends bto readerR. ReaderR then sends a challenge vectora∈ {0,1}k to tagT. TagT generates a bit ν according to the Bernoulli distributionBerη, where η ∈]0,1

2[, and computes a reply z = (a·x)⊕(b·y)⊕ν, where “·” denotes the inner product. Reader R accepts T’s reply, only ifz= (a·x)⊕(b·y), i.e.,ν = 0. Finally, reader R authenticates tag T afterq rounds only if T’s reply was rejected in less than ηq rounds (i.e., ν= 1 in less thanηq rounds).

Assuming the hardness of the LPN problem, the HB+ protocol is provably secure against passive adversaries (i.e., “eavesdroppers”). Additionally, Katz et al. (98) proved that HB+ remains secure under concurrent executions, meaning that the HB+can be parallelized to run in fewer rounds. However, Gilbert et al. (64) showed a man in the middle attack that allows an

44

3.3 RFID Authentication Protocols Tag

KT = (K, K) N0

Reader

R0, v1, v2, ..., vq

Figure 3.3: TheFf protocol

active adversaryAto recover the secretKT = (x,y). To thwart this attack, several protocols based on HB+ have been proposed such as: HB++ (29) and HB-MP (119). Nonetheless, Gilbert et al. (65) showed again that these variants are not secure against man in the middle attacks. Furthermore, HB protocols are not complete. For 80-bit security, the probability of the reader rejecting a legitimate tag attains 44% as shown in (66). Consequently, Gilbert et al. (66) proposed a new variant called HB#that aims to have a lower rate of false negatives and to withstand active attacks. The main idea of HB# is to use kx×p and ky×p-binary matrices X and Y as the tag ’s secrets instead of k-bit binary vectors. The HB# protocol proceeds similarly to HB+, except that the tag is required to send a p-bit message at the end of each round instead of one bit. Now, to optimize storage requirements on tags, Gilbert et al. (66) use Toeplitz matrices that can be entirely defined by the first row and the first column, and it follows that a k×p matrix can be stored in k+p−1 bits rather than in kp bits. However, Ouafi et al. (128) designed a man in the middle attack against HB# that enables an adversary Ato recover the secret matrices (X,Y).

3.3.1.2 The Ff Protocol

Inspired by the work of Di Pietro and Molva (48), Blass et al. (18) proposedFf, a lightweight protocol for RFID tag authentication whose implementation fits in less than 2000 G.E. The main idea behind Ff is instead of relying on a secure hash function to authenticate tags, Ff uses a lightweight function calledFf whose output size is very small. The small output size of theFf function results in a large number of collisions (i.e., for different keys,Ff outputs the same value) which is mitigated by executing theFf protocol in q rounds (typicallyq = 60).

In each round, the Ff function is computed, and its output is used by reader R to filter the secret keys that do not match. In theqthround, only one secret key is left, and it corresponds to the authenticated tag.

Before detailing the Ff protocol, we describe first the Ff function. The Ff function is built upon a small fan-in function f :{0,1}l× {0,1}l→ {0,1}l, and it is defined as:

Ff :{0,1}lt× {0,1}lt→ {0,1}l, Ff(x, y) = Mt

i=1

f(x[i], y[i])

Wherex[i]respectively y[i] denote the ith l-bit block ofx, respectively y.

3. RFID SECURITY AND PRIVACY

Now, we turn to the detailed description of the Ff protocol. Each tag T in the system stores a secret keyKT = (K, K) that it shares with readerR. An execution of the protocol is as follows:

• Reader R sends a nonceN0 ∈ {0,1}lt to tagT;

• tagT replies with a random number R0 and the followingq values vi: v1 = Ff(K, Ra11)⊕Ff(K, N1)

v2 = Ff(K, Ra22)⊕Ff(K, N2)

vq = Ff(K, Raqq)⊕Ff(K, Nq).

We recall that in theFf protocol, each tag is equipped with two LFSRs. One LFSR computes q random numberNi from the nonceN0 sent by reader R, and the other generates a random number R0 and q sets of d random numbers {R1i, R2i, ..., Rdi}, as shown in the following equations.

Ni = LFSR(Ni−1) 1≤i≤q R11 = LFSR(R0)

R1i = LFSR(Rdi−1) 2≤i≤q

Rji = LFSR(Rj−1i ) 1≤i≤q, 2≤j≤d

To compute the ith value vi sent to the reader, tag T first secretly selects a number ai ∈ {1,2, ..., d}, then outputs:

vi =Ff(K, Raii)⊕Ff(K, Ni)

After receiving the response of tag T, readerR first derives the q random numbersNi, then the q sets of thed random numbers{R1i, R2i, ..., Rid}. Next, for each vi, the reader discards from its database every pair of keys (Kj, Kj) that verifies the following:

∀ a∈ {1,2, ..., d}, Ff(Kj, Rai)⊕Ff(Kj, Ni)6=vi

Contrary to the HB protocols, the Ff protocol is complete, i.e., a valid tag is never rejected. Also, if the function f is balanced, the parameters d, l and q can be chosen in such a way that minimizes the probability of breaking the soundness ofFf, see (18) for more details.

To implement Ff, Blass et al. (18) proposed a practical set of parameters as depicted in 46

3.3 RFID Authentication Protocols

Table 3.1: Values of Ff’s parameters

lt l t

256 4 64

d q

8 60

Table 3.1, and defined the functionf :{0,1}4 × {0,1}4 → {0,1}4, f(x, y) =z such that:

z1 = x4y1⊕x1y2⊕x2y3⊕x3y4⊕x1x2y1y2⊕x2x3y2y3⊕x3x4y3y4 z2 = x1y1⊕x2y2⊕x3y3⊕x4y4⊕x1x3y1y3⊕x2x4y2y4⊕x1x4y1y4 z3 = x3y1⊕x4y2⊕x1y3⊕x2y4⊕x1x2y1y4⊕x2x3y2y4⊕x3x4y1y3 z4 = x2y1⊕x3y2⊕x4y3⊕x1y4⊕x1x3y3y4⊕x2x4y2y3⊕x1x4y1y2

Where (x1, x2, x3, x4), (y1, y2, y3, y4) and (z1, z2, z3, z4) stand for the binary representation of x, y and z respectively.

However, we showed in (14) two attacks that allow an adversary A to recover the secret key KT = (K, K) in 252 and 239 steps respectively. The first attack relies on the properties of thef function and transforms the problem of extracting KT into the LPN problem. The second attack exploits the relatively short length (64 bits) of the LFSR’s internal state. In the following, we only describe the second attack as it has better performances, and it does not depend on the properties of the f function.

The starting point of this attack is to find two protocol executions that involve the same tag T and which use the same random seed R0. As the LFSR used to generate R0 has an internal state of 64 bits, a tag uses the same seed R0 after 232 protocol executions.

First, adversary A picks two nonces N(0,1) and N(0,2), and challenges tag T with each of these nonces for 232 times. Eventually, adversary A will find at least two protocol ex-ecutions involving nonce N(0,1) and nonce N(0,2) respectively that use the same seed R0. Therefore, adversary A is able to collect values v(i,1) = Ff(K, Rai(i,1))⊕Ff(K, N(i,1)) and v(i,2) =Ff(K, Ria(i,2))⊕Ff(K, N(i,2)) for 1 ≤i≤q. Now, if Ff(K, Ria(i,1)) =Ff(K, Ria(i,2)), then adversary Aobtains the following equation:

v(i,1)⊕v(i,2)=Ff(K, N(i,1))⊕Ff(K, N(i,2))

• Letπj denote the projection from{0,1}l to {0,1} that sends any element of {0,1}l to its jth bits, i.e., for all x= (x1, x2, ..., xl) ∈ {0,1}l πj(x) =xj.

• LetE(i,j) denote the event that πj(v(i,1)⊕v(i,2)) =πj(Ff(K, N(i,1))⊕Ff(K, N(i,2))).

Event E(i,j) occurs either when a(i,1) =a(i,2) or when a(i,1) 6=a(i,2) but πj(Ff(K, Ria(i,1))) = πj(Ff(K, Rai(i,2))) over{0,1}. Since Ff is well balanced andRji is randomly chosen from the set {R1i, R2i, ..., Rdi}, the first case occurs with probability 1

d, whereas the second case occurs

3. RFID SECURITY AND PRIVACY with probability 1

2(1−1

d). Therefore, eventE(i,j) happens with probability 1 8+1

2, adversaryAcan repeat his attack several times to obtainN samples of the same equation πj(v(i,1)⊕v(i,2)), and if N is large enough, adversary Acan decide the correct value ofπj(Ff(K, N(i,1))⊕Ff(K, N(i,2))) by using a majority vote.

Using Chernoff bounds, we deduce that the probability of adversary A obtaining the correct value ofπj(Ff(K, N(i,1))⊕Ff(K, N(i,2))) in more than N 4×64 linear monomials and 6×64 monomials of degree 2. As a consequence, adversary A must get 640 correct equations πj(v(i,1)⊕v(i,2)) = πj(Ff(K, N(i,1))⊕Ff(K, N(i,2))) to recover the key K. This happens with probability greater than

(1−exp(−2N ǫ2 1 + 2ǫ))640

Since there are q = 60 rounds in one execution of the protocol, it follows that adversary A needs ˜N = 233N

q (1−exp(−2N ǫ2

1 + 2ǫ))640 interactions with tagT to get a correct linearized system in the 640 monomials. Setting N = 4096, we obtain ˜N = 239.09.

Dans le document Security and privacy in RFID systems (Page 67-72)