idnits 2.17.1 draft-perrin-tls-tack-00.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 : ---------------------------------------------------------------------------- == There are 3 instances of lines with non-RFC2606-compliant FQDNs in the document. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 232 has weird spacing: '...eak_Sig break...' -- The document date (May 22, 2012) is 4356 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: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '64' on line 227 -- Looks like a reference, but probably isn't: '32' on line 221 -- Possible downref: Non-RFC (?) normative reference: ref. 'FIPS180-2' -- Possible downref: Non-RFC (?) normative reference: ref. 'FIPS186-3' ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Downref: Normative reference to an Informational RFC: RFC 6090 Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 6 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 TLS Working Group M. Marlinspike 3 Internet-Draft T. Perrin, Ed. 4 Intended status: Standards Track May 22, 2012 5 Expires: November 23, 2012 7 Trust Assertions for Certificate Keys 8 draft-perrin-tls-tack-00.txt 10 Abstract 12 This document defines TACK, a TLS Extension that enables a TLS server 13 to assert the authenticity of its public key. A TACK contains a 14 "TACK key" which is used to sign the public key from the TLS server's 15 certificate. Hostnames can be "pinned" to a TACK key. TLS 16 connections to a pinned hostname require the server to present a TACK 17 containing the pinned key and a corresponding signature over the TLS 18 server's public key. 20 Status of this Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on November 23, 2012. 37 Copyright Notice 39 Copyright (c) 2012 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 55 2. Requirements notation . . . . . . . . . . . . . . . . . . . . 4 56 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 57 3.1. TACK life cycle . . . . . . . . . . . . . . . . . . . . . 5 58 3.2. Pin life cycle . . . . . . . . . . . . . . . . . . . . . . 6 59 4. TACK Extension . . . . . . . . . . . . . . . . . . . . . . . . 7 60 4.1. Definition of TACK_Extension . . . . . . . . . . . . . . . 7 61 4.2. Explanation of TACK_Extension fields . . . . . . . . . . . 8 62 4.2.1. TACK fields . . . . . . . . . . . . . . . . . . . . . 8 63 4.2.2. TACK_Break_Sig fields . . . . . . . . . . . . . . . . 8 64 4.2.3. TACK_Extension fields . . . . . . . . . . . . . . . . 9 65 5. Client processing . . . . . . . . . . . . . . . . . . . . . . 10 66 5.1. TACK pins, key records, and name records . . . . . . . . . 10 67 5.2. High-level client processing . . . . . . . . . . . . . . . 10 68 5.3. Client processing details . . . . . . . . . . . . . . . . 11 69 5.3.1. Check whether the TLS handshake is well-formed . . . . 11 70 5.3.2. Check the TACK generation and update min_generation . 12 71 5.3.3. Check whether the TACK is expired . . . . . . . . . . 12 72 5.3.4. Create and activate pins (optional) . . . . . . . . . 12 73 5.3.5. Discard pins based on break signatures . . . . . . . . 13 74 5.3.6. Deleting pins . . . . . . . . . . . . . . . . . . . . 13 75 6. Variations on client processing . . . . . . . . . . . . . . . 14 76 6.1. TACK and certificate verification . . . . . . . . . . . . 14 77 6.2. Application-specific pinning . . . . . . . . . . . . . . . 14 78 7. TACK IDs . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 79 8. Advice . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 80 8.1. For server operators . . . . . . . . . . . . . . . . . . . 16 81 8.2. For client implementers . . . . . . . . . . . . . . . . . 17 82 9. Security considerations . . . . . . . . . . . . . . . . . . . 18 83 9.1. For server operators . . . . . . . . . . . . . . . . . . . 18 84 9.2. For client implementers . . . . . . . . . . . . . . . . . 18 85 9.3. Note on algorithm agility . . . . . . . . . . . . . . . . 19 86 10. IANA considerations . . . . . . . . . . . . . . . . . . . . . 20 87 10.1. New entry for the TLS ExtensionType Registry . . . . . . . 20 88 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 21 89 12. Normative references . . . . . . . . . . . . . . . . . . . . . 22 90 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 23 92 1. Introduction 94 Traditionally, a TLS client verifies a TLS server's public key using 95 a certificate chain issued by some public CA. "Pinning" is a way for 96 clients to obtain increased certainty in server public keys. Clients 97 that employ pinning check for some constant "pinned" element of the 98 TLS connection when contacting a particular TLS host. 100 Unfortunately, a number of problems arise when attempting to pin 101 certificate chains: the TLS servers at a given hostname may have 102 different certificate chains simultaneously deployed and may change 103 their chains at any time, the "more constant" elements of a chain 104 (the CAs) may not be trustworthy, and the client may be oblivious to 105 key compromise events which render the pinned data untrustworthy. 107 TACK addresses these problems by having the site sign its TLS server 108 public keys with a "TACK key". This enables clients to "pin" a 109 hostname to the TACK key without requiring sites to modify their 110 existing certificate chains, and without limiting a site's 111 flexibility to deploy different certificate chains on different 112 servers or change certificate chains at any time. Since TACK pins 113 are based on TACK keys (instead of CA keys), trust in CAs is not 114 required. Additionally, the TACK key may be used to revoke previous 115 TACK signatures (or even itself) in order to handle the compromise of 116 TLS or TACK private keys. 118 If requested, a compliant server will send a TLS Extension containing 119 its "TACK". Inside the TACK is a public key and signature. Once a 120 client has seen the same (hostname, TACK public key) pair multiple 121 times, the client will "activate" a pin between the hostname and TACK 122 key for a period equal to the length of time the pair has been 123 observed for. This "pin activation" process limits the impact of bad 124 pins resulting from transient network attacks or operator error. 126 TACK pins are easily shared between clients. For example, a TACK 127 client may scan the internet to discover TACK pins, then publish 128 these pins for other clients to rely upon. 130 2. Requirements notation 132 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 133 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 134 document are to be interpreted as described in [RFC2119]. 136 3. Overview 138 3.1. TACK life cycle 140 A server operator using TACK may perform several processes: 142 Selection of a TACK key: The server operator first chooses the ECDSA 143 signing key to use for a set of hostnames. It is safest to use a 144 different signing key for each hostname, though a signing key may 145 be reused for closely-related hostnames (such as aliases for the 146 same host, or hosts sharing the same TLS key). 148 Creating initial TACKs under a TACK key: The TACK private key is 149 then used to sign the TLS public keys for all servers associated 150 with those hostnames. The TACK public key and signature are 151 combined with some metadata into each server's "TACK". 153 Deploying initial TACKs: For each hostname, TACKs are deployed to 154 TLS servers in a two-stage process. First, each TLS server 155 associated with the hostname is given a TACK. Once this is 156 completed, pin activation is enabled on the servers. 158 Creating new TACKs under a TACK key: A TACK needs to be replaced 159 whenever a server changes its TLS public key, or when the TACK 160 expires. TACKs may also need to be replaced with later-generation 161 TACKs if the TACK key's "min_generation" is updated (see next). 163 Revoking old TACKs: If a TLS private key is compromised, the TACKs 164 signing this key can be revoked by publishing a new TACK 165 containing a higher "min_generation". 167 Revoking TACK keys: If a TACK private key is compromised, or a 168 server operator wishes to stop using TACK or abruptly change its 169 TACK key for any reason, a server can revoke an entire TACK key 170 (including all TACKs and pins referring to it) by publishing a 171 "break signature". 173 3.2. Pin life cycle 175 A TACK client maintains a store of pins for verifying TLS 176 connections. Pins associate a hostname and a TACK key. When a 177 client sees a new hostname and TACK key combination, an inactive pin 178 is created. Every subsequent time the client sees the same pin, the 179 pin is "activated" for a period equal to the timespan between the 180 first time the pin was seen and the most recent time, up to a maximum 181 period of 30 days. 183 Pin activation prevents an attacker with short-lived control of the 184 hostname from activating long-lived pins. It also makes it safer for 185 sites to experiment with TACKs, as a new TACK can be discarded 186 without causing long-lived problems. The 30 day limit guarantees 187 that a worst-case pin can be recovered from in reasonable time. 189 In addition to creating and activating pins, a TLS connection can 190 alter the clients's pin store by publishing revocation data: 192 Min_generation: Each pin stores the highest "min_generation" value 193 it has seen from the pinned TACK key, and rejects TACKs from 194 earlier generations. 196 Break signatures: A TLS handshake may send break signatures which 197 cause all pins for the broken key to be discarded. 199 4. TACK Extension 201 4.1. Definition of TACK_Extension 203 A new TLS ExtensionType ("tack") is defined and MAY be included by a 204 TLS client in the ClientHello message defined in [RFC5246]. 206 enum {tack(TBD), (65535)} ExtensionType; 208 The "extension_data" field of this ClientHello SHALL be empty. A TLS 209 server which is not resuming a TLS session MAY respond with an 210 extension of type "tack" in the ServerHello. The "extension_data" 211 field of this ServerHello SHALL contain a "TACK_Extension", as 212 defined below using the TLS presentation language from [RFC5246]. 214 enum (disabled(0), enabled(1)} TACK_Activation; 216 struct { 217 opaque public_key[64]; 218 uint8 min_generation; 219 uint8 generation; 220 uint32 expiration; 221 opaque target_hash[32]; 222 opaque signature[64]; 223 } TACK; /* 166 bytes */ 225 struct { 226 opaque public_key[64]; 227 opaque signature[64]; 228 } TACK_Break_Sig; /* 128 bytes */ 230 struct { 231 TACK tack<0...166> /* 0 or 1 TACK */ 232 TACK_Break_Sig break_sigs<0...1024> /* 0...8 Break Sigs */ 233 TACK_Activation pin_activation; 234 } TACK_Extension; 236 4.2. Explanation of TACK_Extension fields 238 4.2.1. TACK fields 240 public_key: This field specifies the TACK's public key. The field 241 contains a pair of integers (x, y) representing a point on the 242 elliptic curve P-256 defined in [FIPS186-3]. Each integer is 243 encoded as a 32-byte octet string using the Integer-to-Octet- 244 String algorithm from [RFC6090], and these strings are 245 concatenated with the x value first. (NOTE: This is equivalent to 246 an uncompressed subjectPublicKey from [RFC5480], except that the 247 initial 0x04 byte is omitted). 249 min_generation: This field publishes a min_generation value. 251 generation: This field assigns each TACK a generation. Generations 252 less than a published min_generation are considered revoked. 254 expiration: This field specifies a time after which the TACK is 255 considered expired. The time is encoded as the number of minutes, 256 excluding leap seconds, after midnight UTC, January 1 1970. 258 target_hash: This field is a hash of the TLS server's 259 SubjectPublicKeyInfo [RFC5280] using the SHA256 algorithm from 260 [FIPS180-2]. The SubjectPublicKeyInfo is typically conveyed as 261 part of the server's X.509 certificate. 263 signature: This field is an ECDSA signature by the TACK's public key 264 over the 8 byte ASCII string "tack_sig" followed by the contents 265 of the TACK prior to the "signature" field (i.e. the preceding 102 266 bytes). The field contains a pair of integers (r, s) representing 267 an ECDSA signature as defined in [FIPS186-3], using curve P-256 268 and SHA256. Each integer is encoded as a 32-byte octet string 269 using the Integer-to-Octet-String algorithm from [RFC6090], and 270 these strings are concatenated with the r value first. 272 4.2.2. TACK_Break_Sig fields 274 public_key: This field specifies the TACK key being broken. The key 275 is encoded as per TACK.public_key. 277 signature: This field is an ECDSA signature by the TACK_Break_Sig's 278 public key over the 14 byte ASCII string "tack_break_sig". The 279 field contains a pair of integers (r, s) representing an ECDSA 280 signature as defined in [FIPS186-3], using curve P-256 and SHA256. 281 It is calculated and encoded as per TACK.signature. 283 4.2.3. TACK_Extension fields 285 tack: This field provides the server's TACK. It MAY be empty, or 286 MAY contain a TACK. 288 break_sigs: This field provides break signatures. It MAY be empty, 289 or MAY contain up to 8 break signatures. 291 pin_activation: If pin activation is enabled, then the 292 TACK_Extension MAY be used by clients to activate or extend the 293 activation of TACK pins. This field is typically toggled from a 294 disabled to an enabled state once TACKs have been deployed to all 295 TLS servers for a hostname. Enabling pin_activation when there is 296 no TACK present has no effect. 298 Note that both the "tack" and "break_sigs" fields MAY be empty. 300 5. Client processing 302 5.1. TACK pins, key records, and name records 304 A client supporting TACK SHALL have a local store of pins, consisting 305 of "key records" and "name records". Each name record is associated 306 with a key record. Multiple name records MAY be associated with one 307 key record. A "pin" refers to a (name record, key record) pair. 309 A "key record" contains: 311 TACK public key (or hash): A public key or a cryptographically- 312 secure, second preimage-resistant hash of a public key. A client 313 SHALL NOT store multiple key records referencing the same key. 315 Min_generation: A single byte used to detect revoked TACKs. 317 A "name record" contains: 319 Name: A fully qualified DNS hostname. A client SHALL NOT store 320 multiple name records with the same name. The TLS server's 321 hostname is considered the "relevant name", and a pin whose name 322 exactly matches the relevant name is considered a "relevant pin". 324 Initial timestamp: A timestamp noting when this pin was created. 326 Active period end: Empty or a timestamp. If empty or set to a time 327 in the past, the pin is "inactive". If set to a future time, the 328 pin is "active" until that time. 330 5.2. High-level client processing 332 A TACK client SHALL send the "tack" extension defined previously, and 333 SHOULD send the "server_name" extension from [RFC6066]. If not 334 resuming a session, the server MAY respond with a TACK_Extension. A 335 TACK client SHALL perform the following steps prior to using a non- 336 resumed connection: 338 1. Check whether the TLS handshake is "well-formed". 340 2. Check the TACK generation and update min_generation. 342 3. Check whether the TACK is expired. 344 4. Create and activate pins (optional). 346 5. Discard pins based on break signatures. 348 These steps SHALL be performed in order. If there is any error, the 349 client SHALL send a fatal error alert and close the connection, 350 skipping the remaining steps (see Section 5.3 for details). 352 After the above steps, if there is a relevant active pin and a TACK 353 whose key is referenced by the pin, then the connection is "accepted" 354 by the pin. If there is a relevant active pin but no such TACK, the 355 connection is "rejected" by the pin. If there is no relevant active 356 pin, the connection is "unpinned". 358 A rejected connection might indicate a network attack. If the 359 connection is rejected the client SHOULD send a fatal "access_denied" 360 error alert and close the connection. 362 A client MAY perform additional verification steps before using an 363 accepted or unpinned connection. See Section 6.1 for an example. 365 5.3. Client processing details 367 5.3.1. Check whether the TLS handshake is well-formed 369 A TLS handshake is "well-formed" if the following are true (the error 370 alert to be sent on a failure is indicated in parentheses): 372 1. The handshake protocol negotiates a cryptographically secure 373 ciphersuite and finishes succesfully (else see [RFC5246]). 375 2. The handshake contains either no TACK_Extension or a 376 syntactically-valid TACK_Extension (else "decode_error"). 378 3. If break signatures are present, the signatures are correct (else 379 "decrypt_error"). This step is optional, as break signature 380 verification MAY be deferred till later. 382 4. If a TACK is present, it is "well-formed" by the rules below. 384 A TACK is "well-formed" if: 386 1. "public_key" is a valid elliptic curve public key on the curve 387 P-256 (else "decrypt_error"). 389 2. "generation" is >= "min_generation" (else "decode_error"). 391 3. "target_hash" is equal to the SHA256 hash of the server's 392 SubjectPublicKeyInfo (else "illegal_parameter"). 394 4. "signature" is a correct ECDSA signature (else "decrypt_error"). 396 5.3.2. Check the TACK generation and update min_generation 398 If there is a TACK and a key record referencing the TACK key, and the 399 TACK's generation is less than the key record's min_generation, then 400 the TACK is revoked and the client SHALL send the 401 "certificate_revoked" alert and close the connection. 403 Otherwise, if there is a TACK and a key record referencing the TACK 404 key, and the TACK's min_generation is greater than the key record's 405 min_generation, then the key record's min_generation SHALL be set to 406 the TACK's value. 408 5.3.3. Check whether the TACK is expired 410 If there is a TACK and the TACK's "expiration" field specifies a time 411 in the past, the client SHALL send the "certificate_expired" alert 412 and close the connection. 414 5.3.4. Create and activate pins (optional) 416 The TLS connection MAY be used to create, delete, and activate pins 417 as described in this section. Note that this section is optional; a 418 client MAY rely on an external source of pins, provided the external 419 pins are produced by a client following the below algorithms. 421 If there is a TACK and a relevant pin referencing the TACK key, and 422 pin activation is enabled, the name record's "active period end" 423 SHALL be set using the below formula (where "current" is the current 424 time, and "initial" is the "initial timestamp" from the name record): 426 active_period_end = current + MIN(30 days, current - initial) 428 If there is a TACK and either no relevant pin or an inactive relevant 429 pin that does not reference the TACK key, a new pin SHALL be created: 431 1. If the TACK key is referenced by an existing key record, the key 432 record is reused, otherwise a new key record is created with the 433 TACK's key and min_generation. 435 2. A new name record is created containing the relevant name, an 436 "initial timestamp" equal to the current time, and an empty 437 "active period end". 439 3. If there is an existing relevant pin, the pin SHALL be deleted 440 (see Section 5.3.6). 442 If there is no TACK and the relevant pin is inactive, the pin SHALL 443 be deleted (see Section 5.3.6). 445 The following table summarizes this behavior based on whether the 446 relevant pin is active and references the TACK key. The "(*)" means 447 "if pin activation is enabled". 449 +------------+---------------------+-------------------------------+ 450 | Pin status | Pin references TACK | Result | 451 +------------+---------------------+-------------------------------+ 452 | Active | Yes | Extend activation period (*) | 453 | | | | 454 | Active | No (or no TACK) | Rejected | 455 | | | | 456 | Inactive | Yes | Activate pin (*) | 457 | | | | 458 | Inactive | No | Replace with new inactive pin | 459 | | | | 460 | Inactive | No TACK | Delete pin | 461 | | | | 462 | No pin | - | Create new inactive pin | 463 | | | | 464 | No pin | No TACK | - | 465 +------------+---------------------+-------------------------------+ 467 5.3.5. Discard pins based on break signatures 469 All key records broken by break signatures SHALL be discarded, along 470 with their associated name records. A key record is broken by a 471 break signature if the break signature passes the following checks: 473 1. "public_key" is referenced by the key record. 475 2. "signature" is a correct ECDSA signature (else "decrypt_error"). 477 5.3.6. Deleting pins 479 A client might need to delete a pin from its store as a result of the 480 algorithms in Section 5.3.4. A client MAY also delete pins from its 481 store at any time, whether to save space, protect privacy, or for any 482 other reason. To delete a pin, its name record SHALL be removed. If 483 this leaves a key record with no associated name records, the key 484 record MAY be removed as well. Pins MAY be deleted regardless of 485 whether they are active or inactive, however for security concerns 486 regarding pin deletion, see Section 9.2. 488 Deleting pins unnecessarily will reduce the benefits of TACK, so 489 SHOULD be avoided. Note that a pin SHOULD NOT be deleted simply 490 because it has become inactive. Instead, such a pin SHOULD be 491 retained, so that it can be re-activated in the future by the 492 algorithms in Section 5.3.4. 494 6. Variations on client processing 496 6.1. TACK and certificate verification 498 A TACK client MAY choose to perform some form of certificate 499 verification in addition to TACK processing. When combining 500 certificate verification and TACK processing, the TACK processing 501 described in Section 5 SHALL be followed, with the exception that 502 TACK processing MAY be terminated early (or skipped) if some fatal 503 certificate error is discovered. 505 If TACK processing and certificate verification both complete without 506 a fatal error, the client SHALL apply some policy to decide whether 507 to accept the connection. The policy is up to the client. An 508 example policy would be to accept the connection only if it passes 509 certificate verification and is not rejected by a pin, or if the user 510 elects to "connect anyway" despite certificate and/or pin failures. 512 6.2. Application-specific pinning 514 In addition to the hostname-based pinning described in Section 5, 515 some applications may require "application-specific pins", where an 516 application-layer name is pinned to a TACK key. For example, an SMTP 517 MTA may wish to authenticate receiving MTAs by pinning email domains 518 to the receiving MTAs' TACK keys. 520 Application-specific pins may require redefinition of the name 521 record's "name" field, the "relevant name" for the TLS connection, 522 and the "pin activation" signal. With these items redefined, the 523 client processing rules in Section 5 may be reused. 525 Note that a server using application-specific pins is still subject 526 to hostname pins, and a client MAY apply either or both forms of 527 pinning. 529 The specification of application-specific pinning for particular 530 applications is outside the scope of this document. 532 7. TACK IDs 534 A "TACK ID" MAY be used to represent a TACK public key to users in a 535 form that is relatively easy to compare and transcribe. A TACK ID 536 consists of the first 25 characters from the base32 encoding of 537 SHA256(public_key), split into 5 groups of 5 characters separated by 538 periods. Base32 encoding is as specified in [RFC4648], except 539 lowercase is used. 541 Example TACK IDs: 543 quxiz.kpldu.uuedc.j5znm.7mqst 545 a334f.bt7ts.ljb3b.y24ij.6zhwm 547 ebsx7.z22qt.okobu.ibhut.xzdny 549 8. Advice 551 8.1. For server operators 553 Key reuse: All servers that are pinned to a single TACK key are able 554 to impersonate each other, since clients will perceive their TACKs 555 as equivalent. Thus, TACK keys SHOULD NOT be reused with 556 different hostnames unless these hostnames are closely related. 557 Examples where it would be safe to reuse a TACK key are hostnames 558 aliased to the same host, hosts sharing the same TLS key, or 559 hostnames for a group of near-identical servers. 561 Aliases: A TLS server may be referenced by multiple hostnames. 562 Clients may pin any of these hostnames. Server operators should 563 be careful when using such DNS aliases that hostnames are not 564 pinned inadvertently. 566 Generations: To revoke older generations of TACKs, the server 567 operator SHOULD first provide all servers with a new generation of 568 TACKs, and only then provide servers with new TACKs containing the 569 new min_generation. Otherwise, a client may receive a 570 min_generation update from one server but then try to contact an 571 older-generation server which has not yet been updated. 573 Signature expiration: It is convenient to set the TACK expiration 574 equal to the end-entity certificate expiration, so that the TACK 575 and certificate may both be replaced at the same time. 576 Alternatively, short-lived TACKs may be used so that a compromised 577 TLS private key has limited value to an attacker. 579 Break signatures: A break signature only needs to be published for a 580 time interval equal to the maximum active period of any affected 581 pins. For example, if a TACK has been only been published on a 582 website for 24 hours, to remove the TACK only requires publishing 583 the break signature for 24 hours. 585 Pin activation: Pin activation SHOULD only be enabled once all TLS 586 servers sharing the same hostname have a TACK. Otherwise, a 587 client may activate a pin by contacting one server, then contact a 588 different server at the same hostname that does not yet have a 589 TACK. 591 Pin deactivation: The pin_activation field can be used to phase out 592 TACKs for a hostname. If all servers at a hostname disable pin 593 activation, all existing pins for the hostname will eventually 594 become inactive, at which point the servers' TACKs can be removed. 596 8.2. For client implementers 598 Sharing pin information: It is possible for a client to maintain a 599 pin store based entirely on its own TLS connections. However, 600 such a client runs the risk of creating incorrect pins, failing to 601 keep its pins active, or failing to receive revocation information 602 (min_generation updates and break signatures). Clients are 603 advised to collaborate so that pin data can be aggregated and 604 shared. This will require additional protocols outside the scope 605 of this document. 607 Clock synchronization: A client SHOULD take measures to prevent 608 TACKs from being erroneously rejected due to an inaccurate client 609 clock. Such methods MAY include using time synchronization 610 protocols such as NTP [RFC5905], or accepting seemingly-expired 611 TACKs if they expired less than T minutes ago, where T is a 612 "tolerance bound" set to the client's maximum expected clock 613 error. 615 9. Security considerations 617 9.1. For server operators 619 All servers pinned to the same TACK key can impersonate each other 620 (see Section 8.1). Think carefully about this risk if using the same 621 TACK key for multiple hostnames. 623 Make backup copies of the TACK private key and keep all copies in 624 secure locations where they can't be compromised. 626 A TACK private key MUST NOT be used to perform any non-TACK 627 cryptographic operations. For example, using a TACK key for email 628 encryption, code-signing, or any other purpose MUST NOT be done. 630 HTTP cookies [RFC6265] set by a pinned host can be stolen by a 631 network attacker who can forge web and DNS responses so as to cause a 632 client to send the cookies to a phony subdomain of the pinned host. 633 To prevent this, TACK HTTPS Servers SHOULD set the "secure" attribute 634 and omit the "domain" attribute on all security-sensitive cookies, 635 such as session cookies. These settings tell the browser that the 636 cookie should only be presented back to the originating host (not its 637 subdomains), and should only be sent over HTTPS (not HTTP) [RFC6265]. 639 9.2. For client implementers 641 A TACK pin store may contain private details of the client's 642 connection history. An attacker may be able to access this 643 information by hacking or stealing the client. Some information 644 about the client's connection history could also be gleaned by 645 observing whether the client accepts or rejects connections to phony 646 TLS servers without correct TACKs. To mitigate these risks, a TACK 647 client SHOULD allow the user to edit or clear the pin store. 649 Aside from rejecting TLS connections, clients SHOULD NOT take any 650 actions which would reveal to a network observer the state of the 651 client's pin store, as this would allow an attacker to know in 652 advance whether a "man-in-the-middle" attack on a particular TLS 653 connection will succeed or be detected. 655 An attacker may attempt to flood a client with spurious TACKs for 656 different hostnames, causing the client to delete old pins to make 657 space for new ones. To defend against this, clients SHOULD NOT 658 delete active pins to make space for new pins. Clients instead 659 SHOULD delete inactive pins. If there are no inactive pins to 660 delete, then the pin store is full and there is no space for new 661 pins. To select an inactive pin for deletion, the client SHOULD 662 delete the pin with the oldest "active_period_end". 664 9.3. Note on algorithm agility 666 If the need arises for TACKs using different cryptographic algorithms 667 (e.g., if SHA256 or ECDSA are shown to be weak), a "v2" version of 668 TACKs could be defined, requiring assignment of a new TLS Extension 669 number. TACKs as defined in this document would then be known as 670 "v1" TACKs. 672 10. IANA considerations 674 10.1. New entry for the TLS ExtensionType Registry 676 IANA is requested to add an entry to the existing TLS ExtensionType 677 registry, defined in [RFC5246], for tack(TBD) as defined in this 678 document. 680 11. Acknowledgements 682 Valuable feedback has been provided by Adam Langley, Chris Palmer, 683 Nate Lawson, and Joseph Bonneau. 685 12. Normative references 687 [FIPS180-2] 688 National Institute of Standards and Technology, "Secure 689 Hash Standard", FIPS PUB 180-2, August 2002, . 692 [FIPS186-3] 693 National Institute of Standards and Technology, "Digital 694 Signature Standard", FIPS PUB 186-3, June 2009, . 697 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 698 Requirement Levels", BCP 14, RFC 2119, March 1997. 700 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 701 Encodings", RFC 4648, October 2006. 703 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 704 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 706 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 707 Housley, R., and W. Polk, "Internet X.509 Public Key 708 Infrastructure Certificate and Certificate Revocation List 709 (CRL) Profile", RFC 5280, May 2008. 711 [RFC5480] Turner, S., Brown, D., Yiu, K., Housley, R., and T. Polk, 712 "Elliptic Curve Cryptography Subject Public Key 713 Information", RFC 5480, March 2009. 715 [RFC5905] Mills, D., Martin, J., Burbank, J., and W. Kasch, "Network 716 Time Protocol Version 4: Protocol and Algorithms 717 Specification", RFC 5905, June 2010. 719 [RFC6066] Eastlake, D., "Transport Layer Security (TLS) Extensions: 720 Extension Definitions", RFC 6066, January 2011. 722 [RFC6090] McGrew, D., Igoe, K., and M. Salter, "Fundamental Elliptic 723 Curve Cryptography Algorithms", RFC 6090, February 2011. 725 [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, 726 April 2011. 728 Authors' Addresses 730 Moxie Marlinspike 732 Trevor Perrin (editor)