idnits 2.17.00 (12 Aug 2021) /tmp/idnits61959/draft-ietf-sidr-rpsl-sig-07.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 seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (May 11, 2015) is 2567 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '6' on line 479 ** Obsolete normative reference: RFC 4871 (Obsoleted by RFC 6376) ** Obsolete normative reference: RFC 6485 (Obsoleted by RFC 7935) Summary: 2 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 SIDR R. Kisteleki 3 Internet-Draft RIPE NCC 4 Intended status: Standards Track B. Haberman 5 Expires: November 12, 2015 JHU APL 6 May 11, 2015 8 Securing RPSL Objects with RPKI Signatures 9 draft-ietf-sidr-rpsl-sig-07.txt 11 Abstract 13 This document describes a method to allow parties to electronically 14 sign RPSL-like objects and validate such electronic signatures. This 15 allows relying parties to detect accidental or malicious 16 modifications on such objects. It also allows parties who run 17 Internet Routing Registries or similar databases, but do not yet have 18 RPSS-like authentication of the maintainers of certain objects, to 19 verify that the additions or modifications of such database objects 20 are done by the legitimate holder(s) of the Internet resources 21 mentioned in those objects. 23 Status of This Memo 25 This Internet-Draft is submitted in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF). Note that other groups may also distribute 30 working documents as Internet-Drafts. The list of current Internet- 31 Drafts is at http://datatracker.ietf.org/drafts/current/. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 This Internet-Draft will expire on November 12, 2015. 40 Copyright Notice 42 Copyright (c) 2015 IETF Trust and the persons identified as the 43 document authors. All rights reserved. 45 This document is subject to BCP 78 and the IETF Trust's Legal 46 Provisions Relating to IETF Documents 47 (http://trustee.ietf.org/license-info) in effect on the date of 48 publication of this document. Please review these documents 49 carefully, as they describe your rights and restrictions with respect 50 to this document. Code Components extracted from this document must 51 include Simplified BSD License text as described in Section 4.e of 52 the Trust Legal Provisions and are provided without warranty as 53 described in the Simplified BSD License. 55 Table of Contents 57 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 58 2. Signature Syntax and Semantics . . . . . . . . . . . . . . . 3 59 2.1. General Attributes, Meta Information . . . . . . . . . . 3 60 2.2. Signed Attributes . . . . . . . . . . . . . . . . . . . . 4 61 2.3. Storage of the Signature Data . . . . . . . . . . . . . . 5 62 2.4. Number Resource Coverage . . . . . . . . . . . . . . . . 5 63 2.5. Validity Time of the Signature . . . . . . . . . . . . . 6 64 3. Signature Creation and Validation Steps . . . . . . . . . . . 6 65 3.1. Canonicalization . . . . . . . . . . . . . . . . . . . . 6 66 3.2. Signature Creation . . . . . . . . . . . . . . . . . . . 8 67 3.3. Signature Validation . . . . . . . . . . . . . . . . . . 9 68 4. Signed Object Types, Set of Signed Attributes . . . . . . . . 10 69 5. Keys and Certificates used for Signature and Verification . . 12 70 6. Security Considerations . . . . . . . . . . . . . . . . . . . 12 71 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 72 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 12 73 9. Normative References . . . . . . . . . . . . . . . . . . . . 12 74 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 13 76 1. Introduction 78 Objects stored in resource databases, like the RIPE DB, are generally 79 protected by an authentication mechanism: anyone creating or 80 modifying an object in the database has to have proper authorization 81 to do so, and therefore has to go through an authentication procedure 82 (provide a password, certificate, e-mail signature, etc.) However, 83 for objects transferred between resource databases, the 84 authentication is not guaranteed. This means when downloading an 85 object stored in this database, one can reasonably safely claim that 86 the object is authentic, but for an imported object one cannot. 87 Also, once such an object is downloaded from the database, it becomes 88 a simple (but still structured) text file with no integrity 89 protection. More importantly, the authentication and integrity 90 guarantees associated with these objects do not always ensure that 91 the entity that generated them is authorized to make the assertions 92 implied by the data contained in the objects. 94 A potential use for resource certificates [RFC6487] is to use them to 95 secure such (both imported and downloaded) database objects, by 96 applying a form of digital signature over the object contents. A 97 maintainer of such signed database objects MUST possess a relevant 98 resource certificate, which shows him/her as the legitimate holder of 99 an Internet number resource. This mechanism allows the users of such 100 database objects to verify that the contents are in fact produced by 101 the legitimate holder(s) of the Internet resources mentioned in those 102 objects. It also allows the signatures to cover whole RPSL objects, 103 or just selected attributes of them. In other words, a digital 104 signature created using the private key associated with a resource 105 certificate can offer object security in addition to the channel 106 security already present in most of such databases. Object security 107 in turn allows such objects to be hosted in different databases and 108 still be independently verifiable. 110 The capitalized key words "MUST", "MUST NOT", "REQUIRED", "SHALL", 111 "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and 112 "OPTIONAL" in this document are to be interpreted as described in 113 [RFC2119]. 115 2. Signature Syntax and Semantics 117 When signing an RPSL object, the input for the signature process is 118 transformed into a sequence of strings of (ASCII) data. The approach 119 is similar to the one used in DKIM (Domain Key Identified Mail) 120 [RFC4871]. In the case of RPSL, the object-to-be-signed closely 121 resembles an SMTP header, so it seems reasonable to adapt DKIM's 122 relevant features. 124 2.1. General Attributes, Meta Information 126 The digital signature associated with an RPSL object is itself a new 127 attribute named "signature". It consists of mandatory and optional 128 fields. These fields are structured in a sequence of name and value 129 pairs, separated by a semicolon ";" and a white space. Collectively 130 these fields make up the value for the new "signature" attribute. 131 The "name" part of such a component is always a single ASCII 132 character that serves as an identifier; the value is an ASCII string 133 the contents of which depend on the field type. Mandatory fields 134 must appear exactly once, whereas optional fields MUST appear at most 135 once. 137 Mandatory fields of the "signature" attribute: 139 o Version number of the signature (field "v"). This field MUST be 140 set to "1". 142 o Reference to the certificate corresponding to the private key used 143 to sign this object (field "c"). This is a URL of type "rsync" or 144 "http(s)" that points to a specific resource certificate in an 145 RPKI repository [RFC6481]. The value of this field MUST be an 146 "rsync://..." or an "http[s]://..." URL. Any non URL-safe 147 characters (including semicolon ";" and plus "+") must be URL 148 encoded. 150 o Signature method (field "m"): what hash and signature algorithms 151 were used to create the signature. The allowed algorithms which 152 can be used for the signature are specified in [RFC6485]. 154 o Time of signing (field "t"). The format of the value of this 155 field is the number of seconds since Unix EPOCH (00:00:00 on 156 January 1, 1970 in the UTC time zone). The value is expressed as 157 the decimal representation of an unsigned integer. 159 o The signed attributes (field "a"). This is a list of attribute 160 names, separated by an ASCII "+" character (if more than one 161 attribute is enumerated). The list must include any attribute at 162 most once. 164 o The signature itself (field "b"). This MUST be the last field in 165 the list. The signature is the output of the signature algorithm 166 using the appropriate private key and the calculated hash value of 167 the object as inputs. The value of this field is the digital 168 signature in base64 encoding [RFC4648]. 170 Optional fields of the "signature" attribute: 172 o Signature expiration time (field "x"). The format of the value of 173 this field is the number of seconds since Unix EPOCH (00:00:00 on 174 January 1, 1970 in the UTC time zone). The value is expressed as 175 the decimal representation of an unsigned integer. 177 2.2. Signed Attributes 179 One can look at an RPSL object as an (ordered) set of attributes, 180 each having a "key: value" syntax. Understanding this structure can 181 help in developing more flexible methods for applying digital 182 signatures. 184 Some of these attributes are automatically added by the database, 185 some are database-dependent, yet others do not carry operationally 186 important information. This specification allows the maintainer of 187 such an object to define which attributes are signed and which are 188 not, from among all the attributes of the object; in other words, we 189 define a way of including important attributes while excluding 190 irrelevant ones. Allowing the maintainer an object to select the 191 attributes that are covered by the digital signature achieves the 192 goals established in Section 1. 194 The type of the object determines the minimum set of attributes that 195 MUST be signed. The signer MAY choose to sign additional attributes, 196 in order to provide integrity protection for those attributes too. 198 When verifying the signature of an object, the verifier has to check 199 whether the signature itself is valid, and whether all the specified 200 attributes are referenced in the signature. If not, the verifier 201 MUST reject the signature and threat the object as a regular, non- 202 signed RPSL object. 204 2.3. Storage of the Signature Data 206 The result of applying the signature mechanism once is exactly one 207 new attribute for the object. As an illustration, the structure of a 208 signed RPSL object is as follows: 210 attribute1: value1 211 attribute2: value2 212 attribute3: value3 213 ... 214 signature: v=1; c=rsync://.....; m=sha256WithRSAEncryption; 215 t=9999999999; 216 a=attribute1+attribute2+attribute3+...; 217 b= 219 2.4. Number Resource Coverage 221 Even if the signature(s) over the object are valid according to the 222 signature validation rules, they may not be relevant to the object; 223 they also need to cover the relevant Internet number resources 224 mentioned in the object. 226 Therefore the Internet number resources present in [RFC3779] 227 extensions of the certificate referred to in the "c" field of the 228 signature (or in the union of such extensions in the "c" fields of 229 the certificates, in case multiple signatures are present) MUST cover 230 the resources in the primary key of the object (e.g., value of the 231 "aut-num:" attribute of an aut-num object, value of the "inetnum:" 232 attribute of an inetnum object, values of "route:" and "origin:" 233 attributes of a route object, etc.). 235 2.5. Validity Time of the Signature 237 The validity time interval of a signature is the intersection of the 238 validity time of the certificate used to verify the signature, the 239 "not before" time specified by the "t" field of the signature, and 240 the optional "not after" time specified by the "x" field of the 241 signature. 243 When checking multiple signatures, these checks are applied to each 244 signature, individually. 246 3. Signature Creation and Validation Steps 248 3.1. Canonicalization 250 The notion of canonicalization is essential to digital signature 251 generation and validation whenever data representations may change 252 between a signer and one or more signature verifiers. 253 Canonicalization defines how one transforms an a representation of 254 data into a series of bits for signature generation and verification. 255 The task of canonicalization is to make irrelevant differences in 256 representations of the same object, which would otherwise cause 257 signature verification to fail. Examples of this could be: 259 o data transformations applied by the databases that host these 260 objects (such as notational changes for IPv4/IPv6 prefixes, 261 automatic addition/modification of "changed" attributes, etc.) 263 o the difference of line terminators across different systems. 265 This means that the destination database might change parts of the 266 submitted data after it was signed, which would cause signature 267 verification to fail. This document specifies strict 268 canonicalization rules to overcome this problem. 270 The following steps MUST be applied in order to achieve canonicalized 271 representation of an object, before the actual signature 272 (verification) process can begin: 274 1. Comments (anything beginning with a "#") MUST be omitted. 276 2. Any trailing white space MUST be omitted. 278 3. A multi-line attribute MUST be converted into its single-line 279 equivalent. This is accomplished by: 281 * Converting all line endings to a single blank space. 283 * Concatenating all lines into a single line. 285 * Replacing the trailing blank space with a single new line 286 ("\n"). 288 4. Numerical fields must be converted to canonical representations. 289 These include: 291 * Date and time fields MUST be converted to 64-bit NTP Timestamp 292 Format [RFC5905]. 294 * AS numbers MUST be converted to ASPLAIN syntax [RFC5396]. 296 * IPv6 addresses must be canonicalized as defined in [RFC5952]. 298 * IPv4 addresses MUST be converted to a 32-bit representation 299 (e.g., Unix's inet_aton()). 301 * All IP prefixes (IPv4 and IPv6) MUST be represented in CIDR 302 notaion [RFC4632]. 304 5. The name of each attribute MUST be converted into lower case, and 305 MUST be kept as part of the attribute line. 307 6. Tab characters ("\t") MUST be converted to spaces. 309 7. Multiple whitespaces MUST be collapsed into a single space (" ") 310 character. 312 8. All line endings MUST be converted to a singe new line ("\n") 313 character (thus avoiding CR vs. CRLF differences). 315 3.2. Signature Creation 317 Given an RPSL object, in order to create the digital signature, the 318 following steps MUST be performed: 320 1. For each signature, a new key pair and certificate SHOULD be 321 used. Therefore the signer SHOULD create a single-use key pair 322 and end-entity resource certificate (see [RFC6487]) to be used 323 for signing this object this time. 325 2. Create a list of attribute names referring to the attributes that 326 will be signed (contents of the "a" field). The minimum set of 327 these attributes is determined by the object type; the signer MAY 328 select additional attributes. 330 3. Arrange the selected attributes according to the selection 331 sequence specified in the "a" field as above, omiting all 332 attributes that will not be signed. 334 4. Construct the new "signature" attribute, with all its fields, 335 leaving the value of the "b" field empty. 337 5. Apply canonicalization rules to the result (including the 338 "signature" attribute). 340 6. Create the signature over the results of the canonicalization 341 process (according to the signature and hash algorithms specified 342 in the "m" field of the signature attribute). 344 7. Insert the base64 encoded value of the signature as the value of 345 the "b" field. 347 8. Append the resulting "signature" attribute to the original 348 object. 350 3.3. Signature Validation 352 In order to validate a signature over such an object, the following 353 steps MUST be performed: 355 1. Verify the syntax of the "signature" attribute (ie. whether it 356 contains the mandatory and optional components and the syntax of 357 these fields mathces the specification as described in section 358 2.1.) 360 2. Fetch the certificate referred to in the "c" field of the 361 "signature" attribute, and check its validity using the steps 362 described in [RFC6487]. 364 3. Extract the list of attributes that were signed using the signer 365 from the "a" field of the "signature" attribute. 367 4. Verify that the list of signed attributes matches the miminum set 368 of attributes for that object type. 370 5. Arrange the selected attributes according to the selection 371 sequence provided in the value of the "a" field, omitting all 372 non-signed attributes. 374 6. Replace the value of the signature field "b" of the "signature" 375 attribute with an empty string. 377 7. Apply the canonicalization procedure to the selected attributes 378 (including the "signature" attribute). 380 8. Check the validity of the signature using the signature algorithm 381 specified in the "m" field of the signature attribute, the public 382 key contained in the certificate mentioned in the "c" field of 383 the signature, the signature value specified in the "b" field of 384 the signature attribute, and the output of the canonicalization 385 process. 387 4. Signed Object Types, Set of Signed Attributes 389 This section describes a list of object types that MAY signed using 390 this approach, and the set of attributes that MUST be signed for 391 these object types. 393 This list generally excludes attributes that are used to maintain 394 referential integrity in the databases that carry these objects, 395 since these usually make sense only within the context of such a 396 database, whereas the scope of the signatures is only one specific 397 object. Since the attributes in the referred object (such as mnt-by, 398 admin-c, tech-c, ...) can change without any modifications to the 399 signed object, signing such attributes could lead to false sense of 400 security in terms of the contents of the signed data; therefore 401 should only be done in order to provide full integrity protection of 402 the object itself. 404 The newly constructed "signature" attribute is always included in the 405 list. 407 as-block: 409 * as-block 411 * org 413 * signature 415 aut-num: 417 * aut-num 419 * as-name 421 * member-of 423 * import 425 * mp-import 427 * export 429 * mp-export 431 * default 433 * mp-default 434 * signature 436 inet[6]num: 438 * inet[6]num 440 * netname 442 * country 444 * org 446 * status 448 * signature 450 route[6]: 452 * route[6] 454 * origin 456 * holes 458 * org 460 * member-of 462 * signature 464 For each signature, the RFC3779 extension appearing in the 465 certificate used to verify the signature SHOULD include a resource 466 entry that is equivalent to, or covers ("less specific" than) the 467 following resources mentioned in the object the signatrure is 468 attached to: 470 o For the as-block object type: the resource in the "as-block" 471 attribute. 473 o For the aut-num object type: the resource in the "aut-num" 474 attribute. 476 o For the inet[6]num object type: the resource in the "inet[6]num" 477 attribute. 479 o For the route[6] object type: the resource in the "route[6]" or 480 "origin" (or both) attributes. 482 5. Keys and Certificates used for Signature and Verification 484 The certificate that is referred to in the signature (in the "c" 485 field): 487 o MUST be an end-entity (ie. non-CA) certificate 489 o MUST conform to the X.509 PKIX Resource Certificate profile 490 [RFC6487] 492 o MUST have an [RFC3779] extension that contains or covers at least 493 one Internet number resource included in a signed attribute. 495 o SHOULD NOT be used to verify more than one signed object (ie. 496 should be a "single-use" EE certificate, as defined in [RFC6487]). 498 6. Security Considerations 500 RPSL objects stored in the IRR databases are public, and as such 501 there is no need for confidentiality. Each signed RPSL object can 502 have its integrity and authenticity verified using the supplied 503 digital signature and the referenced certificate. 505 Since the RPSL signature approach leverages X.509 extensions, the 506 security considerations in [RFC3779] apply here as well. 508 7. IANA Considerations 510 [Note to IANA, to be removed prior to publication: there are no IANA 511 considerations stated in this version of the document.] 513 8. Acknowledgements 515 The authors would like to acknowledge the valued contributions from 516 Jos Boumans, Steve Kent, and Sean Turner in preparation of this 517 document. 519 9. Normative References 521 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 522 Requirement Levels", BCP 14, RFC 2119, March 1997. 524 [RFC3779] Lynn, C., Kent, S., and K. Seo, "X.509 Extensions for IP 525 Addresses and AS Identifiers", RFC 3779, June 2004. 527 [RFC4632] Fuller, V. and T. Li, "Classless Inter-domain Routing 528 (CIDR): The Internet Address Assignment and Aggregation 529 Plan", BCP 122, RFC 4632, August 2006. 531 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 532 Encodings", RFC 4648, October 2006. 534 [RFC4871] Allman, E., Callas, J., Delany, M., Libbey, M., Fenton, 535 J., and M. Thomas, "DomainKeys Identified Mail (DKIM) 536 Signatures", RFC 4871, May 2007. 538 [RFC5396] Huston, G. and G. Michaelson, "Textual Representation of 539 Autonomous System (AS) Numbers", RFC 5396, December 2008. 541 [RFC5905] Mills, D., Martin, J., Burbank, J., and W. Kasch, "Network 542 Time Protocol Version 4: Protocol and Algorithms 543 Specification", RFC 5905, June 2010. 545 [RFC5952] Kawamura, S. and M. Kawashima, "A Recommendation for IPv6 546 Address Text Representation", RFC 5952, August 2010. 548 [RFC6481] Huston, G., Loomans, R., and G. Michaelson, "A Profile for 549 Resource Certificate Repository Structure", RFC 6481, 550 February 2012. 552 [RFC6485] Huston, G., "The Profile for Algorithms and Key Sizes for 553 Use in the Resource Public Key Infrastructure (RPKI)", RFC 554 6485, February 2012. 556 [RFC6487] Huston, G., Michaelson, G., and R. Loomans, "A Profile for 557 X.509 PKIX Resource Certificates", RFC 6487, February 558 2012. 560 Authors' Addresses 562 Robert Kisteleki 564 Email: robert@ripe.net 565 URI: http://www.ripe.net 567 Brian Haberman 568 Johns Hopkins University Applied Physics Lab 570 Email: brian@innovationslab.net