MURDERKERNEL
← Research

One iris, two keys

If two accounts use the same iris, what does a leaked key from one reveal about the other? A three-bit example introduces reusable fuzzy extractors.

Sri Vedantam · · Markdown

Forenote

My university went from iris scanners to hand scanners this year. There was the usual grumbling from students who disliked the transition and thought the university was trying to collect more information about them. Some students continued to opt out of having their biometrics collected and still, to the dismay of the cafeteria employees, use their ID cards. It slows down the entrance line.

The part that got me thinking was what happens when you give the same biometric to two places. Say I was fine with enrolling my eye at the university. What would I need to know before I enrolled that same eye somewhere else? I've changed the setup a little so we can actually work out an answer. In my example, both places generate a cryptographic key at enrollment and you get to see what they put on record.

Scenario

On Monday, Alice enrolls her right eye at the university. On Tuesday, she enrolls the same eye at the hospital. Each system generates a fresh key and keeps a public record that will help Alice recover it. A year later, suppose the university key leaks. You have that key and both public enrollment records. You've never seen Alice's eye.

I'm assuming that the scanner takes some features from the image of her iris and that the system uses those features to recover a key. If all we asked the scanner to do was match a picture to a student ID, there wouldn't be a hospital key in this scenario. Given what you have, can you tell which key belongs to Alice's hospital account?

What can you tell from two public records?

Let's say the scanner always reads the same three bits from Alice's eye. We'll call those bits WW. For this example, all eight values of WW are equally likely. Each institution independently chooses a uniform three-bit key KK and publishes a helper equal to W⊕KW \oplus K. That symbol means XOR. Two equal bits give you a zero, and two different bits give you a one. When Alice comes back, she reads WW again and computes W⊕(W⊕K)=KW \oplus (W \oplus K) = K.

You're the adversary here. You find 001001 in the hospital's public record. Could its key be 000000? Yes, if Alice's reading was 001001. What about 111111? Yup, if her reading was 110110. Pick any key you like. Exactly one equally likely reading makes it fit.

To lay this out clearly, here are both records before the leak.

Account Public helper Account key
University 110110 ?
Hospital 001001 ?

Can you learn anything while both keys are still hidden? Call the university helper PUP_U and the hospital helper PHP_H. Go ahead and XOR the two values you can see. Watch what happens to the two copies of WW.

PU⊕PH=(W⊕KU)⊕(W⊕KH)=(W⊕W)⊕KU⊕KH=KU⊕KH.\begin{aligned} P_U \oplus P_H &= (W \oplus K_U) \oplus (W \oplus K_H) \\ &= (W \oplus W) \oplus K_U \oplus K_H \\ &= K_U \oplus K_H. \end{aligned}

For our two records, 110⊕001=111110 \oplus 001 = 111. Every bit of the hospital key must be the opposite of the corresponding university bit. Of the 64 possible ordered pairs, you can cross off 56, and you still can't guess either key individually any better than one in eight.

Then the university key leaks. It's 011011. You can fill in the hospital's row yourself.

KH=KU⊕(PU⊕PH)=011⊕111=100.K_H = K_U \oplus (P_U \oplus P_H) = 011 \oplus 111 = 100.

If you've seen the one-time pad before, you might recognize what we just did. The pad in this example is the eye reading. A uniformly random secret pad as long as the message gives perfect secrecy when used once. XOR itself is cheap. The expensive part is getting that much secret randomness to both parties and keeping track of which bits have already been used. Here the university and the hospital each did the work of generating a fresh key. It was Alice who brought the same pad to both places.

Suppose one bit changes

An iris scanner giving Alice exactly the same reading every time is a pretty convenient assumption. Let's change one thing. Suppose exactly one bit changes between her two enrollments, with each position equally likely to change. Keep the public records and the leaked university key. Which hospital keys can you cross off this time?

You can still reconstruct the university reading. Its helper was 110110, its key was 011011, and 110⊕011=101110 \oplus 011 = 101. If the leftmost bit changed, the hospital read 001001. Its helper is also 001001, so its key would be 000000. I'll lay out the other two possibilities the same way.

Which bit changed? Possible hospital reading Possible hospital key
Left 001001 000000
Middle 111111 110110
Right 100100 101101

Where did our old answer go? The hospital key was 100100 a minute ago. For that to work with the hospital helper 001001, the hospital would have to have read 101101, exactly what the university read. I said exactly one bit changes. Had I said at most one, you could put 100100 back on the list. If you wanted to tell me how likely 100100 was, I'd also have to tell you how often the scanner repeats all three bits.

For comparison, suppose I gave Alice two cards with independently chosen, uniform three-bit secrets, one for each account. You could work out the entire university card from the leak. Every hospital key would still fit a hospital card that was just as likely as any other. We'll come back to these three cases once we've dealt with a problem Alice herself has with this setup.

How does Alice get back in?

Suppose Alice enrolled with 101101 and the hospital gave her helper 001001. Her key is 100100. When she comes back for her appointment, the scanner reads 111111. Try using the helper again. She gets 110110. It's only one bit off, but she needs her original key.

This is where a fuzzy extractor comes in. At enrollment it produces a key and public helper data. When Alice comes back with a sufficiently close reading, the recovery algorithm should reproduce her original key with high probability. The paper has to specify what counts as close. Panja, Jiang and Safavi-Naini, Definition 3

Amey Shukla and colleagues built an iris system called ClearEyes. They put the same randomly generated key in many digital lockers. To open a locker, Alice needs the values at the particular positions in her reading that were used to lock it. Here are two eight-bit readings you can try this with. The positions are numbered from the left. Shukla et al., Section 2.0.1

Reading 1 2 3 4 5 6 7 8
Enrollment 1 0 1 1 0 0 1 0
Return visit 1 1 1 1 0 0 1 1

Take positions 1, 4 and 7. Both times you get 111111, so Alice can open that locker. Try positions 2, 4 and 8. At enrollment she got 010010, and at her return visit she gets 111111. That locker stays shut. Both lockers contain the same key, so opening the first one is enough.

How often would that work if you had to choose the positions before Alice came back? Six of the eight positions agree. There are 56 ways to pick three positions, and 20 of those ways use only the six that agree. Now suppose you want six positions in the combination. There are 28 ways to pick them, and exactly one avoids both changed bits. Here's the same count for a uniformly chosen set of kk positions on these two readings.

Pr⁡[all k positions agree]=(6k)(8k),1≤k≤6.\Pr[\text{all } k \text{ positions agree}] = \frac{\binom{6}{k}}{\binom{8}{k}}, \qquad 1 \le k \le 6.

With three positions Alice's chance is 20/5620/56, about 36%. With six it drops to 1/281/28, about 3.6%.

Why bother with a longer combination, then? Put yourself back in the adversary's position. If each selected bit were an independent fair coin, you could guess three of them on your first try with probability 1/81/8. For six bits you'd be down to 1/641/64. You'd also appreciate having more lockers to try, for much the same reason Alice would. The percentages I just worked out are for the two strings on this page. The actual ClearEyes numbers come from iris readings.

What did the extra scans buy?

With one reading at enrollment and one at authentication, ClearEyes accepted 64% of genuine attempts in the authors' evaluation. ClearEyes-M used three readings at enrollment and two at authentication. That brought its true-accept rate to 92%, and its public helper grew from 7 MB to 19 MB. If I were the student standing at the front of that cafeteria line hoping the scanner would let me through, the true-accept rate is the number I'd care about. Shukla et al., Section 1.2 and Table 1

But how many keys did Alice enroll with those three readings? One. Nobody in that experiment gets handed a key from an earlier enrollment and asked to identify a second one. The authors also report a 105-bit security estimate, which depends on their estimate of how hard the selected features are to guess. They explicitly leave a formal treatment of reuse outside the scope of the paper. So what would an experiment that actually asks our hospital question look like? Shukla et al., Sections 1.2, 3.0.1 and 5.2.1

Could you recognize the hospital key?

Let's play it out. You keep the university key and the two public helpers. I flip a fair coin where you can't see it. On heads I show you Alice's real hospital key. On tails I draw a uniform three-bit string and show you that. You have to call heads or tails.

In our first example you already worked out that the key is 100100, so call heads whenever I show you 100100. You get every heads toss right. On tails, seven of my eight possible strings let you correctly call tails. What about the eighth? I can draw 100100 at random too. Your chance of calling the coin correctly is 12(1+7/8)=15/16\dfrac{1}{2}(1 + 7/8) = 15/16.

Now try the example where exactly one bit changes. If I show you 110110, call heads. It was in the middle row of our table. If I show you 100100, call tails. That's the answer we crossed off. Call heads for any of the three surviving keys and you get every heads toss right again. On tails, five of my eight strings fall outside the table. Give each toss its half of the probability and add the two ways you can be right.

Pr⁡[correct call]=12⋅1⏟heads+12⋅58⏟tails=1316.\Pr[\text{correct call}] = \underbrace{\frac{1}{2}\cdot 1}_{\text{heads}} + \underbrace{\frac{1}{2}\cdot\frac{5}{8}}_{\text{tails}} = \frac{13}{16}.

TikZ diagram

How the hospital reading was generated Your chance of guessing the key Your chance of calling the coin correctly
Identical reading 11 15/1615/16
Exactly one uniformly chosen bit changes 1/31/3 13/1613/16
Independent uniform reading 1/81/8 1/21/2

That middle row is the one I find interesting. If I'd asked you to write down the hospital key, you'd only get it right one time in three. Hand you a candidate key and suddenly you can call my coin correctly 13 times in 16. In the last row, all eight strings are equally likely however my coin lands. Even knowing the university key, you might as well flip a coin yourself.

What would a reusable fuzzy extractor have to prove?

Panja, Jiang and Safavi-Naini give the adversary every public helper and every enrolled key except the key being tested. You can think of our university and hospital as the two-enrollment version of their experiment. For a source that meets the paper's assumptions and an enrollment count within its bounds, their constructions keep the adversary's chance of calling the coin correctly close to one half. The part I'd want to check before applying that result to my scanner is the assumption about the source. Panja, Jiang and Safavi-Naini, Figure 1 and Definitions 4 and 6

Say I give you two scanners to test. One generates eight independent fair bits. The other generates four independent fair bits and prints them twice, so one of its readings might be 1011 10111011\,1011. You check each position on its own over many readings. Both scanners should give you a one about half the time at every position. Now I'll let you see the first four bits and ask you to guess the last four. With the first scanner your chance is 1/161/16. With the second you can just read the answer back to me.

This is why the word conditional in conditional min-entropy matters. In our second scanner every individual bit looks fine right up until you ask what somebody already knows. The authors' condition asks how hard it is to guess the values at sampled positions after values at other positions have been revealed, with the positions themselves known. In their first construction, an extractor uses sampled values to produce a pad that masks the key and a check string. When Alice reproduces a matching sample, she can reconstruct that pad and recognize the result. We've come back around to XOR, only now we have a precise assumption about what the adversary can still be missing after seeing the earlier records. Panja, Jiang and Safavi-Naini, Definition 6 and Figure 2

Going back to the cafeteria, I can understand wanting to know what the university keeps when you put your hand on the scanner. I'd add one question to that conversation. Suppose I use the same biometric somewhere else and the university loses my first key. When somebody tells me the second key is secure, did the person trying to guess it in their proof get to see everything I just lost?