N3r0_H4x0r_EvilSec

Internet Engineering Task Force (IETF)

Nov 4th, 2013
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 135.58 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Internet Engineering Task Force (IETF) V. Roca
  8. Request for Comments: 5776 A. Francillon
  9. Category: Experimental S. Faurite
  10. ISSN: 2070-1721 INRIA
  11. April 2010
  12.  
  13. Use of Timed Efficient Stream Loss-Tolerant Authentication (TESLA) in
  14. the Asynchronous Layered Coding (ALC) and
  15. NACK-Oriented Reliable Multicast (NORM) Protocols
  16.  
  17. Abstract
  18.  
  19. This document details the Timed Efficient Stream Loss-Tolerant
  20. Authentication (TESLA) packet source authentication and packet
  21. integrity verification protocol and its integration within the
  22. Asynchronous Layered Coding (ALC) and NACK-Oriented Reliable
  23. Multicast (NORM) content delivery protocols. This document only
  24. considers the authentication/integrity verification of the packets
  25. generated by the session's sender. The authentication and integrity
  26. verification of the packets sent by receivers, if any, is out of the
  27. scope of this document.
  28.  
  29. Status of This Memo
  30.  
  31. This document is not an Internet Standards Track specification; it is
  32. published for examination, experimental implementation, and
  33. evaluation.
  34.  
  35. This document defines an Experimental Protocol for the Internet
  36. community. This document is a product of the Internet Engineering
  37. Task Force (IETF). It represents the consensus of the IETF
  38. community. It has received public review and has been approved for
  39. publication by the Internet Engineering Steering Group (IESG). Not
  40. all documents approved by the IESG are a candidate for any level of
  41. Internet Standard; see Section 2 of RFC 5741.
  42.  
  43. Information about the current status of this document, any errata,
  44. and how to provide feedback on it may be obtained at
  45. http://www.rfc-editor.org/info/rfc5776.
  46.  
  47. Roca, et al. Experimental [Page 1]
  48. RFC 5776 TESLA in ALC and NORM April 2010
  49.  
  50.  
  51. Copyright Notice
  52.  
  53. Copyright (c) 2010 IETF Trust and the persons identified as the
  54. document authors. All rights reserved.
  55.  
  56. This document is subject to BCP 78 and the IETF Trust's Legal
  57. Provisions Relating to IETF Documents
  58. (http://trustee.ietf.org/license-info) in effect on the date of
  59. publication of this document. Please review these documents
  60. carefully, as they describe your rights and restrictions with respect
  61. to this document. Code Components extracted from this document must
  62. include Simplified BSD License text as described in Section 4.e of
  63. the Trust Legal Provisions and are provided without warranty as
  64. described in the Simplified BSD License.
  65.  
  66. This document may contain material from IETF Documents or IETF
  67. Contributions published or made publicly available before November
  68. 10, 2008. The person(s) controlling the copyright in some of this
  69. material may not have granted the IETF Trust the right to allow
  70. modifications of such material outside the IETF Standards Process.
  71. Without obtaining an adequate license from the person(s) controlling
  72. the copyright in such materials, this document may not be modified
  73. outside the IETF Standards Process, and derivative works of it may
  74. not be created outside the IETF Standards Process, except to format
  75. it for publication as an RFC or to translate it into languages other
  76. than English.
  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. Roca, et al. Experimental [Page 2]
  103. RFC 5776 TESLA in ALC and NORM April 2010
  104.  
  105.  
  106. Table of Contents
  107.  
  108. 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5
  109. 1.1. Scope of This Document . . . . . . . . . . . . . . . . . . 6
  110. 1.2. Conventions Used in This Document . . . . . . . . . . . . 7
  111. 1.3. Terminology and Notations . . . . . . . . . . . . . . . . 7
  112. 1.3.1. Notations and Definitions Related to Cryptographic
  113. Functions . . . . . . . . . . . . . . . . . . . . . . 7
  114. 1.3.2. Notations and Definitions Related to Time . . . . . . 8
  115. 2. Using TESLA with ALC and NORM: General Operations . . . . . . 9
  116. 2.1. ALC and NORM Specificities That Impact TESLA . . . . . . . 9
  117. 2.2. Bootstrapping TESLA . . . . . . . . . . . . . . . . . . . 10
  118. 2.2.1. Bootstrapping TESLA with an Out-Of-Band Mechanism . . 10
  119. 2.2.2. Bootstrapping TESLA with an In-Band Mechanism . . . . 11
  120. 2.3. Setting Up a Secure Time Synchronization . . . . . . . . . 11
  121. 2.3.1. Direct Time Synchronization . . . . . . . . . . . . . 12
  122. 2.3.2. Indirect Time Synchronization . . . . . . . . . . . . 12
  123. 2.4. Determining the Delay Bounds . . . . . . . . . . . . . . . 13
  124. 2.4.1. Delay Bound Calculation in Direct Time
  125. Synchronization Mode . . . . . . . . . . . . . . . . . 14
  126. 2.4.2. Delay Bound Calculation in Indirect Time
  127. Synchronization Mode . . . . . . . . . . . . . . . . . 14
  128. 2.5. Cryptographic Parameter Values . . . . . . . . . . . . . . 15
  129. 3. Sender Operations . . . . . . . . . . . . . . . . . . . . . . 16
  130. 3.1. TESLA Parameters . . . . . . . . . . . . . . . . . . . . . 16
  131. 3.1.1. Time Intervals . . . . . . . . . . . . . . . . . . . . 16
  132. 3.1.2. Key Chains . . . . . . . . . . . . . . . . . . . . . . 16
  133. 3.1.3. Time Interval Schedule . . . . . . . . . . . . . . . . 20
  134. 3.1.4. Timing Parameters . . . . . . . . . . . . . . . . . . 20
  135. 3.2. TESLA Signaling Messages . . . . . . . . . . . . . . . . . 21
  136. 3.2.1. Bootstrap Information . . . . . . . . . . . . . . . . 21
  137. 3.2.2. Direct Time Synchronization Response . . . . . . . . . 22
  138. 3.3. TESLA Authentication Information . . . . . . . . . . . . . 22
  139. 3.3.1. Authentication Tags . . . . . . . . . . . . . . . . . 23
  140. 3.3.2. Digital Signatures . . . . . . . . . . . . . . . . . . 23
  141. 3.3.3. Group MAC Tags . . . . . . . . . . . . . . . . . . . . 24
  142. 3.4. Format of TESLA Messages and Authentication Tags . . . . . 25
  143. 3.4.1. Format of a Bootstrap Information Message . . . . . . 26
  144. 3.4.2. Format of a Direct Time Synchronization Response . . . 31
  145. 3.4.3. Format of a Standard Authentication Tag . . . . . . . 32
  146. 3.4.4. Format of an Authentication Tag without Key
  147. Disclosure . . . . . . . . . . . . . . . . . . . . . . 33
  148. 3.4.5. Format of an Authentication Tag with a "New Key
  149. Chain" Commitment . . . . . . . . . . . . . . . . . . 34
  150. 3.4.6. Format of an Authentication Tag with a "Last Key
  151. of Old Chain" Disclosure . . . . . . . . . . . . . . . 35
  152. 4. Receiver Operations . . . . . . . . . . . . . . . . . . . . . 36
  153. 4.1. Verification of the Authentication Information . . . . . . 36
  154.  
  155.  
  156.  
  157. Roca, et al. Experimental [Page 3]
  158. RFC 5776 TESLA in ALC and NORM April 2010
  159.  
  160.  
  161. 4.1.1. Processing the Group MAC Tag . . . . . . . . . . . . . 36
  162. 4.1.2. Processing the Digital Signature . . . . . . . . . . . 37
  163. 4.1.3. Processing the Authentication Tag . . . . . . . . . . 37
  164. 4.2. Initialization of a Receiver . . . . . . . . . . . . . . . 38
  165. 4.2.1. Processing the Bootstrap Information Message . . . . . 38
  166. 4.2.2. Performing Time Synchronization . . . . . . . . . . . 38
  167. 4.3. Authentication of Received Packets . . . . . . . . . . . . 40
  168. 4.3.1. Discarding Unnecessary Packets Earlier . . . . . . . . 43
  169. 4.4. Flushing the Non-Authenticated Packets of a Previous
  170. Key Chain . . . . . . . . . . . . . . . . . . . . . . . . 43
  171. 5. Integration in the ALC and NORM Protocols . . . . . . . . . . 44
  172. 5.1. Authentication Header Extension Format . . . . . . . . . . 44
  173. 5.2. Use of Authentication Header Extensions . . . . . . . . . 45
  174. 5.2.1. EXT_AUTH Header Extension of Type Bootstrap
  175. Information . . . . . . . . . . . . . . . . . . . . . 45
  176. 5.2.2. EXT_AUTH Header Extension of Type Authentication
  177. Tag . . . . . . . . . . . . . . . . . . . . . . . . . 48
  178. 5.2.3. EXT_AUTH Header Extension of Type Direct Time
  179. Synchronization Request . . . . . . . . . . . . . . . 49
  180. 5.2.4. EXT_AUTH Header Extension of Type Direct Time
  181. Synchronization Response . . . . . . . . . . . . . . . 49
  182. 6. Security Considerations . . . . . . . . . . . . . . . . . . . 50
  183. 6.1. Dealing with DoS Attacks . . . . . . . . . . . . . . . . . 50
  184. 6.2. Dealing With Replay Attacks . . . . . . . . . . . . . . . 51
  185. 6.2.1. Impacts of Replay Attacks on TESLA . . . . . . . . . . 51
  186. 6.2.2. Impacts of Replay Attacks on NORM . . . . . . . . . . 52
  187. 6.2.3. Impacts of Replay Attacks on ALC . . . . . . . . . . . 53
  188. 6.3. Security of the Back Channel . . . . . . . . . . . . . . . 53
  189. 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 54
  190. 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 55
  191. 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 55
  192. 9.1. Normative References . . . . . . . . . . . . . . . . . . . 55
  193. 9.2. Informative References . . . . . . . . . . . . . . . . . . 56
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212. Roca, et al. Experimental [Page 4]
  213. RFC 5776 TESLA in ALC and NORM April 2010
  214.  
  215.  
  216. 1. Introduction
  217.  
  218. Many applications using multicast and broadcast communications
  219. require that each receiver be able to authenticate the source of any
  220. packet it receives as well as the integrity of these packets. This
  221. is the case with ALC [RFC5775] and NORM [RFC5740], two Content
  222. Delivery Protocols (CDPs) designed to transfer objects (e.g., files)
  223. reliably between a session's sender and several receivers. The NORM
  224. protocol is based on bidirectional transmissions. Each receiver
  225. acknowledges data received or, in case of packet erasures, asks for
  226. retransmissions. On the opposite, the ALC protocol is based on
  227. purely unidirectional transmissions. Reliability is achieved by
  228. means of the cyclic transmission of the content within a carousel
  229. and/or by the use of proactive Forward Error Correction (FEC) codes.
  230. Both protocols have in common the fact that they operate at the
  231. application level, on top of an erasure channel (e.g., the Internet)
  232. where packets can be lost (erased) during the transmission.
  233.  
  234. The goal of this document is to counter attacks where an attacker
  235. impersonates the ALC or NORM session's sender and injects forged
  236. packets to the receivers, thereby corrupting the objects
  237. reconstructed by the receivers.
  238.  
  239. Preventing this attack is much more complex in the case of group
  240. communications than it is with unicast communications. Indeed, with
  241. unicast communications, a simple solution exists: the sender and the
  242. receiver share a secret key to compute a Message Authentication Code
  243. (MAC) of all messages exchanged. This is no longer feasible in the
  244. case of multicast and broadcast communications since sharing a group
  245. key between the sender and all receivers implies that any group
  246. member can impersonate the sender and send forged messages to other
  247. receivers.
  248.  
  249. The usual solution to provide the source authentication and message
  250. integrity services in the case of multicast and broadcast
  251. communications consists of relying on asymmetric cryptography and
  252. using digital signatures. Yet, this solution is limited by high
  253. computational costs and high transmission overheads. The Timed
  254. Efficient Stream Loss-tolerant Authentication (TESLA) protocol is an
  255. alternative solution that provides the two required services, while
  256. being compatible with high-rate transmissions over lossy channels.
  257.  
  258. This document explains how to integrate the TESLA source
  259. authentication and packet integrity protocol to the ALC and NORM CDP.
  260. Any application built on top of ALC and NORM will directly benefit
  261. from the services offered by TESLA at the transport layer. In
  262. particular, this is the case of File Delivery over Unidirectional
  263. Transport (FLUTE).
  264.  
  265.  
  266.  
  267. Roca, et al. Experimental [Page 5]
  268. RFC 5776 TESLA in ALC and NORM April 2010
  269.  
  270.  
  271. For more information on the TESLA protocol and its principles, please
  272. refer to [RFC4082] and [Perrig04]. For more information on ALC and
  273. NORM, please refer to [RFC5775], [RFC5651], and [RFC5740],
  274. respectively. For more information on FLUTE, please refer to
  275. [RMT-FLUTE].
  276.  
  277. 1.1. Scope of This Document
  278.  
  279. This specification only considers the authentication and integrity
  280. verification of the packets generated by the session's sender. This
  281. specification does not consider the packets that may be sent by
  282. receivers, for instance, NORM's feedback packets. [RMT-SIMPLE-AUTH]
  283. describes several techniques that can be used to that purpose. Since
  284. this is usually a low-rate flow (unlike the downstream flow), using
  285. computing intensive techniques like digital signatures, possibly
  286. combined with a Group MAC scheme, is often acceptable. Finally,
  287. Section 5 explains how to use several authentication schemes in a
  288. given session thanks to the "ASID" (Authentication Scheme IDentifier)
  289. field.
  290.  
  291. This specification relies on several external mechanisms, for
  292. instance:
  293.  
  294. o to communicate securely the public key or a certificate for the
  295. session's sender (Section 2.2.2);
  296.  
  297. o to communicate securely and confidentially the group key, K_g,
  298. used by the Group MAC feature, when applicable (Section 3.3.3).
  299. In some situations, this group key will have to be periodically
  300. refreshed;
  301.  
  302. o to perform secure time synchronization in indirect mode
  303. (Section 2.3.2) or in direct mode (Section 2.3.1) to carry the
  304. request/response messages with ALC, which is purely
  305. unidirectional;
  306.  
  307. These mechanisms are required in order to bootstrap TESLA at a sender
  308. and at a receiver and must be deployed in parallel to TESLA.
  309. Besides, the randomness of the Primary Key of the key chain
  310. (Section 3.1.2) is vital to the security of TESLA. Therefore, the
  311. sender needs an appropriate mechanism to generate this random key.
  312.  
  313. Several technical details of TESLA, like the most appropriate way to
  314. alternate between the transmission of a key disclosure and a
  315. commitment to a new key chain, or the transmission of a key
  316. disclosure and the last key of the previous key chain, or the
  317. disclosure of a key and the compact flavor that does not disclose any
  318. key, are specific to the target use case (Section 3.1.2). For
  319.  
  320.  
  321.  
  322. Roca, et al. Experimental [Page 6]
  323. RFC 5776 TESLA in ALC and NORM April 2010
  324.  
  325.  
  326. instance, it depends on the number of packets sent per time interval,
  327. on the desired robustness and the acceptable transmission overhead,
  328. which can only be optimized after taking into account the use-case
  329. specificities.
  330.  
  331. 1.2. Conventions Used in This Document
  332.  
  333. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  334. "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  335. document are to be interpreted as described in [RFC2119].
  336.  
  337. 1.3. Terminology and Notations
  338.  
  339. The following notations and definitions are used throughout this
  340. document.
  341.  
  342. 1.3.1. Notations and Definitions Related to Cryptographic Functions
  343.  
  344. Notations and definitions related to cryptographic functions
  345. [RFC4082][RFC4383]:
  346.  
  347. o PRF is the Pseudo Random Function;
  348.  
  349. o MAC is the Message Authentication Code;
  350.  
  351. o HMAC is the keyed-Hash Message Authentication Code;
  352.  
  353. o F is the one-way function used to create the key chain
  354. (Section 3.1.2.1);
  355.  
  356. o F' is the one-way function used to derive the HMAC keys
  357. (Section 3.1.2.1);
  358.  
  359. o n_p is the length, in bits, of the F function's output. This is
  360. therefore the length of the keys in the key chain;
  361.  
  362. o n_f is the length, in bits, of the F' function's output. This is
  363. therefore the length of the HMAC keys;
  364.  
  365. o n_m is the length, in bits, of the truncated output of the MAC
  366. [RFC2104]. Only the n_m most significant bits of the MAC output
  367. are kept;
  368.  
  369. o N is the length of a key chain. There are N+1 keys in a key
  370. chain: K_0, K_1, ..., K_N. When several chains are used, all the
  371. chains MUST have the same length and keys are numbered
  372. consecutively, following the time interval numbering;
  373.  
  374.  
  375.  
  376.  
  377. Roca, et al. Experimental [Page 7]
  378. RFC 5776 TESLA in ALC and NORM April 2010
  379.  
  380.  
  381. o n_c is the number of keys in a key chain. Therefore, n_c = N+1;
  382.  
  383. o n_tx_lastkey is the number of additional intervals during which
  384. the last key of the old key chain SHOULD be sent, after switching
  385. to a new key chain and after waiting for the disclosure delay d.
  386. These extra transmissions take place after the interval during
  387. which the last key is normally disclosed. The n_tx_lastkey value
  388. is either 0 (no extra disclosure) or larger. This parameter is
  389. sender specific and is not communicated to the receiver;
  390.  
  391. o n_tx_newkcc is the number of intervals during which the commitment
  392. to a new key chain SHOULD be sent, before switching to the new key
  393. chain. The n_tx_newkcc value is either 0 (no commitment sent
  394. within authentication tags) or larger. This parameter is sender
  395. specific and is not communicated to the receiver;
  396.  
  397. o K_g is a shared group key, communicated to all group members,
  398. confidentially, during the TESLA bootstrapping (Section 2.2);
  399.  
  400. o n_w is the length, in bits, of the truncated output of the MAC of
  401. the optional group authentication scheme: only the n_w most
  402. significant bits of the MAC output are kept. n_w is typically
  403. small, a multiple of 32 bits (e.g., 32 bits).
  404.  
  405. 1.3.2. Notations and Definitions Related to Time
  406.  
  407. Notations and definitions related to time:
  408.  
  409. o i is the time interval index. Interval numbering starts at 0 and
  410. increases consecutively. Since the interval index is stored as a
  411. 32-bit unsigned integer, wrapping to 0 might take place in long
  412. sessions.
  413.  
  414. o t_s is the sender local time value at some absolute time (in NTP
  415. timestamp format);
  416.  
  417. o t_r is the receiver local time value at the same absolute time (in
  418. NTP timestamp format);
  419.  
  420. o T_0 is the start time corresponding to the beginning of the
  421. session, i.e., the beginning of time interval 0 (in NTP timestamp
  422. format);
  423.  
  424. o T_int is the interval duration (in milliseconds);
  425.  
  426. o d is the key disclosure delay (in number of intervals);
  427.  
  428.  
  429.  
  430.  
  431.  
  432. Roca, et al. Experimental [Page 8]
  433. RFC 5776 TESLA in ALC and NORM April 2010
  434.  
  435.  
  436. o D_t is the upper bound of the lag of the receiver's clock with
  437. respect to the clock of the sender;
  438.  
  439. o S_sr is an estimated bound of the clock drift between the sender
  440. and a receiver throughout the duration of the session;
  441.  
  442. o D^O_t is the upper bound of the lag of the sender's clock with
  443. respect to the time reference in indirect time synchronization
  444. mode;
  445.  
  446. o D^R_t is the upper bound of the lag of the receiver's clock with
  447. respect to the time reference in indirect time synchronization
  448. mode;
  449.  
  450. o D_err is an upper bound of the time error between all the time
  451. references, in indirect time synchronization mode;
  452.  
  453. o NTP timestamp format consists in a 64-bit unsigned fixed-point
  454. number, in seconds relative to 0h on 1 January 1900. The integer
  455. part is in the first 32 bits, and the fraction part in the last 32
  456. bits [RFC1305].
  457.  
  458. 2. Using TESLA with ALC and NORM: General Operations
  459.  
  460. 2.1. ALC and NORM Specificities That Impact TESLA
  461.  
  462. The ALC and NORM protocols have features and requirements that
  463. largely impact the way TESLA can be used.
  464.  
  465. In the case of ALC:
  466.  
  467. o ALC is massively scalable: nothing in the protocol specification
  468. limits the number of receivers that join a session. Therefore, an
  469. ALC session potentially includes a huge number (e.g., millions or
  470. more) of receivers;
  471.  
  472. o ALC can work on top of purely unidirectional transport channels:
  473. this is one of the assets of ALC, and examples of unidirectional
  474. channels include satellite (even if a back channel might exist in
  475. some use cases) and broadcasting networks like Digital Video
  476. Broadcasting - Handhelds / Satellite services to Handhelds (DVB-
  477. H/SH);
  478.  
  479. o ALC defines an on-demand content delivery model [RFC5775] where
  480. receivers can arrive at any time, at their own discretion,
  481. download the content and leave the session. Other models (e.g.,
  482. push or streaming) are also defined;
  483.  
  484.  
  485.  
  486.  
  487. Roca, et al. Experimental [Page 9]
  488. RFC 5776 TESLA in ALC and NORM April 2010
  489.  
  490.  
  491. o ALC sessions are potentially very long: a session can last several
  492. days or months during which the content is continuously
  493. transmitted within a carousel. The content can be either static
  494. (e.g., a software update) or dynamic (e.g., a web site).
  495.  
  496. Depending on the use case, some of the above features may not apply.
  497. For instance, ALC can also be used over a bidirectional channel or
  498. with a limited number of receivers.
  499.  
  500. In the case of NORM:
  501.  
  502. o NORM has been designed for medium-size sessions: indeed, NORM
  503. relies on feedback messages and the sender may collapse if the
  504. feedback message rate is too high;
  505.  
  506. o NORM requires a bidirectional transport channel: the back channel
  507. is not necessarily a high-data rate channel since the control
  508. traffic sent over it by a single receiver is an order of magnitude
  509. lower than the downstream traffic. Networks with an asymmetric
  510. connectivity (e.g., a high-rate satellite downlink and a low-rate
  511. return channel) are appropriate.
  512.  
  513. 2.2. Bootstrapping TESLA
  514.  
  515. In order to initialize the TESLA component at a receiver, the sender
  516. MUST communicate some key information in a secure way, so that the
  517. receiver can check the source of the information and its integrity.
  518. Two general methods are possible:
  519.  
  520. o by using an out-of-band mechanism, or
  521.  
  522. o by using an in-band mechanism.
  523.  
  524. The current specification does not recommend any mechanism to
  525. bootstrap TESLA. Choosing between an in-band and out-of-band scheme
  526. is left to the implementer, depending on the target use case.
  527. However, it is RECOMMENDED that TESLA implementations support the use
  528. of the in-band mechanism for interoperability purposes.
  529.  
  530. 2.2.1. Bootstrapping TESLA with an Out-Of-Band Mechanism
  531.  
  532. For instance, [RFC4442] describes the use of the MIKEY (Multimedia
  533. Internet Keying) protocol to bootstrap TESLA. As a side effect,
  534. MIKEY also provides a loose time synchronization feature from which
  535. TESLA can benefit. Other solutions, for instance, based on an
  536. extended session description, are possible, on the condition that
  537. these solutions provide the required security level.
  538.  
  539.  
  540.  
  541.  
  542. Roca, et al. Experimental [Page 10]
  543. RFC 5776 TESLA in ALC and NORM April 2010
  544.  
  545.  
  546. 2.2.2. Bootstrapping TESLA with an In-Band Mechanism
  547.  
  548. This specification describes an in-band mechanism. In some use
  549. cases, it might be desired that bootstrapping take place without
  550. requiring the use of an additional external mechanism. For instance,
  551. each device may feature a clock with a known time-drift that is
  552. negligible in front of the time accuracy required by TESLA, and each
  553. device may embed the public key of the sender. It is also possible
  554. that the use case does not feature a bidirectional channel that
  555. prevents the use of out-of-band protocols like MIKEY. For these two
  556. examples, the exchange of a bootstrap information message (described
  557. in Section 3.4.1) and the knowledge of a few additional parameters
  558. (listed below) are sufficient to bootstrap TESLA at a receiver.
  559.  
  560. Some parameters cannot be communicated in-band. In particular:
  561.  
  562. o the sender or group controller MUST either communicate the public
  563. key of the sender or a certificate (which also means that a PKI
  564. has been set up) to all receivers, so that each receiver be able
  565. to verify the signature of the bootstrap message and direct time
  566. synchronization response messages (when applicable).
  567.  
  568. o when time synchronization is performed with NTP/SNTP (Simple
  569. Network Time Protocol), the sender or group controller MUST
  570. communicate the list of valid NTP/SNTP servers to all the session
  571. members (sender included), so that they are all able to
  572. synchronize themselves on the same NTP/SNTP servers.
  573.  
  574. o when the Group MAC feature is used, the sender or group controller
  575. MUST communicate the K_g group key to all the session members
  576. (sender included). This group key may be periodically refreshed.
  577.  
  578. The way these parameters are communicated is out of the scope of this
  579. document.
  580.  
  581. 2.3. Setting Up a Secure Time Synchronization
  582.  
  583. The security offered by TESLA heavily relies on time. Therefore, the
  584. session's sender and each receiver need to be time synchronized in a
  585. secure way. To that purpose, two general methods exist:
  586.  
  587. o direct time synchronization, and
  588.  
  589. o indirect time synchronization.
  590.  
  591. It is also possible that a given session includes receivers that use
  592. the direct time synchronization mode while others use the indirect
  593. time synchronization mode.
  594.  
  595.  
  596.  
  597. Roca, et al. Experimental [Page 11]
  598. RFC 5776 TESLA in ALC and NORM April 2010
  599.  
  600.  
  601. 2.3.1. Direct Time Synchronization
  602.  
  603. When direct time synchronization is used, each receiver asks the
  604. sender for a time synchronization. To that purpose, a receiver sends
  605. a direct time synchronization request (Section 4.2.2.1). The sender
  606. then directly answers each request with a direct time synchronization
  607. response (Section 3.4.2), signing this reply. Upon receiving this
  608. response, a receiver first verifies the signature, and then
  609. calculates an upper bound of the lag of his clock with respect to the
  610. clock of the sender, D_t. The details on how to calculate D_t are
  611. given in Section 2.4.1.
  612.  
  613. This synchronization method is both simple and secure. Yet, there
  614. are two potential issues:
  615.  
  616. o a bidirectional channel must exist between the sender and each
  617. receiver, and
  618.  
  619. o the sender may collapse if the incoming request rate is too high.
  620.  
  621. Relying on direct time synchronization is not expected to be an issue
  622. with NORM since (1) bidirectional communications already take place,
  623. and (2) NORM scalability is anyway limited. Yet, it can be required
  624. that a mechanism, that is out of the scope of this document, be used
  625. to spread the transmission of direct time synchronization request
  626. messages over time if there is a risk that the sender may collapse.
  627.  
  628. But direct time synchronization is potentially incompatible with ALC
  629. since (1) there might not be a back channel, and (2) there are
  630. potentially a huge number of receivers and therefore a risk that the
  631. sender will collapse.
  632.  
  633. 2.3.2. Indirect Time Synchronization
  634.  
  635. When indirect time synchronization is used, the sender and each
  636. receiver must synchronize securely via an external time reference.
  637. Several possibilities exist:
  638.  
  639. o sender and receivers can synchronize through an NTPv3 (Network
  640. Time Protocol version 3) [RFC1305] hierarchy of servers. The
  641. authentication mechanism of NTPv3 MUST be used in order to
  642. authenticate each NTP message individually. It prevents, for
  643. instance, an attacker from impersonating an NTP server;
  644.  
  645. o they can synchronize through an NTPv4 (Network Time Protocol
  646. version 4) [NTP-NTPv4] hierarchy of servers. The Autokey security
  647. protocol of NTPv4 MUST be used in order to authenticate each NTP
  648. message individually;
  649.  
  650.  
  651.  
  652. Roca, et al. Experimental [Page 12]
  653. RFC 5776 TESLA in ALC and NORM April 2010
  654.  
  655.  
  656. o they can synchronize through an SNTPv4 (Simple Network Time
  657. Protocol version 4) [RFC4330] hierarchy of servers. The
  658. authentication features of SNTPv4 must then be used. Note that
  659. TESLA only needs a loose (but secure) time synchronization, which
  660. is in line with the time synchronization service offered by SNTP;
  661.  
  662. o they can synchronize through a GPS or Galileo (or similar) device
  663. that also provides a high precision time reference. Spoofing
  664. attacks on the GPS system have recently been reported. Depending
  665. on the use case, the security achieved will or will not be
  666. acceptable;
  667.  
  668. o they can synchronize thanks to a dedicated hardware, embedded on
  669. each sender and receiver, that provides a clock with a time-drift
  670. that is negligible in front of the TESLA time accuracy
  671. requirements. This feature enables a device to synchronize its
  672. embedded clock with the official time reference from time to time
  673. (in an extreme case once, at manufacturing time), and then to
  674. remain autonomous for a duration that depends on the known maximum
  675. clock drift.
  676.  
  677. A bidirectional channel is required by the NTP/SNTP schemes. On the
  678. opposite, with the GPS/Galileo and high precision clock schemes, no
  679. such assumption is made. In situations where ALC is used on purely
  680. unidirectional transport channels (Section 2.1), using the NTP/SNTP
  681. schemes is not possible. Another aspect is the scalability
  682. requirement of ALC, and to a lesser extent of NORM. From this point
  683. of view, the above mechanisms usually do not raise any problem,
  684. unlike the direct time synchronization schemes. Therefore, using
  685. indirect time synchronization can be a good choice. It should be
  686. noted that the NTP/SNTP schemes assume that each client trusts the
  687. sender and accepts aligning its NTP/SNTP configuration to that of the
  688. sender. If this assumption does not hold, the sender SHOULD offer an
  689. alternative solution.
  690.  
  691. The details on how to calculate an upper bound of the lag of a
  692. receiver's clock with respect to the clock of the sender, D_t, are
  693. given in Section 2.4.2.
  694.  
  695. 2.4. Determining the Delay Bounds
  696.  
  697. Let us assume that a secure time synchronization has been set up.
  698. This section explains how to define the various timing parameters
  699. that are used during the authentication of received packets.
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707. Roca, et al. Experimental [Page 13]
  708. RFC 5776 TESLA in ALC and NORM April 2010
  709.  
  710.  
  711. 2.4.1. Delay Bound Calculation in Direct Time Synchronization Mode
  712.  
  713. In direct time synchronization mode, synchronization between a
  714. receiver and the sender follows the following protocol [RFC4082]:
  715.  
  716. o The receiver sends a direct time synchronization request message
  717. to the sender, that includes t_r, the receiver local time at the
  718. moment of sending (Section 4.2.2.1).
  719.  
  720. o Upon receipt of this message, the sender records its local time,
  721. t_s, and sends to the receiver a direct time synchronization
  722. response that includes t_r (taken from the request) and t_s,
  723. signing this reply (Section 3.4.2).
  724.  
  725. o Upon receiving this response, the receiver first verifies that he
  726. actually sent a request with t_r and then checks the signature.
  727. Then he calculates D_t = t_s - t_r + S_sr, where S_sr is an
  728. estimated bound of the clock drift between the sender and the
  729. receiver throughout the duration of the session. This document
  730. does not specify how S_sr is estimated.
  731.  
  732. After this initial synchronization, at any point throughout the
  733. session, the receiver knows that: T_s < T_r + D_t, where T_s is the
  734. current time at the sender and T_r is the current time at the
  735. receiver.
  736.  
  737. 2.4.2. Delay Bound Calculation in Indirect Time Synchronization Mode
  738.  
  739. In indirect time synchronization, the sender and the receivers must
  740. synchronize indirectly using one or several time references.
  741.  
  742. 2.4.2.1. Single Time Reference
  743.  
  744. Let us assume that there is a single time reference.
  745.  
  746. 1. The sender calculates D^O_t, the upper bound of the lag of the
  747. sender's clock with respect to the time reference. This D^O_t
  748. value is then communicated to the receivers (Section 3.2.1).
  749.  
  750. 2. Similarly, a receiver R calculates D^R_t, the upper bound of the
  751. lag of the receiver's clock with respect to the time reference.
  752.  
  753. 3. Then, for receiver R, the overall upper bound of the lag of the
  754. receiver's clock with respect to the clock of the sender, D_t, is
  755. the sum: D_t = D^O_t + D^R_t.
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762. Roca, et al. Experimental [Page 14]
  763. RFC 5776 TESLA in ALC and NORM April 2010
  764.  
  765.  
  766. The D^O_t and D^R_t calculation depends on the time synchronization
  767. mechanism used (Section 2.3.2). In some cases, the synchronization
  768. scheme specifications provide these values. In other cases, these
  769. parameters can be calculated by means of a scheme similar to the one
  770. specified in Section 2.4.1, for instance, when synchronization is
  771. achieved via a group controller [RFC4082].
  772.  
  773. 2.4.2.2. Multiple Time References
  774.  
  775. Let us now assume that there are several time references (e.g.,
  776. several NTP/SNTP servers). The sender and receivers first
  777. synchronize with the various time references, independently. It
  778. results in D^O_t and D^R_t. Let D_err be an upper bound of the time
  779. error between all of the time references. Then, the overall value of
  780. D_t within receiver R is set to the sum: D_t = D^O_t + D^R_t + D_err.
  781.  
  782. In some cases, the D_t value is part of the time synchronization
  783. scheme specifications. For instance, NTPv3 [RFC1305] defines
  784. algorithms that are "capable of accuracies in the order of a
  785. millisecond, even after extended periods when synchronization to
  786. primary reference sources has been lost". In practice, depending on
  787. the NTP server stratum, the accuracy might be a little bit worse. In
  788. that case, D_t = security_factor * (1ms + 1ms), where the
  789. security_factor is meant to compensate several sources of inaccuracy
  790. in NTP. The choice of the security_factor value is left to the
  791. implementer, depending on the target use case.
  792.  
  793. 2.5. Cryptographic Parameter Values
  794.  
  795. The F (resp. F') function output length is given by the n_p (resp.
  796. n_f) parameter. The n_p and n_f values depend on the PRF function
  797. chosen, as specified below:
  798.  
  799. +------------------------+---------------------+
  800. | PRF name | n_p and n_f |
  801. +------------------------+---------------------+
  802. | HMAC-SHA-1 | 160 bits (20 bytes) |
  803. | HMAC-SHA-224 | 224 bits (28 bytes) |
  804. | HMAC-SHA-256 (default) | 256 bits (32 bytes) |
  805. | HMAC-SHA-384 | 384 bits (48 bytes) |
  806. | HMAC-SHA-512 | 512 bits (64 bytes) |
  807. +------------------------+---------------------+
  808.  
  809. The computing of regular MAC (resp. Group MAC) makes use of the n_m
  810. (resp. n_w) parameter, i.e., the length of the truncated output of
  811. the function. The n_m and n_w values depend on the MAC function
  812. chosen, as specified below:
  813.  
  814.  
  815.  
  816.  
  817. Roca, et al. Experimental [Page 15]
  818. RFC 5776 TESLA in ALC and NORM April 2010
  819.  
  820.  
  821. +------------------------+---------------------+-------------------+
  822. | MAC name | n_m (regular MAC) | n_w (Group MAC) |
  823. +------------------------+---------------------+-------------------+
  824. | HMAC-SHA-1 | 80 bits (10 bytes) | 32 bits (4 bytes) |
  825. | HMAC-SHA-224 | 112 bits (14 bytes) | 32 bits (4 bytes) |
  826. | HMAC-SHA-256 (default) | 128 bits (16 bytes) | 32 bits (4 bytes) |
  827. | HMAC-SHA-384 | 192 bits (24 bytes) | 32 bits (4 bytes) |
  828. | HMAC-SHA-512 | 256 bits (32 bytes) | 32 bits (4 bytes) |
  829. +------------------------+---------------------+-------------------+
  830.  
  831. 3. Sender Operations
  832.  
  833. This section describes the TESLA operations at a sender. For more
  834. information on the TESLA protocol and its principles, please refer to
  835. [RFC4082][Perrig04].
  836.  
  837. 3.1. TESLA Parameters
  838.  
  839. 3.1.1. Time Intervals
  840.  
  841. The sender divides the time into uniform intervals of duration T_int.
  842. Time interval numbering starts at 0 and is incremented consecutively.
  843. The interval index MUST be stored in an unsigned 32-bit integer so
  844. that wrapping to 0 takes place only after 2^^32 intervals. For
  845. instance, if T_int is equal to 0.5 seconds, then wrapping takes place
  846. after approximately 68 years.
  847.  
  848. 3.1.2. Key Chains
  849.  
  850. 3.1.2.1. Principles
  851.  
  852. The sender computes a one-way key chain of n_c = N+1 keys, and
  853. assigns one key from the chain to each interval, consecutively but in
  854. reverse order. Key numbering starts at 0 and is incremented
  855. consecutively, following the time interval numbering: K_0, K_1, ...,
  856. K_N.
  857.  
  858. In order to compute this chain, the sender must first select a
  859. Primary Key, K_N, and a PRF function, f (Section 7, TESLA-PRF). The
  860. randomness of the Primary Key, K_N, is vital to the security and no
  861. one should be able to guess it.
  862.  
  863. The function F is a one-way function that is defined as: F(k) =
  864. f_k(0), where f_k(0) is the result of the application of the PRF f to
  865. k and 0. When f is an HMAC (Section 7), k is used as the key, and 0
  866. as the message, using the algorithm described in [RFC2104].
  867.  
  868.  
  869.  
  870.  
  871.  
  872. Roca, et al. Experimental [Page 16]
  873. RFC 5776 TESLA in ALC and NORM April 2010
  874.  
  875.  
  876. Similarly, the function F' is a one-way function that is defined as:
  877. F'(k) = f_k(1), where f_k(1) is the result of the application of the
  878. same PRF f to k and 1.
  879.  
  880. The sender then computes all the keys of the chain, recursively,
  881. starting with K_N, using: K_{i-1} = F(K_i). Therefore, K_i = F^{N-
  882. i}(K_N), where F^i(x) is the execution of function F with the
  883. argument x, i times. The receiver can then compute any value in the
  884. key chain from K_N, even if it does not have intermediate values
  885. [RFC4082]. The key for MAC calculation can then be derived from the
  886. corresponding K_i key by K'_i = F'(K_i).
  887.  
  888. The key chain has a finite length, N, which corresponds to a maximum
  889. time duration of (N + 1) * T_int. The content delivery session has a
  890. duration T_delivery, which may either be known in advance, or not. A
  891. first solution consists in having a single key chain of an
  892. appropriate length, so that the content delivery session finishes
  893. before the end of the key chain, i.e., T_delivery <= (N + 1) * T_int.
  894. But the longer the key chain, the higher the memory and computation
  895. required to cope with it. Another solution consists in switching to
  896. a new key chain, of the same length, when necessary [Perrig04].
  897.  
  898. 3.1.2.2. Using Multiple Key Chains
  899.  
  900. When several key chains are needed, all of them MUST be of the same
  901. length. Switching from the current key chain to the next one
  902. requires that a commitment to the new key chain be communicated in a
  903. secure way to the receiver. This can be done by using either an out-
  904. of-band mechanism or an in-band mechanism. This document only
  905. specifies the in-band mechanism.
  906.  
  907. < -------- old key chain --------- >||< -------- new key chain --...
  908. +-----+-----+ .. +-----+-----+-----+||+-----+-----+-----+-----+-----+
  909. 0 1 .. N-2 N-1 N || N+1 N+2 N+3 N+4 N+5
  910. ||
  911. Key disclosures: ||
  912. N/A N/A .. K_N-4 K_N-3 K_N-2 || K_N-1 K_N K_N+1 K_N+2 K_N+3
  913. | || | |
  914. |< -------------- >|| |< ------------- >|
  915. Additional key F(K_N+1) || K_N
  916. disclosures (commitment to || (last key of the
  917. (in parallel): the new chain) || old chain)
  918.  
  919. Figure 1: Switching to the Second Key Chain with the In-Band
  920. Mechanism, Assuming That d=2, n_tx_newkcc=3, n_tx_lastkey=3
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927. Roca, et al. Experimental [Page 17]
  928. RFC 5776 TESLA in ALC and NORM April 2010
  929.  
  930.  
  931. Figure 1 illustrates the switch to the new key chain, using the in-
  932. band mechanism. Let us say that the old key chain stops at K_N and
  933. the new key chain starts at K_{N+1} (i.e., F(K_{N+1}) and K_N are two
  934. different keys). Then, the sender includes the commitment F(K_{N+1})
  935. to the new key chain into packets authenticated with the old key
  936. chain (see Section 3.4.5). This commitment SHOULD be sent during
  937. n_tx_newkcc time intervals before the end of the old key chain.
  938. Since several packets are usually sent during an interval, the sender
  939. SHOULD alternate between sending a disclosed key of the old key chain
  940. and the commitment to the new key chain. The details of how to
  941. alternate between the disclosure and commitment are out of the scope
  942. of this document.
  943.  
  944. The receiver will keep the commitment until the key K_{N+1} is
  945. disclosed, at interval N+1+d. Then, the receiver will be able to
  946. test the validity of that key by computing F(K_{N+1}) and comparing
  947. it to the commitment.
  948.  
  949. When the key chain is changed, it becomes impossible to recover a
  950. previous key from the old key chain. This is a problem if the
  951. receiver lost the packets disclosing the last key of the old key
  952. chain. A solution consists in re-sending the last key, K_N, of the
  953. old key chain (see Section 3.4.6). This SHOULD be done during
  954. n_tx_lastkey additional time intervals after the end of the time
  955. interval where K_N is disclosed. Since several packets are usually
  956. sent during an interval, the sender SHOULD alternate between sending
  957. a disclosed key of the new key chain, and the last key of the old key
  958. chain. The details of how to alternate between the two disclosures
  959. are out of the scope of this document.
  960.  
  961. In some cases, a receiver having experienced a very long
  962. disconnection might have lost the commitment of the new chain.
  963. Therefore, this receiver will not be able to authenticate any packet
  964. related to the new chain or any of the following ones. The only
  965. solution for this receiver to catch up consists in receiving an
  966. additional bootstrap information message. This can happen by waiting
  967. for the next periodic transmission (if sent in-band) or through an
  968. external mechanism (Section 3.2.1).
  969.  
  970. 3.1.2.3. Values of the n_tx_lastkey and n_tx_newkcc Parameters
  971.  
  972. When several key chains and the in-band commitment mechanism are
  973. used, a sender MUST initialize the n_tx_lastkey and n_tx_newkcc
  974. parameters in such a way that no overlapping occurs. In other words,
  975. once a sender starts transmitting commitments for a new key chain, he
  976. MUST NOT send a disclosure for the last key of the old key chain any
  977. more. Therefore, the following property MUST be verified:
  978.  
  979.  
  980.  
  981.  
  982. Roca, et al. Experimental [Page 18]
  983. RFC 5776 TESLA in ALC and NORM April 2010
  984.  
  985.  
  986. d + n_tx_lastkey + n_tx_newkcc <= N + 1
  987.  
  988. It is RECOMMENDED, for robustness purposes, that, once n_tx_lastkey
  989. has been chosen, then:
  990.  
  991. n_tx_newkcc = N + 1 - n_tx_lastkey - d
  992.  
  993. In other words, the sender starts transmitting a commitment to the
  994. following key chain immediately after having sent all the disclosures
  995. of the last key of the previous key chain. Doing so increases the
  996. probability that a receiver gets a commitment for the following key
  997. chain.
  998.  
  999. In any case, these two parameters are sender specific and need not be
  1000. transmitted to the receivers. Of course, as explained above, the
  1001. sender alternates between the disclosure of a key of the current key
  1002. chain and the commitment to the new key chain (or the last key of the
  1003. old key chain).
  1004.  
  1005. 3.1.2.4. The Particular Case of the Session Start
  1006.  
  1007. Since a key cannot be disclosed before the disclosure delay, d, no
  1008. key will be disclosed during the first d time intervals (intervals 0
  1009. and 1 in Figure 1) of the session. To that purpose, the sender uses
  1010. the Authentication Tag without Key Disclosure, Section 3.4.4. The
  1011. following key chains, if any, are not concerned since they will
  1012. disclose the last d keys of the previous chain.
  1013.  
  1014. 3.1.2.5. Managing Silent Periods
  1015.  
  1016. An ALC or NORM sender may stop transmitting packets for some time.
  1017. For instance, it can be the end of the session and all packets have
  1018. already been sent, or the use case may consist in a succession of
  1019. busy periods (when fresh objects are available) followed by silent
  1020. periods. In any case, this is an issue since the authentication of
  1021. the packets sent during the last d intervals requires that the
  1022. associated keys be disclosed, which will take place during d
  1023. additional time intervals.
  1024.  
  1025. To solve this problem, it is recommended that the sender transmit
  1026. empty packets (i.e., without payload) containing the TESLA EXT_AUTH
  1027. Header Extension along with a Standard Authentication Tag during at
  1028. least d time intervals after the end of the regular ALC or NORM
  1029. packet transmissions. The number of such packets and the duration
  1030. during which they are sent must be sufficient for all receivers to
  1031. receive, with a high probability, at least one packet disclosing the
  1032. last useful key (i.e., the key used for the last non-empty packet
  1033. sent).
  1034.  
  1035.  
  1036.  
  1037. Roca, et al. Experimental [Page 19]
  1038. RFC 5776 TESLA in ALC and NORM April 2010
  1039.  
  1040.  
  1041. 3.1.3. Time Interval Schedule
  1042.  
  1043. The sender must determine the following parameters:
  1044.  
  1045. o T_0, the start time corresponding to the beginning of the session,
  1046. i.e., the beginning of time interval 0 (in NTP timestamp format);
  1047.  
  1048. o T_int, the interval duration (in milliseconds), usually ranging
  1049. from 100 milliseconds to 1 second;
  1050.  
  1051. o d, the key disclosure delay (in number of intervals). It is the
  1052. time to wait before disclosing a key;
  1053.  
  1054. o N, the length of a key chain.
  1055.  
  1056. The correct choice of T_int, d, and N is crucial for the efficiency
  1057. of the scheme. For instance, a T_int * d product that is too long
  1058. will cause excessive delay in the authentication process. A T_int *
  1059. d product that is too short prevents many receivers from verifying
  1060. packets. An N * T_int product that is too small will cause the
  1061. sender to switch too often to new key chains. An N that is too long
  1062. with respect to the expected session duration (if known) will require
  1063. the sender to compute too many useless keys. Sections 3.2 and 3.6 of
  1064. [RFC4082] give general guidelines for initializing these parameters.
  1065.  
  1066. The T_0, T_int, d, and N parameters MUST NOT be changed during the
  1067. lifetime of the session. This restriction is meant to prevent
  1068. introducing vulnerabilities. For instance, if a sender was
  1069. authorized to change the key disclosure schedule, a receiver that did
  1070. not receive the change notification would still believe in the old
  1071. key disclosure schedule, thereby creating vulnerabilities [RFC4082].
  1072.  
  1073. 3.1.4. Timing Parameters
  1074.  
  1075. In indirect time synchronization mode, the sender must determine the
  1076. following parameter:
  1077.  
  1078. o D^O_t, the upper bound of the lag of the sender's clock with
  1079. respect to the time reference.
  1080.  
  1081. The D^O_t parameter MUST NOT be changed during the lifetime of the
  1082. session.
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092. Roca, et al. Experimental [Page 20]
  1093. RFC 5776 TESLA in ALC and NORM April 2010
  1094.  
  1095.  
  1096. 3.2. TESLA Signaling Messages
  1097.  
  1098. At a sender, TESLA produces two types of signaling information:
  1099.  
  1100. o The bootstrap information: it can be either sent out-of-band or
  1101. in-band. In the latter case, a digitally signed packet contains
  1102. all the information required to bootstrap TESLA at a receiver;
  1103.  
  1104. o The direct time synchronization response, which enables a receiver
  1105. to finish a direct time synchronization.
  1106.  
  1107. 3.2.1. Bootstrap Information
  1108.  
  1109. In order to initialize the TESLA component at a receiver, the sender
  1110. must communicate some key information in a secure way. This
  1111. information can be sent in-band or out-of-band, as discussed in
  1112. Section 2.2. In this section, we only consider the in-band scheme.
  1113.  
  1114. The TESLA bootstrap information message MUST be digitally signed
  1115. (Section 3.3.2). The goal is to enable a receiver to check the
  1116. packet source and packet integrity. Then, the bootstrap information
  1117. can be:
  1118.  
  1119. o unicast to a receiver during a direct time synchronization
  1120. request/response exchange;
  1121.  
  1122. o broadcast to all receivers. This is typically the case in
  1123. indirect time synchronization mode. It can also be used in direct
  1124. time synchronization mode, for instance, when a large number of
  1125. clients arrive at the same time, in which case it is more
  1126. efficient to answer globally.
  1127.  
  1128. Let us consider situations where the bootstrap information is
  1129. broadcast. This message should be broadcast at the beginning of the
  1130. session, before data packets are actually sent. This is particularly
  1131. important with ALC or NORM sessions in "push" mode, when all clients
  1132. join the session in advance. For improved reliability, bootstrap
  1133. information might be sent a certain number of times.
  1134.  
  1135. A periodic broadcast of the bootstrap information message could also
  1136. be useful when:
  1137.  
  1138. o the ALC session uses an "on-demand" mode, clients arriving at
  1139. their own discretion;
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147. Roca, et al. Experimental [Page 21]
  1148. RFC 5776 TESLA in ALC and NORM April 2010
  1149.  
  1150.  
  1151. o some clients experience an intermittent connectivity. This is
  1152. particularly important when several key chains are used in an ALC
  1153. or NORM session, since there is a risk that a receiver loses all
  1154. the commitments to the new key chain.
  1155.  
  1156. A balance must be found between the signaling overhead and the
  1157. maximum initial waiting time at the receiver before starting the
  1158. delayed authentication process. A period of a few seconds for the
  1159. transmission of this bootstrap information is often a reasonable
  1160. value.
  1161.  
  1162. 3.2.2. Direct Time Synchronization Response
  1163.  
  1164. In direct time synchronization, upon receipt of a synchronization
  1165. request, the sender records its local time, t_s, and sends a response
  1166. message that contains both t_r and t_s (Section 2.4.1). This message
  1167. is unicast to the receiver. This direct time synchronization
  1168. response message MUST be digitally signed in order to enable a
  1169. receiver to check the packet source and packet integrity
  1170. (Section 3.3.2). The receiver MUST also be able to associate this
  1171. response and his request, which is the reason why t_r is included in
  1172. the response message.
  1173.  
  1174. 3.3. TESLA Authentication Information
  1175.  
  1176. At a sender, TESLA produces three types of security tags:
  1177.  
  1178. o an authentication tag, in case of data packets, and which contains
  1179. the MAC of the packet;
  1180.  
  1181. o a digital signature, in case of one of the two TESLA signaling
  1182. packets, namely a bootstrap information message or a direct time
  1183. synchronization response; and
  1184.  
  1185. o an optional group authentication tag, that can be added to all the
  1186. packets to mitigate attacks coming from outside of the group.
  1187.  
  1188. Because of interdependencies, their computation MUST follow a strict
  1189. order:
  1190.  
  1191. o first of all, compute the authentication tag (with data packet) or
  1192. the digital signature (with signaling packet);
  1193.  
  1194. o finally, compute the Group Mac.
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202. Roca, et al. Experimental [Page 22]
  1203. RFC 5776 TESLA in ALC and NORM April 2010
  1204.  
  1205.  
  1206. 3.3.1. Authentication Tags
  1207.  
  1208. All the data packets sent MUST have an authentication tag containing:
  1209.  
  1210. o the interval index, i, which is also the index of the key used for
  1211. computing the MAC of this packet;
  1212.  
  1213. o the MAC of the message: MAC(K'_i, M), where K'_i=F'(K_i);
  1214.  
  1215. o either a disclosed key (which belongs to the current key chain or
  1216. the previous key chain), or a commitment to a new key chain, or no
  1217. key at all.
  1218.  
  1219. The computation of MAC(K'_i, M) MUST include the ALC or NORM header
  1220. (with the various header extensions) and the payload (when
  1221. applicable). The UDP/IP headers MUST NOT be included. During this
  1222. computation, the "MAC(K'_i, M)" field of the authentication tag MUST
  1223. be set to 0.
  1224.  
  1225. 3.3.2. Digital Signatures
  1226.  
  1227. The bootstrap information message (with the in-band bootstrap scheme)
  1228. and direct time synchronization response message (with the indirect
  1229. time synchronization scheme) both need to be signed by the sender.
  1230. These two messages contain a "Signature" field to hold the digital
  1231. signature. The bootstrap information message also contains the
  1232. "Signature Encoding Algorithm", the "Signature Cryptographic
  1233. Function", and the "Signature Length" fields that enable a receiver
  1234. to process the "Signature" field. Note that there are no such
  1235. "Signature Encoding Algorithm", "Signature Cryptographic Function",
  1236. and "Signature Length" fields in the case of a direct time
  1237. synchronization response message since it is assumed that these
  1238. parameters are already known (i.e., the receiver either received a
  1239. bootstrap information message before or these values have been
  1240. communicated out-of-band).
  1241.  
  1242. Several "Signature Encoding Algorithms" can be used, including
  1243. RSASSA-PKCS1-v1_5, the default, and RSASSA-PSS (Section 7). With
  1244. these encodings, SHA-256 is the default "Signature Cryptographic
  1245. Function".
  1246.  
  1247. The computation of the signature MUST include the ALC or NORM header
  1248. (with the various header extensions) and the payload when applicable.
  1249. The UDP/IP headers MUST NOT be included. During this computation,
  1250. the "Signature" field MUST be set to 0 as well as the optional Group
  1251. MAC, when present, since this Group MAC is calculated later.
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257. Roca, et al. Experimental [Page 23]
  1258. RFC 5776 TESLA in ALC and NORM April 2010
  1259.  
  1260.  
  1261. More specifically, from [RFC4359]: Digital signature generation is
  1262. performed as described in [RFC3447], Section 8.2.1 for RSASSA-PKCS1-
  1263. v1_5 and Section 8.1.1 for RSASSA-PSS. The authenticated portion of
  1264. the packet is used as the message M, which is passed to the signature
  1265. generation function. The signer's RSA private key is passed as K.
  1266. In summary, (when SHA-256 is used), the signature generation process
  1267. computes a SHA-256 hash of the authenticated packet bytes, signs the
  1268. SHA-256 hash using the private key, and encodes the result with the
  1269. specified RSA encoding type. This process results in a value S,
  1270. which is the digital signature to be included in the packet.
  1271.  
  1272. With RSASSA-PKCS1-v1_5 and RSASSA-PSS signatures, the size of the
  1273. signature is equal to the "RSA modulus", unless the "RSA modulus" is
  1274. not a multiple of 8 bits. In that case, the signature MUST be
  1275. prepended with between 1 and 7 bits set to zero such that the
  1276. signature is a multiple of 8 bits [RFC4359]. The key size, which in
  1277. practice is also equal to the "RSA modulus", has major security
  1278. implications. [RFC4359] explains how to choose this value depending
  1279. on the maximum expected lifetime of the session. This choice is out
  1280. of the scope of this document.
  1281.  
  1282. 3.3.3. Group MAC Tags
  1283.  
  1284. An optional Group MAC can be used to mitigate Denial-of-Service (DoS)
  1285. attacks coming from attackers that are not group members [RFC4082].
  1286. This feature assumes that a group key, K_g, is shared by the sender
  1287. and all receivers. When the attacker is not a group member, the
  1288. benefits of adding a Group MAC to every packet sent are threefold:
  1289.  
  1290. o a receiver can immediately drop faked packets, without having to
  1291. wait for the disclosure delay, d;
  1292.  
  1293. o a sender can immediately drop faked direct time synchronization
  1294. requests, and avoid checking the digital signature, a computation
  1295. intensive task;
  1296.  
  1297. o a receiver can immediately drop faked direct time synchronization
  1298. response and bootstrap messages, without having to verify the
  1299. digital signature, a computation-intensive task.
  1300.  
  1301. The computation of the Group MAC, MAC(K_g, M), MUST include the ALC
  1302. or NORM header (with the various header extensions) and the payload
  1303. when applicable. The UDP/IP headers MUST NOT be included. During
  1304. this computation, the "Group MAC" field MUST be set to 0. However,
  1305. the digital signature (e.g., of a bootstrap message) and the "MAC"
  1306. fields (e.g., of an authentication tag), when present, MUST have been
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312. Roca, et al. Experimental [Page 24]
  1313. RFC 5776 TESLA in ALC and NORM April 2010
  1314.  
  1315.  
  1316. calculated since they are included in the Group MAC calculation
  1317. itself. Then, the sender truncates the MAC output to keep the n_w
  1318. most significant bits and stores the result in the "Group MAC" field.
  1319.  
  1320. This scheme features a few limits:
  1321.  
  1322. o it is of no help if a group member (who knows K_g) impersonates
  1323. the sender and sends forged messages to other receivers;
  1324.  
  1325. o it requires an additional MAC computing for each packet, both at
  1326. the sender and receiver sides;
  1327.  
  1328. o it increases the size of the TESLA authentication headers. In
  1329. order to limit this problem, the length of the truncated output of
  1330. the MAC, n_w, SHOULD be kept small (e.g., 32 bits) (see [RFC3711],
  1331. Section 9.5). As a side effect, the authentication service is
  1332. significantly weakened: the probability of any forged packet being
  1333. successfully authenticated becomes one in 2^32. Since the Group
  1334. MAC check is only a pre-check that must be followed by the
  1335. standard TESLA authentication check, this is not considered to be
  1336. an issue.
  1337.  
  1338. For a given use case, the benefits brought by the Group MAC must be
  1339. balanced against these limitations.
  1340.  
  1341. Note that the Group MAC function can be different from the TESLA MAC
  1342. function (e.g., it can use a weaker but faster MAC function). Note
  1343. also that the mechanism by which the group key, K_g, is communicated
  1344. to all group members, and perhaps periodically updated, is out of the
  1345. scope of this document.
  1346.  
  1347. 3.4. Format of TESLA Messages and Authentication Tags
  1348.  
  1349. This section specifies the format of the various kinds of TESLA
  1350. messages and authentication tags sent by the session's sender.
  1351. Because these TESLA messages are carried as EXT_AUTH Header
  1352. Extensions of the ALC or NORM packets (Section 5), the following
  1353. formats do not start on 32-bit word boundaries.
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367. Roca, et al. Experimental [Page 25]
  1368. RFC 5776 TESLA in ALC and NORM April 2010
  1369.  
  1370.  
  1371. 3.4.1. Format of a Bootstrap Information Message
  1372.  
  1373. When bootstrap information is sent in-band, the following message is
  1374. used:
  1375.  
  1376. 0 1 2 3
  1377. 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
  1378. +-+-+-+-+-+-+-+-+ ---
  1379. | V |resvd|S|G|A| ^
  1380. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
  1381. | d | PRF Type | MAC Func Type |Gr MAC Fun Type| | f
  1382. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | i
  1383. | SigEncAlgo | SigCryptoFunc | Signature Length | | x
  1384. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | e
  1385. | Reserved | T_int | | d
  1386. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
  1387. | | | l
  1388. + T_0 (NTP timestamp format) + | e
  1389. | | | n
  1390. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | g
  1391. | N (Key Chain Length) | | t
  1392. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | h
  1393. | Current Interval Index i | v
  1394. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ---
  1395. | |
  1396. ~ Current Key Chain Commitment +-+-+-+-+-+-+-+-+
  1397. | | Padding |
  1398. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1399. | |
  1400. + +
  1401. ~ Signature ~
  1402. + +-+-+-+-+-+-+-+-+
  1403. | | Padding |
  1404. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1405. |P| |
  1406. +-+ D^O_t Extension (optional, present if A==1) +
  1407. | (NTP timestamp diff, positive if P==1, negative if P==0) |
  1408. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1409. ~ Group MAC (optional) ~
  1410. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1411.  
  1412. Figure 2: Bootstrap Information Format
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422. Roca, et al. Experimental [Page 26]
  1423. RFC 5776 TESLA in ALC and NORM April 2010
  1424.  
  1425.  
  1426. The format of the bootstrap information is depicted in Figure 2. The
  1427. fields are:
  1428.  
  1429. "V" (Version) field (2 bits):
  1430.  
  1431. The "V" field contains the version number of the protocol. For
  1432. this specification, the value of 0 MUST be used.
  1433.  
  1434. "Reserved" field (3 bits):
  1435.  
  1436. This is a reserved field that MUST be set to zero in this
  1437. specification.
  1438.  
  1439. "S" (Single Key Chain) flag (1 bit):
  1440.  
  1441. The "S" flag indicates whether this TESLA session is restricted to
  1442. a single key chain (S==1) or relies on one or multiple key chains
  1443. (S==0).
  1444.  
  1445. "G" (Group MAC Present) flag (1 bit):
  1446.  
  1447. The "G" flag indicates whether the Group MAC feature is used
  1448. (G==1) or not (G==0). When it is used, a "Group MAC" field is
  1449. added to all the packets containing a TESLA EXT_AUTH Header
  1450. Extension (including this bootstrap message).
  1451.  
  1452. "A" flag (1 bit):
  1453.  
  1454. The "A" flag indicates whether the "P" flag and "D^O_t" fields are
  1455. present (A==1) or not (A==0). In indirect time synchronization
  1456. mode, A MUST be equal to 1 since these fields are needed.
  1457.  
  1458. "d" field (8 bits):
  1459.  
  1460. "d" is an unsigned integer that defines the key disclosure delay
  1461. (in number of intervals). d MUST be greater than or equal to 2.
  1462.  
  1463. "PRF Type" field (8 bits):
  1464.  
  1465. The "PRF Type" is the reference number of the f function used to
  1466. derive the F (for key chain) and F' (for MAC keys) functions
  1467. (Section 7).
  1468.  
  1469. "MAC Function Type" field (8 bits):
  1470.  
  1471. The "MAC Function Type" is the reference number of the function
  1472. used to compute the MAC of the packets (Section 7).
  1473.  
  1474.  
  1475.  
  1476.  
  1477. Roca, et al. Experimental [Page 27]
  1478. RFC 5776 TESLA in ALC and NORM April 2010
  1479.  
  1480.  
  1481. "Group MAC Function Type" field (8 bits):
  1482.  
  1483. When G==1, this field contains the reference number of the
  1484. cryptographic MAC function used to compute the Group MAC
  1485. (Section 7). When G==0, this field MUST be set to zero.
  1486.  
  1487. "Signature Encoding Algorithm" field (8 bits):
  1488.  
  1489. The "Signature Encoding Algorithm" is the reference number
  1490. (Section 7) of the digital signature used to authenticate this
  1491. bootstrap information and included in the "Signature" field.
  1492.  
  1493. "Signature Cryptographic Function" field (8 bits):
  1494.  
  1495. The "Signature Cryptographic Function" is the reference number
  1496. (Section 7) of the cryptographic function used within the digital
  1497. signature.
  1498.  
  1499. "Signature Length" field (16 bits):
  1500.  
  1501. The "Signature Length" is an unsigned integer that indicates the
  1502. "Signature" field size in bytes in the "Signature Extension"
  1503. field. This is also the signature key length, since both
  1504. parameters are equal.
  1505.  
  1506. "Reserved" fields (16 bits):
  1507.  
  1508. This is a reserved field that MUST be set to zero in this
  1509. specification.
  1510.  
  1511. "T_int" field (16 bits):
  1512.  
  1513. "T_int" is an unsigned 16-bit integer that defines the interval
  1514. duration (in milliseconds).
  1515.  
  1516. "T_0" field (64 bits):
  1517.  
  1518. "T_0" is a timestamp in NTP timestamp format that indicates the
  1519. beginning of the session, i.e., the beginning of time interval 0.
  1520.  
  1521. "N" field (32 bits):
  1522.  
  1523. "N" is an unsigned integer that indicates the key chain length.
  1524. There are N + 1 keys per chain.
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532. Roca, et al. Experimental [Page 28]
  1533. RFC 5776 TESLA in ALC and NORM April 2010
  1534.  
  1535.  
  1536. "i" (Interval Index of K_i) field (32 bits):
  1537.  
  1538. "i" is an unsigned integer that indicates the current interval
  1539. index when this bootstrap information message is sent.
  1540.  
  1541. "Current Key Chain Commitment" field (variable size, padded if
  1542. necessary for 32-bit word alignment):
  1543.  
  1544. "Key Chain Commitment" is the commitment to the current key chain,
  1545. i.e., the key chain corresponding to interval i. For instance,
  1546. with the first key chain, this commitment is equal to F(K_0), with
  1547. the second key chain, this commitment is equal to F(K_{N+1}),
  1548. etc.). If need be, this field is padded (with 0) up to a multiple
  1549. of 32 bits.
  1550.  
  1551. "Signature" field (variable size, padded if necessary for 32-bit word
  1552. alignment):
  1553.  
  1554. The "Signature" field is mandatory. It contains a digital
  1555. signature of this message, as specified by the encoding algorithm,
  1556. cryptographic function, and key length parameters. If the
  1557. signature length is not a multiple of 32 bits, this field is
  1558. padded with 0.
  1559.  
  1560. "P" flag (optional, 1 bit if present):
  1561.  
  1562. The "P" flag is optional and only present if the "A" flag is equal
  1563. to 1. It is only used in indirect time synchronization mode.
  1564. This flag indicates whether the D^O_t NTP timestamp difference is
  1565. positive (P==1) or negative (P==0).
  1566.  
  1567. "D^O_t" field (optional, 63 bits if present):
  1568.  
  1569. The "D^O_t" field is optional and only present if the "A" flag is
  1570. equal to 1. It is only used in indirect time synchronization
  1571. mode. It is the upper bound of the lag of the sender's clock with
  1572. respect to the time reference. When several time references are
  1573. specified (e.g., several NTP servers), then D^O_t is the maximum
  1574. upper bound of the lag with each time reference. D^O_t is
  1575. composed of two unsigned integers, as with NTP timestamps: the
  1576. first 31 bits give the time difference in seconds and the
  1577. remaining 32 bits give the sub-second time difference.
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587. Roca, et al. Experimental [Page 29]
  1588. RFC 5776 TESLA in ALC and NORM April 2010
  1589.  
  1590.  
  1591. "Group MAC" field (optional, variable length, multiple of 32 bits):
  1592.  
  1593. This field contains the Group MAC, calculated with the group key,
  1594. K_g, shared by all group members. The field length, in bits, is
  1595. given by n_w, which is known once the Group MAC function type is
  1596. known (Section 7).
  1597.  
  1598. Note that the first byte and the following seven 32-bit words are
  1599. mandatory fixed-length fields. The "Current Key Chain Commitment"
  1600. and "Signature" fields are mandatory but variable-length fields. The
  1601. remaining "D^O_t" and "Group MAC" fields are optional.
  1602.  
  1603. In order to prevent attacks, some parameters MUST NOT be changed
  1604. during the lifetime of the session (Sections 3.1.3 and 3.1.4). The
  1605. following table summarizes the parameter's status:
  1606.  
  1607. +--------------------------+----------------------------------------+
  1608. | Parameter | Status |
  1609. +--------------------------+----------------------------------------+
  1610. | V | set to 0 in this specification |
  1611. | S | static (during whole session) |
  1612. | G | static (during whole session) |
  1613. | A | static (during whole session) |
  1614. | T_O | static (during whole session) |
  1615. | T_int | static (during whole session) |
  1616. | d | static (during whole session) |
  1617. | N | static (during whole session) |
  1618. | D^O_t (if present) | static (during whole session) |
  1619. | PRF Type | static (during whole session) |
  1620. | MAC Function Type | static (during whole session) |
  1621. | Signature Encoding | static (during whole session) |
  1622. | Algorithm | |
  1623. | Signature Crypto. | static (during whole session) |
  1624. | Function | |
  1625. | Signature Length | static (during whole session) |
  1626. | Group MAC Func. Type | static (during whole session) |
  1627. | i | dynamic (related to current key chain) |
  1628. | K_i | dynamic (related to current key chain) |
  1629. | signature | dynamic, packet dependent |
  1630. | Group MAC (if present) | dynamic, packet dependent |
  1631. +--------------------------+----------------------------------------+
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642. Roca, et al. Experimental [Page 30]
  1643. RFC 5776 TESLA in ALC and NORM April 2010
  1644.  
  1645.  
  1646. 3.4.2. Format of a Direct Time Synchronization Response
  1647.  
  1648. 0 1 2 3
  1649. 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
  1650. +-+-+-+-+-+-+-+-+
  1651. | Reserved |
  1652. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1653. | |
  1654. + t_s (NTP timestamp) +
  1655. | |
  1656. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1657. | |
  1658. + t_r (NTP timestamp) +
  1659. | |
  1660. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1661. | |
  1662. + +
  1663. ~ Signature ~
  1664. + +-+-+-+-+-+-+-+-+
  1665. | | Padding |
  1666. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1667. ~ Group MAC (optional) ~
  1668. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1669.  
  1670. Figure 3: Format of a Direct Time Synchronization Response
  1671.  
  1672. The response to a direct time synchronization request contains the
  1673. following information:
  1674.  
  1675. "Reserved" field (8 bits):
  1676.  
  1677. This is a reserved field that MUST be set to zero in this
  1678. specification.
  1679.  
  1680. "t_s" (NTP timestamp, 64 bits):
  1681.  
  1682. "t_s" is a timestamp in NTP timestamp format that corresponds to
  1683. the sender local time value when receiving the direct time
  1684. synchronization request message.
  1685.  
  1686. "t_r" (NTP timestamp, 64 bits):
  1687.  
  1688. "t_r" is a timestamp in NTP timestamp format that contains the
  1689. receiver local time value received in the direct time
  1690. synchronization request message.
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697. Roca, et al. Experimental [Page 31]
  1698. RFC 5776 TESLA in ALC and NORM April 2010
  1699.  
  1700.  
  1701. "Signature" field (variable size, padded if necessary for 32-bit word
  1702. alignment):
  1703.  
  1704. The "Signature" field is mandatory. It contains a digital
  1705. signature of this message, as specified by the encoding algorithm,
  1706. cryptographic function, and key length parameters communicated in
  1707. the bootstrap information message (if applicable) or out-of-band.
  1708. If the signature length is not a multiple of 32 bits, this field
  1709. is padded with 0.
  1710.  
  1711. "Group MAC" field (optional, variable length, multiple of 32 bits):
  1712.  
  1713. This field contains the Group MAC, calculated with the group key,
  1714. K_g, shared by all group members. The field length, in bits, is
  1715. given by n_w, which is known once the Group MAC function type is
  1716. known (Section 7).
  1717.  
  1718. 3.4.3. Format of a Standard Authentication Tag
  1719.  
  1720. 0 1 2 3
  1721. 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
  1722. +-+-+-+-+-+-+-+-+
  1723. | Reserved |
  1724. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1725. | i (Interval Index of K'_i) |
  1726. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1727. | |
  1728. ~ Disclosed Key K_{i-d} ~
  1729. | |
  1730. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1731. | |
  1732. ~ MAC(K'_i, M) +-+-+-+-+-+-+-+-+
  1733. | | Padding |
  1734. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1735. ~ Group MAC (optional) ~
  1736. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1737.  
  1738. Figure 4: Format of the Standard Authentication Tag
  1739.  
  1740. A Standard Authentication Tag is composed of the following fields:
  1741.  
  1742. "Reserved" field (8 bits):
  1743.  
  1744. The "Reserved" field is not used in the current specification and
  1745. MUST be set to zero by the sender.
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752. Roca, et al. Experimental [Page 32]
  1753. RFC 5776 TESLA in ALC and NORM April 2010
  1754.  
  1755.  
  1756. "i" (Interval Index) field (32 bits):
  1757.  
  1758. "i" is the interval index associated with the key (K'_i) used to
  1759. compute the MAC of this packet.
  1760.  
  1761. "Disclosed Key" (variable size, non padded):
  1762.  
  1763. The "Disclosed Key" is the key used for interval i-d: K_{i-d}.
  1764. There is no padding between the "Disclosed Key" and "MAC(K'_i, M)"
  1765. fields, and the latter MAY not start on a 32-bit boundary,
  1766. depending on the n_p parameter.
  1767.  
  1768. "MAC(K'_i, M)" (variable size, padded if necessary for 32-bit word
  1769. alignment):
  1770.  
  1771. "MAC(K'_i, M)" is the truncated message authentication code of the
  1772. current packet. Only the n_m most significant bits of the MAC
  1773. output are kept [RFC2104].
  1774.  
  1775. "Group MAC" field (optional, variable length, multiple of 32 bits):
  1776.  
  1777. This field contains the Group MAC, calculated with a group key,
  1778. K_g, shared by all group members. The field length is given by
  1779. n_w, in bits.
  1780.  
  1781. Note that because a key cannot be disclosed before the disclosure
  1782. delay, d, the sender MUST NOT use this tag during the first d
  1783. intervals of the session: {0 .. d-1} (inclusive). Instead, the
  1784. sender MUST use an Authentication Tag without Key Disclosure.
  1785.  
  1786. 3.4.4. Format of an Authentication Tag without Key Disclosure
  1787.  
  1788. The Authentication Tag without Key Disclosure is meant to be used in
  1789. situations where a high number of packets are sent in a given time
  1790. interval. In such a case, it can be advantageous to disclose the
  1791. K_{i-d} key only in a subset of the packets sent, using a Standard
  1792. Authentication Tag, and to use the shortened version that does not
  1793. disclose the K_{i-d} key in the remaining packets. It is left to the
  1794. implementer to decide how many packets should disclose the K_{i-d}
  1795. key. This Authentication Tag without Key Disclosure MUST also be
  1796. used during the first d intervals: {0 .. d-1} (inclusive).
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.  
  1806.  
  1807. Roca, et al. Experimental [Page 33]
  1808. RFC 5776 TESLA in ALC and NORM April 2010
  1809.  
  1810.  
  1811. 0 1 2 3
  1812. 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
  1813. +-+-+-+-+-+-+-+-+
  1814. | Reserved |
  1815. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1816. | i (Interval Index of K'_i) |
  1817. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1818. | |
  1819. ~ MAC(K'_i, M) +-+-+-+-+-+-+-+-+
  1820. | | Padding |
  1821. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1822. ~ Group MAC (optional) ~
  1823. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1824.  
  1825. Figure 5: Format of the Authentication Tag without Key Disclosure
  1826.  
  1827. 3.4.5. Format of an Authentication Tag with a "New Key Chain"
  1828. Commitment
  1829.  
  1830. During the last n_tx_newkcc intervals of the current key chain, the
  1831. sender SHOULD send commitments to the next key chain. This is done
  1832. by replacing the disclosed key of the Authentication Tag with a New
  1833. Key Chain Commitment, F(K_{N+1}) (or F(K_{2N+2}) in case of a switch
  1834. between the second and third key chains, etc.) Figure 6 shows the
  1835. corresponding format.
  1836.  
  1837. Note that since there is no padding between the "F(K_{N+1})" and
  1838. "MAC(K'_i, M)" fields, the latter MAY not start on a 32-bit boundary,
  1839. depending on the n_p parameter.
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862. Roca, et al. Experimental [Page 34]
  1863. RFC 5776 TESLA in ALC and NORM April 2010
  1864.  
  1865.  
  1866. 0 1 2 3
  1867. 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
  1868. +-+-+-+-+-+-+-+-+
  1869. | Reserved |
  1870. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1871. | i (Interval Index of K'_i) |
  1872. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1873. | |
  1874. ~ New Key Commitment F(K_{N+1}) ~
  1875. | |
  1876. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1877. | |
  1878. ~ MAC(K'_i, M) +-+-+-+-+-+-+-+-+
  1879. | | Padding |
  1880. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1881. ~ Group MAC (optional) ~
  1882. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1883.  
  1884. Figure 6: Format of the Authentication Tag
  1885. with a New Key Chain Commitment
  1886.  
  1887. 3.4.6. Format of an Authentication Tag with a "Last Key of Old Chain"
  1888. Disclosure
  1889.  
  1890. During the first n_tx_lastkey intervals of the new key chain after
  1891. the disclosing interval, d, the sender SHOULD disclose the last key
  1892. of the old key chain. This is done by replacing the disclosed key of
  1893. the Authentication Tag with the Last Key of the Old Chain, K_N (or
  1894. K_{2N+1} in case of a switch between the second and third key chains,
  1895. etc.). Figure 7 shows the corresponding format.
  1896.  
  1897. Note that since there is no padding between the "K_N" and "MAC(K'_i,
  1898. M)" fields, the latter MAY not start on a 32-bit boundary, depending
  1899. on the n_p parameter.
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917. Roca, et al. Experimental [Page 35]
  1918. RFC 5776 TESLA in ALC and NORM April 2010
  1919.  
  1920.  
  1921. 0 1 2 3
  1922. 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
  1923. +-+-+-+-+-+-+-+-+
  1924. | Reserved |
  1925. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1926. | i (Interval Index of K'_i) |
  1927. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1928. | |
  1929. ~ Last Key of Old Chain, K_N ~
  1930. | |
  1931. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1932. | |
  1933. ~ MAC(K'_i, M) +-+-+-+-+-+-+-+-+
  1934. | | Padding |
  1935. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1936. ~ Group MAC (optional) ~
  1937. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1938.  
  1939. Figure 7: Format of the Authentication Tag
  1940. with an Old Chain Last Key Disclosure
  1941.  
  1942. 4. Receiver Operations
  1943.  
  1944. This section describes the TESLA operations at a receiver.
  1945.  
  1946. 4.1. Verification of the Authentication Information
  1947.  
  1948. This section details the computation steps required to verify each of
  1949. the three possible authentication information of an incoming packet.
  1950. The verification MUST follow a strict order:
  1951.  
  1952. o first of all, if the Group MAC is present and if the session uses
  1953. this feature (e.g., if the G bit is set in the bootstrap
  1954. information message), then verify the Group MAC. A packet that
  1955. does not contain a Group MAC tag, whereas the session uses this
  1956. feature, MUST be dropped immediately. On the opposite, if a
  1957. packet contains a Group MAC tag whereas the session does not use
  1958. this feature, this tag MUST be ignored;
  1959.  
  1960. o then, verify the digital signature (with TESLA signaling packets)
  1961. or enter the TESLA authentication process (with data packets).
  1962.  
  1963. 4.1.1. Processing the Group MAC Tag
  1964.  
  1965. Upon receiving a packet containing a Group MAC tag, the receiver
  1966. recomputes the Group MAC and compares it to the value carried in the
  1967. packet. If the check fails, the packet MUST be dropped immediately.
  1968.  
  1969.  
  1970.  
  1971.  
  1972. Roca, et al. Experimental [Page 36]
  1973. RFC 5776 TESLA in ALC and NORM April 2010
  1974.  
  1975.  
  1976. More specifically, recomputing the Group MAC requires saving the
  1977. value of the "Group MAC" field, setting this field to 0, and doing
  1978. the same computation as a sender does (see Section 3.3.3).
  1979.  
  1980. 4.1.2. Processing the Digital Signature
  1981.  
  1982. Upon receiving a packet containing a digital signature, the receiver
  1983. verifies the signature as follows.
  1984.  
  1985. The computation of the signature MUST include the ALC or NORM header
  1986. (with the various header extensions) and the payload when applicable.
  1987. The UDP/IP headers MUST NOT be included. During this computation,
  1988. the "Signature" field MUST be set to 0 as well as the optional Group
  1989. MAC, when present.
  1990.  
  1991. From [RFC4359]: Digital signature verification is performed as
  1992. described in [RFC3447], Section 8.2.2 (RSASSA-PKCS1-v1_5) and
  1993. [RFC3447], Section 8.1.2 (RSASSA-PSS). Upon receipt, the digital
  1994. signature is passed to the verification function as S. The
  1995. authenticated portion of the packet is used as the message M, and the
  1996. RSA public key is passed as (n, e). In summary (when SHA-256 is
  1997. used), the verification function computes a SHA-256 hash of the
  1998. authenticated packet bytes, decrypts the SHA-256 hash in the packet,
  1999. and validates that the appropriate encoding was applied. The two
  2000. SHA-256 hashes are compared, and if they are identical the validation
  2001. is successful.
  2002.  
  2003. It is assumed that the receivers have the possibility to retrieve the
  2004. sender's public key required to check this digital signature
  2005. (Section 2.2). This document does not specify how the public key of
  2006. the sender is communicated reliably and in a secure way to all
  2007. possible receivers.
  2008.  
  2009. 4.1.3. Processing the Authentication Tag
  2010.  
  2011. When a receiver wants to authenticate a packet using an
  2012. authentication tag and when he has the key for the associated time
  2013. interval (i.e., after the disclosing delay, d), the receiver
  2014. recomputes the MAC and compares it to the value carried in the
  2015. packet. If the check fails, the packet MUST be immediately dropped.
  2016.  
  2017. More specifically, recomputing the MAC requires saving the value of
  2018. the "MAC" field, setting this field to 0, and doing the same
  2019. computation as a sender does (see Section 3.3.1).
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027. Roca, et al. Experimental [Page 37]
  2028. RFC 5776 TESLA in ALC and NORM April 2010
  2029.  
  2030.  
  2031. 4.2. Initialization of a Receiver
  2032.  
  2033. A receiver MUST be initialized before being able to authenticate the
  2034. source of incoming packets. This can be done by an out-of-band
  2035. mechanism or an in-band mechanism (Section 2.2). Let us focus on the
  2036. in-band mechanism. Two actions must be performed:
  2037.  
  2038. o receive and process a bootstrap information message, and
  2039.  
  2040. o calculate an upper bound of the sender's local time. To that
  2041. purpose, the receiver must perform time synchronization.
  2042.  
  2043. 4.2.1. Processing the Bootstrap Information Message
  2044.  
  2045. A receiver must first receive a packet containing the bootstrap
  2046. information, digitally signed by the sender. Once the bootstrap
  2047. information has been authenticated (see Section 4.1), the receiver
  2048. can initialize its TESLA component. The receiver MUST then ignore
  2049. the following bootstrap information messages, if any. There is an
  2050. exception though: when a new key chain is used and if a receiver
  2051. missed all the commitments for this new key chain, then this receiver
  2052. MUST process one of the future bootstrap information messages (if
  2053. any) in order to be able to authenticate the incoming packets
  2054. associated to this new key chain.
  2055.  
  2056. Before TESLA has been initialized, a receiver MUST discard incoming
  2057. packets other than the bootstrap information message and direct time
  2058. synchronization response.
  2059.  
  2060. 4.2.2. Performing Time Synchronization
  2061.  
  2062. First of all, the receiver must know whether the ALC or NORM session
  2063. relies on direct or indirect time synchronization. This information
  2064. is communicated by an out-of-band mechanism (for instance, when
  2065. describing the various parameters of an ALC or NORM session). In
  2066. some cases, both mechanisms might be available and the receiver can
  2067. choose the preferred technique.
  2068.  
  2069. 4.2.2.1. Direct Time Synchronization
  2070.  
  2071. In the case of a direct time synchronization, a receiver MUST
  2072. synchronize with the sender. To that purpose, the receiver sends a
  2073. direct time synchronization request message. This message includes
  2074. the local time (in NTP timestamp format) at the receiver when sending
  2075. the message. This timestamp will be copied in the sender's response
  2076. for the receiver to associate the response to the request.
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082. Roca, et al. Experimental [Page 38]
  2083. RFC 5776 TESLA in ALC and NORM April 2010
  2084.  
  2085.  
  2086. The direct time synchronization request message format is the
  2087. following:
  2088.  
  2089. 0 1 2 3
  2090. 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
  2091. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2092. | |
  2093. + t_r (NTP timestamp) +
  2094. | |
  2095. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2096. ~ Group MAC (optional) ~
  2097. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2098.  
  2099. Figure 8: Format of a Direct Time Synchronization Request
  2100.  
  2101. The direct time synchronization request (Figure 8) contains the
  2102. following information:
  2103.  
  2104. "t_r" (NTP timestamp, 64 bits):
  2105.  
  2106. "t_r" is a timestamp in NTP timestamp format that contains the
  2107. receiver local time value when sending this direct time
  2108. synchronization request message;
  2109.  
  2110. "Group MAC" field (optional, variable length, multiple of 32 bits):
  2111.  
  2112. This field contains the Group MAC, calculated with the group key,
  2113. K_g, shared by all group members. The field length, in bits, is
  2114. given by n_w, which is known once the Group MAC function type is
  2115. known (Section 7).
  2116.  
  2117. The receiver then awaits a response message (Section 3.4.2). Upon
  2118. receiving this message, the receiver:
  2119.  
  2120. checks that this response relates to the request, by comparing the
  2121. "t_r" fields;
  2122.  
  2123. checks the Group MAC if present;
  2124.  
  2125. checks the signature;
  2126.  
  2127. retrieves the t_s value and calculates D_t (Section 2.4.1).
  2128.  
  2129. Note that in an ALC session, the direct time synchronization request
  2130. message is sent to the sender by an out-of-band mechanism that is not
  2131. specified by the current document.
  2132.  
  2133.  
  2134.  
  2135.  
  2136.  
  2137. Roca, et al. Experimental [Page 39]
  2138. RFC 5776 TESLA in ALC and NORM April 2010
  2139.  
  2140.  
  2141. 4.2.2.2. Indirect Time Synchronization
  2142.  
  2143. With the indirect time synchronization method, the sender MAY provide
  2144. out-of-band the URL or IP address of the NTP server(s) he trusts
  2145. along with an OPTIONAL certificate for each NTP server. When several
  2146. NTP servers are specified, a receiver MUST choose one of them. This
  2147. document does not specify how the choice is made, but for the sake of
  2148. scalability, the clients SHOULD NOT use the same server if several
  2149. possibilities are offered. The NTP synchronization between the NTP
  2150. server and the receiver MUST be authenticated, either using the
  2151. certificate provided by the server or another certificate the client
  2152. may obtain for this NTP server.
  2153.  
  2154. Then the receiver computes the time offset between itself and the NTP
  2155. server chosen. Note that the receiver does not need to update the
  2156. local time, (which often requires root privileges), computing the
  2157. time offset is sufficient.
  2158.  
  2159. Since the offset between the server and the time reference, D^O_t, is
  2160. indicated in the bootstrap information message (or communicated out-
  2161. of-band), the receiver can now calculate an upper bound of the
  2162. sender's local time (Section 2.4.2).
  2163.  
  2164. Note that this scenario assumes that each client trusts the sender
  2165. and accepts aligning its NTP configuration to that of the sender,
  2166. using one of the NTP server(s) suggested. If this assumption does
  2167. not hold, the client MUST NOT use the NTP indirect time
  2168. synchronization method (Section 2.3.2).
  2169.  
  2170. 4.3. Authentication of Received Packets
  2171.  
  2172. The receiver can now authenticate incoming packets (other than
  2173. bootstrap information and direct time synchronization response
  2174. packets). To that purpose, he MUST follow different steps (see
  2175. [RFC4082], Section 3.5):
  2176.  
  2177. 1. The receiver parses the different packet headers. If none of the
  2178. four TESLA authentication tags are present, the receiver MUST
  2179. discard the packet. If the session is in "Single Key Chain" mode
  2180. (e.g., when the "S" flag is set in the bootstrap information
  2181. message), then the receiver MUST discard any packet containing an
  2182. Authentication Tag with a New Key Chain Commitment or an
  2183. Authentication Tag with a Last Key of Old Chain Disclosure.
  2184.  
  2185. 2. Safe packet test: When the receiver receives packet P_j, it first
  2186. records the local time T at which the packet arrived. The
  2187. receiver then computes an upper bound t_j on the sender's clock
  2188. at the time when the packet arrived: t_j = T + D_t. The receiver
  2189.  
  2190.  
  2191.  
  2192. Roca, et al. Experimental [Page 40]
  2193. RFC 5776 TESLA in ALC and NORM April 2010
  2194.  
  2195.  
  2196. then computes the highest interval the sender could possibly be
  2197. in: highest_i = floor((t_j - T_0) / T_int). He also retrieves
  2198. the "i" interval index from the authentication tag. The receiver
  2199. can now proceed with the "safe packet" test. If highest_i < i +
  2200. d, then the sender is not yet in the interval during which it
  2201. discloses the key K_i. The packet is safe (but not necessarily
  2202. authentic). If the test fails, the packet is unsafe, and the
  2203. receiver MUST discard the packet.
  2204.  
  2205. 3. Group MAC test: if the optional Group MAC tag is present and if
  2206. the session uses this feature, then verify the Group MAC
  2207. (Section 4.1.1). If the verification fails, the packet MUST be
  2208. immediately dropped. A packet that does not contain a Group MAC
  2209. tag whereas the session uses this feature MUST be immediately
  2210. dropped. On the opposite, if a packet contains a Group MAC tag
  2211. whereas the session does not use this feature, this tag MUST be
  2212. ignored.
  2213.  
  2214. 4. Disclosed Key processing: When the packet discloses a key (i.e.,
  2215. with a Standard Authentication Tag, or with an Authentication Tag
  2216. with a Last Key of Old Chain Disclosure), the following tests are
  2217. performed:
  2218.  
  2219. * New key index test: the receiver checks whether a legitimate
  2220. key already exists with the same index (i.e., i-d). If such a
  2221. legitimate key exists, the receiver compares its value with
  2222. the current disclosed key and if they are identical, skips the
  2223. "Unverifiable key test" and "Key verification test". If such
  2224. a legitimate key exists but the values differ, the receiver
  2225. MUST discard the packet.
  2226.  
  2227. * Unverifiable key test: when the disclosed key index is new, it
  2228. is possible that no earlier disclosed and legitimate key
  2229. exists for this key chain, thereby preventing the verification
  2230. of the disclosed key. This happens when the disclosed key
  2231. belongs to the old key chain and no commitment to this old key
  2232. chain has ever been received (e.g., because the first
  2233. bootstrap packet received by a latecomer is for the current
  2234. key chain, and therefore includes a commitment to the current
  2235. key chain, not the previous one). When this happens, the
  2236. receiver MUST ignore the disclosed key (anyway useless) and
  2237. skip the Key verification test.
  2238.  
  2239. * Key verification test: If the disclosed key index is new and
  2240. the key can be verified, the receiver checks the legitimacy of
  2241. K_{i-d} by verifying, for some earlier disclosed and
  2242. legitimate key K_v (with v < i-d), that K_v and F^{i-d-
  2243. v}(K_{i-d}) are identical. In other words, the receiver
  2244.  
  2245.  
  2246.  
  2247. Roca, et al. Experimental [Page 41]
  2248. RFC 5776 TESLA in ALC and NORM April 2010
  2249.  
  2250.  
  2251. checks the disclosed key by computing the necessary number of
  2252. PRF functions to obtain a previously disclosed and legitimate
  2253. (i.e., verified) key. If the key verification fails, the
  2254. receiver MUST discard the packet. If the key verification
  2255. succeeds, this key is said to be legitimate and is stored by
  2256. the receiver, as well as all the keys between indexes v and
  2257. i-d.
  2258.  
  2259. 5. When applicable, the receiver performs any congestion control
  2260. related action (i.e., the ALC or NORM headers are used by the
  2261. associated congestion control building block, if any), even if
  2262. the packet has not yet been authenticated [RFC5651]. If this
  2263. feature leads to a potential DoS attack (the attacker can send a
  2264. faked packet with a wrong sequence number to simulate packet
  2265. losses), it does not compromise the security features offered by
  2266. TESLA and enables a rapid reaction in front of actual congestion
  2267. problems.
  2268.  
  2269. 6. The receiver then buffers the packet for a later authentication,
  2270. once the corresponding key will be disclosed (after d time
  2271. intervals) or deduced from another key (if all packets disclosing
  2272. this key are lost). In some situations, this packet might also
  2273. be discarded later, if it turns out that the receiver will never
  2274. be able to deduce the associated key.
  2275.  
  2276. 7. Authentication test: Let v be the smallest index of the
  2277. legitimate keys known by the receiver so far. For all the new
  2278. keys K_w, with v < w <= i-d, that have been either disclosed by
  2279. this packet (i.e., K_{i-d}) or derived by K_{i-d} (i.e., keys in
  2280. interval {v+1,.. i-d-1}), the receiver verifies the authenticity
  2281. of the safe packets buffered for the corresponding interval w.
  2282. To authenticate one of the buffered packets P_h containing
  2283. message M_h protected with a MAC that used key index w, the
  2284. receiver will compute K'_w = F'(K_w) from which it can compute
  2285. MAC( K'_w, M_h). If this MAC does not equal the MAC stored in
  2286. the packet, the receiver MUST discard the packet. If the two
  2287. MACs are equal, the packet is successfully authenticated and the
  2288. receiver continues processing it.
  2289.  
  2290. 8. Authenticated new key chain commitment processing: If the
  2291. authenticated packet contains a new key chain commitment and if
  2292. no verified commitment already exists, then the receiver stores
  2293. the commitment to the new key chain. Then, if there are non-
  2294. authenticated packets for a previous chain (i.e., the key chain
  2295. before the current one), all these packets can be discarded
  2296. (Section 4.4).
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302. Roca, et al. Experimental [Page 42]
  2303. RFC 5776 TESLA in ALC and NORM April 2010
  2304.  
  2305.  
  2306. 9. The receiver continues the ALC or NORM processing of all the
  2307. packets authenticated during the authentication test.
  2308.  
  2309. In this specification, a receiver using TESLA MUST immediately drop
  2310. unsafe packets. But the receiver MAY also decide, at any time, to
  2311. continue an ALC or NORM session in unsafe (insecure) mode, ignoring
  2312. TESLA extensions. There SHOULD be an explicit user action to that
  2313. purpose.
  2314.  
  2315. 4.3.1. Discarding Unnecessary Packets Earlier
  2316.  
  2317. Following strictly the above steps can lead to excessive processing
  2318. overhead in certain situations. This is the case when a receiver
  2319. receives packets for an unwanted object with the ALC or NORM
  2320. protocols, i.e., an object in which the application (or the end user)
  2321. explicitly mentioned it is not interested. This is also the case
  2322. when a receiver receives packets for an already decoded object, or
  2323. when this object has been partitioned in several blocks, for an
  2324. already decoded block. When such a packet is received, which is
  2325. easily identified by looking at the receiver's status for the
  2326. incoming ALC or NORM packet, the receiver MUST also check that the
  2327. packet is a pure data packet that does not contain any signaling
  2328. information of importance for the session.
  2329.  
  2330. With ALC, a packet containing an "A" flag ("Close Session") or a "B"
  2331. flag ("Close Object") MUST NOT be discarded before having been
  2332. authenticated and processed normally. Otherwise, the receiver can
  2333. safely discard the incoming packet for instance just after step 1 of
  2334. Section 4.3. This optimization can dramatically reduce the
  2335. processing overhead by avoiding many useless authentication checks.
  2336.  
  2337. 4.4. Flushing the Non-Authenticated Packets of a Previous Key Chain
  2338.  
  2339. In some cases, a receiver having experienced a very long
  2340. disconnection might have lost all the disclosures of the last key(s)
  2341. of a previous key chain. Let j be the index of this key chain for
  2342. which there remains non-authenticated packets. This receiver can
  2343. flush all the packets of the key chain j if he determines that:
  2344.  
  2345. o he has just switched to a chain of index j+2 (inclusive) or
  2346. higher;
  2347.  
  2348. o the sender has sent a commitment to the new key chain of index j+2
  2349. (Section 3.1.2.3). This situation requires that the receiver has
  2350. received a packet containing such a commitment and that he has
  2351. been able to check its integrity. In some cases, it might require
  2352. receiving a bootstrap information message for the current key
  2353. chain.
  2354.  
  2355.  
  2356.  
  2357. Roca, et al. Experimental [Page 43]
  2358. RFC 5776 TESLA in ALC and NORM April 2010
  2359.  
  2360.  
  2361. If one of the above two tests succeeds, the sender can discard all
  2362. the awaiting packets since there is no way to authenticate them.
  2363.  
  2364. 5. Integration in the ALC and NORM Protocols
  2365.  
  2366. 5.1. Authentication Header Extension Format
  2367.  
  2368. The integration of TESLA in ALC or NORM is similar and relies on the
  2369. header extension mechanism defined in both protocols. More
  2370. precisely, this document details the EXT_AUTH==1 header extension
  2371. defined in [RFC5651].
  2372.  
  2373. Several fields are added in addition to the "HET" (Header Extension
  2374. Type) and "HEL" (Header Extension Length) fields (Figure 9).
  2375.  
  2376. 0 1 2 3
  2377. 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
  2378. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2379. | HET (=1) | HEL | ASID | Type | |
  2380. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
  2381. | |
  2382. ~ ~
  2383. | Content |
  2384. ~ ~
  2385. | |
  2386. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2387.  
  2388. Figure 9: Format of the TESLA EXT_AUTH Header Extension
  2389.  
  2390. The fields of the TESLA EXT_AUTH Header Extension are:
  2391.  
  2392. "ASID" (Authentication Scheme IDentifier) field (4 bits):
  2393.  
  2394. The "ASID" identifies the source authentication scheme or protocol
  2395. in use. The association between the "ASID" value and the actual
  2396. authentication scheme is defined out-of-band, at session startup.
  2397.  
  2398. "Type" field (4 bits):
  2399.  
  2400. The "Type" field identifies the type of TESLA information carried
  2401. in this header extension. This specification defines the
  2402. following types:
  2403.  
  2404. * 0: Bootstrap information, sent by the sender periodically or
  2405. after a direct time synchronization request;
  2406.  
  2407. * 1: Standard Authentication Tag for the ongoing key chain, sent
  2408. by the sender along with a packet;
  2409.  
  2410.  
  2411.  
  2412. Roca, et al. Experimental [Page 44]
  2413. RFC 5776 TESLA in ALC and NORM April 2010
  2414.  
  2415.  
  2416. * 2: Authentication Tag without Key Disclosure, sent by the
  2417. sender along with a packet;
  2418.  
  2419. * 3: Authentication Tag with a New Key Chain Commitment, sent by
  2420. the sender when approaching the end of a key chain;
  2421.  
  2422. * 4: Authentication Tag with a Last Key of Old Chain Disclosure,
  2423. sent by the sender some time after moving to a new key chain;
  2424.  
  2425. * 5: Direct time synchronization request, sent by a NORM
  2426. receiver. This type of message is invalid in the case of an
  2427. ALC session since ALC is restricted to unidirectional
  2428. transmissions. Yet, an external mechanism may provide the
  2429. direct time synchronization functionality;
  2430.  
  2431. * 6: Direct time synchronization response, sent by a NORM sender.
  2432. This type of message is invalid in the case of an ALC session
  2433. since ALC is restricted to unidirectional transmissions. Yet,
  2434. an external mechanism may provide the direct time
  2435. synchronization functionality.
  2436.  
  2437. "Content" field (variable length):
  2438.  
  2439. This is the TESLA information carried in the header extension,
  2440. whose type is given by the "Type" field.
  2441.  
  2442. 5.2. Use of Authentication Header Extensions
  2443.  
  2444. Each packet sent by the session's sender MUST contain exactly one
  2445. TESLA EXT_AUTH Header Extension.
  2446.  
  2447. All receivers MUST recognize EXT_AUTH but MAY not be able to parse
  2448. its content, for instance, because they do not support TESLA. In
  2449. that case, these receivers MUST ignore the TESLA EXT_AUTH extensions.
  2450. In the case of NORM, the packets sent by receivers MAY contain a
  2451. direct synchronization request but MUST NOT contain any of the other
  2452. five TESLA EXT_AUTH Header Extensions.
  2453.  
  2454. 5.2.1. EXT_AUTH Header Extension of Type Bootstrap Information
  2455.  
  2456. The "bootstrap information" TESLA EXT_AUTH (Type==0) MUST be sent in
  2457. a stand-alone control packet, rather than in a packet containing
  2458. application data. The reason for that is the large size of this
  2459. bootstrap information. By using stand-alone packets, the maximum
  2460. payload size of data packets is only affected by the (mandatory)
  2461. authentication information header extension.
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467. Roca, et al. Experimental [Page 45]
  2468. RFC 5776 TESLA in ALC and NORM April 2010
  2469.  
  2470.  
  2471. With ALC, the "bootstrap information" TESLA EXT_AUTH MUST be sent in
  2472. a control packet, i.e., containing no encoding symbol.
  2473.  
  2474. With NORM, the "bootstrap information" TESLA EXT_AUTH MUST be sent in
  2475. a NORM_CMD(APPLICATION) message.
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522. Roca, et al. Experimental [Page 46]
  2523. RFC 5776 TESLA in ALC and NORM April 2010
  2524.  
  2525.  
  2526. 0 1 2 3
  2527. 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
  2528. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ---
  2529. | HET (=1) | HEL (=46) | ASID | 0 | 0 | 0 |0|1|0| ^
  2530. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
  2531. | d | 2 | 2 | 2 | |
  2532. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
  2533. | 1 | 3 | 128 | |
  2534. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
  2535. | 0 (reserved) | T_int | |
  2536. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
  2537. | | |
  2538. + T_0 (NTP timestamp format) + | 5
  2539. | | | 2
  2540. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
  2541. | N (Key Chain Length) | | b
  2542. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | y
  2543. | Current Interval Index i | | t
  2544. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | e
  2545. | | | s
  2546. + + |
  2547. | | |
  2548. + Current Key Chain Commitment + |
  2549. | (20 bytes) | |
  2550. + + |
  2551. | | |
  2552. + + |
  2553. | | v
  2554. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ---
  2555. | | ^ 1
  2556. + + | 2
  2557. | | | 8
  2558. . . |
  2559. . Signature . | b
  2560. . (128 bytes) . | y
  2561. | | | t
  2562. + + | e
  2563. | | v s
  2564. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ---
  2565. | Group MAC |
  2566. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2567.  
  2568. Figure 10: Example: Format of the Bootstrap Information Message
  2569. (Type 0) Using SHA-256/1024-Bit Signatures,
  2570. the Default HMAC-SHA-256, and a Group MAC
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577. Roca, et al. Experimental [Page 47]
  2578. RFC 5776 TESLA in ALC and NORM April 2010
  2579.  
  2580.  
  2581. For instance, Figure 10 shows the bootstrap information message when
  2582. using the HMAC-SHA-256 transform for the PRF, MAC, and Group MAC
  2583. functions, along with SHA-256/128 byte (1024 bit) key digital
  2584. signatures (which also means that the "Signature" field is 128 bytes
  2585. long). The TESLA EXT_AUTH Header Extension is then 184 bytes long
  2586. (i.e., 46 words of 32 bits).
  2587.  
  2588. 5.2.2. EXT_AUTH Header Extension of Type Authentication Tag
  2589.  
  2590. The four "authentication tag" TESLA EXT_AUTH Header Extensions (Type
  2591. 1, 2, 3, and 4) MUST be attached to the ALC or NORM packet (data or
  2592. control packet) that they protect.
  2593.  
  2594. 0 1 2 3
  2595. 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
  2596. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2597. | HET (=1) | HEL (=10) | ASID | 1 | Reserved |
  2598. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2599. | i (Interval Index of K'_i) |
  2600. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2601. | |
  2602. + +
  2603. | |
  2604. + Disclosed Key K_{i-d} +
  2605. | (20 bytes) |
  2606. + +
  2607. | |
  2608. + +
  2609. | |
  2610. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2611. | |
  2612. + +
  2613. | MAC(K'_i, M) |
  2614. + (16 bytes) +
  2615. | |
  2616. + +
  2617. | |
  2618. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2619.  
  2620. Figure 11: Example: Format of the Standard Authentication Tag
  2621. (Type 1) Using the Default HMAC-SHA-256
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632. Roca, et al. Experimental [Page 48]
  2633. RFC 5776 TESLA in ALC and NORM April 2010
  2634.  
  2635.  
  2636. 0 1 2 3
  2637. 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
  2638. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2639. | HET (=1) | HEL (=5) | ASID | 2 | Reserved |
  2640. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2641. | i (Interval Index of K'_i) |
  2642. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2643. | |
  2644. + +
  2645. | MAC(K'_i, M) |
  2646. + (16 bytes) +
  2647. | |
  2648. + +
  2649. | |
  2650. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2651.  
  2652. Figure 12: Example: Format of the Authentication Tag without
  2653. Key Disclosure (Type 2) Using the Default HMAC-SHA-256
  2654.  
  2655. For instance, Figures 11 and 12 show the format of the authentication
  2656. tags, respectively with and without the K_{i-d} key disclosure, when
  2657. using the (default) HMAC-SHA-256 transform for the PRF and MAC
  2658. functions. In these examples, the Group MAC feature is not used.
  2659.  
  2660. 5.2.3. EXT_AUTH Header Extension of Type Direct Time Synchronization
  2661. Request
  2662.  
  2663. With NORM, the "direct time synchronization request" TESLA EXT_AUTH
  2664. (Type==7) MUST be sent by a receiver in a NORM_CMD(APPLICATION) NORM
  2665. packet.
  2666.  
  2667. With ALC, the "direct time synchronization request" TESLA EXT_AUTH
  2668. cannot be included in an ALC packet, since ALC is restricted to
  2669. unidirectional transmissions, from the session's sender to the
  2670. receivers. An external mechanism must be used with ALC for carrying
  2671. direct time synchronization requests to the session's sender.
  2672.  
  2673. In the case of direct time synchronization, it is RECOMMENDED that
  2674. the receivers spread the transmission of direct time synchronization
  2675. requests over the time (Section 2.3.1).
  2676.  
  2677. 5.2.4. EXT_AUTH Header Extension of Type Direct Time Synchronization
  2678. Response
  2679.  
  2680. With NORM, the "direct time synchronization response" TESLA EXT_AUTH
  2681. (Type==8) MUST be sent by the sender in a NORM_CMD(APPLICATION)
  2682. message.
  2683.  
  2684.  
  2685.  
  2686.  
  2687. Roca, et al. Experimental [Page 49]
  2688. RFC 5776 TESLA in ALC and NORM April 2010
  2689.  
  2690.  
  2691. With ALC, the "direct time synchronization response" TESLA EXT_AUTH
  2692. can be sent in an ALC control packet (i.e., containing no encoding
  2693. symbol) or through the external mechanism used to carry the direct
  2694. time synchronization request.
  2695.  
  2696. 6. Security Considerations
  2697.  
  2698. [RFC4082] discusses the security of TESLA in general. These
  2699. considerations apply to the present specification, namely:
  2700.  
  2701. o great care must be taken in the timing aspects. In particular,
  2702. the D_t parameter is critical and must be correctly initialized;
  2703.  
  2704. o if the sender realizes that the key disclosure schedule is not
  2705. appropriate, then the current session MUST be closed and a new one
  2706. created. Indeed, Section 3.1.3 requires that these parameters be
  2707. fixed during the whole session.
  2708.  
  2709. o when the verifier that authenticates the incoming packets and the
  2710. application that uses the data are two different components, there
  2711. is a risk that an attacker located between these components inject
  2712. faked data. Similarly, when the verifier and the secure timing
  2713. system are two different components, there is a risk that an
  2714. attacker located between these components inject faked timing
  2715. information. For instance, when the verifier reads the local time
  2716. by means of a dedicated system call (e.g., gettimeofday()), if an
  2717. attacker controls the host, he may catch the system call and
  2718. return a faked time information.
  2719.  
  2720. The current specification discusses additional aspects with more
  2721. details.
  2722.  
  2723. 6.1. Dealing with DoS Attacks
  2724.  
  2725. TESLA introduces new opportunities for an attacker to mount DoS
  2726. attacks. For instance, an attacker can try to saturate the
  2727. processing capabilities of the receiver (faked packets are easy to
  2728. create but checking them requires computing a MAC over the packet or
  2729. sometimes checking a digital signature as with the bootstrap and
  2730. direct time synchronization response messages). An attacker can also
  2731. try to saturate the receiver's memory (since authentication is
  2732. delayed and non-authenticated packets will accumulate), or to make
  2733. the receiver believe that a congestion has happened (since congestion
  2734. control MUST be performed before authenticating incoming packets,
  2735. Section 4.3).
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742. Roca, et al. Experimental [Page 50]
  2743. RFC 5776 TESLA in ALC and NORM April 2010
  2744.  
  2745.  
  2746. In order to mitigate these attacks, it is RECOMMENDED to use the
  2747. Group MAC scheme (Section 3.3.3). No mitigation is possible if a
  2748. group member acts as an attacker with Group MAC.
  2749.  
  2750. Generally, it is RECOMMENDED that the amount of memory used to store
  2751. incoming packets waiting to be authenticated be limited to a
  2752. reasonable value.
  2753.  
  2754. 6.2. Dealing With Replay Attacks
  2755.  
  2756. Replay attacks, whereby an attacker stores a valid message and
  2757. replays it later, can have significant impacts, depending on the
  2758. message type. Two levels of impacts must be distinguished:
  2759.  
  2760. o within the TESLA protocol, and
  2761.  
  2762. o within the ALC or NORM protocol.
  2763.  
  2764. 6.2.1. Impacts of Replay Attacks on TESLA
  2765.  
  2766. Replay attacks can impact the TESLA component itself. We review here
  2767. the potential impacts of such an attack depending on the TESLA
  2768. message type:
  2769.  
  2770. o bootstrap information: Since most parameters contained in a
  2771. bootstrap information message are static, replay attacks have no
  2772. consequences. The fact that the "i" and "K_i" fields can be
  2773. updated in subsequent bootstrap information messages does not
  2774. create a problem either, since all "i" and "K_i" fields sent
  2775. remain valid. Finally, a receiver that successfully initialized
  2776. its TESLA component MUST ignore the following messages (see
  2777. Section 4.2.1 for an exception to this rule), which voids replay
  2778. attacks, unless he missed all the commitments to a new key chain
  2779. (e.g., after a long disconnection) (Section 3.2.1).
  2780.  
  2781. o direct time synchronization request: If the Group MAC scheme is
  2782. used, an attacker that is not a member of the group can replay a
  2783. packet and oblige the sender to respond, which requires digitally
  2784. signing the response, a time-consuming process. If the Group MAC
  2785. scheme is not used, an attacker can easily forge a request anyway.
  2786. In both cases, the attack will not compromise the TESLA component,
  2787. but might create a DoS. If this is a concern, it is RECOMMENDED,
  2788. when the Group MAC scheme is used, that the sender verify the
  2789. "t_r" NTP timestamp contained in the request and respond only if
  2790. this value is strictly larger than the previous one received from
  2791. this receiver. When the Group MAC scheme is not used, this attack
  2792. can be mitigated by limiting the number of requests per second
  2793. that will be processed.
  2794.  
  2795.  
  2796.  
  2797. Roca, et al. Experimental [Page 51]
  2798. RFC 5776 TESLA in ALC and NORM April 2010
  2799.  
  2800.  
  2801. o direct time synchronization response: Upon receiving a response, a
  2802. receiver who has no pending request MUST immediately drop the
  2803. packet. If this receiver has previously issued a request, he
  2804. first checks the Group MAC (if applicable), then the "t_r" field,
  2805. to be sure it is a response to his request, and finally the
  2806. digital signature. A replayed packet will be dropped during these
  2807. verifications, without compromising the TESLA component.
  2808.  
  2809. o other messages, containing an authentication tag: Replaying a
  2810. packet containing a TESLA authentication tag will never compromise
  2811. the TESLA component itself (but perhaps the underlying ALC or NORM
  2812. component, see below).
  2813.  
  2814. To conclude, TESLA itself is robust in front of replay attacks.
  2815.  
  2816. 6.2.2. Impacts of Replay Attacks on NORM
  2817.  
  2818. We review here the potential impacts of a replay attack on the NORM
  2819. component. Note that we do not consider here the protocols that
  2820. could be used along with NORM, for instance, the congestion control
  2821. protocols.
  2822.  
  2823. First, let us consider replay attacks within a given NORM session.
  2824. NORM defines a "sequence" field that can be used to protect against
  2825. replay attacks [RFC5740] within a given NORM session. This
  2826. "sequence" field is a 16-bit value that is set by the message
  2827. originator (sender or receiver) as a monotonically increasing number
  2828. incremented with each NORM message transmitted. It is RECOMMENDED
  2829. that a receiver check this "sequence" field and drop messages
  2830. considered as replayed. Similarly, it is RECOMMENDED that a sender
  2831. check this sequence, for each known receiver, and drop messages
  2832. considered as replayed. In both cases, checking this "sequence"
  2833. field SHOULD be done before TESLA processing of the packet: if the
  2834. "sequence" field has not been corrupted, the replay attack will
  2835. immediately be identified; otherwise, the packet will fail the TESLA
  2836. authentication test. This analysis shows that NORM itself is robust
  2837. in front of replay attacks within the same session.
  2838.  
  2839. Now let us consider replay attacks across several NORM sessions.
  2840. Since the key chain used in each session MUST differ, a packet
  2841. replayed in a subsequent session will be identified as unauthentic.
  2842. Therefore, NORM is robust in front of replay attacks across different
  2843. sessions.
  2844.  
  2845.  
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852. Roca, et al. Experimental [Page 52]
  2853. RFC 5776 TESLA in ALC and NORM April 2010
  2854.  
  2855.  
  2856. 6.2.3. Impacts of Replay Attacks on ALC
  2857.  
  2858. We review here the potential impacts of a replay attack on the ALC
  2859. component. Note that we do not consider here the protocols that
  2860. could be used along with ALC, for instance, the layered or wave-based
  2861. congestion control protocols.
  2862.  
  2863. First, let us consider replay attacks within a given ALC session:
  2864.  
  2865. o Regular packets containing an authentication tag: a replayed
  2866. message containing an encoding symbol will be detected once
  2867. authenticated, thanks to the object/block/symbol identifiers, and
  2868. will be silently discarded. This kind of replay attack is only
  2869. penalizing in terms of memory and processing load, but does not
  2870. compromise the ALC behavior.
  2871.  
  2872. o Control packets containing an authentication tag: ALC control
  2873. packets, by definition, do not include any encoding symbol and
  2874. therefore do not include any object/block/symbol identifier that
  2875. would enable a receiver to identify duplicates. However, a sender
  2876. has a very limited number of reasons to send control packets.
  2877. More precisely:
  2878.  
  2879. * At the end of the session, a "Close Session" ("A" flag) packet
  2880. is sent. Replaying this packet has no impact since the
  2881. receivers already left.
  2882.  
  2883. * Similarly, replaying a packet containing a "Close Object" ("B"
  2884. flag) has no impact since this object is probably already
  2885. marked as closed by the receiver.
  2886.  
  2887. This analysis shows that ALC itself is robust in front of replay
  2888. attacks within the same session.
  2889.  
  2890. Now let us consider replay attacks across several ALC sessions.
  2891. Since the key chain used in each session MUST differ, a packet
  2892. replayed in a subsequent session will be identified as unauthentic.
  2893. Therefore, ALC is robust in front of replay attacks across different
  2894. sessions.
  2895.  
  2896. 6.3. Security of the Back Channel
  2897.  
  2898. As specified in Section 1.1, this specification does not consider the
  2899. packets that may be sent by receivers, for instance, NORM's feedback
  2900. packets. When a back channel is used, its security is critical to
  2901. the global security, and an appropriate security mechanism MUST be
  2902. used. [RMT-SIMPLE-AUTH] describes several techniques that can be
  2903. used to that purpose. However, the authentication and integrity
  2904.  
  2905.  
  2906.  
  2907. Roca, et al. Experimental [Page 53]
  2908. RFC 5776 TESLA in ALC and NORM April 2010
  2909.  
  2910.  
  2911. verification of the packets sent by receivers on the back channel, if
  2912. any, is out of the scope of this document.
  2913.  
  2914. 7. IANA Considerations
  2915.  
  2916. IANA has registered the following attributes according to this
  2917. document. The registries are provided by [RFC4442] under the "Timed
  2918. Efficient Stream Loss-tolerant Authentication (TESLA) Parameters"
  2919. registry [TESLA-REG]. Following the policies outlined in [RFC4442],
  2920. the values in the range up to 240 (including 240) for the following
  2921. attributes are assigned after expert review by the MSEC working group
  2922. or its designated successor. The values in the range from 241 to 255
  2923. are reserved for private use.
  2924.  
  2925. Cryptographic Pseudo-Random Function, TESLA-PRF: All implementations
  2926. MUST support HMAC-SHA-256 (default).
  2927.  
  2928. +------------------------+-------+
  2929. | PRF name | Value |
  2930. +------------------------+-------+
  2931. | HMAC-SHA1 | 0 |
  2932. | HMAC-SHA-224 | 1 |
  2933. | HMAC-SHA-256 (default) | 2 |
  2934. | HMAC-SHA-384 | 3 |
  2935. | HMAC-SHA-512 | 4 |
  2936. +------------------------+-------+
  2937.  
  2938. Cryptographic Message Authentication Code (MAC) Function, TESLA-MAC:
  2939. All implementations MUST support HMAC-SHA-256 (default). These MAC
  2940. schemes are used both for the computing of regular MAC and the Group
  2941. MAC (if applicable).
  2942.  
  2943. +------------------------+-------+
  2944. | MAC name | Value |
  2945. +------------------------+-------+
  2946. | HMAC-SHA1 | 0 |
  2947. | HMAC-SHA-224 | 1 |
  2948. | HMAC-SHA-256 (default) | 2 |
  2949. | HMAC-SHA-384 | 3 |
  2950. | HMAC-SHA-512 | 4 |
  2951. +------------------------+-------+
  2952.  
  2953. Furthermore, IANA has created two new registries. Here also, the
  2954. values in the range up to 240 (including 240) for the following
  2955. attributes are assigned after expert review by the MSEC working group
  2956. or its designated successor. The values in the range from 241 to 255
  2957. are reserved for private use.
  2958.  
  2959.  
  2960.  
  2961.  
  2962. Roca, et al. Experimental [Page 54]
  2963. RFC 5776 TESLA in ALC and NORM April 2010
  2964.  
  2965.  
  2966. Signature Encoding Algorithm, TESLA-SIG-ALGO: All implementations
  2967. MUST support RSASSA-PKCS1-v1_5 (default).
  2968.  
  2969. +-----------------------------+-------+
  2970. | Signature Algorithm Name | Value |
  2971. +-----------------------------+-------+
  2972. | INVALID | 0 |
  2973. | RSASSA-PKCS1-v1_5 (default) | 1 |
  2974. | RSASSA-PSS | 2 |
  2975. +-----------------------------+-------+
  2976.  
  2977. Signature Cryptographic Function, TESLA-SIG-CRYPTO-FUNC: All
  2978. implementations MUST support SHA-256 (default).
  2979.  
  2980. +-----------------------------+-------+
  2981. | Cryptographic Function Name | Value |
  2982. +-----------------------------+-------+
  2983. | INVALID | 0 |
  2984. | SHA-1 | 1 |
  2985. | SHA-224 | 2 |
  2986. | SHA-256 (default) | 3 |
  2987. | SHA-384 | 4 |
  2988. | SHA-512 | 5 |
  2989. +-----------------------------+-------+
  2990.  
  2991. 8. Acknowledgments
  2992.  
  2993. The authors are grateful to Yaron Sheffer, Brian Weis, Ramu
  2994. Panayappan, Ran Canetti, David L. Mills, Brian Adamson, and Lionel
  2995. Giraud for their valuable comments while preparing this document.
  2996. The authors are also grateful to Brian Weis for the digital signature
  2997. details.
  2998.  
  2999. 9. References
  3000.  
  3001. 9.1. Normative References
  3002.  
  3003. [RFC1305] Mills, D., "Network Time Protocol (Version 3)
  3004. Specification, Implementation", RFC 1305,
  3005. March 1992.
  3006.  
  3007. [RFC2119] Bradner, S., "Key words for use in RFCs to
  3008. Indicate Requirement Levels", BCP 14, RFC 2119,
  3009. March 1997.
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017. Roca, et al. Experimental [Page 55]
  3018. RFC 5776 TESLA in ALC and NORM April 2010
  3019.  
  3020.  
  3021. [RFC4082] Perrig, A., Song, D., Canetti, R., Tygar, J., and
  3022. B. Briscoe, "Timed Efficient Stream Loss-Tolerant
  3023. Authentication (TESLA): Multicast Source
  3024. Authentication Transform Introduction", RFC 4082,
  3025. June 2005.
  3026.  
  3027. [RFC5651] Luby, M., Watson, M., and L. Vicisano, "Layered
  3028. Coding Transport (LCT) Building Block", RFC 5651,
  3029. October 2009.
  3030.  
  3031. [RFC5740] Adamson, B., Bormann, C., Handley, M., and J.
  3032. Macker, "NACK-Oriented Reliable Multicast (NORM)
  3033. Transport Protocol", RFC 5740, November 2009.
  3034.  
  3035. [RFC5775] Luby, M., Watson, M., and L. Vicisano,
  3036. "Asynchronous Layered Coding (ALC) Protocol
  3037. Instantiation", RFC 5775, April 2010.
  3038.  
  3039. [TESLA-REG] "TESLA Parameters IANA Registry",
  3040. http://www.iana.org.
  3041.  
  3042. 9.2. Informative References
  3043.  
  3044. [NTP-NTPv4] Burbank, J., Kasch, W., Martin, J., Ed., and D.
  3045. Mills, "The Network Time Protocol Version 4
  3046. Protocol And Algorithm Specification", Work
  3047. in Progress, October 2009.
  3048.  
  3049. [Perrig04] Perrig, A. and J. Tygar, "Secure Broadcast
  3050. Communication in Wired and Wireless Networks",
  3051. Kluwer Academic Publishers ISBN 0-7923-7650-1,
  3052. 2004.
  3053.  
  3054. [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC:
  3055. Keyed-Hashing for Message Authentication",
  3056. RFC 2104, February 1997.
  3057.  
  3058. [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key
  3059. Cryptography Standards (PKCS) #1: RSA Cryptography
  3060. Specifications Version 2.1", RFC 3447,
  3061. February 2003.
  3062.  
  3063. [RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E.,
  3064. and K. Norrman, "The Secure Real-time Transport
  3065. Protocol (SRTP)", RFC 3711, March 2004.
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072. Roca, et al. Experimental [Page 56]
  3073. RFC 5776 TESLA in ALC and NORM April 2010
  3074.  
  3075.  
  3076. [RFC4330] Mills, D., "Simple Network Time Protocol (SNTP)
  3077. Version 4 for IPv4, IPv6 and OSI", RFC 4330,
  3078. January 2006.
  3079.  
  3080. [RFC4359] Weis, B., "The Use of RSA/SHA-1 Signatures within
  3081. Encapsulating Security Payload (ESP) and
  3082. Authentication Header (AH)", RFC 4359,
  3083. January 2006.
  3084.  
  3085. [RFC4383] Baugher, M. and E. Carrara, "The Use of Timed
  3086. Efficient Stream Loss-Tolerant Authentication
  3087. (TESLA) in the Secure Real-time Transport Protocol
  3088. (SRTP)", RFC 4383, February 2006.
  3089.  
  3090. [RFC4442] Fries, S. and H. Tschofenig, "Bootstrapping Timed
  3091. Efficient Stream Loss-Tolerant Authentication
  3092. (TESLA)", RFC 4442, March 2006.
  3093.  
  3094. [RMT-FLUTE] Paila, T., Walsh, R., Luby, M., Lehtonen, R., and
  3095. V. Roca, "FLUTE - File Delivery over
  3096. Unidirectional Transport", Work in Progress,
  3097. August 2009.
  3098.  
  3099. [RMT-SIMPLE-AUTH] Roca, V., "Simple Authentication Schemes for the
  3100. ALC and NORM Protocols", Work in Progress,
  3101. October 2009.
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127. Roca, et al. Experimental [Page 57]
  3128. RFC 5776 TESLA in ALC and NORM April 2010
  3129.  
  3130.  
  3131. Authors' Addresses
  3132.  
  3133. Vincent Roca
  3134. INRIA
  3135. 655, av. de l'Europe
  3136. Inovallee; Montbonnot
  3137. ST ISMIER cedex 38334
  3138. France
  3139.  
  3140. URI: http://planete.inrialpes.fr/~roca/
  3141.  
  3142.  
  3143. Aurelien Francillon
  3144. INRIA
  3145. 655, av. de l'Europe
  3146. Inovallee; Montbonnot
  3147. ST ISMIER cedex 38334
  3148. France
  3149.  
  3150. URI: http://planete.inrialpes.fr/~francill/
  3151.  
  3152.  
  3153. Sebastien Faurite
  3154. INRIA
  3155. 655, av. de l'Europe
  3156. Inovallee; Montbonnot
  3157. ST ISMIER cedex 38334
  3158. France
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179. Roca, et al. Experimental [Page 58]
Advertisement
Add Comment
Please, Sign In to add comment