Internet Engineering Task Force (IETF) S. Turner Request for Comments: 8608 sn3rd Obsoletes: 8208 O. Borchert Updates: 7935 NIST Category: Standards Track June 2019 ISSN: 2070-1721
BGPsec Algorithms, Key Formats, and Signature Formats
Abstract
This document specifies the algorithms, algorithm parameters, asymmetric key formats, asymmetric key sizes, and signature formats used in BGPsec (Border Gateway Protocol Security). This document updates RFC 7935 ("The Profile for Algorithms and Key Sizes for Use in the Resource Public Key Infrastructure") and obsoletes RFC 8208 ("BGPsec Algorithms, Key Formats, and Signature Formats") by adding Documentation and Experimentation Algorithm IDs, correcting the range of unassigned algorithms IDs to fill the complete range, and restructuring the document for better reading.
This document also includes example BGPsec UPDATE messages as well as the private keys used to generate the messages and the certificates necessary to validate those signatures.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc8608.
Turner & Borchert Standards Track [Page 1]
RFC 8608 BGPsec Algs, Key & Signature Formats June 2019
Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
o the algorithm identifier assignment and classification,
o the public and private key formats, and
o the signature formats
used by Resource Public Key Infrastructure (RPKI) Certification Authorities (CAs) and BGPsec (Border Gateway Protocol Security) speakers (i.e., routers). CAs use these algorithms when processing requests for BGPsec Router Certificates [RFC8209]. Examples of when BGPsec routers use these algorithms include requesting BGPsec certificates [RFC8209], signing BGPsec UPDATE messages [RFC8205], and verifying signatures on BGPsec UPDATE messages [RFC8205].
This document updates [RFC7935] to add support for a) a different algorithm for BGPsec certificate requests, which are issued only by BGPsec speakers; b) a different Subject Public Key Info format for BGPsec certificates, which is needed for the specified BGPsec signature algorithm; and c) different signature formats for BGPsec signatures, which are needed for the specified BGPsec signature algorithm. The BGPsec certificates are differentiated from other RPKI certificates by the use of the BGPsec Extended Key Usage as defined in [RFC8209]. BGPsec uses a different algorithm [RFC6090] [DSS] from the rest of the RPKI to provide similar security with smaller keys, making the certificates smaller; these algorithms also result in smaller signatures, which make the PDUs smaller.
Appendix A (non-normative) contains example BGPsec UPDATE messages as well as the private keys used to generate the messages and the certificates necessary to validate the signatures.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
Turner & Borchert Standards Track [Page 3]
RFC 8608 BGPsec Algs, Key & Signature Formats June 2019
The algorithms used to compute signatures on CA certificates, BGPsec Router Certificates, and Certificate Revocation Lists (CRLs) are as specified in Section 2 of [RFC7935]. This section addresses algorithms used by BGPsec [RFC8205] [DSS]. For example, these algorithms are used by BGPsec routers to sign and verify BGPsec UPDATE messages. To identify which algorithm is used, the BGPsec UPDATE message contains the corresponding algorithm ID in each Signature_Block of the BGPsec UPDATE message.
Algorithms in BGPsec UPDATE messages are identified by the Algorithm Suite Identifier field (algorithm ID) within the Signature_Block (see Section 3.2 of [RFC8205]).
This document specifies five types of Algorithm IDs:
o Reserved Algorithm ID
Reserved algorithm IDs are the values 0x00 (0) and 0xFF (255). These IDs MUST NOT be used in a Signature_Block, and if encountered, the router MUST treat BGPsec UPDATE messages as malformed [RFC4271].
Turner & Borchert Standards Track [Page 4]
RFC 8608 BGPsec Algs, Key & Signature Formats June 2019
o Signature Algorithm ID
Signature algorithms are defined in Section 2.2 of this document. Processing of BGPsec UPDATE signing and validation using signature algorithms is described at length in Sections 4.2 and 5.2 of [RFC8205].
o Unassigned Algorithm ID
This type of Algorithm ID is free for future assignments and MUST NOT be used until an algorithm is officially assigned (see Section 7). In case a router encounters an unassigned algorithm ID in one of the Signature_Blocks of a BGPsec UPDATE message, the router SHOULD process the Signature_Block as an unsupported algorithm as specified in Section 5.2 of [RFC8205].
o Experimentation Algorithm ID
Experimentation algorithm IDs span from 0xF7 (247) to 0xFA (250). To allow experimentation to accurately describe deployment examples, the use of publicly assigned algorithm IDs is inappropriate, and a reserved block of Experimentation algorithm IDs is required. This ensures that experimentation does not clash with assigned algorithm IDs in deployed networks and mitigates the risks to operational integrity of the network through inappropriate use of experimentation to perform literal configuration of routing elements on production systems. A router that encounters an algorithm ID of this type outside of an experimental network SHOULD treat it the same as an unsupported algorithm as specified in Section 5.2 of [RFC8205].
o Documentation Algorithm ID
Documentation algorithm IDs span from 0xFB (251) to 0xFE (254). To allow documentation to accurately describe deployment examples, the use of publicly assigned algorithm IDs is inappropriate, and a reserved block of Documentation algorithm IDs is required. This ensures that documentation does not clash with assigned algorithm IDs in deployed networks and mitigates the risks to operational integrity of the network through inappropriate use of documentation to perform literal configuration of routing elements on production systems. A router that encounters an algorithm ID of this type SHOULD treat it the same as an unsupported algorithm as specified in Section 5.2 of [RFC8205].
Turner & Borchert Standards Track [Page 5]
RFC 8608 BGPsec Algs, Key & Signature Formats June 2019
o The signature algorithm used MUST be the Elliptic Curve Digital Signature Algorithm (ECDSA) with curve P-256 [RFC6090] [DSS].
o The hash algorithm used MUST be SHA-256 [SHS].
Hash algorithms are not identified by themselves in certificates or BGPsec UPDATE messages. They are represented by an OID that combines the hash algorithm with the digital signature algorithm as follows:
o The ecdsa-with-SHA256 OID [RFC5480] MUST appear in the Public-Key Cryptography Standards #10 (PKCS #10) signatureAlgorithm field [RFC2986] or in the Certificate Request Message Format (CRMF) POPOSigningKey algorithm field [RFC4211]; where the OID is placed depends on the certificate request format generated.
o In BGPsec UPDATE messages, the ECDSA with SHA-256 algorithm suite identifier value 0x01 (1) (see Section 7) is included in the Signature_Block List's Algorithm Suite Identifier field.
The key formats used to compute signatures on CA certificates, BGPsec Router Certificates, and CRLs are as specified in Section 3 of [RFC7935]. This section addresses key formats found in the BGPsec Router Certificate requests and in BGPsec Router Certificates.
3.1. Asymmetric Key Pair for Algorithm ID 0x01 (1) - (ECDSA P-256)
The ECDSA private keys used to compute signatures for certificate requests and BGPsec UPDATE messages MUST be associated with the P-256 elliptic curve domain parameters [RFC5480]. The public key pair MUST use the uncompressed form.
The Subject's public key is included in subjectPublicKeyInfo [RFC5280]. It has two sub-fields: algorithm and subjectPublicKey. The values for the structures and their sub-structures follow:
o algorithm (an AlgorithmIdentifier type): The id-ecPublicKey OID MUST be used in the algorithm field, as specified in Section 2.1.1 of [RFC5480]. The value for the associated parameters MUST be secp256r1, as specified in Section 2.1.1.1 of [RFC5480].
Turner & Borchert Standards Track [Page 6]
RFC 8608 BGPsec Algs, Key & Signature Formats June 2019
o subjectPublicKey: ECPoint MUST be used to encode the certificate's subjectPublicKey field, as specified in Section 2.2 of [RFC5480].
The structure for the certificate's and CRL's signature field MUST be as specified in Section 4 of [RFC7935]; this is the same format used by other RPKI certificates. The structure for the certification request's and BGPsec UPDATE message's signature field MUST be as specified in Section 2.2.3 of [RFC3279].
It is anticipated that BGPsec will require the adoption of updated key sizes and a different set of signature and hash algorithms over time, in order to maintain an acceptable level of cryptographic security. This profile should be updated to specify such future requirements, when appropriate.
The recommended procedures to implement such a transition of key sizes and algorithms are specified in [RFC6916].
The security considerations of [RFC3279], [RFC5480], [RFC6090], [RFC7935], and [RFC8209] apply to certificates. The security considerations of [RFC3279], [RFC6090], [RFC7935], and [RFC8209] apply to certification requests. The security considerations of [RFC3279], [RFC6090], and [RFC8205] apply to BGPsec UPDATE messages. No new security considerations are introduced as a result of this specification.
The Internet Assigned Numbers Authority (IANA) has created the "BGPsec Algorithm Suites" registry in the Resource Public Key Infrastructure (RPKI) group. The one-octet algorithm suite identifiers assigned by IANA identify the digest algorithm and signature algorithm used in the BGPsec Signature_Block List's Algorithm Suite Identifier field.
Per [RFC8208], IANA registered a single algorithm suite identifier for the digest algorithm SHA-256 [SHS] and for the signature algorithm ECDSA on the P-256 curve [RFC6090] [DSS]. This identifier
Turner & Borchert Standards Track [Page 7]
RFC 8608 BGPsec Algs, Key & Signature Formats June 2019
is still valid, and IANA has updated the registration to refer to this document.
IANA has modified the range of the "Unassigned" address space from "0x2-0xEF" to "0x02-0xF6":
RFC 8608 BGPsec Algs, Key & Signature Formats June 2019
Future assignments are to be made using the Standards Action process defined in [RFC8126]. Assignments consist of the one-octet algorithm suite identifier value and the associated digest algorithm name and signature algorithm name.
[RFC3279] Bassham, L., Polk, W., and R. Housley, "Algorithms and Identifiers for the Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 3279, DOI 10.17487/RFC3279, April 2002, <https://www.rfc-editor.org/info/rfc3279>.
[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, <https://www.rfc-editor.org/info/rfc5280>.
[DSS] National Institute of Standards and Technology, "Digital Signature Standard (DSS)", NIST FIPS Publication 186-4, DOI 10.6028/NIST.FIPS.186-4, July 2013, <https://nvlpubs.nist.gov/nistpubs/FIPS/ NIST.FIPS.186-4.pdf>.
Turner & Borchert Standards Track [Page 10]
RFC 8608 BGPsec Algs, Key & Signature Formats June 2019
[SHS] National Institute of Standards and Technology, "Secure Hash Standard (SHS)", NIST FIPS Publication 180-4, DOI 10.6028/NIST.FIPS.180-4, August 2015, <https://nvlpubs.nist.gov/nistpubs/FIPS/ NIST.FIPS.180-4.pdf>.
The signature algorithm used in this example is ECDSA P-256, using the algorithm suite identifier ID 0x01 (1) as specified in Section 7 of this document.
For this example, the ECDSA algorithm was provided with a static k to make the result deterministic.
The k used for all signature operations was taken from [RFC6979], Appendix A.2.5, "Signatures With SHA-256, message = 'sample'".
Note: Even though the certificates below are expired, they are still useful within the constraint of this document.
k = A6E3C57DD01ABE90086538398355DD4C 3B17AA873382B0F24D6129493D8AAD60
Keys of AS64496: ================ ski: AB4D910F55CAE71A215EF3CAFE3ACC45B5EEC154
private key: x = D8AA4DFBE2478F86E88A7451BF075565 709C575AC1C136D081C540254CA440B9
public key: Ux = 7391BABB92A0CB3BE10E59B19EBFFB21 4E04A91E0CBA1B139A7D38D90F77E55A Uy = A05B8E695678E0FA16904B55D9D4F5C0 DFC58895EE50BC4F75D205A25BD36FF5
Turner & Borchert Standards Track [Page 12]
RFC 8608 BGPsec Algs, Key & Signature Formats June 2019
Router Key Certificate example using OpenSSL 1.0.1e-fips 11 Feb 2013 -------------------------------------------------------------------- Certificate: Data: Version: 3 (0x2) Serial Number: 38655612 (0x24dd67c) Signature Algorithm: ecdsa-with-SHA256 Issuer: CN=ROUTER-0000FBF0 Validity Not Before: Jan 1 05:00:00 2017 GMT Not After : Jul 1 05:00:00 2018 GMT Subject: CN=ROUTER-0000FBF0 Subject Public Key Info: Public Key Algorithm: id-ecPublicKey Public-Key: (256 bit) pub: 04:73:91:ba:bb:92:a0:cb:3b:e1:0e:59:b1:9e:bf: fb:21:4e:04:a9:1e:0c:ba:1b:13:9a:7d:38:d9:0f: 77:e5:5a:a0:5b:8e:69:56:78:e0:fa:16:90:4b:55: d9:d4:f5:c0:df:c5:88:95:ee:50:bc:4f:75:d2:05: a2:5b:d3:6f:f5 ASN1 OID: prime256v1 X509v3 extensions: X509v3 Key Usage: Digital Signature X509v3 Subject Key Identifier: AB:4D:91:0F:55:CA:E7:1A:21:5E: F3:CA:FE:3A:CC:45:B5:EE:C1:54 X509v3 Extended Key Usage: 1.3.6.1.5.5.7.3.30 sbgp-autonomousSysNum: critical Autonomous System Numbers: 64496 Routing Domain Identifiers: inherit
Keys of AS(65536): ================== ski: 47F23BF1AB2F8A9D26864EBBD8DF2711C74406EC
private key: x = 6CB2E931B112F24554BCDCAAFD9553A9 519A9AF33C023B60846A21FC95583172
public key: Ux = 28FC5FE9AFCF5F4CAB3F5F85CB212FC1 E9D0E0DBEAEE425BD2F0D3175AA0E989 Uy = EA9B603E38F35FB329DF495641F2BA04 0F1C3AC6138307F257CBA6B8B588F41F
Router Key Certificate example using OpenSSL 1.0.1e-fips 11 Feb 2013 -------------------------------------------------------------------- Certificate: Data: Version: 3 (0x2) Serial Number: 3752143940 (0xdfa52c44) Signature Algorithm: ecdsa-with-SHA256 Issuer: CN=ROUTER-00010000 Validity Not Before: Jan 1 05:00:00 2017 GMT Not After : Jul 1 05:00:00 2018 GMT Subject: CN=ROUTER-00010000 Subject Public Key Info: Public Key Algorithm: id-ecPublicKey Public-Key: (256 bit) pub: 04:28:fc:5f:e9:af:cf:5f:4c:ab:3f:5f:85:cb:21: 2f:c1:e9:d0:e0:db:ea:ee:42:5b:d2:f0:d3:17:5a: a0:e9:89:ea:9b:60:3e:38:f3:5f:b3:29:df:49:56: 41:f2:ba:04:0f:1c:3a:c6:13:83:07:f2:57:cb:a6: b8:b5:88:f4:1f ASN1 OID: prime256v1
Turner & Borchert Standards Track [Page 14]
RFC 8608 BGPsec Algs, Key & Signature Formats June 2019
RFC 8608 BGPsec Algs, Key & Signature Formats June 2019
Acknowledgements
The authors wish to thank Geoff Huston and George Michaelson for producing [RFC7935], which this document is entirely based on. The authors would also like to thank Roque Gagliano, David Mandelberg, Tom Petch, Sam Weiler, and Stephen Kent for their reviews and comments. Mehmet Adalier, Kotikalapudi Sriram, and Doug Montgomery were instrumental in developing the test vectors found in Appendix A. Additionally, we want to thank Geoff Huston, author of [RFC5398] from which we borrowed wording for Section 2.1 of this document.
Authors' Addresses
Sean Turner sn3rd
Email: sean@sn3rd.com
Oliver Borchert NIST 100 Bureau Drive Gaithersburg, MD 20899 United States of America