idnits 2.17.1 draft-ietf-tcpinc-tcpcrypt-07.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (October 4, 2017) is 2395 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Experimental ---------------------------------------------------------------------------- -- Looks like a reference, but probably isn't: '0' on line 323 == Missing Reference: 'RFC-TBD' is mentioned on line 932, but not defined == Outdated reference: A later version (-19) exists of draft-ietf-tcpinc-tcpeno-10 ** Obsolete normative reference: RFC 793 (Obsoleted by RFC 9293) ** Obsolete normative reference: RFC 7539 (Obsoleted by RFC 8439) Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group A. Bittau 3 Internet-Draft Google 4 Intended status: Experimental D. Giffin 5 Expires: April 7, 2018 Stanford University 6 M. Handley 7 University College London 8 D. Mazieres 9 Stanford University 10 Q. Slack 11 Sourcegraph 12 E. Smith 13 Kestrel Institute 14 October 4, 2017 16 Cryptographic protection of TCP Streams (tcpcrypt) 17 draft-ietf-tcpinc-tcpcrypt-07 19 Abstract 21 This document specifies tcpcrypt, a TCP encryption protocol designed 22 for use in conjunction with the TCP Encryption Negotiation Option 23 (TCP-ENO). Tcpcrypt coexists with middleboxes by tolerating 24 resegmentation, NATs, and other manipulations of the TCP header. The 25 protocol is self-contained and specifically tailored to TCP 26 implementations, which often reside in kernels or other environments 27 in which large external software dependencies can be undesirable. 28 Because the size of TCP options is limited, the protocol requires one 29 additional one-way message latency to perform key exchange before 30 application data may be transmitted. However, this cost can be 31 avoided between two hosts that have recently established a previous 32 tcpcrypt connection. 34 Status of This Memo 36 This Internet-Draft is submitted in full conformance with the 37 provisions of BCP 78 and BCP 79. 39 Internet-Drafts are working documents of the Internet Engineering 40 Task Force (IETF). Note that other groups may also distribute 41 working documents as Internet-Drafts. The list of current Internet- 42 Drafts is at http://datatracker.ietf.org/drafts/current/. 44 Internet-Drafts are draft documents valid for a maximum of six months 45 and may be updated, replaced, or obsoleted by other documents at any 46 time. It is inappropriate to use Internet-Drafts as reference 47 material or to cite them other than as "work in progress." 48 This Internet-Draft will expire on April 7, 2018. 50 Copyright Notice 52 Copyright (c) 2017 IETF Trust and the persons identified as the 53 document authors. All rights reserved. 55 This document is subject to BCP 78 and the IETF Trust's Legal 56 Provisions Relating to IETF Documents 57 (http://trustee.ietf.org/license-info) in effect on the date of 58 publication of this document. Please review these documents 59 carefully, as they describe your rights and restrictions with respect 60 to this document. Code Components extracted from this document must 61 include Simplified BSD License text as described in Section 4.e of 62 the Trust Legal Provisions and are provided without warranty as 63 described in the Simplified BSD License. 65 Table of Contents 67 1. Requirements language . . . . . . . . . . . . . . . . . . . . 3 68 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 69 3. Encryption protocol . . . . . . . . . . . . . . . . . . . . . 3 70 3.1. Cryptographic algorithms . . . . . . . . . . . . . . . . 3 71 3.2. Protocol negotiation . . . . . . . . . . . . . . . . . . 4 72 3.3. Key exchange . . . . . . . . . . . . . . . . . . . . . . 6 73 3.4. Session ID . . . . . . . . . . . . . . . . . . . . . . . 8 74 3.5. Session resumption . . . . . . . . . . . . . . . . . . . 8 75 3.6. Data encryption and authentication . . . . . . . . . . . 11 76 3.7. TCP header protection . . . . . . . . . . . . . . . . . . 12 77 3.8. Re-keying . . . . . . . . . . . . . . . . . . . . . . . . 13 78 3.9. Keep-alive . . . . . . . . . . . . . . . . . . . . . . . 14 79 4. Encodings . . . . . . . . . . . . . . . . . . . . . . . . . . 14 80 4.1. Key exchange messages . . . . . . . . . . . . . . . . . . 14 81 4.2. Encryption frames . . . . . . . . . . . . . . . . . . . . 16 82 4.2.1. Plaintext . . . . . . . . . . . . . . . . . . . . . . 17 83 4.2.2. Associated data . . . . . . . . . . . . . . . . . . . 18 84 4.2.3. Frame nonce . . . . . . . . . . . . . . . . . . . . . 18 85 4.3. Constant values . . . . . . . . . . . . . . . . . . . . . 18 86 5. Key agreement schemes . . . . . . . . . . . . . . . . . . . . 19 87 6. AEAD algorithms . . . . . . . . . . . . . . . . . . . . . . . 20 88 7. IANA considerations . . . . . . . . . . . . . . . . . . . . . 20 89 8. Security considerations . . . . . . . . . . . . . . . . . . . 21 90 8.1. Asymmetric roles . . . . . . . . . . . . . . . . . . . . 22 91 8.2. Verified liveness . . . . . . . . . . . . . . . . . . . . 23 92 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 23 93 10. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 23 94 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 24 95 11.1. Normative References . . . . . . . . . . . . . . . . . . 24 96 11.2. Informative References . . . . . . . . . . . . . . . . . 25 97 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 25 99 1. Requirements language 101 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 102 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 103 document are to be interpreted as described in [RFC2119]. 105 2. Introduction 107 This document describes tcpcrypt, an extension to TCP for 108 cryptographic protection of session data. Tcpcrypt was designed to 109 meet the following goals: 111 o Meet the requirements of the TCP Encryption Negotiation Option 112 (TCP-ENO) [I-D.ietf-tcpinc-tcpeno] for protecting connection data. 114 o Be amenable to small, self-contained implementations inside TCP 115 stacks. 117 o Minimize additional latency at connection startup. 119 o As much as possible, prevent connection failure in the presence of 120 NATs and other middleboxes that might normalize traffic or 121 otherwise manipulate TCP segments. 123 o Operate independently of IP addresses, making it possible to 124 authenticate resumed sessions efficiently even when either end 125 changes IP address. 127 3. Encryption protocol 129 This section describes the tcpcrypt protocol at an abstract level. 130 The concrete format of all messages is specified in Section 4. 132 3.1. Cryptographic algorithms 134 Setting up a tcpcrypt connection employs three types of cryptographic 135 algorithms: 137 o A _key agreement scheme_ is used with a short-lived public key to 138 agree upon a shared secret. 140 o An _extract function_ is used to generate a pseudo-random key 141 (PRK) from some initial keying material, typically the output of 142 the key agreement scheme. The notation Extract(S, IKM) denotes 143 the output of the extract function with salt S and initial keying 144 material IKM. 146 o A _collision-resistant pseudo-random function (CPRF)_ is used to 147 generate multiple cryptographic keys from a pseudo-random key, 148 typically the output of the extract function. The CPRF is defined 149 to produce an arbitrary amount of Output Keying Material (OKM), 150 and we use the notation CPRF(K, CONST, L) to designate the first L 151 bytes of the OKM produced by the pseudo-random function identified 152 by key K on CONST. 154 The Extract and CPRF functions used by default are the Extract and 155 Expand functions of HKDF [RFC5869]. These are defined as follows in 156 terms of the function "HMAC-Hash(key, value)" for a negotiated "Hash" 157 function; the symbol | denotes concatenation, and the counter 158 concatenated to the right of CONST occupies a single octet. 160 HKDF-Extract(salt, IKM) -> PRK 161 PRK = HMAC-Hash(salt, IKM) 163 HKDF-Expand(PRK, CONST, L) -> OKM 164 T(0) = empty string (zero length) 165 T(1) = HMAC-Hash(PRK, T(0) | CONST | 0x01) 166 T(2) = HMAC-Hash(PRK, T(1) | CONST | 0x02) 167 T(3) = HMAC-Hash(PRK, T(2) | CONST | 0x03) 168 ... 170 OKM = first L octets of T(1) | T(2) | T(3) | ... 172 Figure 1: HKDF functions used for key derivation 174 Lastly, once tcpcrypt has been successfully set up and encryption 175 keys have been derived, an algorithm for Authenticated Encryption 176 with Associated Data (AEAD) is used to protect the confidentiality 177 and integrity of all transmitted application data. AEAD algorithms 178 use a single key to encrypt their input data and also to generate a 179 cryptographic tag to accompany the resulting ciphertext; when 180 decryption is performed, the tag allows authentication of the 181 encrypted data and of optional, associated plaintext data. 183 3.2. Protocol negotiation 185 Tcpcrypt depends on TCP-ENO [I-D.ietf-tcpinc-tcpeno] to negotiate 186 whether encryption will be enabled for a connection, and also which 187 key agreement scheme to use. TCP-ENO negotiates the use of a 188 particular TCP encryption protocol or _TEP_ by including protocol 189 identifiers in ENO suboptions. This document associates four TEP 190 identifiers with the tcpcrypt protocol, as listed in Table 2. Each 191 identifier indicates the use of a particular key-agreement scheme. 192 Future standards may associate additional identifiers with tcpcrypt. 194 An active opener that wishes to negotiate the use of tcpcrypt 195 includes an ENO option in its SYN segment. That option includes 196 suboptions with tcpcrypt TEP identifiers indicating the key-agreement 197 schemes it is willing to enable. The active opener MAY additionally 198 include suboptions indicating support for encryption protocols other 199 than tcpcrypt, as well as global suboptions as specified by TCP-ENO. 201 If a passive opener receives an ENO option including tcpcrypt TEPs it 202 supports, it MAY then attach an ENO option to its SYN-ACK segment, 203 including _solely_ the TEP it wishes to enable. 205 To establish distinct roles for the two hosts in each connection, 206 tcpcrypt depends on the role-negotiation mechanism of TCP-ENO. As 207 one result of the negotiation process, TCP-ENO assigns hosts unique 208 roles abstractly called "A" at one end of the connection and "B" at 209 the other. Generally, an active opener plays the "A" role and a 210 passive opener plays the "B" role; but in the case of simultaneous 211 open, an additional mechanism breaks the symmetry and assigns 212 different roles to the two hosts. This document adopts the terms 213 "host A" and "host B" to identify each end of a connection uniquely, 214 following TCP-ENO's designation. 216 ENO suboptions include a flag "v" which indicates the presence of 217 associated, variable-length data. In order to propose fresh key 218 agreement with a particular tcpcrypt TEP, a host sends a one-byte 219 suboption containing the TEP identifier and "v = 0". In order to 220 propose session resumption (described further below) with a 221 particular TEP, a host sends a variable-length suboption containing 222 the TEP identifier, the flag "v = 1", and an identifier for a session 223 previously negotiated with the same host and the same TEP. 225 Once two hosts have exchanged SYN segments, TCP-ENO defines the 226 _negotiated TEP_ to be the last valid TEP identifier in the SYN 227 segment of host B (that is, the passive opener in the absence of 228 simultaneous open) that also occurs in that of host A. If there is 229 no such TEP, hosts MUST disable TCP-ENO and tcpcrypt. 231 If the negotiated TEP was sent by host B with "v = 0", it means that 232 fresh key agreement will be performed as described below in 233 Section 3.3. If it had "v = 1", the key-exchange messages will be 234 omitted in favor of determining keys via session-resumption as 235 described in Section 3.5, and protected application data may 236 immediately be sent as detailed in Section 3.6. 238 Note that the negotiated TEP is determined without reference to the 239 "v" bits in ENO suboptions, so if host A offers resumption with a 240 particular TEP and host B replies with a non-resumption suboption 241 with the same TEP, that may become the negotiated TEP and fresh key 242 agreement will be performed. That is, sending a resumption suboption 243 also implies willingness to perform fresh key agreement with the 244 indicated TEP. 246 As required by TCP-ENO, once a host has both sent and received an ACK 247 segment containing a valid ENO option, encryption MUST be enabled and 248 plaintext application data MUST NOT ever be exchanged on the 249 connection. If the negotiated TEP is among those listed in Table 2, 250 a host MUST follow the protocol described in this document. 252 3.3. Key exchange 254 Following successful negotiation of a tcpcrypt TEP, all further 255 signaling is performed in the Data portion of TCP segments. Except 256 when resumption was negotiated (described below in Section 3.5), the 257 two hosts perform key exchange through two messages, "Init1" and 258 "Init2", at the start of the data streams of host A and host B, 259 respectively. These messages may span multiple TCP segments and need 260 not end at a segment boundary. However, the segment containing the 261 last byte of an "Init1" or "Init2" message MUST have TCP's push flag 262 (PSH) set. 264 The key exchange protocol, in abstract, proceeds as follows: 266 A -> B: Init1 = { INIT1_MAGIC, sym-cipher-list, N_A, PK_A } 267 B -> A: Init2 = { INIT2_MAGIC, sym-cipher, N_B, PK_B } 269 The concrete format of these messages is specified in Section 4.1. 271 The parameters are defined as follows: 273 o "INIT1_MAGIC", "INIT2_MAGIC": constants defined in Table 1. 275 o "sym-cipher-list": a list of symmetric ciphers (AEAD algorithms) 276 acceptable to host A. These are specified in Table 3. 278 o "sym-cipher": the symmetric cipher selected by host B from the 279 "sym-cipher-list" sent by host A. 281 o "N_A", "N_B": nonces chosen at random by hosts A and B, 282 respectively. 284 o "PK_A", "PK_B": ephemeral public keys for hosts A and B, 285 respectively. These, as well as their corresponding private keys, 286 are short-lived values that SHOULD be refreshed periodically. The 287 private keys SHOULD NOT ever be written to persistent storage. 289 The ephemeral secret ("ES") is the result of the key-agreement 290 algorithm (see Section 5) indicated by the negotiated TEP. The 291 inputs to the algorithm are the local host's ephemeral private key 292 and the remote host's ephemeral public key. For example, host A 293 would compute "ES" using its own private key (not transmitted) and 294 host B's public key, "PK_B". 296 The two sides then compute a pseudo-random key ("PRK"), from which 297 all session keys are derived, as follows: 299 PRK = Extract(N_A, eno-transcript | Init1 | Init2 | ES) 301 Above, "|" denotes concatenation; "eno-transcript" is the protocol- 302 negotiation transcript defined in Section 4.8 of 303 [I-D.ietf-tcpinc-tcpeno]; and "Init1" and "Init2" are the transmitted 304 encodings of the messages described in Section 4.1. 306 A series of "session secrets" are then computed from "PRK" as 307 follows: 309 ss[0] = PRK 310 ss[i] = CPRF(ss[i-1], CONST_NEXTK, K_LEN) 312 The value "ss[0]" is used to generate all key material for the 313 current connection. The values "ss[i]" for "i > 0" can be used to 314 avoid public key cryptography when establishing subsequent 315 connections between the same two hosts, as described in Section 3.5. 316 The "CONST_*" values are constants defined in Table 1. The length 317 "K_LEN" depends on the tcpcrypt TEP in use, and is specified in 318 Section 5. 320 Given a session secret "ss", the two sides compute a series of master 321 keys as follows: 323 mk[0] = CPRF(ss, CONST_REKEY, K_LEN) 324 mk[i] = CPRF(mk[i-1], CONST_REKEY, K_LEN) 326 The particular master key in use is advanced as described in 327 Section 3.8. 329 Finally, each master key "mk" is used to generate keys for 330 authenticated encryption for the "A" and "B" roles. Key "k_ab" is 331 used by host A to encrypt and host B to decrypt, while "k_ba" is used 332 by host B to encrypt and host A to decrypt. 334 k_ab = CPRF(mk, CONST_KEY_A, ae_keylen) 335 k_ba = CPRF(mk, CONST_KEY_B, ae_keylen) 337 The value "ae_keylen" depends on the authenticated-encryption 338 algorithm selected, and is given under "Key Length" in Table 3. 340 After host B sends "Init2" or host A receives it, that host may 341 immediately begin transmitting protected application data as 342 described in Section 3.6. 344 If host A receives "Init2" with a "sym-cipher" value that was not 345 present in the "sym-cipher-list" it previously transmitted in 346 "Init1", it MUST abort the connection and raise an error condition 347 distinct from the end-of-file condition. 349 Throughout this document, to "abort the connection" means to issue 350 the "Abort" command as described in [RFC0793], Section 3.8. That is, 351 the TCP connection is destroyed, RESET is transmitted, and the local 352 user is alerted to the abort event. 354 3.4. Session ID 356 TCP-ENO requires each TEP to define a _session ID_ value that 357 uniquely identifies each encrypted connection. 359 As required, a tcpcrypt session ID begins with the negotiated TEP 360 identifier along with the "v" bit as transmitted by host B. The 361 remainder of the ID is derived from the session secret, as follows: 363 session_id[i] = TEP-byte | CPRF(ss[i], CONST_SESSID, K_LEN) 365 Again, the length "K_LEN" depends on the TEP, and is specified in 366 Section 5. 368 3.5. Session resumption 370 When two hosts have already negotiated session secret "ss[i-1]", they 371 can establish a new connection without public-key operations using 372 "ss[i]". A host signals willingness to resume with a particular 373 session secret by sending a SYN segment with a resumption suboption: 374 that is, an ENO suboption containing the negotiated TEP identifier 375 from the original session and part of an identifier for the session. 377 The resumption identifier is calculated from a session secret "ss[i]" 378 as follows: 380 resume[i] = CPRF(ss[i], CONST_RESUME, 18) 382 To name a session for resumption, a host sends either the first or 383 second half of the resumption identifier, according to the role it 384 played in the original session with secret "ss[0]". 386 A host that originally played role A and wishes to resume from a 387 cached session sends a suboption with the first half of the 388 resumption identifier: 390 byte 0 1 9 (10 bytes total) 391 +--------+--------+---...---+--------+ 392 | TEP- | resume[i]{0..8} | 393 | byte | | 394 +--------+--------+---...---+--------+ 396 Figure 2: Resumption suboption sent when original role was A. The 397 TEP-byte contains a tcpcrypt TEP identifier and v = 1. 399 Similarly, a host that originally played role B sends a suboption 400 with the second half of the resumption identifier: 402 byte 0 1 9 (10 bytes total) 403 +--------+--------+---...---+--------+ 404 | TEP- | resume[i]{9..17} | 405 | byte | | 406 +--------+--------+---...---+--------+ 408 Figure 3: Resumption suboption sent when original role was B. The 409 TEP-byte contains a tcpcrypt TEP identifier and v = 1. 411 If a passive opener recognizes the identifier-half in a resumption 412 suboption it has received and knows "ss[i]", it SHOULD (with 413 exceptions specified below) agree to resume from the cached session 414 by sending its own resumption suboption, which will contain the other 415 half of the identifier. 417 If it does not agree to resumption with a particular TEP, the passive 418 opener may either request fresh key exchange by responding with a 419 non-resumption suboption using the same TEP, or else respond to any 420 other received suboption. 422 If an active opener receives a resumption suboption for a particular 423 TEP and the received identifier-half does not match the "resume[i]" 424 value whose other half it previously sent in a resumption suboption 425 for the same TEP, it MUST ignore that suboption. In the typical case 426 that this was the only ENO suboption received, this means the host 427 MUST disable TCP-ENO and tcpcrypt: that is, it MUST NOT send any more 428 ENO options and MUST NOT encrypt the connection. 430 When a host concludes that TCP-ENO negotiation has succeeded for some 431 TEP that was received in a resumption suboption, it MUST then enable 432 encryption with that TEP, using the cached session secret, as 433 described in Section 3.6. 435 The session ID (Section 3.4) is constructed in the same way for 436 resumed sessions as it is for fresh ones. In this case the first 437 byte will always have "v = 1". The remainder of the ID is derived 438 from the cached session secret. 440 In the case of simultaneous open where TCP-ENO is able to establish 441 asymmetric roles, two hosts that simultaneously send SYN segments 442 with compatible resumption suboptions may resume the associated 443 session. 445 In a particular SYN segment, a host SHOULD NOT send more than one 446 resumption suboption, and MUST NOT send more than one resumption 447 suboption with the same TEP identifier. But in addition to any 448 resumption suboptions, an active opener MAY include non-resumption 449 suboptions describing other key-agreement schemes it supports (in 450 addition to that indicated by the TEP in the resumption suboption). 452 After using "ss[i]" to compute "mk[0]", implementations SHOULD 453 compute and cache "ss[i+1]" for possible use by a later session, then 454 erase "ss[i]" from memory. Hosts SHOULD retain "ss[i+1]" until it is 455 used or the memory needs to be reclaimed. Hosts SHOULD NOT write a 456 cached "ss[i+1]" value to non-volatile storage. 458 When proposing resumption, the active opener MUST use the lowest 459 value of "i" that has not already been used (successfully or not) to 460 negotiate resumption with the same host and for the same pre-session 461 key "ss[0]". 463 A session secret may not be used to secure more than one TCP 464 connection. To prevent this, a host MUST NOT resume with a session 465 secret if it has ever enabled encryption in the past with the same 466 secret, in either role. In the event that two hosts simultaneously 467 send SYN segments to each other that propose resumption with the same 468 session secret but the two segments are not part of a simultaneous 469 open, both connections will have to revert to fresh key-exchange. To 470 avoid this limitation, implementations MAY choose to implement 471 session resumption such that a given pre-session key "ss[0]" is only 472 used for either passive or active opens at the same host, not both. 474 When two hosts have previously negotiated a tcpcrypt session, either 475 host may initiate session resumption regardless of which host was the 476 active opener or played the "A" role in the previous session. 478 However, a given host must either encrypt with "k_ab" for all 479 sessions derived from the same pre-session key "ss[0]", or with 480 "k_ba". Thus, which keys a host uses to send segments is not 481 affected by the role it plays in the current connection: it depends 482 only on whether the host played the "A" or "B" role in the initial 483 session. 485 Implementations that perform session caching MUST provide a means for 486 applications to control session caching, including flushing cached 487 session secrets associated with an ESTABLISHED connection or 488 disabling the use of caching for a particular connection. 490 3.6. Data encryption and authentication 492 Following key exchange (or its omission via session resumption), all 493 further communication in a tcpcrypt-enabled connection is carried out 494 within delimited _encryption frames_ that are encrypted and 495 authenticated using the agreed keys. 497 This protection is provided via algorithms for Authenticated 498 Encryption with Associated Data (AEAD). The particular algorithms 499 that may be used are listed in Table 3. One algorithm is selected 500 during the negotiation described in Section 3.3. 502 The format of an encryption frame is specified in Section 4.2. A 503 sending host breaks its stream of application data into a series of 504 chunks. Each chunk is placed in the "data" portion of a "plaintext" 505 value, which is then encrypted to yield a frame's "ciphertext" field. 506 Chunks must be small enough that the ciphertext (whose length depends 507 on the AEAD cipher used, and is generally slightly longer than the 508 plaintext) has length less than 2^16 bytes. 510 An "associated data" value (see Section 4.2.2) is constructed for the 511 frame. It contains the frame's "control" field and the length of the 512 ciphertext. 514 A "frame nonce" value (see Section 4.2.3) is also constructed for the 515 frame but not explicitly transmitted. It contains an "offset" field 516 whose integer value is the zero-indexed byte offset of the beginning 517 of the current encryption frame in the underlying TCP datastream. 518 (That is, the offset in the framing stream, not the plaintext 519 application stream.) Because it is strictly necessary for the 520 security of the AEAD algorithm, an implementation MUST NOT ever 521 transmit distinct frames with the same nonce value under the same 522 encryption key. In particular, a retransmitted TCP segment MUST 523 contain the same payload bytes for the same TCP sequence numbers, and 524 a host MUST NOT transmit more than 2^64 bytes in the underlying TCP 525 datastream (which would cause the "offset" field to wrap) before re- 526 keying. 528 With reference to the "AEAD Interface" described in Section 2 of 529 [RFC5116], tcpcrypt invokes the AEAD algorithm with the secret key 530 "K" set to k_ab or k_ba, according to the host's role as described in 531 Section 3.3. The plaintext value serves as "P", the associated data 532 as "A", and the frame nonce as "N". The output of the encryption 533 operation, "C", is transmitted in the frame's "ciphertext" field. 535 When a frame is received, tcpcrypt reconstructs the associated data 536 and frame nonce values (the former contains only data sent in the 537 clear, and the latter is implicit in the TCP stream), and provides 538 these and the ciphertext value to the the AEAD decryption operation. 539 The output of this operation is either a plaintext value "P" or the 540 special symbol FAIL. In the latter case, the implementation MUST 541 either drop the TCP segment(s) containing the frame or abort the 542 connection; but if it aborts, the implementation MUST raise an error 543 condition distinct from the end-of-file condition. 545 3.7. TCP header protection 547 The "ciphertext" field of the encryption frame contains protected 548 versions of certain TCP header values. 550 When the "URGp" bit is set, the "urgent" value indicates an offset 551 from the current frame's beginning offset; the sum of these offsets 552 gives the index of the last byte of urgent data in the application 553 datastream. 555 A sender MUST set the "FINp" bit on the last frame it sends in the 556 connection (unless it aborts the connection), and MUST NOT set "FINp" 557 on any other frame. 559 TCP sets the FIN flag when a sender has no more data, which with 560 tcpcrypt means setting FIN on the segment containing the last byte of 561 the last frame. However, a receiver MUST report the end-of-file 562 condition to the connection's local user when and only when it 563 receives a frame with the "FINp" bit set. If a host receives a 564 segment with the TCP FIN flag set but the received datastream 565 including this segment does not contain a frame with "FINp" set, the 566 host SHOULD abort the connection and raise an error condition 567 distinct from the end-of-file condition; but if there are 568 unacknowledged segments whose retransmission could potentially result 569 in a valid frame, the host MAY instead drop the segment with the TCP 570 FIN flag set. 572 3.8. Re-keying 574 Re-keying allows hosts to wipe from memory keys that could decrypt 575 previously transmitted segments. It also allows the use of AEAD 576 ciphers that can securely encrypt only a bounded number of messages 577 under a given key. 579 We refer to the two encryption keys (k_ab, k_ba) as a _key-set_. We 580 refer to the key-set generated by mk[i] as the key-set with 581 _generation number_ "i" within a session. Each host maintains a 582 _local generation number_ that determines which key-set it uses to 583 encrypt outgoing frames, and a _remote generation number_ equal to 584 the highest generation used in frames received from its peer. 585 Initially, these two values are set to zero. 587 A host MAY increment its local generation number beyond the remote 588 generation number it has recorded. We call this action _initiating 589 re-keying_. 591 When a host has incremented its local generation number and uses the 592 new key-set for the first time to encrypt an outgoing frame, it MUST 593 set "rekey = 1" for that frame. It MUST set this field to zero in 594 all other cases. 596 When a host receives a frame with "rekey = 1", it increments its 597 record of the remote generation number. If the remote generation 598 number is now greater than the local generation number, the receiver 599 MUST immediately increment its local generation number to match. 600 Moreover, if the receiver has not yet transmitted a segment with the 601 FIN flag set, it MUST immediately send a frame (with empty 602 application data if necessary) with "rekey = 1". 604 A host SHOULD NOT initiate more than one concurrent re-key operation 605 if it has no data to send; that is, it should not initiate re-keying 606 with an empty encryption frame more than once while its record of the 607 remote generation number is less than its own. 609 When retransmitting, implementations must always transmit the same 610 bytes for the same TCP sequence numbers. Thus, a frame in a 611 retransmitted segment MUST always be encrypted with the same key as 612 when it was originally transmitted. 614 Implementations SHOULD delete older-generation keys from memory once 615 they have received all frames they will need to decrypt with the old 616 keys and have encrypted all outgoing frames under the old keys. 618 3.9. Keep-alive 620 Instead of using TCP Keep-Alives to verify that the remote endpoint 621 is still responsive, tcpcrypt implementations SHOULD employ the re- 622 keying mechanism for this purpose, as follows. When necessary, a 623 host SHOULD probe the liveness of its peer by initiating re-keying 624 and transmitting a new frame immediately (with empty application data 625 if necessary). 627 As described in Section 3.8, a host receiving a frame encrypted under 628 a generation number greater than its own MUST increment its own 629 generation number and (if it has not already transmitted a segment 630 with FIN set) immediately transmit a new frame (with zero-length 631 application data if necessary). 633 Implementations MAY use TCP Keep-Alives for purposes that do not 634 require endpoint authentication, as discussed in Section 8.2. 636 4. Encodings 638 This section provides byte-level encodings for values transmitted or 639 computed by the protocol. 641 4.1. Key exchange messages 643 The "Init1" message has the following encoding: 645 byte 0 1 2 3 646 +-------+-------+-------+-------+ 647 | INIT1_MAGIC | 648 | | 649 +-------+-------+-------+-------+ 651 4 5 6 7 652 +-------+-------+-------+-------+ 653 | message_len | 654 | = M | 655 +-------+-------+-------+-------+ 657 8 658 +--------+-------+-------+---...---+-------+ 659 |nciphers|sym- |sym- | |sym- | 660 | =K+1 |cipher0|cipher1| |cipherK| 661 +--------+-------+-------+---...---+-------+ 663 K + 10 K + 10 + N_A_LEN 664 | | 665 v v 666 +-------+---...---+-------+-------+---...---+-------+ 667 | N_A | PK_A | 668 | | | 669 +-------+---...---+-------+-------+---...---+-------+ 671 M - 1 672 +-------+---...---+-------+ 673 | ignored | 674 | | 675 +-------+---...---+-------+ 677 The constant "INIT1_MAGIC" is defined in Table 1. The four-byte 678 field "message_len" gives the length of the entire "Init1" message, 679 encoded as a big-endian integer. The "nciphers" field contains an 680 integer value that specifies the number of one-byte symmetric-cipher 681 identifiers that follow. The "sym-cipher" bytes identify 682 cryptographic algorithms in Table 3. The length "N_A_LEN" and the 683 length of "PK_A" are both determined by the negotiated key-agreement 684 scheme, as described in Section 5. 686 When sending "Init1", implementations of this protocol MUST omit the 687 field "ignored"; that is, they must construct the message such that 688 its end, as determined by "message_len", coincides with the end of 689 the field "PK_A". When receiving "Init1", however, implementations 690 MUST permit and ignore any bytes following "PK_A". 692 The "Init2" message has the following encoding: 694 byte 0 1 2 3 695 +-------+-------+-------+-------+ 696 | INIT2_MAGIC | 697 | | 698 +-------+-------+-------+-------+ 700 4 5 6 7 8 701 +-------+-------+-------+-------+-------+ 702 | message_len |sym- | 703 | = M |cipher | 704 +-------+-------+-------+-------+-------+ 706 9 9 + N_B_LEN 707 | | 708 v v 709 +-------+---...---+-------+-------+---...---+-------+ 710 | N_B | PK_B | 711 | | | 712 +-------+---...---+-------+-------+---...---+-------+ 714 M - 1 715 +-------+---...---+-------+ 716 | ignored | 717 | | 718 +-------+---...---+-------+ 720 The constant "INIT2_MAGIC" is defined in Table 1. The four-byte 721 field "message_len" gives the length of the entire "Init2" message, 722 encoded as a big-endian integer. The "sym-cipher" value is a 723 selection from the symmetric-cipher identifiers in the previously- 724 received "Init1" message. The length "N_B_LEN" and the length of 725 "PK_B" are both determined by the negotiated key-agreement scheme, as 726 described in Section 5. 728 When sending "Init2", implementations of this protocol MUST omit the 729 field "ignored"; that is, they must construct the message such that 730 its end, as determined by "message_len", coincides with the end of 731 the "PK_B" field. When receiving "Init2", however, implementations 732 MUST permit and ignore any bytes following "PK_B". 734 4.2. Encryption frames 736 An _encryption frame_ comprises a control byte and a length-prefixed 737 ciphertext value: 739 byte 0 1 2 3 clen+2 740 +-------+-------+-------+-------+---...---+-------+ 741 |control| clen | ciphertext | 742 +-------+-------+-------+-------+---...---+-------+ 744 The field "clen" is an integer in big-endian format and gives the 745 length of the "ciphertext" field. 747 The byte "control" has this structure: 749 bit 7 1 0 750 +-------+---...---+-------+-------+ 751 | cres | rekey | 752 +-------+---...---+-------+-------+ 754 The seven-bit field "cres" is reserved; implementations MUST set 755 these bits to zero when sending, and MUST ignore them when receiving. 757 The use of the "rekey" field is described in Section 3.8. 759 4.2.1. Plaintext 761 The "ciphertext" field is the result of applying the negotiated 762 authenticated-encryption algorithm to a "plaintext" value, which has 763 one of these two formats: 765 byte 0 1 plen-1 766 +-------+-------+---...---+-------+ 767 | flags | data | 768 +-------+-------+---...---+-------+ 770 byte 0 1 2 3 plen-1 771 +-------+-------+-------+-------+---...---+-------+ 772 | flags | urgent | data | 773 +-------+-------+-------+-------+---...---+-------+ 775 (Note that "clen" in the previous section will generally be greater 776 than "plen", as the ciphertext produced by the authenticated- 777 encryption scheme must both encrypt the application data and provide 778 a way to verify its integrity.) 780 The "flags" byte has this structure: 782 bit 7 6 5 4 3 2 1 0 783 +----+----+----+----+----+----+----+----+ 784 | fres |URGp|FINp| 785 +----+----+----+----+----+----+----+----+ 787 The six-bit value "fres" is reserved; implementations MUST set these 788 six bits to zero when sending, and MUST ignore them when receiving. 790 When the "URGp" bit is set, it indicates that the "urgent" field is 791 present, and thus that the plaintext value has the second structure 792 variant above; otherwise the first variant is used. 794 The meaning of "urgent" and of the flag bits is described in 795 Section 3.7. 797 4.2.2. Associated data 799 An encryption frame's "associated data" (which is supplied to the 800 AEAD algorithm when decrypting the ciphertext and verifying the 801 frame's integrity) has this format: 803 byte 0 1 2 804 +-------+-------+-------+ 805 |control| clen | 806 +-------+-------+-------+ 808 It contains the same values as the frame's "control" and "clen" 809 fields. 811 4.2.3. Frame nonce 813 Lastly, a "frame nonce" (provided as input to the AEAD algorithm) has 814 this format: 816 byte 817 +------+------+------+------+ 818 0 | FRAME_NONCE_MAGIC | 819 +------+------+------+------+ 820 4 | | 821 + offset + 822 8 | | 823 +------+------+------+------+ 825 The 4-byte magic constant is defined in Table 1. The 8-byte "offset" 826 field contains an integer in big-endian format. Its value is 827 specified in Section 3.6. 829 4.3. Constant values 831 The table below defines values for the constants used in the 832 protocol. 834 +------------+-------------------+ 835 | Value | Name | 836 +------------+-------------------+ 837 | 0x01 | CONST_NEXTK | 838 | 0x02 | CONST_SESSID | 839 | 0x03 | CONST_REKEY | 840 | 0x04 | CONST_KEY_A | 841 | 0x05 | CONST_KEY_B | 842 | 0x06 | CONST_RESUME | 843 | 0x15101a0e | INIT1_MAGIC | 844 | 0x097105e0 | INIT2_MAGIC | 845 | 0x44415441 | FRAME_NONCE_MAGIC | 846 +------------+-------------------+ 848 Table 1: Constant values used in the protocol 850 5. Key agreement schemes 852 The TEP negotiated via TCP-ENO may indicate the use of one of the 853 key-agreement schemes named in Table 2. For example, 854 "TCPCRYPT_ECDHE_P256" names the tcpcrypt protocol with key-agreement 855 scheme ECDHE-P256. 857 All schemes listed there use HKDF-Expand-SHA256 as the CPRF, and 858 these lengths for nonces and session keys: 860 N_A_LEN: 32 bytes 861 N_B_LEN: 32 bytes 862 K_LEN: 32 bytes 864 Key-agreement schemes ECDHE-P256 and ECDHE-P521 employ the ECSVDP-DH 865 secret value derivation primitive defined in [ieee1363]. The named 866 curves are defined in [nist-dss]. When the public-key values "PK_A" 867 and "PK_B" are transmitted as described in Section 4.1, they are 868 encoded with the "Elliptic Curve Point to Octet String Conversion 869 Primitive" described in Section E.2.3 of [ieee1363], and are prefixed 870 by a two-byte length in big-endian format: 872 byte 0 1 2 L - 1 873 +-------+-------+-------+---...---+-------+ 874 | pubkey_len | pubkey | 875 | = L | | 876 +-------+-------+-------+---...---+-------+ 878 Implementations SHOULD encode these "pubkey" values in "compressed 879 format", and MUST accept values encoded in "compressed", 880 "uncompressed" or "hybrid" formats. 882 Key-agreement schemes ECDHE-Curve25519 and ECDHE-Curve448 use the 883 functions X25519 and X448, respectively, to perform the Diffie-Helman 884 protocol as described in [RFC7748]. When using these ciphers, 885 public-key values "PK_A" and "PK_B" are transmitted directly with no 886 length prefix: 32 bytes for Curve25519, and 56 bytes for Curve448. 888 A tcpcrypt implementation MUST support at least the schemes 889 ECDHE-P256 and ECDHE-P521, although system administrators need not 890 enable them. 892 6. AEAD algorithms 894 Specifiers and key-lengths for AEAD algorithms are given in Table 3. 895 The algorithms "AEAD_AES_128_GCM" and "AEAD_AES_256_GCM" are 896 specified in [RFC5116]. The algorithm "AEAD_CHACHA20_POLY1305" is 897 specified in [RFC7539]. 899 7. IANA considerations 901 Tcpcrypt's TEP identifiers will need to be incorporated in IANA's 902 "TCP encryption protocol identifiers" registry under the 903 "Transmission Control Protocol (TCP) Parameters" registry, as in the 904 following table. The various key-agreement schemes used by these 905 tcpcrypt variants are defined in Section 5. 907 +-------+---------------------------+-----------+ 908 | Value | Meaning | Reference | 909 +-------+---------------------------+-----------+ 910 | 0x21 | TCPCRYPT_ECDHE_P256 | [RFC-TBD] | 911 | 0x22 | TCPCRYPT_ECDHE_P521 | [RFC-TBD] | 912 | 0x23 | TCPCRYPT_ECDHE_Curve25519 | [RFC-TBD] | 913 | 0x24 | TCPCRYPT_ECDHE_Curve448 | [RFC-TBD] | 914 +-------+---------------------------+-----------+ 916 Table 2: TEP identifiers for use with tcpcrypt 918 In Section 4.1, this document defines "sym-cipher" specifiers for 919 which IANA is to maintain a new "tcpcrypt AEAD Algorithm" registry 920 under the "Transmission Control Protocol (TCP) Parameters" registry, 921 with initial values as given in the following table. The AEAD 922 algorithms named there are defined in Section 6. Future assignments 923 are to be made under the "RFC Required" policy detailed in [RFC8126], 924 relying on early allocation [RFC7120] to facilitate testing before an 925 RFC is finalized. 927 +-------+------------------------+------------+-----------+ 928 | Value | AEAD Algorithm | Key Length | Reference | 929 +-------+------------------------+------------+-----------+ 930 | 0x01 | AEAD_AES_128_GCM | 16 bytes | [RFC-TBD] | 931 | 0x02 | AEAD_AES_256_GCM | 32 bytes | [RFC-TBD] | 932 | 0x10 | AEAD_CHACHA20_POLY1305 | 32 bytes | [RFC-TBD] | 933 +-------+------------------------+------------+-----------+ 935 Table 3: Authenticated-encryption algorithms corresponding to sym- 936 cipher specifiers in Init1 and Init2 messages. 938 8. Security considerations 940 Public-key generation, public-key encryption, and shared-secret 941 generation all require randomness. Other tcpcrypt functions may also 942 require randomness, depending on the algorithms and modes of 943 operation selected. A weak pseudo-random generator at either host 944 will compromise tcpcrypt's security. Many of tcpcrypt's 945 cryptographic functions require random input, and thus any host 946 implementing tcpcrypt MUST have access to a cryptographically-secure 947 source of randomness or pseudo-randomness. 949 Most implementations will rely on system-wide pseudo-random 950 generators seeded from hardware events and a seed carried over from 951 the previous boot. Once a pseudo-random generator has been properly 952 seeded, it can generate effectively arbitrary amounts of pseudo- 953 random data. However, until a pseudo-random generator has been 954 seeded with sufficient entropy, not only will tcpcrypt be insecure, 955 it will reveal information that further weakens the security of the 956 pseudo-random generator, potentially harming other applications. As 957 required by TCP-ENO, implementations MUST NOT send ENO options unless 958 they have access to an adequate source of randomness. 960 The cipher-suites specified in this document all use HMAC-SHA256 to 961 implement the collision-resistant pseudo-random function denoted by 962 "CPRF". A collision-resistant function is one on which, for 963 sufficiently large L, an attacker cannot find two distinct inputs 964 "K_1", "CONST_1" and "K_2", "CONST_2" such that "CPRF(K_1, CONST_1, 965 L) = CPRF(K_2, CONST_2, L)". Collision resistance is important to 966 assure the uniqueness of session IDs, which are generated using the 967 CPRF. 969 All of the security considerations of TCP-ENO apply to tcpcrypt. In 970 particular, tcpcrypt does not protect against active eavesdroppers 971 unless applications authenticate the session ID. If it can be 972 established that the session IDs computed at each end of the 973 connection match, then tcpcrypt guarantees that no man-in-the-middle 974 attacks occurred unless the attacker has broken the underlying 975 cryptographic primitives (e.g., ECDH). A proof of this property for 976 an earlier version of the protocol has been published [tcpcrypt]. 978 To gain middlebox compatibility, tcpcrypt does not protect TCP 979 headers. Hence, the protocol is vulnerable to denial-of-service from 980 off-path attackers just as plain TCP is. Possible attacks include 981 desynchronizing the underlying TCP stream, injecting RST or FIN 982 segments, and forging rekey bits. These attacks will cause a 983 tcpcrypt connection to hang or fail with an error, but not in any 984 circumstance where plain TCP could continue uncorrupted. 985 Implementations MUST give higher-level software a way to distinguish 986 such errors from a clean end-of-stream (indicated by an authenticated 987 "FINp" bit) so that applications can avoid semantic truncation 988 attacks. 990 There is no "key confirmation" step in tcpcrypt. This is not 991 required because tcpcrypt's threat model includes the possibility of 992 a connection to an adversary. If key negotiation is compromised and 993 yields two different keys, all subsequent frames will be ignored due 994 to failed integrity checks, causing the application's connection to 995 hang. This is not a new threat because in plain TCP, an active 996 attacker could have modified sequence and acknowledgement numbers to 997 hang the connection anyway. 999 Tcpcrypt uses short-lived public keys to provide forward secrecy. 1000 All currently specified key agreement schemes involve ECDHE-based key 1001 agreement, meaning a new key can be efficiently computed for each 1002 connection. If implementations reuse these parameters, they SHOULD 1003 limit the lifetime of the private parameters, ideally to no more than 1004 two minutes. 1006 Attackers cannot force passive openers to move forward in their 1007 session resumption chain without guessing the content of the 1008 resumption identifier, which will be difficult without key knowledge. 1010 8.1. Asymmetric roles 1012 Tcpcrypt transforms a shared pseudo-random key (PRK) into 1013 cryptographic session keys for each direction. Doing so requires an 1014 asymmetry in the protocol, as the key derivation function must be 1015 perturbed differently to generate different keys in each direction. 1016 Tcpcrypt includes other asymmetries in the roles of the two hosts, 1017 such as the process of negotiating algorithms (e.g., proposing vs. 1018 selecting cipher suites). 1020 8.2. Verified liveness 1022 Many hosts implement TCP Keep-Alives [RFC1122] as an option for 1023 applications to ensure that the other end of a TCP connection still 1024 exists even when there is no data to be sent. A TCP Keep-Alive 1025 segment carries a sequence number one prior to the beginning of the 1026 send window, and may carry one byte of "garbage" data. Such a 1027 segment causes the remote side to send an acknowledgment. 1029 Unfortunately, tcpcrypt cannot cryptographically verify Keep-Alive 1030 acknowledgments. Hence, an attacker could prolong the existence of a 1031 session at one host after the other end of the connection no longer 1032 exists. (Such an attack might prevent a process with sensitive data 1033 from exiting, giving an attacker more time to compromise a host and 1034 extract the sensitive data.) 1036 Thus, tcpcrypt specifies a way to stimulate the remote host to send 1037 verifiably fresh and authentic data, described in Section 3.9. 1039 The TCP keep-alive mechanism has also been used for its effects on 1040 intermediate nodes in the network, such as preventing flow state from 1041 expiring at NAT boxes or firewalls. As these purposes do not require 1042 the authentication of endpoints, implementations may safely 1043 accomplish them using either the existing TCP keep-alive mechanism or 1044 tcpcrypt's verified keep-alive mechanism. 1046 9. Acknowledgments 1048 We are grateful for contributions, help, discussions, and feedback 1049 from the TCPINC working group, including Marcelo Bagnulo, David 1050 Black, Bob Briscoe, Jana Iyengar, Tero Kivinen, Mirja Kuhlewind, Yoav 1051 Nir, Christoph Paasch, Eric Rescorla, and Kyle Rose. 1053 This work was funded by gifts from Intel (to Brad Karp) and from 1054 Google; by NSF award CNS-0716806 (A Clean-Slate Infrastructure for 1055 Information Flow Control); by DARPA CRASH under contract 1056 #N66001-10-2-4088; and by the Stanford Secure Internet of Things 1057 Project. 1059 10. Contributors 1061 Dan Boneh and Michael Hamburg were co-authors of the draft that 1062 became this document. 1064 11. References 1066 11.1. Normative References 1068 [I-D.ietf-tcpinc-tcpeno] 1069 Bittau, A., Giffin, D., Handley, M., Mazieres, D., and E. 1070 Smith, "TCP-ENO: Encryption Negotiation Option", draft- 1071 ietf-tcpinc-tcpeno-10 (work in progress), October 2017. 1073 [ieee1363] 1074 "IEEE Standard Specifications for Public-Key Cryptography 1075 (IEEE Std 1363-2000)", 2000. 1077 [nist-dss] 1078 "Digital Signature Standard, FIPS 186-2", 2000. 1080 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 1081 RFC 793, DOI 10.17487/RFC0793, September 1981, 1082 . 1084 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1085 Requirement Levels", BCP 14, RFC 2119, 1086 DOI 10.17487/RFC2119, March 1997, . 1089 [RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated 1090 Encryption", RFC 5116, DOI 10.17487/RFC5116, January 2008, 1091 . 1093 [RFC5869] Krawczyk, H. and P. Eronen, "HMAC-based Extract-and-Expand 1094 Key Derivation Function (HKDF)", RFC 5869, 1095 DOI 10.17487/RFC5869, May 2010, . 1098 [RFC7120] Cotton, M., "Early IANA Allocation of Standards Track Code 1099 Points", BCP 100, RFC 7120, DOI 10.17487/RFC7120, January 1100 2014, . 1102 [RFC7539] Nir, Y. and A. Langley, "ChaCha20 and Poly1305 for IETF 1103 Protocols", RFC 7539, DOI 10.17487/RFC7539, May 2015, 1104 . 1106 [RFC7748] Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves 1107 for Security", RFC 7748, DOI 10.17487/RFC7748, January 1108 2016, . 1110 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 1111 Writing an IANA Considerations Section in RFCs", BCP 26, 1112 RFC 8126, DOI 10.17487/RFC8126, June 2017, 1113 . 1115 11.2. Informative References 1117 [RFC1122] Braden, R., Ed., "Requirements for Internet Hosts - 1118 Communication Layers", STD 3, RFC 1122, 1119 DOI 10.17487/RFC1122, October 1989, . 1122 [tcpcrypt] 1123 Bittau, A., Hamburg, M., Handley, M., Mazieres, D., and D. 1124 Boneh, "The case for ubiquitous transport-level 1125 encryption", USENIX Security , 2010. 1127 Authors' Addresses 1129 Andrea Bittau 1130 Google 1131 345 Spear Street 1132 San Francisco, CA 94105 1133 US 1135 Email: bittau@google.com 1137 Daniel B. Giffin 1138 Stanford University 1139 353 Serra Mall, Room 288 1140 Stanford, CA 94305 1141 US 1143 Email: dbg@scs.stanford.edu 1145 Mark Handley 1146 University College London 1147 Gower St. 1148 London WC1E 6BT 1149 UK 1151 Email: M.Handley@cs.ucl.ac.uk 1152 David Mazieres 1153 Stanford University 1154 353 Serra Mall, Room 290 1155 Stanford, CA 94305 1156 US 1158 Email: dm@uun.org 1160 Quinn Slack 1161 Sourcegraph 1162 121 2nd St Ste 200 1163 San Francisco, CA 94105 1164 US 1166 Email: sqs@sourcegraph.com 1168 Eric W. Smith 1169 Kestrel Institute 1170 3260 Hillview Avenue 1171 Palo Alto, CA 94304 1172 US 1174 Email: eric.smith@kestrel.edu