idnits 2.17.1 draft-ietf-ppsp-peer-protocol-09.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 (April 4, 2014) is 3675 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Non-RFC (?) normative reference: ref. 'FIPS180-4' -- Possible downref: Non-RFC (?) normative reference: ref. 'IANADNSSECALGNUM' == Outdated reference: A later version (-12) exists of draft-ietf-ppsp-base-tracker-protocol-03 -- Obsolete informational reference (is this intentional?): RFC 4960 (Obsoleted by RFC 9260) -- Obsolete informational reference (is this intentional?): RFC 5226 (Obsoleted by RFC 8126) -- Obsolete informational reference (is this intentional?): RFC 5389 (Obsoleted by RFC 8489) -- Obsolete informational reference (is this intentional?): RFC 6347 (Obsoleted by RFC 9147) Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 7 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 PPSP A. Bakker 3 Internet-Draft Vrije Universiteit Amsterdam 4 Intended status: Standards Track R. Petrocco 5 Expires: October 6, 2014 V. Grishchenko 6 Technische Universiteit Delft 7 April 4, 2014 9 Peer-to-Peer Streaming Peer Protocol (PPSPP) 10 draft-ietf-ppsp-peer-protocol-09 12 Abstract 14 The Peer-to-Peer Streaming Peer Protocol (PPSPP) is a protocol for 15 disseminating the same content to a group of interested parties in a 16 streaming fashion. PPSPP supports streaming of both pre-recorded 17 (on-demand) and live audio/video content. It is based on the peer- 18 to-peer paradigm, where clients consuming the content are put on 19 equal footing with the servers initially providing the content, to 20 create a system where everyone can potentially provide upload 21 bandwidth. It has been designed to provide short time-till-playback 22 for the end user, and to prevent disruption of the streams by 23 malicious peers. PPSPP has also been designed to be flexible and 24 extensible. It can use different mechanisms to optimize peer 25 uploading, prevent freeriding, and work with different peer discovery 26 schemes (centralized trackers or Distributed Hash Tables). It 27 supports multiple methods for content integrity protection and chunk 28 addressing. Designed as a generic protocol that can run on top of 29 various transport protocols, it currently runs on top of UDP using 30 LEDBAT for congestion control. 32 Status of this Memo 34 This Internet-Draft is submitted in full conformance with the 35 provisions of BCP 78 and BCP 79. 37 Internet-Drafts are working documents of the Internet Engineering 38 Task Force (IETF). Note that other groups may also distribute 39 working documents as Internet-Drafts. The list of current Internet- 40 Drafts is at http://datatracker.ietf.org/drafts/current/. 42 Internet-Drafts are draft documents valid for a maximum of six months 43 and may be updated, replaced, or obsoleted by other documents at any 44 time. It is inappropriate to use Internet-Drafts as reference 45 material or to cite them other than as "work in progress." 47 This Internet-Draft will expire on October 6, 2014. 49 Copyright Notice 51 Copyright (c) 2014 IETF Trust and the persons identified as the 52 document authors. All rights reserved. 54 This document is subject to BCP 78 and the IETF Trust's Legal 55 Provisions Relating to IETF Documents 56 (http://trustee.ietf.org/license-info) in effect on the date of 57 publication of this document. Please review these documents 58 carefully, as they describe your rights and restrictions with respect 59 to this document. Code Components extracted from this document must 60 include Simplified BSD License text as described in Section 4.e of 61 the Trust Legal Provisions and are provided without warranty as 62 described in the Simplified BSD License. 64 Table of Contents 66 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 6 67 1.1. Purpose . . . . . . . . . . . . . . . . . . . . . . . . . 6 68 1.2. Requirements Language . . . . . . . . . . . . . . . . . . 7 69 1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . . 7 70 2. Overall Operation . . . . . . . . . . . . . . . . . . . . . . 9 71 2.1. Example: Joining a Swarm . . . . . . . . . . . . . . . . . 9 72 2.2. Example: Exchanging Chunks . . . . . . . . . . . . . . . . 10 73 2.3. Example: Leaving a Swarm . . . . . . . . . . . . . . . . . 11 74 3. Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 75 3.1. HANDSHAKE . . . . . . . . . . . . . . . . . . . . . . . . 11 76 3.2. HAVE . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 77 3.3. DATA . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 78 3.4. ACK . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 79 3.5. INTEGRITY . . . . . . . . . . . . . . . . . . . . . . . . 13 80 3.6. SIGNED_INTEGRITY . . . . . . . . . . . . . . . . . . . . . 13 81 3.7. REQUEST . . . . . . . . . . . . . . . . . . . . . . . . . 13 82 3.8. CANCEL . . . . . . . . . . . . . . . . . . . . . . . . . . 14 83 3.9. CHOKE and UNCHOKE . . . . . . . . . . . . . . . . . . . . 14 84 3.10. Peer Address Exchange . . . . . . . . . . . . . . . . . . 14 85 3.10.1. PEX_REQ and PEX_RES Messages . . . . . . . . . . . . 14 86 3.11. Channels . . . . . . . . . . . . . . . . . . . . . . . . . 16 87 3.12. Keep Alive Signalling . . . . . . . . . . . . . . . . . . 17 88 4. Chunk Addressing Schemes . . . . . . . . . . . . . . . . . . . 17 89 4.1. Start-End Ranges . . . . . . . . . . . . . . . . . . . . . 18 90 4.1.1. Chunk Ranges . . . . . . . . . . . . . . . . . . . . 18 91 4.1.2. Byte Ranges . . . . . . . . . . . . . . . . . . . . . 18 92 4.2. Bin Numbers . . . . . . . . . . . . . . . . . . . . . . . 18 93 4.3. In Messages . . . . . . . . . . . . . . . . . . . . . . . 20 94 4.3.1. In HAVE Messages . . . . . . . . . . . . . . . . . . 20 95 4.3.2. In ACK Messages . . . . . . . . . . . . . . . . . . . 20 97 5. Content Integrity Protection . . . . . . . . . . . . . . . . . 21 98 5.1. Merkle Hash Tree Scheme . . . . . . . . . . . . . . . . . 21 99 5.2. Content Integrity Verification . . . . . . . . . . . . . . 22 100 5.3. The Atomic Datagram Principle . . . . . . . . . . . . . . 23 101 5.4. INTEGRITY Messages . . . . . . . . . . . . . . . . . . . . 24 102 5.5. Discussion and Overhead . . . . . . . . . . . . . . . . . 24 103 5.6. Automatic Detection of Content Size . . . . . . . . . . . 25 104 5.6.1. Peak Hashes . . . . . . . . . . . . . . . . . . . . . 26 105 5.6.2. Procedure . . . . . . . . . . . . . . . . . . . . . . 28 106 6. Live Streaming . . . . . . . . . . . . . . . . . . . . . . . . 28 107 6.1. Content Authentication . . . . . . . . . . . . . . . . . . 28 108 6.1.1. Sign All . . . . . . . . . . . . . . . . . . . . . . 29 109 6.1.2. Unified Merkle Tree . . . . . . . . . . . . . . . . . 30 110 6.1.2.1. Signed Munro Hashes . . . . . . . . . . . . . . . 30 111 6.1.2.2. Munro Signature Calculation . . . . . . . . . . . 33 112 6.1.2.3. Procedure . . . . . . . . . . . . . . . . . . . . 33 113 6.1.2.4. Secure Tune In . . . . . . . . . . . . . . . . . . 33 114 6.2. Forgetting Chunks . . . . . . . . . . . . . . . . . . . . 34 115 7. Protocol Options . . . . . . . . . . . . . . . . . . . . . . . 35 116 7.1. End Option . . . . . . . . . . . . . . . . . . . . . . . . 35 117 7.2. Version . . . . . . . . . . . . . . . . . . . . . . . . . 35 118 7.3. Minimum Version . . . . . . . . . . . . . . . . . . . . . 36 119 7.4. Swarm Identifier . . . . . . . . . . . . . . . . . . . . . 36 120 7.5. Content Integrity Protection Method . . . . . . . . . . . 37 121 7.6. Merkle Tree Hash Function . . . . . . . . . . . . . . . . 37 122 7.7. Live Signature Algorithm . . . . . . . . . . . . . . . . . 38 123 7.8. Chunk Addressing Method . . . . . . . . . . . . . . . . . 38 124 7.9. Live Discard Window . . . . . . . . . . . . . . . . . . . 39 125 7.10. Supported Messages . . . . . . . . . . . . . . . . . . . . 40 126 8. UDP Encapsulation . . . . . . . . . . . . . . . . . . . . . . 40 127 8.1. Chunk Size . . . . . . . . . . . . . . . . . . . . . . . . 40 128 8.2. Datagrams and Messages . . . . . . . . . . . . . . . . . . 41 129 8.3. Channels . . . . . . . . . . . . . . . . . . . . . . . . . 42 130 8.4. HANDSHAKE . . . . . . . . . . . . . . . . . . . . . . . . 43 131 8.5. HAVE . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 132 8.6. DATA . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 133 8.7. ACK . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 134 8.8. INTEGRITY . . . . . . . . . . . . . . . . . . . . . . . . 46 135 8.9. SIGNED_INTEGRITY . . . . . . . . . . . . . . . . . . . . . 47 136 8.10. REQUEST . . . . . . . . . . . . . . . . . . . . . . . . . 48 137 8.11. CANCEL . . . . . . . . . . . . . . . . . . . . . . . . . . 48 138 8.12. CHOKE and UNCHOKE . . . . . . . . . . . . . . . . . . . . 49 139 8.13. PEX_REQ, PEX_RESv4, PEX_RESv6 and PEX_REScert . . . . . . 49 140 8.14. KEEPALIVE . . . . . . . . . . . . . . . . . . . . . . . . 51 141 8.15. Detecting a Dead Peer . . . . . . . . . . . . . . . . . . 51 142 8.16. Flow and Congestion Control . . . . . . . . . . . . . . . 52 143 8.17. Example of Operation . . . . . . . . . . . . . . . . . . . 52 144 9. Extensibility . . . . . . . . . . . . . . . . . . . . . . . . 57 145 9.1. Chunk Picking Algorithms . . . . . . . . . . . . . . . . . 57 146 9.2. Reciprocity Algorithms . . . . . . . . . . . . . . . . . . 57 147 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 57 148 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 58 149 11.1. PPSP Peer Protocol Message Type Registry . . . . . . . . . 58 150 11.2. PPSP Peer Protocol Option Registry . . . . . . . . . . . . 58 151 11.3. PPSP Peer Protocol Version Number Registry . . . . . . . . 58 152 11.4. PPSP Peer Protocol Content Integrity Protection Method 153 Registry . . . . . . . . . . . . . . . . . . . . . . . . . 58 154 11.5. PPSP Peer Protocol Merkle Hash Tree Function Registry . . 58 155 11.6. PPSP Peer Protocol Chunk Addressing Method Registry . . . 58 156 12. Manageability Considerations . . . . . . . . . . . . . . . . . 58 157 12.1. Operations . . . . . . . . . . . . . . . . . . . . . . . . 59 158 12.1.1. Installation and Initial Setup . . . . . . . . . . . 59 159 12.1.2. Requirements on Other Protocols and Functional 160 Components . . . . . . . . . . . . . . . . . . . . . 60 161 12.1.3. Migration Path . . . . . . . . . . . . . . . . . . . 60 162 12.1.4. Impact on Network Operation . . . . . . . . . . . . . 60 163 12.1.5. Verifying Correct Operation . . . . . . . . . . . . . 60 164 12.1.6. Configuration . . . . . . . . . . . . . . . . . . . . 61 165 12.2. Management Considerations . . . . . . . . . . . . . . . . 61 166 12.2.1. Management Interoperability and Information . . . . . 62 167 12.2.2. Fault Management . . . . . . . . . . . . . . . . . . 62 168 12.2.3. Configuration Management . . . . . . . . . . . . . . 62 169 12.2.4. Accounting Management . . . . . . . . . . . . . . . . 63 170 12.2.5. Performance Management . . . . . . . . . . . . . . . 63 171 12.2.6. Security Management . . . . . . . . . . . . . . . . . 63 172 13. Security Considerations . . . . . . . . . . . . . . . . . . . 63 173 13.1. Security of the Handshake Procedure . . . . . . . . . . . 63 174 13.1.1. Protection Against Attack 1 . . . . . . . . . . . . . 64 175 13.1.2. Protection Against Attack 2 . . . . . . . . . . . . . 65 176 13.1.3. Protection Against Attack 3 . . . . . . . . . . . . . 65 177 13.2. Secure Peer Address Exchange . . . . . . . . . . . . . . . 66 178 13.2.1. Protection against the Amplification Attack . . . . . 66 179 13.2.2. Example: Tracker as Certification Authority . . . . . 67 180 13.2.3. Protection Against Eclipse Attacks . . . . . . . . . 68 181 13.3. Support for Closed Swarms (PPSP.SEC.REQ-1) . . . . . . . . 68 182 13.4. Confidentiality of Streamed Content (PPSP.SEC.REQ-2+3) . . 68 183 13.5. Strength of the Hash Function for Merkle Hash Trees . . . 69 184 13.6. Limit Potential Damage and Resource Exhaustion by Bad 185 or Broken Peers (PPSP.SEC.REQ-4+6) . . . . . . . . . . . . 69 186 13.6.1. HANDSHAKE . . . . . . . . . . . . . . . . . . . . . . 69 187 13.6.2. HAVE . . . . . . . . . . . . . . . . . . . . . . . . 69 188 13.6.3. DATA . . . . . . . . . . . . . . . . . . . . . . . . 70 189 13.6.4. ACK . . . . . . . . . . . . . . . . . . . . . . . . . 70 190 13.6.5. INTEGRITY and SIGNED_INTEGRITY . . . . . . . . . . . 70 191 13.6.6. REQUEST . . . . . . . . . . . . . . . . . . . . . . . 71 192 13.6.7. CANCEL . . . . . . . . . . . . . . . . . . . . . . . 71 193 13.6.8. CHOKE . . . . . . . . . . . . . . . . . . . . . . . . 71 194 13.6.9. UNCHOKE . . . . . . . . . . . . . . . . . . . . . . . 71 195 13.6.10. PEX_RES . . . . . . . . . . . . . . . . . . . . . . . 72 196 13.6.11. Unsolicited Messages in General . . . . . . . . . . . 72 197 13.7. Exclude Bad or Broken Peers (PPSP.SEC.REQ-5) . . . . . . . 72 198 14. References . . . . . . . . . . . . . . . . . . . . . . . . . . 72 199 14.1. Normative References . . . . . . . . . . . . . . . . . . . 72 200 14.2. Informative References . . . . . . . . . . . . . . . . . . 73 201 Appendix A. Revision History . . . . . . . . . . . . . . . . . . 77 202 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 95 204 1. Introduction 206 1.1. Purpose 208 This document describes the Peer-to-Peer Streaming Peer Protocol 209 (PPSPP), designed for disseminating the same content to a group of 210 interested parties in a streaming fashion. PPSPP supports streaming 211 of both pre-recorded (on-demand) and live audio/video content. It is 212 based on the peer-to-peer paradigm where clients consuming the 213 content are put on equal footing with the servers initially providing 214 the content, to create a system where everyone can potentially 215 provide upload bandwidth. 217 PPSPP has been designed to provide short time-till-playback for the 218 end user, and to prevent disruption of the streams by malicious 219 peers. Central in this design is a simple method of identifying 220 content based on self-certification. In particular, content in PPSPP 221 is identified by a single cryptographic hash that is the root hash in 222 a Merkle hash tree calculated recursively from the content 223 [MERKLE][ABMRKL]. This self-certifying hash tree allows every peer 224 to directly detect when a malicious peer tries to distribute fake 225 content. The tree can be used for both static and live content. 226 Moreover, it ensures only a small amount of information is needed to 227 start a download and to verify incoming chunks of content, thus 228 ensuring short start-up times. 230 PPSPP has also been designed to be extensible for different 231 transports and use cases. Hence, PPSPP is a generic protocol which 232 can run directly on top of UDP, TCP, or other protocols. As such, 233 PPSPP defines a common set of messages that make up the protocol, 234 which can have different representations on the wire depending on the 235 lower-level protocol used. When the lower-level transport allows, 236 PPSPP can also use different congestion control algorithms. 238 At present, PPSPP is set to run on top of UDP using LEDBAT for 239 congestion control [RFC6817]. Using LEDBAT enables PPSPP to serve 240 the content after playback (seeding) without disrupting the user who 241 may have moved to different tasks that use its network connection. 243 PPSPP is also flexible and extensible in the mechanisms it uses to 244 promote client contribution and prevent freeriding, that is, how to 245 deal with peers that only download content but never upload to 246 others. It also allows different schemes for chunk addressing and 247 content integrity protection, if the defaults are not fit for a 248 particular use case. In addition, it can work with different peer 249 discovery schemes, such as centralized trackers or fast Distributed 250 Hash Tables [JIM11]. Finally, in this default setup, PPSPP maintains 251 only a small amount of state per peer. A reference implementation of 252 PPSPP over UDP is available [SWIFTIMPL]. 254 1.2. Requirements Language 256 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 257 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 258 document are to be interpreted as described in RFC 2119 [RFC2119]. 260 1.3. Terminology 262 message 263 The basic unit of PPSPP communication. A message will have 264 different representations on the wire depending on the transport 265 protocol used. Messages are typically multiplexed into a 266 datagram for transmission. 268 datagram 269 A sequence of messages that is offered as a unit to the 270 underlying transport protocol (UDP, etc.). The datagram is 271 PPSPP's Protocol Data Unit (PDU). 273 content 274 Either a live transmission, a pre-recorded multimedia asset, or a 275 file. 277 chunk 278 The basic unit in which the content is divided. E.g. a block of 279 N kilobyte. 281 chunk ID 282 Unique identifier for a chunk of content (e.g. an integer). Its 283 type depends on the chunk addressing scheme used. 285 chunk specification 286 An expression that denotes one or more chunk IDs. 288 chunk addressing scheme 289 Scheme for identifying chunks and expressing the chunk 290 availability map of a peer in a compact fashion. 292 chunk availability map 293 The set of chunks a peer has successfully downloaded and checked 294 the integrity of. 296 bin 297 A number denoting a specific binary interval of the content 298 (i.e., one or more consecutive chunks) in the bin numbers chunk 299 addressing scheme (see Section 4). 301 content integrity protection scheme 302 Scheme for protecting the integrity of the content while it is 303 being distributed via the peer-to-peer network. I.e. methods for 304 receiving peers to detect whether a requested chunk has been 305 maliciously modified by the sending peer. 307 hash 308 The result of applying a cryptographic hash function, more 309 specifically a modification detection code (MDC) [HAC01], such as 310 SHA-1 [FIPS180-4], to a piece of data. 312 Merkle hash tree 313 A tree of hashes whose base is formed by the hashes of the chunks 314 of content, and its higher nodes are calculated by recursively 315 computing the hash of the concatenation of the two child hashes 316 (see Section 5.1). 318 root hash 319 The root in a Merkle hash tree calculated recursively from the 320 content (see Section 5.1). 322 swarm 323 A group of peers participating in the distribution of the same 324 content. 326 swarm ID 327 Unique identifier for a swarm of peers, in PPSPP a sequence of 328 bytes. When Merkle hash trees are used for content integrity 329 protection, the identifier is the so-called root hash of the 330 content (video-on-demand). For live streaming, the swarm ID is a 331 public key. 333 tracker 334 An entity that records the addresses of peers participating in a 335 swarm, usually for a set of swarms, and makes this membership 336 information available to other peers on request. 338 choking 339 When a peer A is choking peer B it means that A is currently not 340 willing to accept requests for content from B. 342 seeding 343 Peer A is said to be seeding when A has downloaded a static 344 content asset completely and is now offering it for others to 345 download. 347 leeching 348 Peer A is said to be leeching when A has not completely 349 downloaded a static content asset yet or is not offering to 350 upload it to others. 352 channel 353 A logical connection between two peers. The channel concept 354 allows peers to use the same transport address for communicating 355 with different peers. 357 channel ID 358 Unique, randomly chosen identifier for a channel, local to each 359 peer. So the two peers logically connected by a channel each 360 have a different channel ID for the channel. 362 In this document the prefixes kilo, mega, etc. denote base 1024. 364 2. Overall Operation 366 The basic unit of communication in PPSPP is the message. Multiple 367 messages are multiplexed into a single datagram for transmission. A 368 datagram (and hence the messages it contains) will have different 369 representations on the wire depending on the transport protocol used 370 (see Section 8). 372 The overall operation of PPSPP is illustrated in the following 373 examples. The examples assume that UDP is used for transport, the 374 Merkle Hash Tree scheme is used for content integrity protection, and 375 that a specific policy is used for selecting which chunks to 376 download. 378 2.1. Example: Joining a Swarm 380 Consider a user who wants to watch a video. To play the video, the 381 user clicks on the play button of a HTML5