idnits 2.17.1 draft-brockners-proof-of-transit-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (October 30, 2016) is 2727 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Outdated reference: A later version (-30) exists of draft-ietf-anima-autonomic-control-plane-03 Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group F. Brockners 3 Internet-Draft S. Bhandari 4 Intended status: Experimental S. Dara 5 Expires: May 3, 2017 C. Pignataro 6 Cisco 7 J. Leddy 8 Comcast 9 S. Youell 10 JMPC 11 D. Mozes 12 Mellanox Technologies Ltd. 13 T. Mizrahi 14 Marvell 15 October 30, 2016 17 Proof of Transit 18 draft-brockners-proof-of-transit-02 20 Abstract 22 Several technologies such as Traffic Engineering (TE), Service 23 Function Chaining (SFC), and policy based routing are used to steer 24 traffic through a specific, user-defined path. This document defines 25 mechanisms to securely prove that traffic transited said defined 26 path. These mechanisms allow to securely verify whether, within a 27 given path, all packets traversed all the nodes that they are 28 supposed to visit. 30 Status of This Memo 32 This Internet-Draft is submitted in full conformance with the 33 provisions of BCP 78 and BCP 79. 35 Internet-Drafts are working documents of the Internet Engineering 36 Task Force (IETF). Note that other groups may also distribute 37 working documents as Internet-Drafts. The list of current Internet- 38 Drafts is at http://datatracker.ietf.org/drafts/current/. 40 Internet-Drafts are draft documents valid for a maximum of six months 41 and may be updated, replaced, or obsoleted by other documents at any 42 time. It is inappropriate to use Internet-Drafts as reference 43 material or to cite them other than as "work in progress." 45 This Internet-Draft will expire on May 3, 2017. 47 Copyright Notice 49 Copyright (c) 2016 IETF Trust and the persons identified as the 50 document authors. All rights reserved. 52 This document is subject to BCP 78 and the IETF Trust's Legal 53 Provisions Relating to IETF Documents 54 (http://trustee.ietf.org/license-info) in effect on the date of 55 publication of this document. Please review these documents 56 carefully, as they describe your rights and restrictions with respect 57 to this document. Code Components extracted from this document must 58 include Simplified BSD License text as described in Section 4.e of 59 the Trust Legal Provisions and are provided without warranty as 60 described in the Simplified BSD License. 62 Table of Contents 64 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 65 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 4 66 3. Proof of Transit . . . . . . . . . . . . . . . . . . . . . . 5 67 3.1. Basic Idea . . . . . . . . . . . . . . . . . . . . . . . 5 68 3.2. Solution Approach . . . . . . . . . . . . . . . . . . . . 6 69 3.2.1. Setup . . . . . . . . . . . . . . . . . . . . . . . . 7 70 3.2.2. In Transit . . . . . . . . . . . . . . . . . . . . . 7 71 3.2.3. Verification . . . . . . . . . . . . . . . . . . . . 7 72 3.3. Illustrative Example . . . . . . . . . . . . . . . . . . 7 73 3.3.1. Basic Version . . . . . . . . . . . . . . . . . . . . 7 74 3.3.1.1. Secret Shares . . . . . . . . . . . . . . . . . . 8 75 3.3.1.2. Lagrange Polynomials . . . . . . . . . . . . . . 8 76 3.3.1.3. LPC Computation . . . . . . . . . . . . . . . . . 8 77 3.3.1.4. Reconstruction . . . . . . . . . . . . . . . . . 9 78 3.3.1.5. Verification . . . . . . . . . . . . . . . . . . 9 79 3.3.2. Enhanced Version . . . . . . . . . . . . . . . . . . 9 80 3.3.2.1. Random Polynomial . . . . . . . . . . . . . . . . 9 81 3.3.2.2. Reconstruction . . . . . . . . . . . . . . . . . 10 82 3.3.2.3. Verification . . . . . . . . . . . . . . . . . . 10 83 3.3.3. Final Version . . . . . . . . . . . . . . . . . . . . 11 84 3.4. Operational Aspects . . . . . . . . . . . . . . . . . . . 11 85 3.5. Alternative Approach . . . . . . . . . . . . . . . . . . 12 86 3.5.1. Basic Idea . . . . . . . . . . . . . . . . . . . . . 12 87 3.5.2. Pros . . . . . . . . . . . . . . . . . . . . . . . . 12 88 3.5.3. Cons . . . . . . . . . . . . . . . . . . . . . . . . 12 89 4. Sizing the Data for Proof of Transit . . . . . . . . . . . . 12 90 5. Node Configuration . . . . . . . . . . . . . . . . . . . . . 13 91 5.1. Procedure . . . . . . . . . . . . . . . . . . . . . . . . 14 92 5.2. YANG Model . . . . . . . . . . . . . . . . . . . . . . . 14 93 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 94 7. Manageability Considerations . . . . . . . . . . . . . . . . 17 95 8. Security Considerations . . . . . . . . . . . . . . . . . . . 17 96 8.1. Proof of Transit . . . . . . . . . . . . . . . . . . . . 18 97 8.2. Cryptanalysis . . . . . . . . . . . . . . . . . . . . . . 18 98 8.3. Anti-Replay . . . . . . . . . . . . . . . . . . . . . . . 19 99 8.4. Anti-Preplay . . . . . . . . . . . . . . . . . . . . . . 19 100 8.5. Anti-Tampering . . . . . . . . . . . . . . . . . . . . . 20 101 8.6. Recycling . . . . . . . . . . . . . . . . . . . . . . . . 20 102 8.7. Redundant Nodes and Failover . . . . . . . . . . . . . . 20 103 8.8. Controller Operation . . . . . . . . . . . . . . . . . . 20 104 8.9. Verification Scope . . . . . . . . . . . . . . . . . . . 21 105 8.9.1. Node Ordering . . . . . . . . . . . . . . . . . . . . 21 106 8.9.2. Stealth Nodes . . . . . . . . . . . . . . . . . . . . 21 107 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 21 108 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 21 109 10.1. Normative References . . . . . . . . . . . . . . . . . . 21 110 10.2. Informative References . . . . . . . . . . . . . . . . . 22 111 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 22 113 1. Introduction 115 Several deployments use Traffic Engineering, policy routing, Segment 116 Routing (SR), and Service Function Chaining (SFC) [RFC7665] to steer 117 packets through a specific set of nodes. In certain cases, 118 regulatory obligations or a compliance policy require operators to 119 prove that all packets that are supposed to follow a specific path 120 are indeed being forwarded across and exact set of pre-determined 121 nodes. 123 If a packet flow is supposed to go through a series of service 124 functions or network nodes, it has to be proven that indeed all 125 packets of the flow followed the path or service chain or collection 126 of nodes specified by the policy. In case some packets of a flow 127 weren't appropriately processed, a verification device should 128 determine the policy violation and take corresponding actions 129 corresponding to the policy (e.g., drop or redirect the packet, send 130 an alert etc.) In today's deployments, the proof that a packet 131 traversed a particular path or service chain is typically delivered 132 in an indirect way: Service appliances and network forwarding are in 133 different trust domains. Physical hand-off-points are defined 134 between these trust domains (i.e. physical interfaces). Or in other 135 terms, in the "network forwarding domain" things are wired up in a 136 way that traffic is delivered to the ingress interface of a service 137 appliance and received back from an egress interface of a service 138 appliance. This "wiring" is verified and then trusted upon. The 139 evolution to Network Function Virtualization (NFV) and modern service 140 chaining concepts (using technologies such as Locator/ID Separation 141 Protocol (LISP), Network Service Header (NSH), Segment Routing (SR), 142 etc.) blurs the line between the different trust domains, because the 143 hand-off-points are no longer clearly defined physical interfaces, 144 but are virtual interfaces. As a consequence, different trust layers 145 should not to be mixed in the same device. For an NFV scenario a 146 different type of proof is required. Offering a proof that a packet 147 indeed traversed a specific set of service functions or nodes allows 148 operators to evolve from the above described indirect methods of 149 proving that packets visit a predetermined set of nodes. 151 The solution approach presented in this document is based on a small 152 portion of operational data added to every packet. This "in-situ" 153 operational data is also referred to as "proof of transit data", or 154 POT data. The POT data is updated at every required node and is used 155 to verify whether a packet traversed all required nodes. A 156 particular set of nodes "to be verified" is either described by a set 157 of secret keys, or a set of shares of a single secret. Nodes on the 158 path retrieve their individual keys or shares of a key (using for 159 e.g., Shamir's Secret Sharing scheme) from a central controller. The 160 complete key set is only known to the controller and a verifier node, 161 which is typically the ultimate node on a path that performs 162 verification. Each node in the path uses its secret or share of the 163 secret to update the POT data of the packets as the packets pass 164 through the node. When the verifier receives a packet, it uses its 165 key(s) along with data found in the packet to validate whether the 166 packet traversed the path correctly. 168 2. Conventions 170 Abbreviations used in this document: 172 HMAC: Hash based Message Authentication Code. For example, 173 HMAC-SHA256 generates 256 bits of MAC 175 LISP: Locator/ID Separation Protocol 177 LPC: Lagrange Polynomial Constants 179 MTU: Maximum Transmit Unit 181 NFV: Network Function Virtualization 183 NSH: Network Service Header 185 POT: Proof of Transit 187 POT-profile: Proof of Transit Profile that has the necessary data 188 for nodes to participate in proof of transit 190 RND: Random Bits generated per packet. Packet fields that 191 donot change during the traversal are given as input to 192 HMAC-256 algorithm. A minimum of 32 bits (left most) need 193 to be used from the output if RND is used to verify the 194 packet integrity. This is a standard recommendation by 195 NIST. 197 SEQ_NO: Sequence number initialized to a predefined constant. 198 This is used in concatenation with RND bits to mitigate 199 different attacks discussed later. 201 SFC: Service Function Chain 203 SR: Segment Routing 205 3. Proof of Transit 207 This section discusses methods and algorithms to provide for a "proof 208 of transit" for packets traversing a specific path. A path which is 209 to be verified consists of a set of nodes. Transit of the data 210 packets through those nodes is to be proven. Besides the nodes, the 211 setup also includes a Controller that creates secrets and secrets 212 shares and configures the nodes for POT operations. 214 The methods how traffic is identified and associated to a specific 215 path is outside the scope of this document. Identification could be 216 done using a filter (e.g., 5-tuple classifier), or an identifier 217 which is already present in the packet (e.g., path or service 218 identifier, NSH Service Path Identifier (SPI), flow-label, etc.) 220 The solution approach is detailed in two steps. Initially the 221 concept of the approach is explained. This concept is then further 222 refined to make it operationally feasible. 224 3.1. Basic Idea 226 The method relies on adding POT data to all packets that traverse a 227 path. The added POT data allows a verifying node (egress node) to 228 check whether a packet traversed the identified set of nodes on a 229 path correctly or not. Security mechanisms are natively built into 230 the generation of the POT data to protect against misuse (i.e. 231 configuration mistakes, malicious administrators playing tricks with 232 routing, capturing, spoofing and replaying packets). The mechanism 233 for POT leverages "Shamir's Secret Sharing" scheme [SSS]. 235 Shamir's secret sharing base idea: A polynomial (represented by its 236 coefficients) is chosen as a secret by the controller. A polynomial 237 represents a curve. A set of well-defined points on the curve are 238 needed to construct the polynomial. Each point of the polynomial is 239 called "share" of the secret. A single secret is associated with a 240 particular set of nodes, which typically represent the path, to be 241 verified. Shares of the single secret (i.e., points on the curve) 242 are securely distributed from a Controller to the network nodes. 243 Nodes use their respective share to update a cumulative value in the 244 POT data of each packet. Only a verifying node has access to the 245 complete secret. The verifying node validates the correctness of the 246 received POT data by reconstructing the curve. 248 The polynomial cannot be constructed if any of the points are missed 249 or tampered. Per Shamir's Secret Sharing Scheme, any lesser points 250 means one or more nodes are missed. Details of the precise 251 configuration needed for achieving security are discussed further 252 below. 254 While applicable in theory, a vanilla approach based on Shamir's 255 secret sharing could be easily attacked. If the same polynomial is 256 reused for every packet for a path a passive attacker could reuse the 257 value. As a consequence, one could consider creating a different 258 polynomial per packet. Such an approach would be operationally 259 complex. It would be complex to configure and recycle so many curves 260 and their respective points for each node. Rather than using a 261 single polynomial, two polynomials are used for the solution 262 approach: A secret polynomial which is kept constant, and a per- 263 packet polynomial which is public. Operations are performed on the 264 sum of those two polynomials - creating a third polynomial which is 265 secret and per packet. 267 3.2. Solution Approach 269 Solution approach: The overall algorithm uses two polynomials: POLY-1 270 and POLY-2. POLY-1 is secret and constant. Each node gets a point 271 on POLY-1 at setup-time and keeps it secret. POLY-2 is public, 272 random and per packet. Each node generates a point on POLY-2 each 273 time a packet crosses it. Each node then calculates (point on POLY-1 274 + point on POLY-2) to get a (point on POLY-3) and passes it to 275 verifier by adding it to each packet. The verifier constructs POLY-3 276 from the points given by all the nodes and cross checks whether 277 POLY-3 = POLY-1 + POLY-2. Only the verifier knows POLY-1. The 278 solution leverages finite field arithmetic in a field of size "prime 279 number". 281 Detailed algorithms are discussed next. A simple example is 282 discussed in Section 3.3. 284 3.2.1. Setup 286 A controller generates a first polynomial (POLY-1) of degree k and 287 k+1 points on the polynomial. The constant coefficient of POLY-1 is 288 considered the SECRET. The non-constant coefficients are used to 289 generate the Lagrange Polynomial Constants (LPC). Each of the k 290 nodes (including verifier) are assigned a point on the polynomial 291 i.e., shares of the SECRET. The verifier is configured with the 292 SECRET. The Controller also generates coefficients (except the 293 constant coefficient, called "RND", which is changed on a per packet 294 basis) of a second polynomial POLY-2 of the same degree. Each node 295 is configured with the LPC of POLY-2. Note that POLY-2 is public. 297 3.2.2. In Transit 299 For each packet, the ingress node generates a random number (RND). 300 It is considered as the constant coefficient for POLY-2. A 301 cumulative value (CML) is initialized to 0. Both RND, CML are 302 carried as within the packet POT data. As the packet visits each 303 node, the RND is retrieved from the packet and the respective share 304 of POLY-2 is calculated. Each node calculates (Share(POLY-1) + 305 Share(POLY-2)) and CML is updated with this sum. This step is 306 performed by each node until the packet completes the path. The 307 verifier also performs the step with its respective share. 309 3.2.3. Verification 311 The verifier cross checks whether CML = SECRET + RND. If this 312 matches then the packet traversed the specified set of nodes in the 313 path. This is due to the additive homomorphic property of Shamir's 314 Secret Sharing scheme. 316 3.3. Illustrative Example 318 This section shows a simple example to illustrate step by step the 319 approach described above. 321 3.3.1. Basic Version 323 Assumption: It is to be verified whether packets passed through 3 324 nodes. A polynomial of degree 2 is chosen for verification. 326 Choices: Prime = 53. POLY-1(x) = (3x^2 + 3x + 10) mod 53. The 327 secret to be re-constructed is the constant coefficient of POLY-1, 328 i.e., SECRET=10. It is important to note that all operations are 329 done over a finite field (i.e., modulo prime). 331 3.3.1.1. Secret Shares 333 The shares of the secret are the points on POLY-1 chosen for the 3 334 nodes. For example, let x0=2, x1=4, x2=5. 336 POLY-1(2) = 28 => (x0, y0) = (2, 28) 338 POLY-1(4) = 17 => (x1, y1) = (4, 17) 340 POLY-1(5) = 47 => (x2, y2) = (5, 47) 342 The three points above are the points on the curve which are 343 considered the shares of the secret. They are assigned to three 344 nodes respectively and are kept secret. 346 3.3.1.2. Lagrange Polynomials 348 Lagrange basis polynomials (or Lagrange polynomials) are used for 349 polynomial interpolation. For a given set of points on the curve 350 Lagrange polynomials (as defined below) are used to reconstruct the 351 curve and thus reconstruct the complete secret. 353 l0(x) = (((x-x1) / (x0-x1)) * ((x-x2)/x0-x2))) mod 53 = 354 (((x-4) / (2-4)) * ((x-5)/2-5))) mod 53 = 355 (10/3 - 3x/2 + (1/6)x^2) mod 53 357 l1(x) = (((x-x0) / (x1-x0)) * ((x-x2)/x1-x2))) mod 53 = 358 (-5 + 7x/2 - (1/2)x^2) mod 53 360 l2(x) = (((x-x0) / (x2-x0)) * ((x-x1)/x2-x1))) mod 53 = 361 (8/3 - 2 + (1/3)x^2) mod 53 363 3.3.1.3. LPC Computation 365 Since x0=2, x1=4, x2=5 are chosen points. Given that computations 366 are done over a finite arithmetic field ("modulo a prime number"), 367 the Lagrange basis polynomial constants are computed modulo 53. The 368 Lagrange Polynomial Constant (LPC) would be 10/3 , -5 , 8/3. 370 LPC(x0) = (10/3) mod 53 = 21 372 LPC(x1) = (-5) mod 53 = 48 374 LPC(x2) = (8/3) mod 53 = 38 376 For a general way to compute the modular multiplicative inverse, see 377 e.g., the Euclidean algorithm. 379 3.3.1.4. Reconstruction 381 Reconstruction of the polynomial is well-defined as 383 POLY1(x) = l0(x) * y0 + l1(x) * y1 + l2(x) * y2 385 Subsequently, the SECRET, which is the constant coefficient of 386 POLY1(x) can be computed as below 388 SECRET = (y0*LPC(l0)+y1*LPC(l1)+y2*LPC(l2)) mod 53 390 The secret can be easily reconstructed using the y-values and the 391 LPC: 393 SECRET = (y0*LPC(l0) + y1*LPC(l1) + y2*LPC(l2)) mod 53 = mod (28 * 21 394 + 17 * 48 + 47 * 38) mod 53 = 3190 mod 53 = 10 396 One observes that the secret reconstruction can easily be performed 397 cumulatively hop by hop. CML represents the cumulative value. It is 398 the POT data in the packet that is updated at each hop with the 399 node's respective (yi*LPC(i)), where i is their respective value. 401 3.3.1.5. Verification 403 Upon completion of the path, the resulting CML is retrieved by the 404 verifier from the packet POT data. Recall that verifier is 405 preconfigured with the original SECRET. It is cross checked with the 406 CML by the verifier. Subsequent actions based on the verification 407 failing or succeeding could be taken as per the configured policies. 409 3.3.2. Enhanced Version 411 As observed previously, the vanilla algorithm that involves a single 412 secret polynomial is not secure. Therefore, the solution is further 413 enhanced with usage of a random second polynomial chosen per packet. 415 3.3.2.1. Random Polynomial 417 Let the second polynomial POLY-2 be (RND + 7x + 10 x^2). RND is a 418 random number and is generated for each packet. Note that POLY-2 is 419 public and need not be kept secret. The nodes can be pre-configured 420 with the non-constant coefficients (for example, 7 and 10 in this 421 case could be configured through the Controller on each node). So 422 precisely only RND value changes per packet and is public and the 423 rest of the non-constant coefficients of POLY-2 kept secret. 425 3.3.2.2. Reconstruction 427 Recall that each node is preconfigured with their respective 428 Share(POLY-1). Each node calculates its respective Share(POLY-2) 429 using the RND value retrieved from the packet. The CML 430 reconstruction is enhanced as below. At every node, CML is updated 431 as 433 CML = CML+(((Share(POLY-1)+ Share(POLY-2)) * LPC) mod Prime 435 Let us observe the packet level transformations in detail. For the 436 example packet here, let the value RND be 45. Thus POLY-2 would be 437 (45 + 7x + 10x^2). 439 The shares that could be generated are (2, 46), (4, 21), (5, 12). 441 At ingress: The fields RND = 45. CML = 0. 443 At node-1 (x0): Respective share of POLY-2 is generated i.e., (2, 444 46) because share index of node-1 is 2. 446 CML = 0 + ((28 + 46)* 21) mod 53 = 17 448 At node-2 (x1): Respective share of POLY-2 is generated i.e., (4, 449 21) because share index of node-2 is 4. 451 CML = 17 + ((17 + 21)*48) mod 53 = 17 + 22 = 39 453 At node-3 (x2), which is also the verifier: The respective share 454 of POLY-2 is generated i.e., (5, 12) because the share index of 455 the verifier is 12. 457 CML = 39 + ((47 + 12)*38) mod 53 = 39 + 16 = 55 mod 53 = 2 459 The verification using CML is discussed in next section. 461 3.3.2.3. Verification 463 As shown in the above example, for final verification, the verifier 464 compares: 466 VERIFY = (SECRET + RND) mod Prime, with Prime = 53 here 468 VERIFY = (RND-1 + RND-2) mod Prime = ( 10 + 45 ) mod 53 = 2 470 Since VERIFY = CML the packet is proven to have gone through nodes 1, 471 2, and 3. 473 3.3.3. Final Version 475 The enhanced version of the protocol is still prone to replay and 476 preplay attacks. An attacker could reuse the POT metadata for 477 bypassing the verification. So additional measures using packet 478 integrity checks (HMAC) and sequence numbers (SEQ_NO) are discussed 479 later "Security Considerations" section. 481 3.4. Operational Aspects 483 To operationalize this scheme, a central controller is used to 484 generate the necessary polynomials, the secret share per node, the 485 prime number, etc. and distributing the data to the nodes 486 participating in proof of transit. The identified node that performs 487 the verification is provided with the verification key. The 488 information provided from the Controller to each of the nodes 489 participating in proof of transit is referred to as a proof of 490 transit profile (POT-profile). Also note that the set of nodes for 491 which the transit has to be proven are typically associated to a 492 different trust domain than the verifier. Note that building the 493 trust relationship between the Controller and the nodes is outside 494 the scope of this document. Techniques such as those described in 495 [I-D.ietf-anima-autonomic-control-plane] might be applied. 497 To optimize the overall data amount of exchanged and the processing 498 at the nodes the following optimizations are performed: 500 1. The points (x, y) for each of the nodes on the public and private 501 polynomials are picked such that the x component of the points 502 match. This lends to the LPC values which are used to calculate 503 the cumulative value CML to be constant. Note that the LPC are 504 only depending on the x components. They can be computed at the 505 controller and communicated to the nodes. Otherwise, one would 506 need to distributed the x components to all the nodes. 508 2. A pre-evaluated portion of the public polynomial for each of the 509 nodes is calculated and added to the POT-profile. Without this 510 all the coefficients of the public polynomial had to be added to 511 the POT profile and each node had to evaluate them. As stated 512 before, the public portion is only the constant coefficient RND 513 value, the pre-evaluated portion for each node should be kept 514 secret as well. 516 3. To provide flexibility on the size of the cumulative and random 517 numbers carried in the POT data a field to indicate this is 518 shared and interpreted at the nodes. 520 3.5. Alternative Approach 522 In certain scenarios preserving the order of the nodes traversed by 523 the packet may be needed. An alternative, "nested encryption" based 524 approach is described here for preserving the order 526 3.5.1. Basic Idea 528 1. The controller provisions all the nodes with their respective 529 secret keys. 531 2. The controller provisions the verifier with all the secret keys 532 of the nodes. 534 3. For each packet, the ingress node generates a random number RND 535 and encrypts it with its secret key to generate CML value 537 4. Each subsequent node on the path encrypts CML with their 538 respective secret key and passes it along 540 5. The verifier is also provisioned with the expected sequence of 541 nodes in order to verify the order 543 6. The verifier receives the CML, RND values, re-encrypts the RND 544 with keys in the same order as expected sequence to verify. 546 3.5.2. Pros 548 Nested encryption approach retains the order in which the nodes are 549 traversed. 551 3.5.3. Cons 553 1. Standard AES encryption would need 128 bits of RND, CML. This 554 results in a 256 bits of additional overhead is added per packet 556 2. In hardware platforms that do not support native encryption 557 capabilities like (AES-NI). This approach would have 558 considerable impact on the computational latency 560 4. Sizing the Data for Proof of Transit 562 Proof of transit requires transport of two data records in every 563 packet that should be verified: 565 1. RND: Random number (the constant coefficient of public 566 polynomial) 568 2. CML: Cumulative 570 The size of the data records determines how often a new set of 571 polynomials would need to be created. At maximum, the largest RND 572 number that can be represented with a given number of bits determines 573 the number of unique polynomials POLY-2 that can be created. The 574 table below shows the maximum interval for how long a single set of 575 polynomials could last for a variety of bit rates and RND sizes: When 576 choosing 64 bits for RND and CML data records, the time between a 577 renewal of secrets could be as long as 3,100 years, even when running 578 at 100 Gbps. 580 +-------------+--------------+------------------+-------------------+ 581 | Transfer | Secret/RND | Max # of packets | Time RND lasts | 582 | rate | size | | | 583 +-------------+--------------+------------------+-------------------+ 584 | 1 Gbps | 64 | 2^64 = approx. | approx. 310,000 | 585 | | | 2*10^19 | years | 586 | 10 Gbps | 64 | 2^64 = approx. | approx. 31,000 | 587 | | | 2*10^19 | years | 588 | 100 Gbps | 64 | 2^64 = approx. | approx. 3,100 | 589 | | | 2*10^19 | years | 590 | 1 Gbps | 32 | 2^32 = approx. | 2,200 seconds | 591 | | | 4*10^9 | | 592 | 10 Gbps | 32 | 2^32 = approx. | 220 seconds | 593 | | | 4*10^9 | | 594 | 100 Gbps | 32 | 2^32 = approx. | 22 seconds | 595 | | | 4*10^9 | | 596 +-------------+--------------+------------------+-------------------+ 598 Table assumes 64 octet packets 600 Table 1: Proof of transit data sizing 602 5. Node Configuration 604 A POT system consists of a number of nodes that participate in POT 605 and a Controller, which serves as a control and configuration entity. 606 The Controller is to create the required parameters (polynomials, 607 prime number, etc.) and communicate those to the nodes. The sum of 608 all parameters for a specific node is referred to as "POT-profile". 609 This document does not define a specific protocol to be used between 610 Controller and nodes. It only defines the procedures and the 611 associated YANG data model. 613 5.1. Procedure 615 The Controller creates new POT-profiles at a constant rate and 616 communicates the POT-profile to the nodes. The controller labels a 617 POT-profile "even" or "odd" and the Controller cycles between "even" 618 and "odd" labeled profiles. The rate at which the POT-profiles are 619 communicated to the nodes is configurable and is more frequent than 620 the speed at which a POT-profile is "used up" (see table above). 621 Once the POT-profile has been successfully communicated to all nodes 622 (e.g., all NETCONF transactions completed, in case NETCONF is used as 623 a protocol), the controller sends an "enable POT-profile" request to 624 the ingress node. 626 All nodes maintain two POT-profiles (an even and an odd POT-profile): 627 One POT-profile is currently active and in use; one profile is 628 standby and about to get used. A flag in the packet is indicating 629 whether the odd or even POT-profile is to be used by a node. This is 630 to ensure that during profile change the service is not disrupted. 631 If the "odd" profile is active, the Controller can communicate the 632 "even" profile to all nodes. Only if all the nodes have received the 633 POT-profile, the Controller will tell the ingress node to switch to 634 the "even" profile. Given that the indicator travels within the 635 packet, all nodes will switch to the "even" profile. The "even" 636 profile gets active on all nodes and nodes are ready to receive a new 637 "odd" profile. 639 Unless the ingress node receives a request to switch profiles, it'll 640 continue to use the active profile. If a profile is "used up" the 641 ingress node will recycle the active profile and start over (this 642 could give rise to replay attacks in theory - but with 2^32 or 2^64 643 packets this isn't really likely in reality). 645 5.2. YANG Model 647 This section defines that YANG data model for the information 648 exchange between the Controller and the nodes. 650 file "ietf-pot-profile@2016-06-15.yang" 651 module ietf-pot-profile { 653 yang-version 1; 655 namespace "urn:ietf:params:xml:ns:yang:ietf-pot-profile"; 657 prefix ietf-pot-profile; 659 organization "IETF xxx Working Group"; 660 contact ""; 662 description "This module contains a collection of YANG 663 definitions for proof of transit configuration 664 parameters. The model is meant for proof of 665 transit and is targeted for communicating the 666 POT-profile between a controller and nodes 667 participating in proof of transit."; 669 revision 2016-06-15 { 670 description 671 "Initial revision."; 672 reference 673 ""; 674 } 676 typedef profile-index-range { 677 type int32 { 678 range "0 .. 1"; 679 } 680 description 681 "Range used for the profile index. Currently restricted to 682 0 or 1 to identify the odd or even profiles."; 683 } 685 grouping pot-profile { 686 description "A grouping for proof of transit profiles."; 687 list pot-profile-list { 688 key "pot-profile-index"; 689 ordered-by user; 690 description "A set of pot profiles."; 692 leaf pot-profile-index { 693 type profile-index-range; 694 mandatory true; 695 description 696 "Proof of transit profile index."; 697 } 699 leaf prime-number { 700 type uint64; 701 mandatory true; 702 description 703 "Prime number used for module math computation"; 704 } 706 leaf secret-share { 707 type uint64; 708 mandatory true; 709 description 710 "Share of the secret of polynomial 1 used in computation"; 711 } 713 leaf public-polynomial { 714 type uint64; 715 mandatory true; 716 description 717 "Pre evaluated Public polynomial"; 718 } 720 leaf lpc { 721 type uint64; 722 mandatory true; 723 description 724 "Lagrange Polynomial Coefficient"; 725 } 727 leaf validator { 728 type boolean; 729 default "false"; 730 description 731 "True if the node is a verifier node"; 732 } 734 leaf validator-key { 735 type uint64; 736 description 737 "Secret key for validating the path, constant of poly 1"; 738 } 740 leaf bitmask { 741 type uint64; 742 default 4294967295; 743 description 744 "Number of bits as mask used in controlling the size of the 745 random value generation. 32-bits of mask is default."; 746 } 747 } 748 } 750 container pot-profiles { 751 description "A group of proof of transit profiles."; 753 list pot-profile-set { 754 key "pot-profile-name"; 755 ordered-by user; 756 description 757 "Set of proof of transit profiles that group parameters 758 required to classify and compute proof of transit 759 metadata at a node"; 761 leaf pot-profile-name { 762 type string; 763 mandatory true; 764 description 765 "Unique identifier for each proof of transit profile"; 766 } 768 leaf active-profile-index { 769 type profile-index-range; 770 description 771 "Proof of transit profile index that is currently active. 772 Will be set in the first hop of the path or chain. 773 Other nodes will not use this field."; 774 } 776 uses pot-profile; 777 } 778 /*** Container: end ***/ 779 } 780 /*** module: end ***/ 781 } 782 784 6. IANA Considerations 786 IANA considerations will be added in a future version of this 787 document. 789 7. Manageability Considerations 791 Manageability considerations will be addressed in a later version of 792 this document. 794 8. Security Considerations 796 Different security requirements achieved by the solution approach are 797 discussed here. 799 8.1. Proof of Transit 801 Proof of correctness and security of the solution approach is per 802 Shamir's Secret Sharing Scheme [SSS]. Cryptographically speaking it 803 achieves information-theoretic security i.e., it cannot be broken by 804 an attacker even with unlimited computing power. As long as the 805 below conditions are met it is impossible for an attacker to bypass 806 one or multiple nodes without getting caught. 808 o If there are k+1 nodes in the path, the polynomials (POLY-1, POLY- 809 2) should be of degree k. Also k+1 points of POLY-1 are chosen 810 and assigned to each node respectively. The verifier can re- 811 construct the k degree polynomial (POLY-3) only when all the 812 points are correctly retrieved. 814 o Precisely three values are kept secret by individual nodes. Share 815 of SECRET (i.e. points on POLY-1), Share of POLY-2, LPC, P. Note 816 that only constant coefficient, RND, of POLY-2 is public. x values 817 and non-constant coefficient of POLY-2 are secret 819 An attacker bypassing a few nodes will miss adding a respective point 820 on POLY-1 to corresponding point on POLY-2 , thus the verifier cannot 821 construct POLY-3 for cross verification. 823 Also it is highly recommended that different polynomials should be 824 used as POLY-1 across different paths, traffic profiles or service 825 chains. 827 8.2. Cryptanalysis 829 A passive attacker could try to harvest the POT data (i.e., CML, RND 830 values) in order to determine the configured secrets. Subsequently 831 two types of differential analysis for guessing the secrets could be 832 done. 834 o Inter-Node: A passive attacker observing CML values across nodes 835 (i.e., as the packets entering and leaving), cannot perform 836 differential analysis to construct the points on POLY-1. This is 837 because at each point there are four unknowns (i.e. Share(POLY- 838 1), Share(Poly-2) LPC and prime number P) and three known values 839 (i.e. RND, CML-before, CML-after). 841 o Inter-Packets: A passive attacker could observe CML values across 842 packets (i.e., values of PKT-1 and subsequent PKT-2), in order to 843 predict the secrets. Differential analysis across packets could 844 be mitigated using a good PRNG for generating RND. Note that if 845 constant coefficient is a sequence number than CML values become 846 quite predictable and the scheme would be broken. 848 8.3. Anti-Replay 850 A passive attacker could reuse a set of older RND and the 851 intermediate CML values to bypass certain nodes in later packets. 852 Such attacks could be avoided by carefully choosing POLY-2 as a 853 (SEQ_NO + RND). For example, if 64 bits are being used for POLY-2 854 then first 16 bits could be a sequence number SEQ_NO and next 48 bits 855 could be a random number. 857 Subsequently, the verifier could use the SEQ_NO bits to run classic 858 anti-replay techniques like sliding window used in IPSEC. The 859 verifier could buffer up to 2^16 packets as a sliding window. 860 Packets arriving with a higher SEQ_NO than current buffer could be 861 flagged legitimate. Packets arriving with a lower SEQ_NO than 862 current buffer could be flagged as suspicious. 864 For all practical purposes in the rest of the document RND means 865 SEQ_NO + RND to keep it simple. 867 The solution discussed in this memo does not currently mitigate 868 replay attacks. An anti-replay mechanism may be included in future 869 versions of the solution. 871 8.4. Anti-Preplay 873 An active attacker could try to perform a man-in-the-middle (MITM) 874 attack by extracting the POT of PKT-1 and using it in PKT-2. 875 Subsequently attacker drops the PKT-1 in order to avoid duplicate POT 876 values reaching the verifier. If the PKT-1 reaches the verifier, 877 then this attack is same as Replay attacks discussed before. 879 Preplay attacks are possible since the POT metadata is not dependent 880 on the packet fields. Below steps are recommended for remediation: 882 o Ingress node and Verifier are configured with common pre shared 883 key 885 o Ingress node generates a Message Authentication Code (MAC) from 886 packet fields using standard HMAC algorithm. 888 o The left most bits of the output are truncated to desired length 889 to generate RND. It is recommended to use a minimum of 32 bits. 891 o The verifier regenerates the HMAC from the packet fields and 892 compares with RND. To ensure the POT data is in fact that of the 893 packet. 895 If an HMAC is used, an active attacker lacks the knowledge of the 896 pre-shared key, and thus cannot launch preplay attacks. 898 The solution discussed in this memo does not currently mitigate 899 prereplay attacks. A mitigation mechanism may be included in future 900 versions of the solution. 902 8.5. Anti-Tampering 904 An active attacker could not insert any arbitrary value for CML. 905 This would subsequently fail the reconstruction of the POLY-3. Also 906 an attacker could not update the CML with a previously observed 907 value. This could subsequently be detected by using timestamps 908 within the RND value as discussed above. 910 8.6. Recycling 912 The solution approach is flexible for recycling long term secrets 913 like POLY-1. All the nodes could be periodically updated with shares 914 of new SECRET as best practice. The table above could be consulted 915 for refresh cycles (see Section 4). 917 8.7. Redundant Nodes and Failover 919 A "node" or "service" in terms of POT can be implemented by one or 920 multiple physical entities. In case of multiple physical entities 921 (e.g., for load-balancing, or business continuity situations - 922 consider for example a set of firewalls), all physical entities which 923 are implementing the same POT node are given that same share of the 924 secret. This makes multiple physical entities represent the same POT 925 node from an algorithm perspective. 927 8.8. Controller Operation 929 The Controller needs to be secured given that it creates and holds 930 the secrets, as need to be the nodes. The communication between 931 Controller and the nodes also needs to be secured. As secure 932 communication protocol such as for example NETCONF over SSH should be 933 chosen for Controller to node communication. 935 The Controller only interacts with the nodes during the initial 936 configuration and thereafter at regular intervals at which the 937 operator chooses to switch to a new set of secrets. In case 64 bits 938 are used for the data-records "CML" and "RND" which are carried 939 within the data packet, the regular intervals are expected to be 940 quite long (e.g., at 100 Gbps, a profile would only be used up after 941 3100 years) - see Section 4 above, thus even a "headless" operation 942 without a Controller can be considered feasible. In such a case, the 943 Controller would only be used for the initial configuration of the 944 POT-profiles. 946 8.9. Verification Scope 948 The POT solution defined in this document verifies that a data-packet 949 traversed or transited a specific set of nodes. From an algorithm 950 perspective, a "node" is an abstract entity. It could be represented 951 by one or multiple physical or virtual network devices, or is could 952 be a component within a networking device or system. The latter 953 would be the case if a forwarding path within a device would need to 954 be securely verified. 956 8.9.1. Node Ordering 958 POT using Shamir's secret sharing scheme as discussed in this 959 document provides for a means to verify that a set of nodes has been 960 visited by a data packet. It does not verify the order in which the 961 data packet visited the nodes. In case the order in which a data 962 packet traversed a particular set of nodes needs to be verified as 963 well, alternate schemes that e.g., rely on "nested encryption" could 964 to be considered. 966 8.9.2. Stealth Nodes 968 The POT approach discussed in this document is to prove that a data 969 packet traversed a specific set of "nodes". This set could be all 970 nodes within a path, but could also be a subset of nodes in a path. 971 Consequently, the POT approach isn't suited to detect whether 972 "stealth" nodes which do not participate in proof-of-transit have 973 been inserted into a path. 975 9. Acknowledgements 977 The authors would like to thank Eric Vyncke, Nalini Elkins, Srihari 978 Raghavan, Ranganathan T S, Karthik Babu Harichandra Babu, Akshaya 979 Nadahalli, Erik Nordmark, and Andrew Yourtchenko for the comments and 980 advice. 982 10. References 984 10.1. Normative References 986 [RFC7665] Halpern, J., Ed. and C. Pignataro, Ed., "Service Function 987 Chaining (SFC) Architecture", RFC 7665, DOI 10.17487/ 988 RFC7665, October 2015, 989 . 991 [SSS] "Shamir's Secret Sharing", . 994 10.2. Informative References 996 [I-D.ietf-anima-autonomic-control-plane] 997 Behringer, M., Eckert, T., and S. Bjarnason, "An Autonomic 998 Control Plane", draft-ietf-anima-autonomic-control- 999 plane-03 (work in progress), July 2016. 1001 Authors' Addresses 1003 Frank Brockners 1004 Cisco Systems, Inc. 1005 Hansaallee 249, 3rd Floor 1006 DUESSELDORF, NORDRHEIN-WESTFALEN 40549 1007 Germany 1009 Email: fbrockne@cisco.com 1011 Shwetha Bhandari 1012 Cisco Systems, Inc. 1013 Cessna Business Park, Sarjapura Marathalli Outer Ring Road 1014 Bangalore, KARNATAKA 560 087 1015 India 1017 Email: shwethab@cisco.com 1019 Sashank Dara 1020 Cisco Systems, Inc. 1021 Cessna Business Park, Sarjapura Marathalli Outer Ring Road 1022 BANGALORE, Bangalore, KARNATAKA 560 087 1023 INDIA 1025 Email: sadara@cisco.com 1027 Carlos Pignataro 1028 Cisco Systems, Inc. 1029 7200-11 Kit Creek Road 1030 Research Triangle Park, NC 27709 1031 United States 1033 Email: cpignata@cisco.com 1034 John Leddy 1035 Comcast 1037 Email: John_Leddy@cable.comcast.com 1039 Stephen Youell 1040 JP Morgan Chase 1041 25 Bank Street 1042 London E14 5JP 1043 United Kingdom 1045 Email: stephen.youell@jpmorgan.com 1047 David Mozes 1048 Mellanox Technologies Ltd. 1050 Email: davidm@mellanox.com 1052 Tal Mizrahi 1053 Marvell 1054 6 Hamada St. 1055 Yokneam 20692 1056 Israel 1058 Email: talmi@marvell.com