idnits 2.17.00 (12 Aug 2021) /tmp/idnits61417/draft-ietf-sidr-rpsl-sig-04.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document 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 (April 6, 2012) is 3697 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 475 ** 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: October 8, 2012 JHU APL 6 April 6, 2012 8 Securing RPSL Objects with RPKI Signatures 9 draft-ietf-sidr-rpsl-sig-04.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 October 8, 2012. 40 Copyright Notice 42 Copyright (c) 2012 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 . . . . . . . . . . . . . . . . . . . . . . . . . 3 58 2. Signature Syntax and Semantics . . . . . . . . . . . . . . . . 3 59 2.1. General Attributes, Meta Information . . . . . . . . . . . 4 60 2.2. Signed Attributes . . . . . . . . . . . . . . . . . . . . 5 61 2.3. Storage of the Signature Data . . . . . . . . . . . . . . 6 62 2.4. Number Resource Coverage . . . . . . . . . . . . . . . . . 6 63 2.5. Validity Time of the Signature . . . . . . . . . . . . . . 6 64 3. Signature Creation and Validation Steps . . . . . . . . . . . 7 65 3.1. Canonicalization . . . . . . . . . . . . . . . . . . . . . 7 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 . . 11 70 6. Security Considerations . . . . . . . . . . . . . . . . . . . 11 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 1. Version number of the signature (field "v"). This field MUST be 140 set to "1". 142 2. Reference to the certificate corresponding to the private key 143 used to sign this object (field "c"). This is a URL of type 144 "rsync" or "http(s)" that points to a specific resource 145 certificate in an RPKI repository. The value of this field MUST 146 be an "rsync://..." or an "http[s]://..." URL. Any non URL-safe 147 characters (including semicolon ";" and plus "+") must be URL 148 encoded. 150 3. 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 4. 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 5. 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 6. 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 167 of the object as inputs. The value of this field is the base64 168 encoded representation of the signature. 170 Optional fields of the "signature" attribute: 172 1. Signature expiration time (field "x"). The format of the value 173 of this field is the number of seconds since Unix EPOCH (00:00:00 174 on January 1, 1970 in the UTC time zone). The value is expressed 175 as the decimal representation of an unsigned integer. 177 2. Reference(s) to other party's certificate(s) (field "o"). If 178 such certificates are mentioned (referred to) in any signature, 179 then this signature should be considered valid only in case when 180 there are other signatures over this current object, and these 181 other signatures refer to, and can be verified with, the 182 certificates mentioned in this field. This mechanism allows 183 having multiple signatures over an object in such a way that all 184 of these signatures have to be present and valid for the whole 185 signature to be considered valid. This would allow 186 interdependent multi-party signatures over an object. One 187 applications for such a mechanism include the case of a route[6] 188 object, where both the prefix owner's and the AS owner's 189 signature is expected (if they are different parties). The value 190 of this field MUST be a list of "rsync://..." or "http[s]://..." 191 URLs. If there are more such reference URLs, then they must be 192 separated with a plus "+" sign. Any non URL-safe characters 193 (including semicolon ";" and plus "+") must be URL encoded in all 194 such URLs. 196 2.2. Signed Attributes 198 One can look at an RPSL object as an (ordered) set of attributes, 199 each having a "key: value" syntax. Understanding this structure can 200 help in developing more flexible methods for applying digital 201 signatures. 203 Some of these attributes are automatically added by the database, 204 some are database-dependent, yet others do not carry operationally 205 important information. This specification allows the maintainer of 206 such an object to define which attributes are signed and which are 207 not, from among all the attributes of the object; in other words, we 208 define a way of including important attributes while excluding 209 irrelevant ones. Allowing the maintainer an object to select the 210 attributes that are covered by the digital signature achieves the 211 goals established in Section 1. 213 The type of the object determines the minimum set of attributes that 214 MUST be signed. The signer MAY choose to sign additional attributes, 215 in order to provide integrity protection for those attributes too. 217 When verifying the signature of an object, the verifier has to check 218 whether the signature itself is valid, and whether all the specified 219 attributes are referenced in the signature. If not, the verifier 220 MUST reject the signature and threat the object as a regular, non- 221 signed RPSL object. 223 2.3. Storage of the Signature Data 225 The result of applying the signature mechanism once is exactly one 226 new attribute for the object. As an illustration, the structure of a 227 signed RPSL object is as follows: 229 attribute1: value1 230 attribute2: value2 231 attribute3: value3 232 ... 233 signature: v=1; c=rsync://.....; m=sha256WithRSAEncryption; 234 t=9999999999; 235 a=attribute1+attribute2+attribute3+...; 236 b= 238 2.4. Number Resource Coverage 240 Even if the signature(s) over the object are valid according to the 241 signature validation rules, they may not be relevant to the object; 242 they also need to cover the relevant Internet number resources 243 mentioned in the object. 245 Therefore the Internet number resources present in [RFC3779] 246 extensions of the certificate referred to in the "c" field of the 247 signature (or in the union of such extensions in the "c" fields of 248 the certificates, in case multiple signatures are present) MUST cover 249 the resources in the primary key of the object (e.g., value of the 250 "aut-num:" attribute of an aut-num object, value of the "inetnum:" 251 attribute of an inetnum object, values of "route:" and "origin:" 252 attributes of a route object, etc.). 254 2.5. Validity Time of the Signature 256 The validity time interval of a signature is the intersection of the 257 validity time of the certificate used to verify the signature, the 258 "not before" time specified by the "t" field of the signature, and 259 the optional "not after" time specified by the "x" field of the 260 signature. 262 When checking multiple signatures, these checks are applied to each 263 signature, individually. 265 3. Signature Creation and Validation Steps 267 3.1. Canonicalization 269 The notion of canonicalization is essential to digital signature 270 generation and validation whenever data representations may change 271 between a signer and one or more signature verifiers. 272 Canonicalization defines how one transforms an a representation of 273 data into a series of bits for signature generation and verification. 274 The task of canonicalization is to make irrelevant differences in 275 representations of the same object, which would otherwise cause 276 signature verification to fail. Examples of this could be: 278 o data transformations applied by the databases that host these 279 objects (such as notational changes for IPv4/IPv6 prefixes, 280 automatic addition/modification of "changed" attributes, etc.) 282 o the difference of line terminators across different systems. 284 This means that the destination database might change parts of the 285 submitted data after it was signed, which would cause signature 286 verification to fail. This document specifies strict 287 canonicalization rules to overcome this problem. 289 The following steps MUST be applied in order to achieve canonicalized 290 representation of an object, before the actual signature 291 (verification) process can begin: 293 1. Comments (anything beginning with a "#") MUST be omitted. 295 2. Any trailing white space MUST be omitted. 297 3. A multi-line attribute MUST be converted into its single-line 298 equivalent. This is accomplished by: 300 * Converting all line endings to a single blank space. 302 * Concatenating all lines into a single line. 304 * Replacing the trailing blank space with a single new line 305 ("\n"). 307 4. Numerical fields must be converted to canonical representations. 308 These include: 310 * Date and time fields MUST be converted to 64-bit NTP Timestamp 311 Format [RFC5905]. 313 * AS numbers MUST be converted to ASPLAIN syntax [RFC5396]. 315 * IPv6 addresses must be canonicalized as defined in [RFC5952]. 317 * IPv4 addresses MUST be converted to a 32-bit representation 318 (e.g., Unix's inet_aton()). 320 * All IP prefixes (IPv4 and IPv6) MUST be represented in CIDR 321 notaion [RFC4632]. 323 5. The name of each attribute MUST be converted into lower case, and 324 MUST be kept as part of the attribute line. 326 6. Tab characters ("\t") MUST be converted to spaces. 328 7. Multiple whitespaces MUST be collapsed into a single space (" ") 329 character. 331 8. All line endings MUST be converted to a singe new line ("\n") 332 character (thus avoiding CR vs. CRLF differences). 334 3.2. Signature Creation 336 Given an RPSL object, in order to create the digital signature, the 337 following steps MUST be performed: 339 1. For each signature, a new key pair and certificate SHOULD be 340 used. Therefore the signer SHOULD create a single-use key pair 341 and end-entity resource certificate (see [RFC6487]) to be used 342 for signing this object this time. 344 2. Create a list of attribute names referring to the attributes that 345 will be signed (contents of the "a" field). The minimum set of 346 these attributes is determined by the object type; the signer MAY 347 select additional attributes. 349 3. Arrange the selected attributes according to the selection 350 sequence specified in the "a" field as above, omiting all 351 attributes that will not be signed. 353 4. Construct the new "signature" attribute, with all its fields, 354 leaving the value of the "b" field empty. 356 5. Apply canonicalization rules to the result (including the 357 "signature" attribute). 359 6. Create the signature over the results of the canonicalization 360 process (according to the signature and hash algorithms specified 361 in the "m" field of the signature attribute). 363 7. Insert the base64 encoded value of the signature as the value of 364 the "b" field. 366 8. Append the resulting "signature" attribute to the original 367 object. 369 3.3. Signature Validation 371 In order to validate a signature over such an object, the following 372 steps MUST be performed: 374 1. Verify the syntax of the "signature" attribute (ie. whether it 375 contains the mandatory and optional components and the syntax of 376 these fields mathces the specification as described in section 377 2.1.) 379 2. Fetch the certificate referred to in the "c" field of the 380 "signature" attribute, and check its validity using the steps 381 described in [RFC6487]. 383 3. Extract the list of attributes that were signed using the signer 384 from the "a" field of the "signature" attribute. 386 4. Verify that the list of signed attributes matches the miminum set 387 of attributes for that object type. 389 5. Arrange the selected attributes according to the selection 390 sequence provided in the value of the "a" field, omitting all 391 non-signed attributes. 393 6. Replace the value of the signature field "b" of the "signature" 394 attribute with an empty string. 396 7. Apply the canonicalization procedure to the selected attributes 397 (including the "signature" attribute). 399 8. Check the validity of the signature using the signature algorithm 400 specified in the "m" field of the signature attribute, the public 401 key contained in the certificate mentioned in the "c" field of 402 the signature, the signature value specified in the "b" field of 403 the signature attribute, and the output of the canonicalization 404 process. 406 4. Signed Object Types, Set of Signed Attributes 408 This section describes a list of object types that MAY signed using 409 this approach, and the set of attributes that MUST be signed for 410 these object types. 412 This list generally excludes attributes that are used to maintain 413 referential integrity in the databases that carry these objects, 414 since these usually make sense only within the context of such a 415 database, whereas the scope of the signatures is only one specific 416 object. Since the attributes in the referred object (such as mnt-by, 417 admin-c, tech-c, ...) can change without any modifications to the 418 signed object, signing such attributes could lead to false sense of 419 security in terms of the contents of the signed data; therefore 420 should only be done in order to provide full integrity protection of 421 the object itself. 423 The newly constructed "signature" attribute is always included in the 424 list. 426 as-block: 427 * as-block 428 * org 429 * signature 431 aut-num: 432 * aut-num 433 * as-name 434 * member-of 435 * import 436 * mp-import 437 * export 438 * mp-export 439 * default 440 * mp-default 441 * signature 443 inet[6]num: 444 * inet[6]num 445 * netname 446 * country 447 * org 448 * status 449 * signature 451 route[6]: 453 * route[6] 454 * origin 455 * holes 456 * org 457 * member-of 458 * signature 460 For each signature, the RFC3779 extension appearing in the 461 certificate used to verify the signature SHOULD include a resource 462 entry that is equivalent to, or covers ("less specific" than) the 463 following resources mentioned in the object the signatrure is 464 attached to: 466 o For the as-block object type: the resource in the "as-block" 467 attribute. 469 o For the aut-num object type: the resource in the "aut-num" 470 attribute. 472 o For the inet[6]num object type: the resource in the "inet[6]num" 473 attribute. 475 o For the route[6] object type: the resource in the "route[6]" or 476 "origin" (or both) attributes. 478 5. Keys and Certificates used for Signature and Verification 480 The certificate that is referred to in the signature (in the "c" 481 field): 482 o MUST be an end-entity (ie. non-CA) certificate 483 o MUST conform to the X.509 PKIX Resource Certificate profile 484 [RFC6487] 485 o MUST have an [RFC3779] extension that contains or covers at least 486 one Internet number resource included in a signed attribute. 487 o SHOULD NOT be used to verify more than one signed object (ie. 488 should be a "single-use" EE certificate, as defined in [RFC6487]). 490 6. Security Considerations 492 RPSL objects stored in the IRR databases are public, and as such 493 there is no need for confidentiality. Each signed RPSL object can 494 have its integrity and authenticity verified using the supplied 495 digital signature and the referenced certificate. 497 Since the RPSL signature approach leverages X.509 extensions, the 498 security considerations in [RFC3779] apply here as well. 500 7. IANA Considerations 502 [Note to IANA, to be removed prior to publication: there are no IANA 503 considerations stated in this version of the document.] 505 8. Acknowledgements 507 The authors would like to acknowledge the valued contributions from 508 Jos Boumans and Steve Kent in preparation of this document. 510 9. Normative References 512 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 513 Requirement Levels", BCP 14, RFC 2119, March 1997. 515 [RFC3779] Lynn, C., Kent, S., and K. Seo, "X.509 Extensions for IP 516 Addresses and AS Identifiers", RFC 3779, June 2004. 518 [RFC4632] Fuller, V. and T. Li, "Classless Inter-domain Routing 519 (CIDR): The Internet Address Assignment and Aggregation 520 Plan", BCP 122, RFC 4632, August 2006. 522 [RFC4871] Allman, E., Callas, J., Delany, M., Libbey, M., Fenton, 523 J., and M. Thomas, "DomainKeys Identified Mail (DKIM) 524 Signatures", RFC 4871, May 2007. 526 [RFC5396] Huston, G. and G. Michaelson, "Textual Representation of 527 Autonomous System (AS) Numbers", RFC 5396, December 2008. 529 [RFC5905] Mills, D., Martin, J., Burbank, J., and W. Kasch, "Network 530 Time Protocol Version 4: Protocol and Algorithms 531 Specification", RFC 5905, June 2010. 533 [RFC5952] Kawamura, S. and M. Kawashima, "A Recommendation for IPv6 534 Address Text Representation", RFC 5952, August 2010. 536 [RFC6485] Huston, G., "The Profile for Algorithms and Key Sizes for 537 Use in the Resource Public Key Infrastructure (RPKI)", 538 RFC 6485, February 2012. 540 [RFC6487] Huston, G., Michaelson, G., and R. Loomans, "A Profile for 541 X.509 PKIX Resource Certificates", RFC 6487, 542 February 2012. 544 Authors' Addresses 546 Robert Kisteleki 548 Email: robert@ripe.net 549 URI: http://www.ripe.net 551 Brian Haberman 552 Johns Hopkins University Applied Physics Lab 554 Phone: +1 443 778 1319 555 Email: brian@innovationslab.net