idnits 2.17.1 draft-ietf-fecframe-ldpc-04.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 9, 2012) is 4216 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) -- Looks like a reference, but probably isn't: '0' on line 465 -- Looks like a reference, but probably isn't: '1' on line 467 -- Looks like a reference, but probably isn't: '2' on line 469 -- Looks like a reference, but probably isn't: '3' on line 471 Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 FecFrame V. Roca 3 Internet-Draft INRIA 4 Intended status: Standards Track M. Cunche 5 Expires: April 12, 2013 INSA-Lyon/INRIA 6 J. Lacan 7 ISAE, Univ. of Toulouse 8 October 9, 2012 10 Simple LDPC-Staircase Forward Error Correction (FEC) Scheme for FECFRAME 11 draft-ietf-fecframe-ldpc-04 13 Abstract 15 This document describes a fully-specified simple FEC scheme for LDPC- 16 Staircase codes that can be used to protect media streams along the 17 lines defined by the FECFRAME framework. These codes have many 18 interesting properties: they are systematic codes, they perform close 19 to ideal codes in many use-cases and they also feature very high 20 encoding and decoding throughputs. LDPC-Staircase codes are 21 therefore a good solution to protect a single high bitrate source 22 flow, or to protect globally several mid-rate flows within a single 23 FECFRAME instance. They are also a good solution whenever the 24 processing load of a software encoder or decoder must be kept to a 25 minimum. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at http://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on April 12, 2013. 44 Copyright Notice 46 Copyright (c) 2012 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (http://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 62 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 63 3. Definitions Notations and Abbreviations . . . . . . . . . . . 4 64 3.1. Definitions . . . . . . . . . . . . . . . . . . . . . . . 4 65 3.2. Notations . . . . . . . . . . . . . . . . . . . . . . . . 6 66 3.3. Abbreviations . . . . . . . . . . . . . . . . . . . . . . 7 67 4. Common Procedures Related to the ADU Block and Source 68 Block Creation . . . . . . . . . . . . . . . . . . . . . . . . 7 69 4.1. Restrictions . . . . . . . . . . . . . . . . . . . . . . . 7 70 4.2. ADU Block Creation . . . . . . . . . . . . . . . . . . . . 8 71 4.3. Source Block Creation . . . . . . . . . . . . . . . . . . 9 72 5. LDPC-Staircase FEC Scheme for Arbitrary ADU Flows . . . . . . 11 73 5.1. Formats and Codes . . . . . . . . . . . . . . . . . . . . 11 74 5.1.1. FEC Framework Configuration Information . . . . . . . 11 75 5.1.2. Explicit Source FEC Payload ID . . . . . . . . . . . . 13 76 5.1.3. Repair FEC Payload ID . . . . . . . . . . . . . . . . 14 77 5.2. Procedures . . . . . . . . . . . . . . . . . . . . . . . . 15 78 5.3. FEC Code Specification . . . . . . . . . . . . . . . . . . 15 79 6. Security Considerations . . . . . . . . . . . . . . . . . . . 16 80 6.1. Attacks Against the Data Flow . . . . . . . . . . . . . . 16 81 6.1.1. Access to Confidential Content . . . . . . . . . . . . 16 82 6.1.2. Content Corruption . . . . . . . . . . . . . . . . . . 16 83 6.2. Attacks Against the FEC Parameters . . . . . . . . . . . . 16 84 6.3. When Several Source Flows are to be Protected Together . . 17 85 6.4. Baseline Secure FEC Framework Operation . . . . . . . . . 17 86 7. Operations and Management Considerations . . . . . . . . . . . 17 87 7.1. Operational Recommendations . . . . . . . . . . . . . . . 18 88 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19 89 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 19 90 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 19 91 10.1. Normative References . . . . . . . . . . . . . . . . . . . 19 92 10.2. Informative References . . . . . . . . . . . . . . . . . . 20 94 1. Introduction 96 The use of Forward Error Correction (FEC) codes is a classic solution 97 to improve the reliability of unicast, multicast and broadcast 98 Content Delivery Protocols (CDP) and applications [RFC3453]. The 99 [RFC6363] document describes a generic framework to use FEC schemes 100 with media delivery applications, and for instance with real-time 101 streaming media applications based on the RTP real-time protocol. 102 Similarly the [RFC5052] document describes a generic framework to use 103 FEC schemes with objects (e.g., files) delivery applications based on 104 the Asynchronous Layered Coding (ALC) [RFC5775] and NACK-Oriented 105 Reliable Multicast (NORM) [RFC5740] reliable multicast transport 106 protocols. 108 More specifically, the [RFC5053] (Raptor) and [RFC5170] (LDPC- 109 Staircase and LDPC-Triangle) FEC schemes introduce erasure codes 110 based on sparse parity check matrices for object delivery protocols 111 like ALC and NORM. Similarly, the [RFC5510] document introduces 112 Reed-Solomon codes based on Vandermonde matrices for the same object 113 delivery protocols. All these codes are systematic codes, meaning 114 that the k source symbols are part of the n encoding symbols. 115 Additionally, the Reed-Solomon FEC codes belong to the class of 116 Maximum Distance Separable (MDS) codes that are optimal in terms of 117 erasure recovery capabilities. It means that a receiver can recover 118 the k source symbols from any set of exactly k encoding symbols out 119 of n. This is not the case with either Raptor or LDPC-Staircase 120 codes, and these codes require a certain number of encoding symbols 121 in excess to k. However, this number is small in practice when an 122 appropriate decoding scheme is used at the receiver [Cunche08]. 123 Another key difference is the high encoding/decoding complexity of 124 Reed-Solomon codecs compared to Raptor or LDPC-Staircase codes. A 125 difference of one or more orders of magnitude or more in terms of 126 encoding/decoding speed exists between the Reed-Solomon and LDPC- 127 Staircase software codecs [Cunche08][CunchePHD10]. Finally, Raptor 128 and LDPC-Staircase codes are large block FEC codes, in the sense of 129 [RFC3453], since they can efficiently deal with a large number of 130 source symbols. 132 The present document focuses on LDPC-Staircase codes, that belong to 133 the well-known class of "Low Density Parity Check" codes. Because of 134 their key features, these codes are a good solution in many 135 situations, as detailed in Section 7. 137 This documents inherits from [RFC5170] the specifications of the core 138 LDPC-Staircase codes. Therefore this document specifies only the 139 information specific to the FECFRAME context and refers to [RFC5170] 140 for the core specifications of the codes. To that purpose, the 141 present document introduces: 143 o the Fully-Specified FEC Scheme with FEC Encoding ID XXX that 144 specifies a simple way of using LDPC-Staircase codes in order to 145 protect arbitrary Application Data Unit (ADU) flows. 147 Finally, publicly available reference implementations of these codes 148 are available [LDPC-codec] [LDPC-codec-OpenFEC]. 150 2. Terminology 152 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 153 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 154 document are to be interpreted as described in RFC 2119 [RFC2119]. 156 3. Definitions Notations and Abbreviations 158 3.1. Definitions 160 This document uses the following terms and definitions. Some of them 161 are FEC scheme specific and are in line with [RFC5052]: 163 Source symbol: unit of data used during the encoding process. In 164 this specification, there is always one source symbol per ADU. 166 Encoding symbol: unit of data generated by the encoding process. 167 With systematic codes, source symbols are part of the encoding 168 symbols. 170 Repair symbol: encoding symbol that is not a source symbol. 172 Code rate: the k/n ratio, i.e., the ratio between the number of 173 source symbols and the number of encoding symbols. By definition, 174 the code rate is such that: 0 < code rate <= 1. A code rate close 175 to 1 indicates that a small number of repair symbols have been 176 produced during the encoding process. 178 Systematic code: FEC code in which the source symbols are part of 179 the encoding symbols. The LDPC-Staircase codes introduced in this 180 document are systematic. 182 Source block: a block of k source symbols that are considered 183 together for the encoding. 185 Packet Erasure Channel: a communication path where packets are 186 either dropped (e.g., by a congested router, or because the number 187 of transmission errors exceeds the correction capabilities of the 188 physical layer codes) or received. When a packet is received, it 189 is assumed that this packet is not corrupted. 191 Some of them are FECFRAME framework specific and are in line with 192 [RFC6363]: 194 Application Data Unit (ADU): the unit of source data provided as 195 payload to the transport layer. Depending on the use-case, an ADU 196 may use an RTP encapsulation. 198 (Source) ADU Flow: a sequence of ADUs associated with a transport- 199 layer flow identifier (such as the standard 5-tuple {Source IP 200 address, source port, destination IP address, destination port, 201 transport protocol}). Depending on the use-case, several ADU 202 flows may be protected together by the FECFRAME framework. 204 ADU Block: a set of ADUs that are considered together by the 205 FECFRAME instance for the purpose of the FEC scheme. Along with 206 the flow ID (F[]), length (L[]), and padding (Pad[]) fields, they 207 form the set of source symbols over which FEC encoding will be 208 performed. 210 ADU Information (ADUI): a unit of data constituted by the ADU and 211 the associated Flow ID, Length and Padding fields (Section 4.3). 212 This is the unit of data that is used as source symbol. 214 FEC Framework Configuration Information (FFCI): information which 215 controls the operation of the FEC Framework. The FFCI enables the 216 synchronization of the FECFRAME sender and receiver instances. 218 FEC Source Packet: at a sender (respectively, at a receiver) a 219 payload submitted to (respectively, received from) the transport 220 protocol containing an ADU along with an optional Explicit Source 221 FEC Payload ID. 223 FEC Repair Packet: at a sender (respectively, at a receiver) a 224 payload submitted to (respectively, received from) the transport 225 protocol containing one repair symbol along with a Repair FEC 226 Payload ID and possibly an RTP header. 228 The above terminology is illustrated in Figure 1 (sender's point of 229 view): 231 +----------------------+ 232 | Application | 233 +----------------------+ 234 | 235 | (1) Application Data Units (ADUs) 236 | 237 v 238 +----------------------+ +----------------+ 239 | FEC Framework | | | 240 | |-------------------------->| FEC Scheme | 241 |(2) Construct source |(3) Source Block | | 242 | blocks | |(4) FEC Encoding| 243 |(6) Construct FEC |<--------------------------| | 244 | source and repair | | | 245 | packets |(5) Explicit Source FEC | | 246 +----------------------+ Payload IDs +----------------+ 247 | Repair FEC Payload IDs 248 | Repair symbols 249 | 250 |(7) FEC source and repair packets 251 v 252 +----------------------+ 253 | Transport Layer | 254 | (e.g., UDP) | 255 +----------------------+ 257 Figure 1: Terminology used in this document (sender). 259 3.2. Notations 261 This document uses the following notations: Some of them are FEC 262 scheme specific: 264 k denotes the number of source symbols in a source block. 266 max_k denotes the maximum number of source symbols for any source 267 block. 269 n denotes the number of encoding symbols generated for a source 270 block. 272 E denotes the encoding symbol length in bytes. 274 CR denotes the "code rate", i.e., the k/n ratio. 276 N1 denotes the target number of "1s" per column in the left side 277 of the parity check matrix. 279 N1m3 denotes the value N1 - 3. 281 G G denotes the number of encoding symbols per group, i.e., the 282 number of symbols sent in the same packet. 284 a^^b denotes a raised to the power b. 286 Some of them are FECFRAME framework specific: 288 B denotes the number of ADUs per ADU block. 290 max_B denotes the maximum number of ADUs for any ADU block. 292 3.3. Abbreviations 294 This document uses the following abbreviations: 296 ADU stands for Application Data Unit. 298 ESI stands for Encoding Symbol ID. 300 FEC stands for Forward Error (or Erasure) Correction code. 302 FFCI stands for FEC Framework Configuration Information. 304 FSSI stands for FEC Scheme Specific Information. 306 LDPC stands for Low Density Parity Check. 308 MDS stands for Maximum Distance Separable code. 310 SDP stands for Session Description Protocol. 312 4. Common Procedures Related to the ADU Block and Source Block Creation 314 This section introduces the procedures that are used during the ADU 315 block and the related source block creation, for the FEC scheme 316 considered. 318 4.1. Restrictions 320 This specification has the following restrictions: 322 o there MUST be exactly one source symbol per ADUI, and therefore 323 per ADU; 325 o there MUST be exactly one repair symbol per FEC Repair Packet; 327 o there MUST be exactly one source block per ADU block; 329 o the use of the LDPC-Staircase scheme is such that there MUST be 330 exactly one encoding symbol per group, i.e., G MUST be equal to 1 331 [RFC5170]; 333 4.2. ADU Block Creation 335 Two kinds of limitations exist that impact the ADU block creation: 337 o at the FEC Scheme level: the FEC Scheme and the FEC codec have 338 limitations that define a maximum source block size; 340 o at the FECFRAME instance level: the target use-case can have real- 341 time constraints that can/will define a maximum ADU block size; 343 Note that terminology "maximum source block size" and "maximum ADU 344 block size" depends on the point of view that is adopted (FEC Scheme 345 versus FECFRAME instance). However, in this document, both refer to 346 the same value since Section 4.1 requires there is exactly one source 347 symbol per ADU. We now detail each of these aspects. 349 The maximum source block size in symbols, max_k, depends on several 350 parameters: the code rate (CR), the Encoding Symbol ID (ESI) field 351 length in the Explicit Source/Repair FEC Payload ID (16 bits), as 352 well as possible internal codec limitations. More specifically, 353 max_k cannot be larger than the following values, derived from the 354 ESI field size limitation, for a given code rate: 356 max1_k = 2^^(16 - ceil(Log2(1/CR))) 358 Some common max1_k values are: 360 o CR == 1 (no repair symbol): max1_k = 2^^16 = 65536 symbols 362 o 1/2 <= CR < 1: max1_k = 2^^15 = 32,768 symbols 364 o 1/4 <= CR < 1/2: max1_k = 2^^14 = 16,384 symbols 366 Additionally, a codec can impose other limitations on the maximum 367 source block size, for instance, because of a limited working memory 368 size. This decision MUST be clarified at implementation time, when 369 the target use-case is known. This results in a max2_k limitation. 371 Then, max_k is given by: 373 max_k = min(max1_k, max2_k) 375 Note that this calculation is only required at the encoder (sender), 376 since the actual k parameter (k <= max_k) is communicated to the 377 decoder (receiver) through the Explicit Source/Repair FEC Payload ID. 379 The source ADU flows can have real-time constraints. When there are 380 multiple flows, with different real-time constraints, let us consider 381 the most stringent constraints (see [RFC6363], section 10.2, item 6 382 for recommendations when several flows are globally protected). In 383 that case the maximum number of ADUs of an ADU block must not exceed 384 a certain threshold since it directly impacts the decoding delay. 385 The larger the ADU block size, the longer a decoder may have to wait 386 until it has received a sufficient number of encoding symbols for 387 decoding to succeed, and therefore the larger the decoding delay. 388 When the target use-case is known, these real-time constraints result 389 in an upper bound to the ADU block size, max_rt. 391 For instance, if the use-case specifies a maximum decoding latency, 392 l, and if each source ADU covers a duration d of a continuous media 393 (we assume here the simple case of a constant bit rate ADU flow), 394 then the ADU block size must not exceed: 396 max_rt = floor(l / d) 398 After encoding, this block will produce a set of at most n = max_rt / 399 CR encoding symbols. These n encoding symbols will have to be sent 400 at a rate of n / l packets per second. For instance, with d = 10 ms, 401 l = 1 s, max_rt = 100 ADUs. 403 If we take into account all these constraints, we find: 405 max_B = min(max_k, max_rt) 407 This max_B parameter is an upper bound to the number of ADUs that can 408 constitute an ADU block. 410 4.3. Source Block Creation 412 In its most general form the FECFRAME framework and the LDPC- 413 Staircase FEC scheme are meant to protect a set of independent flows. 414 Since the flows have no relationship to one another, the ADU size of 415 each flow can potentially vary significantly. Even in the special 416 case of a single flow, the ADU sizes can largely vary (e.g., the 417 various frames of a "Group of Pictures (GOP) of an H.264 flow). This 418 diversity must be addressed since the LDPC-Staircase FEC scheme 419 requires a constant encoding symbol size (E parameter) per source 420 block. Since this specification requires that there is only one 421 source symbol per ADU, E must be large enough to contain all the ADUs 422 of an ADU block along with their prepended 3 bytes (see below). 424 In situations where E is determined per source block (default, 425 specified by the FFCI/FSSI with S = 0, Section 5.1.1.2), E is equal 426 to the size of the largest ADU of this source block plus three (for 427 the prepended 3 bytes, see below). In this case, upon receiving the 428 first FEC Repair Packet for this source block, since this packet MUST 429 contain a single repair symbol (Section 5.1.3), a receiver determines 430 the E parameter used for this source block. 432 In situations where E is fixed (specified by the FFCI/FSSI with S = 433 1, Section 5.1.1.2), then E must be greater or equal to the size of 434 the largest ADU of this source block plus three (for the prepended 3 435 bytes, see below). If this is not the case, an error is returned. 436 How to handle this error is use-case specific (e.g., a larger E 437 parameter may be communicated to the receivers in an updated FFCI 438 message, using an appropriate mechanism) and is not considered by 439 this specification. 441 The ADU block is always encoded as a single source block. There are 442 a total of B <= max_B ADUs in this ADU block. For the ADU i, with 0 443 <= i <= B-1, 3 bytes are prepended (Figure 2): 445 o The first byte, F[i] (Flow ID), contains the integer identifier 446 associated to the source ADU flow to which this ADU belongs to. 447 It is assumed that a single byte is sufficient, or said 448 differently, that no more than 256 flows will be protected by a 449 single instance of the FECFRAME framework. 451 o The following two bytes, L[i] (Length), contain the length of this 452 ADU, in network byte order (i.e., big endian). This length is for 453 the ADU itself and does not include the F[i], L[i], or Pad[i] 454 fields. 456 Then zero padding is added to ADU i (if needed) in field Pad[i], for 457 alignment purposes up to a size of exactly E bytes. The data unit 458 resulting from the ADU i and the F[i], L[i] and Pad[i] fields, is 459 called ADU Information (or ADUI). Each ADUI contributes to exactly 460 one source symbol of the source block. 462 Encoding Symbol Length (E) 463 < -------------------------------------------------------------- > 464 +----+----+-----------------------+------------------------------+ 465 |F[0]|L[0]| ADU[0] | Pad[0] | 466 +----+----+----------+------------+------------------------------+ 467 |F[1]|L[1]| ADU[1] | Pad[1] | 468 +----+----+----------+-------------------------------------------+ 469 |F[2]|L[2]| ADU[2] | 470 +----+----+------+-----------------------------------------------+ 471 |F[3]|L[3]|ADU[3]| Pad[3] | 472 +----+----+------+-----------------------------------------------+ 473 \_______________________________ _______________________________/ 474 \/ 475 simple FEC encoding 477 +----------------------------------------------------------------+ 478 | Repair 4 | 479 +----------------------------------------------------------------+ 480 . . 481 . . 482 +----------------------------------------------------------------+ 483 | Repair 7 | 484 +----------------------------------------------------------------+ 486 Figure 2: Source block creation, for code rate 1/2 (equal number of 487 source and repair symbols, 4 in this example), and S = 0. 489 Note that neither the initial 3 bytes nor the optional padding are 490 sent over the network. However, they are considered during FEC 491 encoding. It means that a receiver who lost a certain FEC source 492 packet (e.g., the UDP datagram containing this FEC source packet) 493 will be able to recover the ADUI if FEC decoding succeeds. Thanks to 494 the initial 3 bytes, this receiver will get rid of the padding (if 495 any) and identify the corresponding ADU flow. 497 5. LDPC-Staircase FEC Scheme for Arbitrary ADU Flows 499 5.1. Formats and Codes 501 5.1.1. FEC Framework Configuration Information 503 The FEC Framework Configuration Information (or FFCI) includes 504 information that MUST be communicated between the sender and 505 receiver(s). More specifically, it enables the synchronization of 506 the FECFRAME sender and receiver instances. It includes both 507 mandatory elements and scheme-specific elements, as detailed below. 509 5.1.1.1. Mandatory Information 511 o FEC Encoding ID: the value assigned to this fully-specified FEC 512 scheme MUST be XXX, as assigned by IANA (Section 8). 514 When SDP is used to communicate the FFCI, this FEC Encoding ID is 515 carried in the 'encoding-id' parameter. 517 5.1.1.2. FEC Scheme-Specific Information 519 The FEC Scheme Specific Information (FSSI) includes elements that are 520 specific to the present FEC scheme. More precisely: 522 o PRNG seed (seed): a non-negative 32 bit integer used as the seed 523 of the Pseudo Random Number Generator, as defined in [RFC5170]. 525 o Encoding symbol length (E): a non-negative integer that indicates 526 either the length of each encoding symbol in bytes (strict mode, 527 i.e., if S = 1), or the maximum length of any encoding symbol 528 (i.e., if S = 0). 530 o Strict (S) flag: when set to 1 this flag indicates that the E 531 parameter is the actual encoding symbol length value for each 532 block of the session (unless otherwise notified by an updated FFCI 533 if this possibility is considered by the use-case or CDP). When 534 set to 0 this flag indicates that the E parameter is the maximum 535 encoding symbol length value for each block of the session (unless 536 otherwise notified by an updated FFCI if this possibility is 537 considered by the use-case or CDP). 539 o N1 minus 3 (n1m3): an integer between 0 (default) and 7, 540 inclusive. The number of "1s" per column in the left side of the 541 parity check matrix, N1, is then equal to N1m3 + 3, as specified 542 in [RFC5170]. 544 These elements are required both by the sender (LDPC-Staircase 545 encoder) and the receiver(s) (LDPC-Staircase decoder). 547 When SDP is used to communicate the FFCI, this FEC scheme-specific 548 information is carried in the 'fssi' parameter in textual 549 representation as specified in [RFC6364]. For instance: 551 fssi=seed:1234,E:1400,S:0,n1m3:0 553 If another mechanism requires the FSSI to be carried as an opaque 554 octet string (for instance after a Base64 encoding), the encoding 555 format consists of the following 7 octets: 557 o PRNG seed (seed): 32 bit field. 559 o Encoding symbol length (E): 16 bit field. 561 o Strict (S) flag: 1 bit field. 563 o Reserved: a 4 bit field that MUST be set to zero. 565 o N1m3 parameter (n1m3): 3 bit field. 567 0 1 2 568 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 569 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 570 | PRNG seed (seed) | 571 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 572 | Encoding Symbol Length (E) |S| resvd | n1m3| 573 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 575 Figure 3: FSSI encoding format. 577 5.1.2. Explicit Source FEC Payload ID 579 A FEC source packet MUST contain an Explicit Source FEC Payload ID 580 that is appended to the end of the packet as illustrated in Figure 4. 582 +--------------------------------+ 583 | IP Header | 584 +--------------------------------+ 585 | Transport Header | 586 +--------------------------------+ 587 | ADU | 588 +--------------------------------+ 589 | Explicit Source FEC Payload ID | 590 +--------------------------------+ 592 Figure 4: Structure of a FEC Source Packet with the Explicit Source 593 FEC Payload ID. 595 More precisely, the Explicit Source FEC Payload ID is composed of the 596 following fields (Figure 5): 598 o Source Block Number (SBN) (16 bit field): this field identifies 599 the source block to which this FEC source packet belongs. 601 o Encoding Symbol ID (ESI) (16 bit field): this field identifies the 602 source symbol contained in this FEC source packet. This value is 603 such that 0 <= ESI <= k - 1 for source symbols. 605 o Source Block Length (k) (16 bit field): this field provides the 606 number of source symbols for this source block, i.e., the k 607 parameter. 609 0 1 2 3 610 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 611 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 612 | Source Block Number (SBN) | Encoding Symbol ID (ESI) | 613 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 614 | Source Block Length (k) | 615 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 617 Figure 5: Source FEC Payload ID encoding format. 619 5.1.3. Repair FEC Payload ID 621 A FEC repair packet MUST contain a Repair FEC Payload ID that is 622 prepended to the repair symbol(s) as illustrated in Figure 6. There 623 MUST be a single repair symbol per FEC repair packet. 625 +--------------------------------+ 626 | IP Header | 627 +--------------------------------+ 628 | Transport Header | 629 +--------------------------------+ 630 | Repair FEC Payload ID | 631 +--------------------------------+ 632 | Repair Symbol | 633 +--------------------------------+ 635 Figure 6: Structure of a FEC Repair Packet with the Repair FEC 636 Payload ID. 638 More precisely, the Repair FEC Payload ID is composed of the 639 following fields (Figure 7): 641 o Source Block Number (SBN) (16 bit field): this field identifies 642 the source block to which the FEC repair packet belongs. 644 o Encoding Symbol ID (ESI) (16 bit field): this field identifies the 645 repair symbol contained in this FEC repair packet. This value is 646 such that k <= ESI <= n - 1 for repair symbols. 648 o Source Block Length (k) (16 bit field): this field provides the 649 number of source symbols for this source block, i.e., the k 650 parameter. 652 o Number of Encoding Symbols (n) (16 bit field): this field provides 653 the number of encoding symbols for this source block, i.e., the n 654 parameter. 656 0 1 2 3 657 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 658 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 659 | Source Block Number (SBN) | Encoding Symbol ID (ESI) | 660 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 661 | Source Block Length (k) | Number Encoding Symbols (n) | 662 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 664 Figure 7: Repair FEC Payload ID encoding format. 666 5.2. Procedures 668 The following procedures apply: 670 o The source block creation MUST follow the procedures specified in 671 Section 4.3. 673 o The SBN value MUST start with value 0 for the first block of the 674 ADU flow and MUST be incremented by 1 for each new source block. 675 Wrapping to zero will happen for long sessions, after value 2^^16 676 - 1. 678 o The ESI of encoding symbols MUST start with value 0 for the first 679 symbol and MUST be managed sequentially. The first k values (0 <= 680 ESI <= k - 1) identify source symbols whereas the last n-k values 681 (k <= ESI <= n - 1) identify repair symbols. 683 o The FEC repair packet creation MUST follow the procedures 684 specified in Section 5.1.3. 686 5.3. FEC Code Specification 688 The present document inherits from [RFC5170] the specification of the 689 core LDPC-Staircase codes for a packet erasure transmission channel. 691 Because of the requirement to have exactly one encoding symbol per 692 group, i.e., because G MUST be equal to 1 (Section 4.1), several 693 parts of [RFC5170] are useless. In particular, this is the case of 694 Section 5.6. "Identifying the G Symbols of an Encoding Symbol 695 Group". 697 6. Security Considerations 699 The FEC Framework document [RFC6363] provides a comprehensive 700 analysis of security considerations applicable to FEC schemes. 701 Therefore the present section follows the security considerations 702 section of [RFC6363] and only discusses topics that are specific to 703 the use of LDPC-Staircase codes. 705 6.1. Attacks Against the Data Flow 707 6.1.1. Access to Confidential Content 709 The LDPC-Staircase FEC Scheme specified in this document does not 710 change the recommendations of [RFC6363]. To summarize, if 711 confidentiality is a concern, it is RECOMMENDED that one of the 712 solutions mentioned in [RFC6363] is used, with special considerations 713 to the way this solution is applied (e.g., is encryption applied 714 before or after FEC protection, within the end-system or in a 715 middlebox), to the operational constraints (e.g., performing FEC 716 decoding in a protected environment may be complicated or even 717 impossible) and to the threat model. 719 6.1.2. Content Corruption 721 The LDPC-Staircase FEC Scheme specified in this document does not 722 change the recommendations of [RFC6363]. To summarize, it is 723 RECOMMENDED that one of the solutions mentioned in [RFC6363] is used 724 on both the FEC Source and Repair Packets. 726 6.2. Attacks Against the FEC Parameters 728 The FEC Scheme specified in this document defines parameters that can 729 be the basis of several attacks. More specifically, the following 730 parameters of the FFCI may be modified by an attacker 731 (Section 5.1.1.2): 733 o FEC Encoding ID: changing this parameter leads the receiver to 734 consider a different FEC Scheme, which enables an attacker to 735 create a Denial of Service (DoS). 737 o Encoding symbol length (E): setting this E parameter to a value 738 smaller than the valid one enables an attacker to create a DoS 739 since the repair symbols and certain source symbols will be larger 740 than E, which is an incoherency for the receiver. Setting this E 741 parameter to a value larger than the valid one has similar impacts 742 when S=1 since the received repair symbol size will be smaller 743 than expected. On the opposite it will not lead to any 744 incoherency when S=0 since the actual symbol length value for the 745 block is determined by the size of any received repair symbol, as 746 long as this value is smaller than E. However setting this E 747 parameter to a larger value may have impacts on receivers that 748 pre-allocate memory space in advance to store incoming symbols. 750 o Strict (S) flag: flipping this S flag from 0 to 1 (i.e., E is now 751 considered as a strict value) enables an attacker to mislead the 752 receiver if the actual symbol size varies over different source 753 blocks. Flipping this S flag from 1 to 0 has no major 754 consequences unless the receiver requires to have a fixed E value 755 (e.g., because the receiver pre-allocates memory space). 757 o N1 minus 3 (n1m3): changing this parameter leads the receiver to 758 consider a different code, which enables an attacker to create a 759 DoS. 761 It is therefore RECOMMENDED that security measures are taken to 762 guarantee the FFCI integrity, as specified in [RFC6363]. How to 763 achieve this depends on the way the FFCI is communicated from the 764 sender to the receiver, which is not specified in this document. 766 Similarly, attacks are possible against the Explicit Source FEC 767 Payload ID and Repair FEC Payload ID: by modifying the Source Block 768 Number (SBN), or the Encoding Symbol ID (ESI), or the Source Block 769 Length (k), or the Number Encoding Symbols (n), an attacker can 770 easily corrupt the block identified by the SBN. Other consequences, 771 that are use-case and/or CDP dependant, may also happen. It is 772 therefore RECOMMENDED that security measures are taken to guarantee 773 the FEC Source and Repair Packets as stated in [RFC6363]. 775 6.3. When Several Source Flows are to be Protected Together 777 The LDPC-Staircase FEC Scheme specified in this document does not 778 change the recommendations of [RFC6363]. 780 6.4. Baseline Secure FEC Framework Operation 782 The LDPC-Staircase FEC Scheme specified in this document does not 783 change the recommendations of [RFC6363] concerning the use of the 784 IPsec/ESP security protocol as a mandatory to implement (but not 785 mandatory to use) security scheme. This is well suited to situations 786 where the only insecure domain is the one over which the FEC 787 Framework operates. 789 7. Operations and Management Considerations 791 The FEC Framework document [RFC6363] provides a comprehensive 792 analysis of operations and management considerations applicable to 793 FEC schemes. Therefore the present section only discusses topics 794 that are specific to the use of LDPC-Staircase codes as specified in 795 this document. 797 7.1. Operational Recommendations 799 LDPC-Staircase codes have excellent erasure recovery capabilities 800 with large source blocks, close to ideal MDS codes. For instance, 801 independently of FECFRAME, with source block size k=1024 symbols, 802 CR=2/3, N1=7, G=1, a hybrid ITerative/Maximum Likelihood (IT/ML) 803 decoding approach (see below) and when all symbols are sent in a 804 random order, the average overhead amounts to 0.237% (i.e., receiving 805 2.43 symbols in addition to k enables a successful decoding with a 806 probability 0.5) and an overhead of 1.46% (i.e., receiving 15 symbols 807 in addition to k) is sufficient to reduce the decoding failure 808 probability to 8.2*10^^-5. This is why these codes are a good 809 solution to protect a single high bitrate source flow as in 810 [Matsuzono10], or to protect globally several mid-rate source flows 811 within a single FECFRAME instance: in both cases the source block 812 size can be assumed to be equal to a few hundreds (or more) source 813 symbols. 815 LDPC-Staircase codes are also a good solution whenever processing 816 requirements at a software encoder or decoder must be kept to a 817 minimum. This is true when the decoder uses an IT decoding 818 algorithm, or an ML algorithm (we use a Gaussian Elimination as the 819 ML algorithm) when this latter is carefully implemented, or a mixture 820 of both techniques which is the recommended solution 821 [Cunche08][CunchePHD10][LDPC-codec-OpenFEC]. For instance an average 822 decoding speed between 1.78 Gbps (overhead of 2 symbols in addition 823 to k, corresponding to a very bad channel, close to the theoretical 824 decoding limit, where ML decoding is required) and 3.41 Gbps 825 (corresponding to a medium quality channel where IT decoding is 826 sufficient) is easily achieved with a source block size composed of 827 k=1024 source symbols, a code rate CR=2/3 (i.e., 512 repair symbols), 828 1024 byte long symbols, G=1, and N1=7, on an Intel Xeon 5120/1.86GHz 829 workstation running Linux/64 bits. Under the same conditions, on a 830 Samsung Galaxy SII (GT-I9100P model, featuring an ARM Cortex-A9/1.2 831 GHz processor and running Android 2.3.4), decoding speed is between 832 278 Mbps (overhead of 2 symbols and ML decoding) and 626 Mbps (IT 833 decoding). 835 As the source block size decreases, the erasure recovery capabilities 836 of LDPC codes in general also decrease. In the case of LDPC- 837 Staircase codes, in order to limit this phenomenon, it is recommended 838 to use a value of the N1 parameter at least equal to 7 (e.g., 839 experiments carried out in [Matsuzono10] use N1=7 if k=170 symbols, 840 and N1=5 otherwise). For instance, independently of FECFRAME, with 841 source block size k=256 symbols, CR=2/3, N1=7, and G=1, the average 842 overhead amounts to 0.706% (i.e., receiving 1.8 symbols in addition 843 to k enables a successful decoding with a probability 0.5), and an 844 overhead of 5.86% (i.e., receiving 15 symbols ina addition to k) is 845 sufficient to reduce the decoding failure probability to 5.9*10^^-5. 847 With very small source blocks (e.g., a few tens of symbols), using 848 for instance Reed-Solomon codes [SIMPLE_RS] or 2D parity check codes 849 may be more appropriate. 851 The way the FEC Repair Packets are transmitted is of high importance. 852 A good strategy, that works well for any kind of channel loss model, 853 consists in sending FEC Repair Packets in random order (rather than 854 in sequence) while FEC Source Packets are sent first and in sequence. 855 Sending all packets in a random order is another possibility, but it 856 requires that all repair symbols for a source block be produced 857 first, which adds some extra delay at a sender. 859 8. IANA Considerations 861 This document registers one value in the FEC Framework (FECFRAME) FEC 862 Encoding IDs registry [RFC6363] as follows: 864 o XXX refers to the Simple LDPC-Staircase FEC Scheme for Arbitrary 865 Packet Flows, as defined in Section 5 of this document. 867 9. Acknowledgments 869 The authors want to thank K. Matsuzono, J. Detchart and H. Asaeda for 870 their contributions in evaluating the use of LDPC-Staircase codes in 871 the context of FECFRAME [Matsuzono10]. 873 10. References 875 10.1. Normative References 877 [RFC2119] Bradner, S., "Key words for use in RFCs to 878 Indicate Requirement Levels", RFC 2119. 880 [RFC5170] Roca, V., Neumann, C., and D. Furodet, "Low 881 Density Parity Check (LDPC) Forward Error 882 Correction", RFC 5170, June 2008. 884 [RFC6363] Watson, M., Begen, A., and V. Roca, "Forward 885 Error Correction (FEC) Framework", RFC 6363, 886 September 2011. 888 [RFC6364] Begen, A., "Session Description Protocol 889 Elements for the Forward Error Correction (FEC) 890 Framework", RFC 6364, October 2011. 892 10.2. Informative References 894 [RFC3453] Luby, M., Vicisano, L., Gemmell, J., Rizzo, L., 895 Handley, M., and J. Crowcroft, "The Use of 896 Forward Error Correction (FEC) in Reliable 897 Multicast", RFC 3453, December 2002. 899 [RFC5052] Watson, M., Luby, M., and L. Vicisano, "Forward 900 Error Correction (FEC) Building Block", 901 RFC 5052, August 2007. 903 [RFC5510] Lacan, J., Roca, V., Peltotalo, J., and S. 904 Peltotalo, "Reed-Solomon Forward Error 905 Correction (FEC) Schemes", RFC 5510, 906 April 2009. 908 [SIMPLE_RS] Roca, V., Cunche, M., Lacan, J., Bouabdallah, 909 A., and K. Matsuzono, "Simple Reed-Solomon 910 Forward Error Correction (FEC) Scheme for 911 FECFRAME", 912 draft-ietf-fecframe-simple-rs-04 (Work in 913 Progress), October 2012. 915 [RFC5053] Luby, M., Shokrollahi, A., Watson, M., and T. 916 Stockhammer, "Raptor Forward Error Correction 917 Scheme for Object Delivery", RFC 5053, 918 June 2007. 920 [RFC5740] Adamson, B., Bormann, C., Handley, M., and J. 921 Macker, "NACK-Oriented Reliable Multicast 922 (NORM) Transport Protocol", RFC 5740, 923 November 2009. 925 [RFC5775] Luby, M., Watson, M., and L. Vicisano, 926 "Asynchronous Layered Coding (ALC) Protocol 927 Instantiation", RFC 5775, April 2010. 929 [Cunche08] Cunche, M. and V. Roca, "Optimizing the Error 930 Recovery Capabilities of LDPC-Staircase Codes 931 Featuring a Gaussian Elimination Decoding 932 Scheme", 10th IEEE International Workshop on 933 Signal Processing for Space Communications 934 (SPSC'08), October 2008. 936 [CunchePHD10] Cunche, M., "High performances AL-FEC codes for 937 the erasure channel : variation around LDPC 938 codes", PhD dissertation (in French) (http:// 939 tel.archives-ouvertes.fr/tel-00451336/en/), 940 June 2010. 942 [Matsuzono10] Matsuzono, K., Detchart, J., Cunche, M., Roca, 943 V., and H. Asaeda, "Performance Analysis of a 944 High-Performance Real-Time Application with 945 Several AL-FEC Schemes", 35th Annual IEEE 946 Conference on Local Computer Networks (LCN 947 2010), October 2010. 949 [LDPC-codec] Cunche, M., Roca, V., Neumann, C., and J. 950 Laboure, "LDPC-Staircase/LDPC-Triangle Codec 951 Reference Implementation", INRIA Rhone-Alpes 952 and STMicroelectronics, 953 . 955 [LDPC-codec-OpenFEC] "The OpenFEC project", . 957 Authors' Addresses 959 Vincent Roca 960 INRIA 961 655, av. de l'Europe 962 Inovallee; Montbonnot 963 ST ISMIER cedex 38334 964 France 966 EMail: vincent.roca@inria.fr 967 URI: http://planete.inrialpes.fr/people/roca/ 969 Mathieu Cunche 970 INSA-Lyon/INRIA 971 Laboratoire CITI 972 6 av. des Arts 973 Villeurbanne cedex 69621 974 France 976 EMail: mathieu.cunche@inria.fr 977 URI: http://mathieu.cunche.free.fr/ 978 Jerome Lacan 979 ISAE, Univ. of Toulouse 980 10 av. Edouard Belin; BP 54032 981 Toulouse cedex 4 31055 982 France 984 EMail: jerome.lacan@isae.fr 985 URI: http://personnel.isae.fr/jerome-lacan/