1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845
|
<pre>Network Working Group V. Roca
Request for Comments: 5170 INRIA
Category: Standards Track C. Neumann
Thomson
D. Furodet
STMicroelectronics
June 2008
<span class="h1">Low Density Parity Check (LDPC) Staircase and Triangle</span>
<span class="h1">Forward Error Correction (FEC) Schemes</span>
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Abstract
This document describes two Fully-Specified Forward Error Correction
(FEC) Schemes, Low Density Parity Check (LDPC) Staircase and LDPC
Triangle, and their application to the reliable delivery of data
objects on the packet erasure channel (i.e., a communication path
where packets are either received without any corruption or discarded
during transmission). These systematic FEC codes belong to the well-
known class of "Low Density Parity Check" codes, and are large block
FEC codes in the sense of <a href="./rfc3453">RFC 3453</a>.
<span class="grey">Roca, et al. Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-2">2</a>. Requirements Notation . . . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-3">3</a>. Definitions, Notations, and Abbreviations . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-3.1">3.1</a>. Definitions . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-3.2">3.2</a>. Notations . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-3.3">3.3</a>. Abbreviations . . . . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-4">4</a>. Formats and Codes . . . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-4.1">4.1</a>. FEC Payload IDs . . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-4.2">4.2</a>. FEC Object Transmission Information . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-4.2.1">4.2.1</a>. Mandatory Element . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-4.2.2">4.2.2</a>. Common Elements . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-4.2.3">4.2.3</a>. Scheme-Specific Elements . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-4.2.4">4.2.4</a>. Encoding Format . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-5">5</a>. Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-5.1">5.1</a>. General . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-5.2">5.2</a>. Determining the Maximum Source Block Length (B) . . . . . <a href="#page-11">11</a>
5.3. Determining the Encoding Symbol Length (E) and Number
of Encoding Symbols per Group (G) . . . . . . . . . . . . <a href="#page-12">12</a>
5.4. Determining the Maximum Number of Encoding Symbols
Generated for Any Source Block (max_n) . . . . . . . . . . <a href="#page-13">13</a>
5.5. Determining the Number of Encoding Symbols of a Block
(n) . . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-14">14</a>
<a href="#section-5.6">5.6</a>. Identifying the G Symbols of an Encoding Symbol Group . . <a href="#page-14">14</a>
<a href="#section-5.7">5.7</a>. Pseudo-Random Number Generator . . . . . . . . . . . . . . <a href="#page-17">17</a>
<a href="#section-6">6</a>. Full Specification of the LDPC-Staircase Scheme . . . . . . . <a href="#page-19">19</a>
<a href="#section-6.1">6.1</a>. General . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-19">19</a>
<a href="#section-6.2">6.2</a>. Parity Check Matrix Creation . . . . . . . . . . . . . . . <a href="#page-19">19</a>
<a href="#section-6.3">6.3</a>. Encoding . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-21">21</a>
<a href="#section-6.4">6.4</a>. Decoding . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-21">21</a>
<a href="#section-7">7</a>. Full Specification of the LDPC-Triangle Scheme . . . . . . . . <a href="#page-22">22</a>
<a href="#section-7.1">7.1</a>. General . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-22">22</a>
<a href="#section-7.2">7.2</a>. Parity Check Matrix Creation . . . . . . . . . . . . . . . <a href="#page-22">22</a>
<a href="#section-7.3">7.3</a>. Encoding . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-23">23</a>
<a href="#section-7.4">7.4</a>. Decoding . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-23">23</a>
<a href="#section-8">8</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-24">24</a>
<a href="#section-8.1">8.1</a>. Problem Statement . . . . . . . . . . . . . . . . . . . . <a href="#page-24">24</a>
<a href="#section-8.2">8.2</a>. Attacks Against the Data Flow . . . . . . . . . . . . . . <a href="#page-24">24</a>
<a href="#section-8.2.1">8.2.1</a>. Access to Confidential Objects . . . . . . . . . . . . <a href="#page-24">24</a>
<a href="#section-8.2.2">8.2.2</a>. Content Corruption . . . . . . . . . . . . . . . . . . <a href="#page-25">25</a>
<a href="#section-8.3">8.3</a>. Attacks Against the FEC Parameters . . . . . . . . . . . . <a href="#page-26">26</a>
<a href="#section-9">9</a>. IANA Considerations . . . . . . . . . . . . . . . . . . . . . <a href="#page-27">27</a>
<a href="#section-10">10</a>. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-27">27</a>
<a href="#section-11">11</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-27">27</a>
<a href="#section-11.1">11.1</a>. Normative References . . . . . . . . . . . . . . . . . . . <a href="#page-27">27</a>
<a href="#section-11.2">11.2</a>. Informative References . . . . . . . . . . . . . . . . . . <a href="#page-27">27</a>
<a href="#appendix-A">Appendix A</a>. Trivial Decoding Algorithm (Informative Only) . . . . <a href="#page-30">30</a>
<span class="grey">Roca, et al. Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
[<a id="ref-RFC3453">RFC3453</a>] introduces large block FEC codes as an alternative to small
block FEC codes like Reed-Solomon. The main advantage of such large
block codes is the possibility to operate efficiently on source
blocks with a size of several tens of thousands (or more) of source
symbols. The present document introduces the Fully-Specified FEC
Encoding ID 3 that is intended to be used with the LDPC-Staircase FEC
codes, and the Fully-Specified FEC Encoding ID 4 that is intended to
be used with the LDPC-Triangle FEC codes [<a href="#ref-RN04" title=""Design, Evaluation and Comparison of Four Large Block FEC Codecs: LDPC, LDGM, LDGM-Staircase and LDGM-Triangle, Plus a Reed-Solomon Small Block FEC Codec"">RN04</a>][MK03]. Both schemes
belong to the broad class of large block codes. For a definition of
the term Fully-Specified Scheme, see <a href="./rfc5052#section-4">Section 4 of [RFC5052]</a>.
LDPC codes rely on a dedicated matrix, called a "parity check
matrix", at the encoding and decoding ends. The parity check matrix
defines relationships (or constraints) between the various encoding
symbols (i.e., source symbols and repair symbols), which are later
used by the decoder to reconstruct the original k source symbols if
some of them are missing. These codes are systematic, in the sense
that the encoding symbols include the source symbols in addition to
the repair symbols.
Since the encoder and decoder must operate on the same parity check
matrix, information must be communicated between them as part of the
FEC Object Transmission Information.
A publicly available reference implementation of these codes is
available and distributed under a GNU/LGPL (Lesser General Public
License) [<a href="#ref-LDPC-codec" title=""LDPC-Staircase/LDPC-Triangle Codec Reference Implementation"">LDPC-codec</a>]. Besides, the code extracts included in this
document are directly contributed to the IETF process by the authors
of this document and by Radford M. Neal.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Requirements Notation</span>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Definitions, Notations, and Abbreviations</span>
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Definitions</span>
This document uses the same terms and definitions as those specified
in [<a href="./rfc5052" title=""Forward Error Correction (FEC) Building Block"">RFC5052</a>]. Additionally, it uses the following definitions:
Source Symbol: a unit of data used during the encoding process
<span class="grey">Roca, et al. Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
Encoding Symbol: a unit of data generated by the encoding process
Repair Symbol: an encoding symbol that is not a source symbol
Code Rate: the k/n ratio, i.e., the ratio between the number of
source symbols and the number of encoding symbols. The code rate
belongs to a ]0; 1] interval. A code rate close to 1 indicates
that a small number of repair symbols have been produced during
the encoding process
Systematic Code: FEC code in which the source symbols are part of
the encoding symbols
Source Block: a block of k source symbols that are considered
together for the encoding
Encoding Symbol Group: a group of encoding symbols that are sent
together, within the same packet, and whose relationships to the
source object can be derived from a single Encoding Symbol ID
Source Packet: a data packet containing only source symbols
Repair Packet: a data packet containing only repair symbols
Packet Erasure Channel: a communication path where packets are
either dropped (e.g., by a congested router or because the number
of transmission errors exceeds the correction capabilities of the
physical layer codes) or received. When a packet is received, it
is assumed that this packet is not corrupted
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Notations</span>
This document uses the following notations:
L denotes the object transfer length in bytes.
k denotes the source block length in symbols, i.e., the number of
source symbols of a source block.
n denotes the encoding block length, i.e., the number of encoding
symbols generated for a source block.
E denotes the encoding symbol length in bytes.
B denotes the maximum source block length in symbols, i.e., the
maximum number of source symbols per source block.
<span class="grey">Roca, et al. Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
N denotes the number of source blocks into which the object shall
be partitioned.
G denotes the number of encoding symbols per group, i.e., the
number of symbols sent in the same packet.
CR denotes the "code rate", i.e., the k/n ratio.
max_n denotes the maximum number of encoding symbols generated for
any source block. This is in particular the number of encoding
symbols generated for a source block of size B.
H denotes the parity check matrix.
N1 denotes the target number of "1s" per column in the left side
of the parity check matrix.
N1m3 denotes the value N1 - 3, where N1 is the target number of
"1s" per column in the left side of the parity check matrix.
pmms_rand(m) denotes the pseudo-random number generator defined in
<a href="#section-5.7">Section 5.7</a> that returns a new random integer in [0; m-1] each
time it is called.
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. Abbreviations</span>
This document uses the following abbreviations:
ESI: Encoding Symbol ID
FEC OTI: FEC Object Transmission Information
FPI: FEC Payload ID
LDPC: Low Density Parity Check
PRNG: Pseudo-Random Number Generator
<span class="grey">Roca, et al. Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Formats and Codes</span>
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. FEC Payload IDs</span>
The FEC Payload ID is composed of the Source Block Number and the
Encoding Symbol ID:
The Source Block Number (12-bit field) identifies from which
source block of the object the encoding symbol(s) in the packet
payload is(are) generated. There is a maximum of 2^^12 blocks per
object. Source block numbering starts at 0.
The Encoding Symbol ID (20-bit field) identifies which encoding
symbol(s) generated from the source block is(are) carried in the
packet payload. There is a maximum of 2^^20 encoding symbols per
block. The first k values (0 to k-1) identify source symbols, the
remaining n-k values (k to n-k-1) identify repair symbols.
There MUST be exactly one FEC Payload ID per packet. In the case of
an Encoding Symbol Group, when multiple encoding symbols are sent in
the same packet, the FEC Payload ID refers to the first symbol of the
packet. The other symbols can be deduced from the ESI of the first
symbol thanks to a dedicated function, as explained in <a href="#section-5.6">Section 5.6</a>
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Block Number | Encoding Symbol ID (20 bits) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 1: FEC Payload ID encoding format for FEC Encoding ID 3 and 4
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. FEC Object Transmission Information</span>
<span class="h4"><a class="selflink" id="section-4.2.1" href="#section-4.2.1">4.2.1</a>. Mandatory Element</span>
o FEC Encoding ID: the LDPC-Staircase and LDPC-Triangle Fully-
Specified FEC Schemes use the FEC Encoding ID 3 (Staircase) and 4
(Triangle), respectively.
<span class="h4"><a class="selflink" id="section-4.2.2" href="#section-4.2.2">4.2.2</a>. Common Elements</span>
The following elements MUST be defined with the present FEC Schemes:
o Transfer-Length (L): a non-negative integer indicating the length
of the object in bytes. There are some restrictions on the
maximum Transfer-Length that can be supported:
<span class="grey">Roca, et al. Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
maximum transfer length = 2^^12 * B * E
For instance, if B=2^^19 (because of a code rate of 1/2,
<a href="#section-5.2">Section 5.2</a>), and if E=1024 bytes, then the maximum transfer
length is 2^^41 bytes (or 2 TB). The upper limit, with symbols of
size 2^^16-1 bytes and a code rate larger or equal to 1/2, amounts
to 2^^47 bytes (or 128 TB).
o Encoding-Symbol-Length (E): a non-negative integer indicating the
length of each encoding symbol in bytes.
o Maximum-Source-Block-Length (B): a non-negative integer indicating
the maximum number of source symbols in a source block. There are
some restrictions on the maximum B value, as explained in
<a href="#section-5.2">Section 5.2</a>.
o Max-Number-of-Encoding-Symbols (max_n): a non-negative integer
indicating the maximum number of encoding symbols generated for
any source block. There are some restrictions on the maximum
max_n value. In particular max_n is at most equal to 2^^20.
<a href="#section-5">Section 5</a> explains how to define the values of each of these
elements.
<span class="h4"><a class="selflink" id="section-4.2.3" href="#section-4.2.3">4.2.3</a>. Scheme-Specific Elements</span>
The following elements MUST be defined with the present FEC Scheme:
o N1m3: an integer between 0 (default) and 7, inclusive. The target
number of "1s" per column in the left side of the parity check
matrix, N1, is then equal to N1m3 + 3 (see Sections <a href="#section-6.2">6.2</a> and <a href="#section-7.2">7.2</a>).
Using the default value of 0 for N1m3 is recommended when the
sender has no information on the decoding scheme used by the
receivers. A value greater than 0 for N1m3 can be a good choice
in specific situations, e.g., with LDPC-staircase codes when the
sender knows that all the receivers use a Gaussian elimination
decoding scheme. Nevertheless, the current document does not
mandate any specific value. This choice is left to the codec
developer.
o G: an integer between 1 (default) and 31, inclusive, indicating
the number of encoding symbols per group (i.e., per packet). The
default value is 1, meaning that each packet contains exactly one
symbol. Values greater than 1 can also be defined, as explained
in <a href="#section-5.3">Section 5.3</a>.
<span class="grey">Roca, et al. Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
o PRNG seed: the seed is a 32-bit unsigned integer between 1 and
0x7FFFFFFE (i.e., 2^^31-2) inclusive. This value is used to
initialize the Pseudo-Random Number Generator (<a href="#section-5.7">Section 5.7</a>).
<span class="h4"><a class="selflink" id="section-4.2.4" href="#section-4.2.4">4.2.4</a>. Encoding Format</span>
This section shows two possible encoding formats of the above FEC
OTI. The present document does not specify when or how these
encoding formats should be used.
<span class="h5"><a class="selflink" id="section-4.2.4.1" href="#section-4.2.4.1">4.2.4.1</a>. Using the General EXT_FTI Format</span>
The FEC OTI binary format is the following when the EXT_FTI mechanism
is used (e.g., within the Asynchronous Layer Coding (ALC)
[<a href="#ref-RMT-PI-ALC" title=""Asynchronous Layered Coding (ALC) Protocol Instantiation"">RMT-PI-ALC</a>] or NACK-Oriented Reliable Multicast (NORM) [<a href="#ref-RMT-PI-NORM" title=""Negative-acknowledgment (NACK)-Oriented Reliable Multicast (NORM) Protocol"">RMT-PI-NORM</a>]
protocols).
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| HET = 64 | HEL = 5 | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
| Transfer-Length (L) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Encoding Symbol Length (E) | N1m3| G | B (MSB) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| B (LSB) | Max Nb of Enc. Symbols (max_n) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PRNG seed |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 2: EXT_FTI Header for FEC Encoding ID 3 and 4
In particular:
o The Transfer-Length (L) field size (48 bits) is larger than the
size required to store the maximum transfer length (<a href="#section-4.2.2">Section 4.2.2</a>)
for field alignment purposes.
o The Maximum-Source-Block-Length (B) field (20 bits) is split into
two parts: the 8 most significant bits (MSB) are in the third 32-
bit word of the EXT_FTI, and the remaining 12 least significant
bits (LSB) are in the fourth 32-bit word.
<span class="grey">Roca, et al. Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
<span class="h5"><a class="selflink" id="section-4.2.4.2" href="#section-4.2.4.2">4.2.4.2</a>. Using the FDT Instance (FLUTE-Specific)</span>
When it is desired that the FEC OTI be carried in the File Delivery
Table (FDT) Instance of a File Delivery over Unidirectional Transport
(FLUTE) session [<a href="#ref-RMT-FLUTE" title=""FLUTE - File Delivery over Unidirectional Transport"">RMT-FLUTE</a>], the following XML attributes must be
described for the associated object:
o FEC-OTI-FEC-Encoding-ID
o FEC-OTI-Transfer-length
o FEC-OTI-Encoding-Symbol-Length
o FEC-OTI-Maximum-Source-Block-Length
o FEC-OTI-Max-Number-of-Encoding-Symbols
o FEC-OTI-Scheme-Specific-Info
The FEC-OTI-Scheme-Specific-Info contains the string resulting from
the Base64 encoding [<a href="./rfc4648" title=""The Base16, Base32, and Base64 Data Encodings"">RFC4648</a>] of the following value:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PRNG seed |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| N1m3| G |
+-+-+-+-+-+-+-+-+
Figure 3: FEC OTI Scheme-Specific Information to be Included in the
FDT Instance for FEC Encoding ID 3 and 4
During Base64 encoding, the 5 bytes of the FEC OTI Scheme-Specific
Information are transformed into a string of 8 printable characters
(in the 64-character alphabet) that is added to the FEC-OTI-Scheme-
Specific-Info attribute.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Procedures</span>
This section defines procedures that are common to FEC Encoding IDs 3
and 4.
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. General</span>
The B (maximum source block length in symbols), E (encoding symbol
length in bytes), and G (number of encoding symbols per group)
parameters are first determined. The algorithms of <a href="#section-5.2">Section 5.2</a> and
<span class="grey">Roca, et al. Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
<a href="#section-5.3">Section 5.3</a> MAY be used to that purpose. Using other algorithms is
possible without compromising interoperability since the B, E, and G
parameters are communicated to the receiver by means of the FEC OTI.
Then, the source object MUST be partitioned using the block
partitioning algorithm specified in [<a href="./rfc5052" title=""Forward Error Correction (FEC) Building Block"">RFC5052</a>]. To that purpose, the
B, L (object transfer length in bytes), and E arguments are provided.
As a result, the object is partitioned into N source blocks. These
blocks are numbered consecutively from 0 to N-1. The first I source
blocks consist of A_large source symbols, the remaining N-I source
blocks consist of A_small source symbols. Each source symbol is E
bytes in length, except perhaps the last symbol, which may be
shorter.
Then, the max_n (maximum number of encoding symbols generated for any
source block) parameter is determined. The algorithm in <a href="#section-5.4">Section 5.4</a>
MAY be used to that purpose. Using another algorithm is possible
without compromising interoperability since the max_n parameter is
communicated to the receiver by means of the FEC OTI.
For each block, the actual number of encoding symbols, n, MUST then
be determined using the "n-algorithm" detailed in <a href="#section-5.5">Section 5.5</a>.
Then, FEC encoding and decoding can be done block per block,
independently. To that purpose, a parity check matrix is created,
that forms a system of linear equations between the source and repair
symbols of a given block, where the basic operator is XOR.
This parity check matrix is logically divided into two parts: the
left side (from column 0 to k-1) describes the occurrences of each
source symbol in the system of linear equations; the right side (from
column k to n-1) describes the occurrences of each repair symbol in
the system of linear equations. The only difference between the
LDPC-Staircase and LDPC-Triangle schemes is the construction of this
right sub-matrix. An entry (a "1") in the matrix at position (i,j)
(i.e., at row i and column j) means that the symbol with ESI j
appears in equation i of the system.
When the parity symbols have been created, the sender transmits
source and parity symbols. The way this transmission occurs can
largely impact the erasure recovery capabilities of the LDPC-* FEC.
In particular, sending parity symbols in sequence is suboptimal.
Instead, it is usually recommended to shuffle these symbols. The
interested reader will find more details in [<a href="#ref-NRFF05" title=""Impacts of Packet Scheduling and Packet Loss Distribution on FEC Performances: Observations and Recommendations"">NRFF05</a>].
<span class="grey">Roca, et al. Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
The following sections detail how the B, E, G, max_n, and n
parameters are determined (in Sections <a href="#section-5.2">5.2</a>, <a href="#section-5.3">5.3</a>, <a href="#section-5.4">5.4</a> and <a href="#section-5.5">5.5</a>,
respectively). <a href="#section-5.6">Section 5.6</a> details how Encoding Symbol Groups are
created, and finally, <a href="#section-5.7">Section 5.7</a> covers the PRNG.
<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>. Determining the Maximum Source Block Length (B)</span>
The B parameter (maximum source block length in symbols) depends on
several parameters: the code rate (CR), the Encoding Symbol ID field
length of the FEC Payload ID (20 bits), as well as possible internal
codec limitations.
The B parameter cannot be larger than the following values, derived
from the FEC Payload ID limitations, for a given code rate:
max1_B = 2^^(20 - ceil(Log2(1/CR)))
Some common max1_B values are:
o CR == 1 (no repair symbol): max1_B = 2^^20 = 1,048,576
o 1/2 <= CR < 1: max1_B = 2^^19 = 524,288 symbols
o 1/4 <= CR < 1/2: max1_B = 2^^18 = 262,144 symbols
o 1/8 <= CR < 1/4: max1_B = 2^^17 = 131,072 symbols
Additionally, a codec MAY impose other limitations on the maximum
block size. For instance, this is the case when the codec uses
internally 16-bit unsigned integers to store the Encoding Symbol ID,
since it does not enable to store all the possible values of a 20-bit
field. In that case, if for instance, 1/2 <= CR < 1, then the
maximum source block length is 2^^15. Other limitations may also
apply, for instance, because of a limited working memory size. This
decision MUST be clarified at implementation time, when the target
use case is known. This results in a max2_B limitation.
Then, B is given by:
B = min(max1_B, max2_B)
Note that this calculation is only required at the coder, since the B
parameter is communicated to the decoder through the FEC OTI.
<span class="grey">Roca, et al. Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
<span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a>. Determining the Encoding Symbol Length (E) and Number of Encoding</span>
<span class="h3"> Symbols per Group (G)</span>
The E parameter usually depends on the maximum transmission unit on
the path (PMTU) from the source to each receiver. In order to
minimize the protocol header overhead (e.g., the Layered Coding
Transport (LCT), UDP, IPv4, or IPv6 headers in the case of ALC), E is
chosen to be as large as possible. In that case, E is chosen so that
the size of a packet composed of a single symbol (G=1) remains below
but close to the PMTU.
However, other considerations can exist. For instance, the E
parameter can be made a function of the object transfer length.
Indeed, LDPC codes are known to offer better protection for large
blocks. In the case of small objects, it can be advantageous to
reduce the encoding symbol length (E) in order to artificially
increase the number of symbols and therefore the block size.
In order to minimize the protocol header overhead, several symbols
can be grouped in the same Encoding Symbol Group (i.e., G > 1).
Depending on how many symbols are grouped (G) and on the packet loss
rate (G symbols are lost for each packet erasure), this strategy
might or might not be appropriate. A balance must therefore be
found.
The current specification does not mandate any value for either E or
G. The current specification only provides an example of possible
choices for E and G. Note that this choice is made by the sender,
and the E and G parameters are then communicated to the receiver
thanks to the FEC OTI. Note also that the decoding algorithm used
influences the choice of the E and G parameters. Indeed, increasing
the number of symbols will negatively impact the processing load when
decoding is based (in part or totally) on Gaussian elimination,
whereas the impacts will be rather low when decoding is based on the
trivial algorithm sketched in <a href="#section-6.4">Section 6.4</a>.
Example:
Let us assume that the trivial decoding algorithm sketched in
<a href="#section-6.4">Section 6.4</a> is used. First, define the target packet payload size,
pkt_sz (at most equal to the PMTU minus the size of the various
protocol headers). The pkt_sz must be chosen in such a way that the
symbol size is an integer. This can require that pkt_sz be a
multiple of 4, 8, or 16 (see the table below). Then calculate the
number of packets in the object: nb_pkts = ceil(L / pkt_sz).
Finally, thanks to nb_pkts, use the following table to find a
possible G value.
<span class="grey">Roca, et al. Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
+------------------------+----+-------------+-------------------+
| Number of packets | G | Symbol size | k |
+------------------------+----+-------------+-------------------+
| 4000 <= nb_pkts | 1 | pkt_sz | 4000 <= k |
| | | | |
| 1000 <= nb_pkts < 4000 | 4 | pkt_sz / 4 | 4000 <= k < 16000 |
| | | | |
| 500 <= nb_pkts < 1000 | 8 | pkt_sz / 8 | 4000 <= k < 8000 |
| | | | |
| 1 <= nb_pkts < 500 | 16 | pkt_sz / 16 | 16 <= k < 8000 |
+------------------------+----+-------------+-------------------+
<span class="h3"><a class="selflink" id="section-5.4" href="#section-5.4">5.4</a>. Determining the Maximum Number of Encoding Symbols Generated for</span>
<span class="h3"> Any Source Block (max_n)</span>
The following algorithm MAY be used by a sender to determine the
maximum number of encoding symbols generated for any source block
(max_n) as a function of B and the target code rate. Since the max_n
parameter is communicated to the decoder by means of the FEC OTI,
another method MAY be used to determine max_n.
Input:
B: Maximum source block length, for any source block. <a href="#section-5.2">Section 5.2</a>
MAY be used to determine its value.
CR: FEC code rate, which is provided by the user (e.g., when
starting a FLUTE sending application). It is expressed as a
floating point value. The CR value must be such that the
resulting number of encoding symbols per block is at most equal to
2^^20 (<a href="#section-4.1">Section 4.1</a>).
Output:
max_n: Maximum number of encoding symbols generated for any source
block.
Algorithm:
max_n = ceil(B / CR);
if (max_n > 2^^20), then return an error ("invalid code rate");
(NB: if B has been defined as explained in <a href="#section-5.2">Section 5.2</a>, this error
should never happen.)
<span class="grey">Roca, et al. Standards Track [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
<span class="h3"><a class="selflink" id="section-5.5" href="#section-5.5">5.5</a>. Determining the Number of Encoding Symbols of a Block (n)</span>
The following algorithm, also called "n-algorithm", MUST be used by
the sender and the receiver to determine the number of encoding
symbols for a given block (n) as a function of B, k, and max_n.
Input:
B: Maximum source block length, for any source block. At a
sender, <a href="#section-5.2">Section 5.2</a> MAY be used to determine its value. At a
receiver, this value MUST be extracted from the received FEC OTI.
k: Current source block length. At a sender or receiver, the
block partitioning algorithm MUST be used to determine its value.
max_n: Maximum number of encoding symbols generated for any source
block. At a sender, <a href="#section-5.4">Section 5.4</a> MAY be used to determine its
value. At a receiver, this value MUST be extracted from the
received FEC OTI.
Output:
n: Number of encoding symbols generated for this source block.
Algorithm:
n = floor(k * max_n / B);
<span class="h3"><a class="selflink" id="section-5.6" href="#section-5.6">5.6</a>. Identifying the G Symbols of an Encoding Symbol Group</span>
When multiple encoding symbols are sent in the same packet, the FEC
Payload ID information of the packet MUST refer to the first encoding
symbol. It MUST then be possible to identify each symbol from this
single FEC Payload ID. To that purpose, the symbols of an Encoding
Symbol Group (i.e., packet):
o MUST all be either source symbols or repair symbols. Therefore,
only source packets and repair packets are permitted, not mixed
ones.
o are identified by a function, sender(resp.
receiver)_find_ESIs_of_group(), that takes as argument:
* for a sender, the index of the Encoding Symbol Group (i.e.,
packet) that the application wants to create,
* for a receiver, the ESI information contained in the FEC
Payload ID.
<span class="grey">Roca, et al. Standards Track [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
and returns a list of G Encoding Symbol IDs. In the case of a
source packet, the G Encoding Symbol IDs are chosen consecutively,
by incrementing the ESI. In the case of a repair packet, the G
repair symbols are chosen randomly, as explained below.
o are stored in sequence in the packet, without any padding. In
other words, the last byte of the i-th symbol is immediately
followed by the first byte of (i+1)-th symbol.
The system must first be initialized by creating a random permutation
of the n-k indexes. This initialization function MUST be called
immediately after creating the parity check matrix. More precisely,
since the PRNG seed is not re-initialized, there must not have been a
call to the PRNG function between the time the parity check matrix
has been initialized and the time the following initialization
function is called. This is true both at a sender and at a receiver.
int *txseqToID;
int *IDtoTxseq;
/*
* Initialization function.
* Warning: use only when G > 1.
*/
void
initialize_tables ()
{
int i;
int randInd;
int backup;
txseqToID = malloc((n-k) * sizeof(int));
IDtoTxseq = malloc((n-k) * sizeof(int));
if (txseqToID == NULL || IDtoTxseq == NULL)
handle the malloc failures as appropriate...
/* initialize the two tables that map ID
* (i.e., ESI-k) to/from TxSequence. */
for (i = 0; i < n - k; i++) {
IDtoTxseq[i] = i;
txseqToID[i] = i;
}
/* now randomize everything */
for (i = 0; i < n - k; i++) {
randInd = pmms_rand(n - k);
backup = IDtoTxseq[i];
IDtoTxseq[i] = IDtoTxseq[randInd];
IDtoTxseq[randInd] = backup;
txseqToID[IDtoTxseq[i]] = i;
<span class="grey">Roca, et al. Standards Track [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
txseqToID[IDtoTxseq[randInd]] = randInd;
}
return;
}
It is then possible, at the sender, to determine the sequence of G
Encoding Symbol IDs that will be part of the group.
/*
* Determine the sequence of ESIs for the packet under construction
* at a sender.
* Warning: use only when G > 1.
* PktIdx (IN): index of the packet, in
* {0..ceil(k/G)+ceil((n-k)/G)} range
* ESIs[] (OUT): list of ESIs for the packet
*/
void
sender_find_ESIs_of_group (int PktIdx,
ESI_t ESIs[])
{
int i;
if (PktIdx < nbSourcePkts) {
/* this is a source packet */
ESIs[0] = PktIdx * G;
for (i = 1; i < G; i++) {
ESIs[i] = (ESIs[0] + i) % k;
}
} else {
/* this is a repair packet */
for (i = 0; i < G; i++) {
ESIs[i] =
k +
txseqToID[(i + (PktIdx - nbSourcePkts) * G)
% (n - k)];
}
}
return;
}
Similarly, upon receiving an Encoding Symbol Group (i.e., packet), a
receiver can determine the sequence of G Encoding Symbol IDs from the
first ESI, esi0, that is contained in the FEC Payload ID.
<span class="grey">Roca, et al. Standards Track [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
/*
* Determine the sequence of ESIs for the packet received.
* Warning: use only when G > 1.
* esi0 (IN): : ESI contained in the FEC Payload ID
* ESIs[] (OUT): list of ESIs for the packet
*/
void
receiver_find_ESIs_of_group (ESI_t esi0,
ESI_t ESIs[])
{
int i;
if (esi0 < k) {
/* this is a source packet */
ESIs[0] = esi0;
for (i = 1; i < G; i++) {
ESIs[i] = (esi0 + i) % k;
}
} else {
/* this is a repair packet */
for (i = 0; i < G; i++) {
ESIs[i] =
k +
txseqToID[(i + IDtoTxseq[esi0 - k])
% (n - k)];
}
}
}
<span class="h3"><a class="selflink" id="section-5.7" href="#section-5.7">5.7</a>. Pseudo-Random Number Generator</span>
The FEC Encoding IDs 3 and 4 rely on a pseudo-random number generator
(PRNG) that must be fully specified, in particular in order to enable
the receivers and the senders to build the same parity check matrix.
The Park-Miler "minimal standard" PRNG [<a href="#ref-PM88" title=""Random Number Generators: Good Ones are Hard to Find"">PM88</a>] MUST be used. It
defines a simple multiplicative congruential algorithm: Ij+1 = A * Ij
(modulo M), with the following choices: A = 7^^5 = 16807 and M =
2^^31 - 1 = 2147483647. A validation criteria of such a PRNG is the
following: if seed = 1, then the 10,000th value returned MUST be
equal to 1043618065.
Several implementations of this PRNG are known and discussed in the
literature. An optimized implementation of this algorithm, using
only 32-bit mathematics, and which does not require any division, can
be found in [<a href="#ref-rand31pmc" title=""31 bit pseudo-random number generator"">rand31pmc</a>]. It uses the Park and Miller algorithm
[<a href="#ref-PM88" title=""Random Number Generators: Good Ones are Hard to Find"">PM88</a>] with the optimization suggested by D. Carta in [<a href="#ref-CA90" title=""Two Fast Implementations of the Minimal Standard Random Number Generator"">CA90</a>]. The
history behind this algorithm is detailed in [<a href="#ref-WI08" title=""Park-Miller-Carta Pseudo-Random Number Generator"">WI08</a>]. Yet, any other
<span class="grey">Roca, et al. Standards Track [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
implementation of the PRNG algorithm that matches the above
validation criteria, like the ones detailed in [<a href="#ref-PM88" title=""Random Number Generators: Good Ones are Hard to Find"">PM88</a>], is
appropriate.
This PRNG produces, natively, a 31-bit value between 1 and 0x7FFFFFFE
(2^^31-2) inclusive. Since it is desired to scale the pseudo-random
number between 0 and maxv-1 inclusive, one must keep the most
significant bits of the value returned by the PRNG (the least
significant bits are known to be less random, and modulo-based
solutions should be avoided [<a href="#ref-PTVF92" title=""Numerical Recipes in C; Second Edition"">PTVF92</a>]). The following algorithm MUST
be used:
Input:
raw_value: random integer generated by the inner PRNG algorithm,
between 1 and 0x7FFFFFFE (2^^31-2) inclusive.
maxv: upper bound used during the scaling operation.
Output:
scaled_value: random integer between 0 and maxv-1 inclusive.
Algorithm:
scaled_value = (unsigned long) ((double)maxv * (double)raw_value /
(double)0x7FFFFFFF);
(NB: the above C type casting to unsigned long is equivalent to
using floor() with positive floating point values.)
In this document, pmms_rand(maxv) denotes the PRNG function that
implements the Park-Miller "minimal standard" algorithm, defined
above, and that scales the raw value between 0 and maxv-1 inclusive,
using the above scaling algorithm. Additionally, a function should
be provided to enable the initialization of the PRNG with a seed
(i.e., a 31-bit integer between 1 and 0x7FFFFFFE inclusive) before
calling pmms_rand(maxv) the first time.
<span class="grey">Roca, et al. Standards Track [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Full Specification of the LDPC-Staircase Scheme</span>
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>. General</span>
The LDPC-Staircase scheme is identified by the Fully-Specified FEC
Encoding ID 3.
The PRNG used by the LDPC-Staircase scheme must be initialized by a
seed. This PRNG seed is an instance-specific FEC OTI attribute
(<a href="#section-4.2.3">Section 4.2.3</a>).
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>. Parity Check Matrix Creation</span>
The LDPC-Staircase matrix can be divided into two parts: the left
side of the matrix defines in which equations the source symbols are
involved; the right side of the matrix defines in which equations the
repair symbols are involved.
The left side MUST be generated by using the following function:
/*
* Initialize the left side of the parity check matrix.
* This function assumes that an empty matrix of size n-k * k has
* previously been allocated/reset and that the matrix_has_entry(),
* matrix_insert_entry() and degree_of_row() functions can access it.
* (IN): the k, n and N1 parameters.
*/
void left_matrix_init (int k, int n, int N1)
{
int i; /* row index or temporary variable */
int j; /* column index */
int h; /* temporary variable */
int t; /* left limit within the list of possible choices u[] */
int u[N1*MAX_K]; /* table used to have a homogeneous 1 distrib. */
/* Initialize a list of all possible choices in order to
* guarantee a homogeneous "1" distribution */
for (h = N1*k-1; h >= 0; h--) {
u[h] = h % (n-k);
}
<span class="grey">Roca, et al. Standards Track [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
/* Initialize the matrix with N1 "1s" per column, homogeneously */
t = 0;
for (j = 0; j < k; j++) { /* for each source symbol column */
for (h = 0; h < N1; h++) { /* add N1 "1s" */
/* check that valid available choices remain */
for (i = t; i < N1*k && matrix_has_entry(u[i], j); i++);
if (i < N1*k) {
/* choose one index within the list of possible
* choices */
do {
i = t + pmms_rand(N1*k-t);
} while (matrix_has_entry(u[i], j));
matrix_insert_entry(u[i], j);
/* replace with u[t] which has never been chosen */
u[i] = u[t];
t++;
} else {
/* no choice left, choose one randomly */
do {
i = pmms_rand(n-k);
} while (matrix_has_entry(i, j));
matrix_insert_entry(i, j);
}
}
}
/* Add extra bits to avoid rows with less than two "1s".
* This is needed when the code rate is smaller than 2/(2+N1) */
for (i = 0; i < n-k; i++) { /* for each row */
if (degree_of_row(i) == 0) {
j = pmms_rand(k);
matrix_insert_entry(i, j);
}
if (degree_of_row(i) == 1) {
do {
j = pmms_rand(k);
} while (matrix_has_entry(i, j));
matrix_insert_entry(i, j);
}
}
}
<span class="grey">Roca, et al. Standards Track [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
The right side (the staircase) MUST be generated by using the
following function:
/*
* Initialize the right side of the parity check matrix with a
* staircase structure.
* (IN): the k and n parameters.
*/
void right_matrix_staircase_init (int k, int n)
{
int i; /* row index */
matrix_insert_entry(0, k); /* first row */
for (i = 1; i < n-k; i++) { /* for the following rows */
matrix_insert_entry(i, k+i); /* identity */
matrix_insert_entry(i, k+i-1); /* staircase */
}
}
Note that just after creating this parity check matrix, when Encoding
Symbol Groups are used (i.e., G > 1), the function initializing the
two random permutation tables (<a href="#section-5.6">Section 5.6</a>) MUST be called. This is
true both at a sender and at a receiver.
<span class="h3"><a class="selflink" id="section-6.3" href="#section-6.3">6.3</a>. Encoding</span>
Thanks to the staircase matrix, repair symbol creation is
straightforward: each repair symbol is equal to the sum of all source
symbols in the associated equation, plus the previous repair symbol
(except for the first repair symbol). Therefore, encoding MUST
follow the natural repair symbol order: start with the first repair
symbol and generate a repair symbol with ESI i before a symbol with
ESI i+1.
<span class="h3"><a class="selflink" id="section-6.4" href="#section-6.4">6.4</a>. Decoding</span>
Decoding basically consists in solving a system of n-k linear
equations whose variables are the n source and repair symbols. Of
course, the final goal is to recover the value of the k source
symbols only.
To that purpose, many techniques are possible. One of them is the
following trivial algorithm [<a href="#ref-ZP74" title=""Decoding Complexity of Low-Density Codes for Transmission in a Channel with Erasures"">ZP74</a>]: given a set of linear equations,
if one of them has only one remaining unknown variable, then the
value of this variable is that of the constant term. So, replace
this variable by its value in all the remaining linear equations and
reiterate. The value of several variables can therefore be found
recursively. Applied to LDPC FEC codes working over an erasure
<span class="grey">Roca, et al. Standards Track [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
channel, the parity check matrix defines a set of linear equations
whose variables are the source symbols and repair symbols. Receiving
or decoding a symbol is equivalent to having the value of a variable.
<a href="#appendix-A">Appendix A</a> sketches a possible implementation of this algorithm.
A Gaussian elimination (or any optimized derivative) is another
possible decoding technique. Hybrid solutions that start by using
the trivial algorithm above and finish with a Gaussian elimination
are also possible [<a href="#ref-CR08" title=""Improving the Decoding of LDPC Codes for the Packet Erasure Channel with a Hybrid Zyablov Iterative Decoding/Gaussian Elimination Scheme"">CR08</a>].
Because interoperability does not depend on the decoding algorithm
used, the current document does not recommend any particular
technique. This choice is left to the codec developer.
However, choosing a decoding technique will have great practical
impacts. It will impact the erasure capabilities: a Gaussian
elimination enables to solve the system with a smaller number of
known symbols compared to the trivial technique. It will also impact
the CPU load: a Gaussian elimination requires more processing than
the above trivial algorithm. Depending on the target use case, the
codec developer will favor one feature or the other.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Full Specification of the LDPC-Triangle Scheme</span>
<span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a>. General</span>
LDPC-Triangle is identified by the Fully-Specified FEC Encoding ID 4.
The PRNG used by the LDPC-Triangle scheme must be initialized by a
seed. This PRNG seed is an instance-specific FEC OTI attribute
(<a href="#section-4.2.3">Section 4.2.3</a>).
<span class="h3"><a class="selflink" id="section-7.2" href="#section-7.2">7.2</a>. Parity Check Matrix Creation</span>
The LDPC-Triangle matrix can be divided into two parts: the left side
of the matrix defines in which equations the source symbols are
involved; the right side of the matrix defines in which equations the
repair symbols are involved.
The left side MUST be generated by using the same left_matrix_init()
function as with LDPC-Staircase (<a href="#section-6.2">Section 6.2</a>).
<span class="grey">Roca, et al. Standards Track [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
The right side (the triangle) MUST be generated by using the
following function:
/*
* Initialize the right side of the parity check matrix with a
* triangle structure.
* (IN): the k and n parameters.
*/
void right_matrix_staircase_init (int k, int n)
{
int i; /* row index */
int j; /* randomly chosen column indexes in 0..n-k-2 */
int l; /* limitation of the # of "1s" added per row */
matrix_insert_entry(0, k); /* first row */
for (i = 1; i < n-k; i++) { /* for the following rows */
matrix_insert_entry(i, k+i); /* identity */
matrix_insert_entry(i, k+i-1); /* staircase */
/* now fill the triangle */
j = i-1;
for (l = 0; l < j; l++) { /* limit the # of "1s" added */
j = pmms_rand(j);
matrix_insert_entry(i, k+j);
}
}
}
Note that just after creating this parity check matrix, when Encoding
Symbol Groups are used (i.e., G > 1), the function initializing the
two random permutation tables (<a href="#section-5.6">Section 5.6</a>) MUST be called. This is
true both at a sender and at a receiver.
<span class="h3"><a class="selflink" id="section-7.3" href="#section-7.3">7.3</a>. Encoding</span>
Here also, repair symbol creation is straightforward: each repair
symbol of ESI i is equal to the sum of all source and repair symbols
(with ESI lower than i) in the associated equation. Therefore,
encoding MUST follow the natural repair symbol order: start with the
first repair symbol, and generate repair symbol with ESI i before
symbol with ESI i+1.
<span class="h3"><a class="selflink" id="section-7.4" href="#section-7.4">7.4</a>. Decoding</span>
Decoding basically consists in solving a system of n-k linear
equations, whose variables are the n source and repair symbols. Of
course, the final goal is to recover the value of the k source
symbols only. To that purpose, many techniques are possible, as
explained in <a href="#section-6.4">Section 6.4</a>.
<span class="grey">Roca, et al. Standards Track [Page 23]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
Because interoperability does not depend on the decoding algorithm
used, the current document does not recommend any particular
technique. This choice is left to the codec implementer.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Security Considerations</span>
<span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a>. Problem Statement</span>
A content delivery system is potentially subject to many attacks:
some of them target the network (e.g., to compromise the routing
infrastructure, by compromising the congestion control component),
others target the Content Delivery Protocol (CDP) (e.g., to
compromise its normal behavior), and finally some attacks target the
content itself. Since this document focuses on an FEC building block
independently of any particular CDP (even if ALC and NORM are two
natural candidates), this section only discusses the additional
threats that an arbitrary CDP may be exposed to when using this
building block.
More specifically, several kinds of attacks exist:
o those that are meant to give access to a confidential content
(e.g., in case of a non-free content),
o those that try to corrupt the object being transmitted (e.g., to
inject malicious code within an object, or to prevent a receiver
from using an object), and
o those that try to compromise the receiver's behavior (e.g., by
making the decoding of an object computationally expensive).
These attacks can be launched either against the data flow itself
(e.g., by sending forged symbols) or against the FEC parameters that
are sent either in-band (e.g., in an EXT_FTI or FDT Instance) or out-
of-band (e.g., in a session description).
<span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a>. Attacks Against the Data Flow</span>
First of all, let us consider the attacks against the data flow.
<span class="h4"><a class="selflink" id="section-8.2.1" href="#section-8.2.1">8.2.1</a>. Access to Confidential Objects</span>
Access control to a confidential object being transmitted is
typically provided by means of encryption. This encryption can be
done over the whole object (e.g., by the content provider, before the
FEC encoding process), or be done on a packet per packet basis (e.g.,
when IPsec/ESP is used [<a href="./rfc4303" title=""IP Encapsulating Security Payload (ESP)"">RFC4303</a>]). If confidentiality is a concern,
<span class="grey">Roca, et al. Standards Track [Page 24]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
it is RECOMMENDED that one of these solutions be used. Even if we
mention these attacks here, they are not related or facilitated by
the use of FEC.
<span class="h4"><a class="selflink" id="section-8.2.2" href="#section-8.2.2">8.2.2</a>. Content Corruption</span>
Protection against corruptions (e.g., after sending forged packets)
is achieved by means of a content integrity verification/sender
authentication scheme. This service can be provided at the object
level, but in that case a receiver has no way to identify which
symbol(s) is(are) corrupted if the object is detected as corrupted.
This service can also be provided at the packet level. In this case,
after removing all forged packets, the object may be, in some cases,
recovered. Several techniques can provide this source
authentication/content integrity service:
o at the object level, the object MAY be digitally signed (with
public key cryptography), for instance, by using RSASSA-PKCS1-v1_5
[<a href="./rfc3447" title=""Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1"">RFC3447</a>]. This signature enables a receiver to check the object
integrity, once the latter has been fully decoded. Even if
digital signatures are computationally expensive, this calculation
occurs only once per object, which is usually acceptable;
o at the packet level, each packet can be digitally signed. A major
limitation is the high computational and transmission overheads
that this solution requires (unless perhaps if Elliptic Curve
Cryptography (ECC) is used). To avoid this problem, the signature
may span a set of symbols (instead of a single one) in order to
amortize the signature calculation. But if a single symbol is
missing, the integrity of the whole set cannot be checked;
o at the packet level, a Group Message Authentication Code (MAC)
[<a href="./rfc2104" title=""HMAC: Keyed-Hashing for Message Authentication"">RFC2104</a>] scheme can be used, for instance, by using HMAC-SHA-1
with a secret key shared by all the group members, senders, and
receivers. This technique creates a cryptographically secured
(thanks to the secret key) digest of a packet that is sent along
with the packet. The Group MAC scheme does not create a
prohibitive processing load or transmission overhead, but it has a
major limitation: it only provides a group authentication/
integrity service since all group members share the same secret
group key, which means that each member can send a forged packet.
It is therefore restricted to situations where group members are
fully trusted (or in association with another technique such as a
pre-check);
o at the packet level, Timed Efficient Stream Loss-Tolerant
Authentication (TESLA) [<a href="./rfc4082" title=""Timed Efficient Stream Loss-Tolerant Authentication (TESLA): Multicast Source Authentication Transform Introduction"">RFC4082</a>] is an attractive solution that is
robust to losses, provides a true authentication/integrity
<span class="grey">Roca, et al. Standards Track [Page 25]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
service, and does not create any prohibitive processing load or
transmission overhead. Yet, checking a packet requires a small
delay (a second or more) after its reception.
Techniques relying on public key cryptography (digital signatures and
TESLA during the bootstrap process, when used) require that public
keys be securely associated to the entities. This can be achieved by
a Public Key Infrastructure (PKI), or by a PGP Web of Trust, or by
pre-distributing the public keys of each group member.
Techniques relying on symmetric key cryptography (Group MAC) require
that a secret key be shared by all group members. This can be
achieved by means of a group key management protocol, or simply by
pre-distributing the secret key (but this manual solution has many
limitations).
It is up to the CDP developer, who knows the security requirements
and features of the target application area, to define which solution
is the most appropriate. Nonetheless, in case there is any concern
of the threat of object corruption, it is RECOMMENDED that at least
one of these techniques be used.
<span class="h3"><a class="selflink" id="section-8.3" href="#section-8.3">8.3</a>. Attacks Against the FEC Parameters</span>
Let us now consider attacks against the FEC parameters (or FEC OTI).
The FEC OTI can either be sent in-band (i.e., in an EXT_FTI or in an
FDT Instance containing FEC OTI for the object) or out-of-band (e.g.,
in a session description). Attacks on these FEC parameters can
prevent the decoding of the associated object: for instance,
modifying the B parameter will lead to a different block
partitioning.
It is therefore RECOMMENDED that security measures be taken to
guarantee the FEC OTI integrity. To that purpose, the packets
carrying the FEC parameters sent in-band in an EXT_FTI header
extension SHOULD be protected by one of the per-packet techniques
described above: digital signature, Group MAC, or TESLA. When FEC
OTI is contained in an FDT Instance, this object SHOULD be protected,
for instance, by digitally signing it with XML digital signatures
[<a href="./rfc3275" title=""(Extensible Markup Language) XML-Signature Syntax and Processing"">RFC3275</a>]. Finally, when FEC OTI is sent out-of-band (e.g., in a
session description) the latter SHOULD be protected, for instance, by
digitally signing it with [<a href="./rfc3852" title=""Cryptographic Message Syntax (CMS)"">RFC3852</a>].
The same considerations concerning the key management aspects apply
here, also.
<span class="grey">Roca, et al. Standards Track [Page 26]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. IANA Considerations</span>
Values of FEC Encoding IDs and FEC Instance IDs are subject to IANA
registration. For general guidelines on IANA considerations as they
apply to this document, see [<a href="./rfc5052" title=""Forward Error Correction (FEC) Building Block"">RFC5052</a>].
This document assigns the Fully-Specified FEC Encoding ID 3 under the
"ietf:rmt:fec:encoding" name-space to "LDPC Staircase Codes".
This document assigns the Fully-Specified FEC Encoding ID 4 under the
"ietf:rmt:fec:encoding" name-space to "LDPC Triangle Codes".
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. Acknowledgments</span>
<a href="#section-5.5">Section 5.5</a> is derived from an earlier document, and we would like to
thank S. Peltotalo and J. Peltotalo for their contribution. We would
also like to thank Pascal Moniot, Laurent Fazio, Mathieu Cunche,
Aurelien Francillon, Shao Wenjian, Magnus Westerlund, Brian
Carpenter, Tim Polk, Jari Arkko, Chris Newman, Robin Whittle, and
Alfred Hoenes for their comments.
Last but not least, the authors are grateful to Radford M. Neal
(University of Toronto) whose LDPC software
(<a href="http://www.cs.toronto.edu/~radford/ldpc.software.html">http://www.cs.toronto.edu/~radford/ldpc.software.html</a>) inspired this
work.
<span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. References</span>
<span class="h3"><a class="selflink" id="section-11.1" href="#section-11.1">11.1</a>. Normative References</span>
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="./rfc2119">RFC 2119</a>, <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, March 1997.
[<a id="ref-RFC5052">RFC5052</a>] Watson, M., Luby, M., and L. Vicisano, "Forward Error
Correction (FEC) Building Block", <a href="./rfc5052">RFC 5052</a>,
August 2007.
<span class="h3"><a class="selflink" id="section-11.2" href="#section-11.2">11.2</a>. Informative References</span>
[<a id="ref-ZP74">ZP74</a>] Zyablov, V. and M. Pinsker, "Decoding Complexity of
Low-Density Codes for Transmission in a Channel with
Erasures", Translated from Problemy Peredachi
Informatsii, Vol.10, No. 1, pp.15-28, January-
March 1974.
<span class="grey">Roca, et al. Standards Track [Page 27]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
[<a id="ref-RN04">RN04</a>] Roca, V. and C. Neumann, "Design, Evaluation and
Comparison of Four Large Block FEC Codecs: LDPC, LDGM,
LDGM-Staircase and LDGM-Triangle, Plus a Reed-Solomon
Small Block FEC Codec", INRIA Research Report RR-5225,
June 2004.
[<a id="ref-NRFF05">NRFF05</a>] Neumann, C., Roca, V., Francillon, A., and D. Furodet,
"Impacts of Packet Scheduling and Packet Loss
Distribution on FEC Performances: Observations and
Recommendations", ACM CoNEXT'05 Conference, Toulouse,
France (an extended version is available as INRIA
Research Report RR-5578), October 2005.
[<a id="ref-CR08">CR08</a>] Cunche, M. and V. Roca, "Improving the Decoding of
LDPC Codes for the Packet Erasure Channel with a
Hybrid Zyablov Iterative Decoding/Gaussian Elimination
Scheme", INRIA Research Report RR-6473, March 2008.
[<a id="ref-LDPC-codec">LDPC-codec</a>] Roca, V., Neumann, C., Cunche, M., and J. Laboure,
"LDPC-Staircase/LDPC-Triangle Codec Reference
Implementation", INRIA Rhone-Alpes and
STMicroelectronics,
<<a href="http://planete-bcast.inrialpes.fr/">http://planete-bcast.inrialpes.fr/</a>>.
[<a id="ref-MK03">MK03</a>] MacKay, D., "Information Theory, Inference and
Learning Algorithms", Cambridge University
Press, ISBN: 0-521-64298-1, 2003.
[<a id="ref-PM88">PM88</a>] Park, S. and K. Miller, "Random Number Generators:
Good Ones are Hard to Find", Communications of the
ACM, Vol. 31, No. 10, pp.1192-1201, 1988.
[<a id="ref-CA90">CA90</a>] Carta, D., "Two Fast Implementations of the Minimal
Standard Random Number Generator", Communications of
the ACM, Vol. 33, No. 1, pp.87-88, January 1990.
[<a id="ref-WI08">WI08</a>] Whittle, R., "Park-Miller-Carta Pseudo-Random Number
Generator", January 2008,
<<a href="http://www.firstpr.com.au/dsp/rand31/">http://www.firstpr.com.au/dsp/rand31/</a>>.
[<a id="ref-rand31pmc">rand31pmc</a>] Whittle, R., "31 bit pseudo-random number generator",
September 2005, <<a href="http://www.firstpr.com.au/dsp/rand31/rand31-park-miller-carta.cc.txt">http://www.firstpr.com.au/dsp/rand31/</a>
<a href="http://www.firstpr.com.au/dsp/rand31/rand31-park-miller-carta.cc.txt">rand31-park-miller-carta.cc.txt</a>>.
[<a id="ref-PTVF92">PTVF92</a>] Press, W., Teukolsky, S., Vetterling, W., and B.
Flannery, "Numerical Recipes in C; Second Edition",
Cambridge University Press, ISBN: 0-521-43108-5, 1992.
<span class="grey">Roca, et al. Standards Track [Page 28]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
[<a id="ref-RMT-PI-ALC">RMT-PI-ALC</a>] Luby, M., Watson, M., and L. Vicisano, "Asynchronous
Layered Coding (ALC) Protocol Instantiation", Work
in Progress, November 2007.
[<a id="ref-RMT-PI-NORM">RMT-PI-NORM</a>] Adamson, B., Bormann, C., Handley, M., and J. Macker,
"Negative-acknowledgment (NACK)-Oriented Reliable
Multicast (NORM) Protocol", Work in Progress,
January 2008.
[<a id="ref-RMT-FLUTE">RMT-FLUTE</a>] Paila, T., Walsh, R., Luby, M., Lehtonen, R., and V.
Roca, "FLUTE - File Delivery over Unidirectional
Transport", Work in Progress, October 2007.
[<a id="ref-RFC3447">RFC3447</a>] Jonsson, J. and B. Kaliski, "Public-Key Cryptography
Standards (PKCS) #1: RSA Cryptography Specifications
Version 2.1", <a href="./rfc3447">RFC 3447</a>, February 2003.
[<a id="ref-RFC4303">RFC4303</a>] Kent, S., "IP Encapsulating Security Payload (ESP)",
<a href="./rfc4303">RFC 4303</a>, December 2005.
[<a id="ref-RFC2104">RFC2104</a>] "HMAC: Keyed-Hashing for Message Authentication",
<a href="./rfc2104">RFC 2104</a>, February 1997.
[<a id="ref-RFC4082">RFC4082</a>] "Timed Efficient Stream Loss-Tolerant Authentication
(TESLA): Multicast Source Authentication Transform
Introduction", <a href="./rfc4082">RFC 4082</a>, June 2005.
[<a id="ref-RFC3275">RFC3275</a>] Eastlake, D., Reagle, J., and D. Solo, "(Extensible
Markup Language) XML-Signature Syntax and Processing",
<a href="./rfc3275">RFC 3275</a>, March 2002.
[<a id="ref-RFC3453">RFC3453</a>] Luby, M., Vicisano, L., Gemmell, J., Rizzo, L.,
Handley, M., and J. Crowcroft, "The Use of Forward
Error Correction (FEC) in Reliable Multicast",
<a href="./rfc3453">RFC 3453</a>, December 2002.
[<a id="ref-RFC3852">RFC3852</a>] Housley, R., "Cryptographic Message Syntax (CMS)",
<a href="./rfc3852">RFC 3852</a>, July 2004.
[<a id="ref-RFC4648">RFC4648</a>] Josefsson, S., "The Base16, Base32, and Base64 Data
Encodings", <a href="./rfc4648">RFC 4648</a>, October 2006.
<span class="grey">Roca, et al. Standards Track [Page 29]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. Trivial Decoding Algorithm (Informative Only)</span>
A trivial decoding algorithm is sketched below (please see
[<a href="#ref-LDPC-codec" title=""LDPC-Staircase/LDPC-Triangle Codec Reference Implementation"">LDPC-codec</a>] for the details omitted here):
Initialization: allocate a table partial_sum[n-k] of buffers, each
buffer being of size the symbol size. There's one
entry per equation since the buffers are meant to
store the partial sum of each equation; Reset all
the buffers to zero;
/*
* For each newly received or decoded symbol, try to make progress
* in the decoding of the associated source block.
* NB: in case of a symbol group (G>1), this function is called for
* each symbol of the received packet.
* NB: a callback function indicates to the caller that new symbol(s)
* has(have) been decoded.
* new_esi (IN): ESI of the new symbol received or decoded
* new_symb (IN): Buffer of the new symbol received or decoded
*/
void
decoding_step(ESI_t new_esi,
symbol_t *new_symb)
{
If (new_symb is an already decoded or received symbol) {
Return; /* don't waste time with this symbol */
}
If (new_symb is the last missing source symbol) {
Remember that decoding is finished;
Return; /* work is over now... */
}
Create an empty list of equations having symbols decoded
during this decoding step;
/*
* First add this new symbol to the partial sum of all the
* equations where the symbol appears.
*/
For (each equation eq in which new_symb is a variable and
having more than one unknown variable) {
Add new_symb to partial_sum[eq];
Remove entry(eq, new_esi) from the H matrix;
<span class="grey">Roca, et al. Standards Track [Page 30]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
If (the new degree of equation eq == 1) {
/* a new symbol can be decoded, remember the
* equation */
Append eq to the list of equations having symbols
decoded during this decoding step;
}
}
/*
* Then finish with recursive calls to decoding_step() for each
* newly decoded symbol.
*/
For (each equation eq in the list of equations having symbols
decoded during this decoding step) {
/*
* Because of the recursion below, we need to check that
* decoding is not finished, and that the equation is
* __still__ of degree 1
*/
If (decoding is finished) {
break; /* exit from the loop */
}
If ((degree of equation eq == 1) {
Let dec_esi be the ESI of the newly decoded symbol in
equation eq;
Remove entry(eq, dec_esi);
Allocate a buffer, dec_symb, for this symbol and
copy partial_sum[eq] to dec_symb;
Inform the caller that a new symbol has been
decoded via a callback function;
/* finally, call this function recursively */
decoding_step(dec_esi, dec_symb);
}
}
Free the list of equations having symbols decoded;
Return;
}
<span class="grey">Roca, et al. Standards Track [Page 31]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
Authors' Addresses
Vincent Roca
INRIA
655, av. de l'Europe
Inovallee; Montbonnot
ST ISMIER cedex 38334
France
EMail: vincent.roca@inria.fr
URI: <a href="http://planete.inrialpes.fr/people/roca/">http://planete.inrialpes.fr/people/roca/</a>
Christoph Neumann
Thomson
12, bd de Metz
Rennes 35700
France
EMail: christoph.neumann@thomson.net
URI: <a href="http://planete.inrialpes.fr/people/chneuman/">http://planete.inrialpes.fr/people/chneuman/</a>
David Furodet
STMicroelectronics
12, Rue Jules Horowitz
BP217
Grenoble Cedex 38019
France
EMail: david.furodet@st.com
URI: <a href="http://www.st.com/">http://www.st.com/</a>
<span class="grey">Roca, et al. Standards Track [Page 32]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span>
<span class="grey"><a href="./rfc5170">RFC 5170</a> LDPC Staircase and Triangle FEC June 2008</span>
Full Copyright Statement
Copyright (C) The IETF Trust (2008).
This document is subject to the rights, licenses and restrictions
contained in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a>, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be
found in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and <a href="https://www.rfc-editor.org/bcp/bcp79">BCP 79</a>.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
<a href="http://www.ietf.org/ipr">http://www.ietf.org/ipr</a>.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at
ietf-ipr@ietf.org.
Roca, et al. Standards Track [Page 33]
</pre>
|