rfc-8635

Router Keying for BGPsec

R. Bush, S. Turner, K. Patel
date2019-08 streamIETF areaops wgsidrops statusPROPOSED STANDARD pages21 canonicalhttps://www.rfc-editor.org/rfc/rfc8635 doi10.17487/RFC8635
BGPsec-speaking routers are provisioned with private keys in order to sign BGPsec announcements. The corresponding public keys are published in the Global Resource Public Key Infrastructure (RPKI), enabling verification of BGPsec messages. This document describes two methods of generating the public-private key pairs: router-driven and operator-driven.

Extracted elements (26)

design-rationale §3

An initial leap of faith is required for both methods because the router has no keying material to protect communications before provisioning. A direct physical connection (craft port) is safer than a network connection because it reduces the risk of a man-in-the-middle attack.

bgp, security

design-rationale §1

The router-driven method mirrors traditional PKI subscriber practices where the private key never leaves trusted storage (e.g., an HSM), providing proof-of-possession to the CA. However, for non-human entities requiring hot-swap continuity, this model does not always work, motivating the operator-driven method.

bgp, pkix, security

design-rationale §1

Two key provisioning methods are defined — router-driven (key generated on-router, private key never leaves trusted storage) and operator-driven (key generated off-router and installed via protected channel). The operator-driven method exists because hot-swapping routers requires the same private key to be installed in a replacement router, minimizing downtime compared to the RPKI propagation delay of a day or longer for a new key.

bgp, pkix, security

interoperability-note §9

For advanced deployments, routers may use preinstalled IEEE 802.1AR manufacturer-driven certificates or Pre-Shared Keys combined with PKI-enrollment protocols such as EST (RFC 7030) or CMC transport (RFC 5273) to authenticate directly to the CA, bypassing the operator as intermediary.

bgp, pkix

interoperability-note §Appendix A

SSH certificates used for the management session are distinct from BGPsec router certificates. SSH session certificates should also provide at least 128-bit security equivalent to the BGPsec keys; x509v3-ecdsa-sha2-nistp256 is suggested for SSH authentication.

bgp, pkix, security

interoperability-note §3, Appendix A

The protected management channel between the management system and router is assumed to be SSH-protected CLI, though NETCONF may also be used. Encryption, integrity, and key-exchange algorithms used SHOULD be of equal or greater strength (128-bit) than the BGPsec keys they protect; minimum recommended algorithms include AES-128, hmac-sha2-256, ecdsa-sha2-nistp256, and ecdh-sha2-nistp256.

bgp, security, pkix

normative-requirement §6.2.1 SHOULD

A private key encapsulated in a PKCS#8 Asymmetric Key Package SHOULD be further encapsulated in CMS SignedData and signed with the operator's EE private key.

bgp, pkix, crypto, security

normative-requirement §11 MUST

All key pairs MUST be generated from a good source of non-deterministic random input per RFC 4086. Mistakes in key-pair generation are for all practical purposes catastrophic because PKIs rely on the pairing of a difficult-to-generate public-private key pair with a signer.

bgp, crypto, security, pkix

normative-requirement §11 MUST

All private keys MUST be protected when at rest in a secure fashion. Disclosure of the private key allows another entity to masquerade as the signer.

bgp, crypto, security, pkix

normative-requirement §9 MUST

For advanced deployment scenarios, an authenticated log of those who have accessed the preinstalled private key material MUST be provided to the operator, or the operator must have guarantees that no one has accessed the private key.

bgp, pkix, security

normative-requirement §10.4 SHOULD

For router replacement scenarios, routers SHOULD allow the private BGPsec key to be inserted via a protected channel (e.g., SSH, NETCONF, SNMP). The router MAY allow the private key to be exported after key generation, but this SHOULD be paired with functionality that sets the key into a permanent non-exportable state.

bgp, pkix, security

normative-requirement §7 SHOULD

The CA SHOULD include the certificate chain below the TA Certificate in the PKCS#7 certs-only message returned to the operator's management station, so the router can validate the router certificate.

bgp, pkix

normative-requirement §11 MUST

The operator MUST ensure that the installed CA certificate is valid. The revocation status of the CA certificate is rarely checked on the router because the router may not have global connectivity or CRL-aware software.

bgp, pkix, security

normative-requirement §8 SHOULD

The router SHOULD extract the certificate from the PKCS#7 certs-only message and verify that the public key corresponds to the stored private key, then verify the certificate chain back to the installed TA Certificate.

bgp, pkix, security

normative-requirement §6.2.1 SHOULD

The router SHOULD verify the signature of the encapsulated PKCS#8 to ensure the returned private key came from the operator. The router SHOULD inform the operator whether the signature validates to a trust anchor.

bgp, pkix, security

normative-requirement §4 RECOMMENDED

Transports used to exchange certificates SHOULD also provide integrity protection, even though certificates are themselves integrity-protected.

bgp, pkix, security

normative-requirement §9 SHOULD

When a PKI-capable router communicates directly with a CA, the communication SHOULD be automatically re-established by the router at future times to renew the certificate automatically when necessary.

bgp, pkix

protocol-element §4

Certificate exchange between operator management stations, routers, and the RPKI uses PKCS#7 certs-only messages (RFC 8551). Three transport options are enumerated: application/pkcs10 + pkcs7-mime media types, FTP/HTTP per RFC 2585, or EST per RFC 7030.

bgp, pkix

protocol-element §6.2.1

Private keys are transferred to routers using PKCS#8 Asymmetric Key Package (RFC 5958), optionally wrapped in CMS SignedData (RFC 5652) and signed by the operator's EE private key to provide provenance.

bgp, pkix, crypto

protocol-element §5

The operator configures the router with an AS number and BGP Identifier (RFC 6286) to be used in the generated router certificate. In cases where unique per-router certificates are not used, a BGP Identifier of 0 MAY be used.

bgp, pkix

protocol-element §6

The PKCS#10 certification request (CSR) is the primary artifact exchanged between the router/operator and the CA. It does not include the AS number or BGP Identifier; these must be transmitted separately by the operator when sending the CSR to the CA.

bgp, pkix

protocol-element §Appendix B

The router certificate's subject name is 'ROUTER-' followed by the AS number, and the serial number is the 32-bit BGP Identifier. These fields are not contained in the PKCS#10 and must be communicated by the operator to the CA separately.

bgp, pkix

security-consideration §10.3

Key revocation requires placing the BGPsec certificate on the CA's CRL, re-keying the router's certificate, and deciding whether to keep the router operational with the compromised key or bring it offline. Routers supporting multiple simultaneous private keys facilitate revocation by allowing a spare key to become operational before the compromised key is revoked.

bgp, pkix, security

security-consideration §10.1, Appendix B

Operators must track certificate expiry times and renew certificates at least one week before the notAfter date. Multiple operators should be notified as expiry approaches to prevent a single operator's forgetfulness from affecting the organization's BGPsec operation.

bgp, pkix, security

security-consideration §11 RECOMMENDED

Transport security for private keys is strongly RECOMMENDED, with transport security strength SHOULD be at least as good as the BGPsec key strength. Transmitting a private key in the clear or with a known-broken algorithm undermines the entire PKI trust model and enables impersonation of the BGPsec signer.

bgp, security, pkix, crypto

state-machine §5–8

Key provisioning workflow: (1) establish protected channel and install TA certificate, (2) generate key pair via router-driven or operator-driven method producing a PKCS#10 CSR, (3) operator sends CSR with AS number and BGP Identifier to CA, (4) CA certifies and publishes to RPKI and returns PKCS#7, (5) operator installs PKCS#7 into router over protected channel.

bgp, pkix