RPKI algorithms: The Profile for Algorithms and Key Sizes for Use in the Resource Public Key Infrastructure (RPKI)
Cryptographic algorithms and key sizes for RPKI
Huston, G., "The Profile for Algorithms and Key Sizes for Use in the Resource Public Key Infrastructure (RPKI)", RFC 6485, DOI 10.17487/RFC6485, February 2012, <https://www.rfc-editor.org/info/rfc6485>.
@misc{rfc6485,
series = {Request for Comments},
number = 6485,
howpublished = {RFC 6485},
publisher = {RFC Editor},
doi = {10.17487/RFC6485},
url = {https://www.rfc-editor.org/info/rfc6485},
author = {G. Huston},
title = {{The Profile for Algorithms and Key Sizes for Use in the Resource Public Key Infrastructure (RPKI)}},
pagetotal = 6,
year = 2012,
month = feb,
} RFC text
Contents
Internet Engineering Task Force (IETF) G. Huston
Request for Comments: 6485 APNIC
Category: Standards Track February 2012
ISSN: 2070-1721
The Profile for Algorithms and Key Sizes for
Use in the Resource Public Key Infrastructure (RPKI)
Abstract
This document specifies the algorithms, algorithms' parameters,
asymmetric key formats, asymmetric key size, and signature format for
the Resource Public Key Infrastructure (RPKI) subscribers that
generate digital signatures on certificates, Certificate Revocation
Lists, and signed objects as well as for the relying parties (RPs)
that verify these digital 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 5741.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc6485.
Copyright Notice
Copyright (c) 2012 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
(http://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.
1. Introduction
This document specifies:
* the digital signature algorithm and parameters;
* the hash algorithm and parameters;
* the public and private key formats; and,
* the signature format
used by Resource Public Key Infrastructure (RPKI) subscribers when
they apply digital signatures to certificates, Certificate Revocation
Lists (CRLs), and signed objects (e.g., Route Origin Authorizations
(ROAs) and manifests). Relying parties (RPs) also use the algorithms
defined in this document to verify RPKI subscribers' digital
signatures [RFC6480].
This document is referenced by other RPKI profiles and
specifications, including the RPKI Certificate Policy (CP) [RFC6484],
the RPKI Certificate Profile [RFC6487], the SIDR Architecture
[RFC6480], and the Signed Object Template for the RPKI [RFC6488].
Familiarity with these documents is assumed.
1.1. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119].
2. Algorithms
Two cryptographic algorithms are used in the RPKI:
* The signature algorithm used in certificates, CRLs, and signed
objects is RSA Public-Key Cryptography Standards (PKCS) #1
Version 1.5 (sometimes referred to as "RSASSA-PKCS1-v1_5") from
Section 5 of [RFC4055].
* The hashing algorithm used in certificates, CRLs, and signed
objects is SHA-256 [SHS]. The hashing algorithm is not
identified by itself when used in certificates and CRLs, as
they are combined with the digital signature algorithm (see
below).
When used in the Cryptographic Message Syntax (CMS) SignedData,
the hash algorithm (in this case, the hash algorithm is
sometimes called a message digest algorithm) is identified by
itself. For CMS SignedData, the object identifier and
parameters for SHA-256 (as defined in [RFC5754]) MUST be used
when populating the digestAlgorithms and digestAlgorithm
fields.
NOTE: The exception to the above hashing algorithm is the use
of SHA-1 [SHS] when Certification Authorities (CAs) generate
authority and subject key identifiers [RFC6487].
When used to generate and verify digital signatures the hash and
digital signature algorithms are referred together, i.e., "RSA PKCS#1
v1.5 with SHA-256" or more simply "RSA with SHA-256". The Object
Identifier (OID) sha256withRSAEncryption from [RFC4055] MUST be used.
Locations for this OID are as follows:
In the certificate, the OID appears in the signature and
signatureAlgorithm fields [RFC4055];
In the CRL, the OID appears in the signatureAlgorithm field
[RFC4055];
In CMS SignedData, the OID appears in each SignerInfo
signatureAlgoithm field [RFC3370] using the OID from above; and,
In a certification request, the OID appears in the PKCS #10
signatureAlgorithm field [RFC2986] or in the Certificate Request
Message Format (CRMF) POPOSigningKey signature field [RFC4211].
3. Asymmetric Key Pair Formats
The RSA key pairs used to compute the signatures MUST have a 2048-bit
modulus and a public exponent (e) of 65,537.
3.1. Public Key Format
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:
algorithm (which is an AlgorithmIdentifier type):
The object identifier for RSA PKCS#1 v1.5 with SHA-256 MUST be
used in the algorithm field, as specified in Section 5 of
[RFC4055]. The value for the associated parameters from that
clause MUST also be used for the parameters field.
subjectPublicKey:
RSAPublicKey MUST be used to encode the certificate's
subjectPublicKey field, as specified in [RFC4055].
3.2. Private Key Format
Local policy determines the private key format.
4. Signature Format
The structure for the certificate's signature field is as specified
in Section 1.2 of [RFC4055]. The structure for the CMS SignedData's
signature field is as specified in [RFC3370].
5. Additional Requirements
It is anticipated that the RPKI 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 to protect the integrity of signed products in the RPKI.
This profile should be replaced to specify such future requirements,
as and when appropriate.
CAs and RPs SHOULD be capable of supporting a transition to allow for
the phased introduction of additional encryption algorithms and key
specifications, and also accommodate the orderly deprecation of
previously specified algorithms and keys. Accordingly, CAs and RPs
SHOULD be capable of supporting multiple RPKI algorithm and key
profiles simultaneously within the scope of such anticipated
transitions. The recommended procedures to implement such a
transition of key sizes and algorithms is not specified in this
document.
6. Security Considerations
The Security Considerations of [RFC4055], [RFC5280], and [RFC6487]
apply to certificates and CRLs. The Security Considerations of
[RFC5754] apply to signed objects. No new security threats are
introduced as a result of this specification.
7. Acknowledgments
The author acknowledges the reuse in this document of material
originally contained in working drafts of the RPKI Certificate Policy
[RFC6484] and the resource certificate profile [RFC6487] documents.
The co-authors of these two documents, namely Stephen Kent, Derrick
Kong, Karen Seo, Ronald Watro, George Michaelson, and Robert Loomans,
are acknowledged, with thanks. The constraint on key size noted in
this profile is the outcome of comments from Stephen Kent and review
comments from David Cooper. Sean Turner has provided additional
review input to this document.
9. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2986] Nystrom, M. and B. Kaliski, "PKCS #10: Certification
Request Syntax Specification Version 1.7", RFC 2986,
November 2000.
[RFC3370] Housley, R., "Cryptographic Message Syntax (CMS)
Algorithms", RFC 3370, August 2002.
[RFC4055] Schaad, J., Kaliski, B., and R. Housley, "Additional
Algorithms and Identifiers for RSA Cryptography for use in
the Internet X.509 Public Key Infrastructure Certificate
and Certificate Revocation List (CRL) Profile", RFC 4055,
June 2005.
[RFC4211] Schaad, J., "Internet X.509 Public Key Infrastructure
Certificate Request Message Format (CRMF)", RFC 4211,
September 2005.
[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, May 2008.
[RFC5754] Turner, S., "Using SHA2 Algorithms with Cryptographic
Message Syntax", RFC 5754, January 2010.
[RFC6480] Lepinski, M. and S. Kent, "An Infrastructure to Support
Secure Internet Routing", RFC 6480, February 2012.
[RFC6484] Kent, S., Kong, D., Seo, K., and R. Watro, "Certificate
Policy (CP) for the Resource Public Key Infrastructure
(RPKI)", BCP 173, RFC 6484, February 2012.
[RFC6487] Husotn, G., Michaelson, G., and R. Loomans, "A Profile for
X.509 PKIX Resource Certificates", RFC 6487, February
2012.
[RFC6488] Lepinski, M., Chi, A., and S. Kent, "Signed Object
Template for the Resource Public Key Infrastructure
(RPKI)", RFC 6488, February 2012.
[SHS] National Institute of Standards and Technology (NIST),
"FIPS Publication 180-3: Secure Hash Standard (SHS)", FIPS
Publication 180-3, October 2008.
Author's Address
Geoff Huston
APNIC
EMail: gih@apnic.net
AI ELI5
On this page
§1Introduction
RFC 6485 specifies the cryptographic algorithms, key formats, key sizes, and signature formats used throughout the Resource Public Key Infrastructure (RPKI). RPKI is the public key infrastructure for validating the authenticity and authorization of Internet routing information, particularly for BGP route origin authorizations and IP address allocations.
This specification applies to all RPKI subscribers who generate digital signatures on certificates, Certificate Revocation Lists (CRLs), and signed objects such as Route Origin Authorizations (ROAs) and manifests. It also applies to relying parties who must verify these signatures. The document is referenced by other RPKI specifications including the RPKI Certificate Policy (RFC 6484), the RPKI Certificate Profile (RFC 6487), and the SIDR Architecture (RFC 6480).
RPKI is the system that checks if a company really owns an IP address or can tell routers where traffic should go. Everyone doing this checking needs to use the same lock design so it works everywhere.
§2Signature and Hash Algorithms
RPKI uses a single mandatory cryptographic approach: RSA PKCS #1 v1.5 signatures combined with SHA-256 hashing. When referenced together, this combination is termed "RSA with SHA-256." The Object Identifier (OID) sha256withRSAEncryption from RFC 4055 must be used in all RPKI cryptographic operations.
The SHA-256 hash algorithm appears in different locations depending on the context. In certificates and CRLs, SHA-256 is implicitly combined with the signature algorithm. In Cryptographic Message Syntax (CMS) SignedData structures, SHA-256 is identified separately using the OID and parameters defined in RFC 5754. One exception to SHA-256 usage is the generation of authority and subject key identifiers in certificates, which uses SHA-1 for historical compatibility as specified in RFC 6487.
The OID sha256withRSAEncryption appears in specific fields of different structures: the signature and signatureAlgorithm fields of certificates, the signatureAlgorithm field of CRLs, the signatureAlgorithm field of CMS SignerInfo, and the signature field of PKCS #10 certification requests or CRMF Certificate Request Message Format requests.
Everyone locks things with RSA keys and checks for tampering with SHA-256. This combination is called RSA with SHA-256. It appears in different parts of different documents depending on what they are.
§3Asymmetric Keys and Key Pair Formats
All RPKI cryptographic operations use RSA key pairs with precisely specified parameters. The RSA modulus must be exactly 2048 bits long, and the public exponent must be 65537 (a value commonly written as 0x10001 in hexadecimal). These parameters are chosen for security and compatibility: 2048-bit keys provide adequate security for signing infrastructure, and the public exponent 65537 is a widely supported standard value.
The public key is encoded in the subjectPublicKeyInfo structure as defined in RFC 5280. This structure contains an algorithm field identifying the key type and an RSAPublicKey field containing the actual public key material. For the algorithm field, the object identifier for RSA PKCS #1 v1.5 with SHA-256 and its associated parameters (as specified in RFC 4055) must be used.
The format of private keys is determined by local policy and is not specified by RFC 6485. Different RPKI implementations may use different private key storage formats, as long as the corresponding public key and signatures conform to the requirements above.
RSA keys must be 2048 bits long and use the standard public exponent 65537. How you store your private key is up to you, but the public part must follow these exact rules.
§4Signature Encoding Formats
The structure for encoding signatures varies slightly depending on the context. In certificates, signatures are encoded as specified in Section 1.2 of RFC 4055. In CMS SignedData structures, signatures are encoded as specified in RFC 3370, which defines how PKCS #1 v1.5 signatures appear within the broader CMS framework.
These encoding specifications ensure that all RPKI implementations produce and consume signatures in a compatible format. By using standard, well-defined encoding rules, RPKI achieves interoperability: a signature generated by one implementation can be verified by any other implementation following these standards.
Signatures are written in a standard format that everyone understands. There are slightly different formats for different document types, but they all mean the same thing.
§5Future Algorithm Evolution
RFC 6485 explicitly anticipates that RPKI will eventually need to adopt stronger cryptographic algorithms and larger key sizes as computational power increases and security standards evolve. The specification notes that this profile should be replaced with updated requirements when necessary to maintain adequate cryptographic security for protecting the integrity of RPKI signed products.
To facilitate a smooth transition to stronger algorithms in the future, both CAs and relying parties should design their systems to support multiple RPKI algorithm profiles simultaneously. This capability allows for a phased, orderly transition where older algorithms are gradually deprecated while new algorithms are introduced. Organizations implementing RPKI systems should plan for the eventual need to migrate away from 2048-bit RSA and SHA-256 to stronger alternatives when this RFC is updated.
As computers get faster, locks need to get stronger. In the future, RPKI will probably switch to bigger keys and harder locks. Right now, systems should be ready to use more than one kind of lock at the same time, to make switching easier later.