21.03.2013 Views

Problem - Kevin Tafuro

Problem - Kevin Tafuro

Problem - Kevin Tafuro

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

• If you have to accept data from the network, make sure that it is likely to have<br />

some other entropy beyond the timing, and never estimate more than 2.5 bits of<br />

entropy per packet with a high-resolution clock (i.e., one running in the GHz<br />

range). If your clock has better than millisecond resolution and the processor is<br />

modern, it is probably reasonable to assume a half-bit of entropy on incoming<br />

network packets.<br />

Entropy in a key press<br />

As with any entropy source, when you are trying to get entropy from a key press, you<br />

should try to get entropy by taking a timestamp alongside the key press and estimate<br />

entropy as discussed in the previous subsection.<br />

How much entropy should you count for the actual value of the key itself, though?<br />

Of course, in practice, the answer has to do with how likely an attacker is to guess<br />

the key you are typing. If the attacker knows that the victim is typing War and Peace,<br />

there would be very little entropy (the only entropy would be from mistakes in typing<br />

or time between timestrokes).<br />

If you are not worried about attacks from local users, we believe that a good, conservative<br />

approximation is one bit of entropy per character, if and only if the character<br />

is not identical to the previous character (otherwise, estimate zero). This assumes<br />

that the attacker has a pretty good but not exact idea of the content being typed.<br />

If an attacker who is sending his own data into your entropy infrastructure is part of<br />

your threat model, we think the above metric is too liberal. If your infrastructure is<br />

multiuser, where the users are separated from each other, use a metric similar to the<br />

ones we discussed earlier for dealing with a single tainted data source.<br />

For example, suppose that you collect keystroke data from two users, Alice and Bob.<br />

Keep track of the number of characters Alice types and the number Bob types. Your<br />

estimate as to the number of bits of entropy you have collected should be the minimum<br />

of those two values. That way, if Bob is an attacker, Alice will still have a reasonable<br />

amount of entropy, and vice versa.<br />

If you are worried that an attacker may be feeding you all your input keystrokes, you<br />

should count no entropy, but mix in the key value to your entropy state anyway. In<br />

such a case, it might be reasonable to count a tiny bit of entropy from an associated<br />

timestamp if and only if the keystroke comes from the network. If the attacker may<br />

be local, do not assume there is any entropy.<br />

Entropy in mouse movements<br />

On most operating systems, moving the mouse produces events that give positional<br />

information about the mouse. In some cases, any user on the operating system can<br />

see those events. Therefore, if attacks from local users are in your threat model, you<br />

should not assume any entropy.<br />

Performing Entropy Estimation and Management | 627<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!