source: trunk/docs/cautions.rst

Last change on this file was f81900e, checked in by Brian Warner <warner@…>, at 2016-03-30T08:26:47Z

format docs for Sphinx

Added indexes, fixed cross-references.

Also a few pip-related cleanups I noticed along the way.

  • Property mode set to 100644
File size: 3.1 KB
Line 
1.. -*- coding: utf-8-with-signature -*-
2
3=======================================================
4 Things To Be Careful About As We Venture Boldly Forth
5=======================================================
6
7See also :doc:`known_issues`.
8
9Timing Attacks
10==============
11
12Asymmetric-key cryptography operations are particularly sensitive to
13side-channel attacks. Unless the library is carefully hardened against timing
14attacks, it is dangerous to allow an attacker to measure how long signature
15and pubkey-derivation operations take. With enough samples, the attacker can
16deduce the private signing key from these measurements. (Note that
17verification operations are only sensitive if the verifying key is secret,
18which is not the case for anything in Tahoe).
19
20We currently use private-key operations in mutable-file writes, and
21anticipate using them in signed-introducer announcements and accounting
22setup.
23
24Mutable-file writes can reveal timing information to the attacker because the
25signature operation takes place in the middle of a read-modify-write cycle.
26Modifying a directory requires downloading the old contents of the mutable
27file, modifying the contents, signing the new contents, then uploading the
28new contents. By observing the elapsed time between the receipt of the last
29packet for the download, and the emission of the first packet of the upload,
30the attacker will learn information about how long the signature took. The
31attacker might ensure that they run one of the servers, and delay responding
32to the download request so that their packet is the last one needed by the
33client. They might also manage to be the first server to which a new upload
34packet is sent. This attack gives the adversary timing information about one
35signature operation per mutable-file write. Note that the UCWE
36automatic-retry response (used by default in directory modification code) can
37cause multiple mutable-file read-modify-write cycles per user-triggered
38operation, giving the adversary a slightly higher multiplier.
39
40The signed-introducer announcement involves a signature made as the client
41node is booting, before the first connection is established to the
42Introducer. This might reveal timing information if any information is
43revealed about the client's exact boot time: the signature operation starts a
44fixed number of cycles after node startup, and the first packet to the
45Introducer is sent a fixed number of cycles after the signature is made. An
46adversary who can compare the node boot time against the transmission time of
47the first packet will learn information about the signature operation, one
48measurement per reboot. We currently do not provide boot-time information in
49Introducer messages or other client-to-server data.
50
51In general, we are not worried about these leakages, because timing-channel
52attacks typically require thousands or millions of measurements to detect the
53(presumably) small timing variations exposed by our asymmetric crypto
54operations, which would require thousands of mutable-file writes or thousands
55of reboots to be of use to the adversary. However, future authors should take
56care to not make changes that could provide additional information to
57attackers.
Note: See TracBrowser for help on using the repository browser.