<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent" [
<!ENTITY rfc2629 PUBLIC "" "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2629.xml">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF" category="info" consensus="yes" number="8488" ipr="trust200902" obsoletes="" updates="" xml:lang="en" version="3">
  <!-- xml2rfc v2v3 conversion 2.17.2 -->
  <front>
    <title abbrev="RPKI Tree Validation">RIPE NCC's Implementation of Resource
      Public Key Infrastructure (RPKI) Certificate Tree Validation</title>
    <seriesInfo name="RFC" value="8488"/>
    <author fullname="Oleg Muravskiy" initials="O." surname="Muravskiy">
      <organization>RIPE NCC</organization>
      <address>
        <email>oleg@ripe.net</email>
        <uri>https://www.ripe.net/</uri>
      </address>
    </author>
    <author initials="T." surname="Bruijnzeels" fullname="Tim Bruijnzeels">
      <organization>NLNetLabs</organization>
      <address>
        <email>tim@nlnetlabs.nl</email>
        <uri>https://www.nlnetlabs.nl/</uri>
      </address>
    </author>
    <date month="December" year="2018"/>
    <area>rtg</area>
    <workgroup>SIDR Operations</workgroup>
    <keyword>RPKI</keyword>
    <keyword>validation</keyword>
    <keyword>RRDP</keyword>
    <abstract>
      <t>This document describes an approach to validating the content
      of the Resource Public Key Infrastructure (RPKI) certificate tree, as it is implemented in the RIPE
      NCC RPKI Validator. This approach is independent of a particular
      object retrieval mechanism, which allows it to be used with
      repositories available over the rsync protocol, the RPKI
      Repository Delta Protocol (RRDP), and repositories that use a mix of
      both.
      </t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
      <t>This document describes how the RIPE NCC RPKI Validator version 2.25
        has been implemented. Source code for this software can be found at
        <xref target="rpki-validator" format="default"/>. The purpose of this document is to
        provide transparency to users of (and contributors to) this software
        tool.
      </t>
      <t>In order to use information published in RPKI repositories,
      Relying Parties (RPs) need to retrieve and validate the content
      of certificates, Certificate Revocation Lists (CRLs), and other
      RPKI signed objects. To validate a particular object, one must
      ensure that all certificates in the certificate chain up to the
      Trust Anchor (TA) are valid. Therefore, the validation of a
      certificate tree is performed top-down, starting from the TA
      certificate and descending the certificate chain,
      validating every encountered certificate and its products. The
      result of this process is a list of all encountered RPKI objects
      with a validity status attached to each of them. These results
      may later be used by an RP in making routing
      decisions, etc.
      </t>
      <t>Traditionally, RPKI data is made available to RPs through the
      repositories <xref target="RFC6481" format="default"/> accessible over the rsync protocol <xref target="rsync" format="default"/>. RPs are advised to keep
      a local copy of repository data and perform regular updates of
      this copy from the repository (see Section 5 of <xref target="RFC6481" format="default"/>). The RRDP <xref target="RFC8182" format="default"/> introduces another method to fetch
      repository data and keep the local copy up to date with the
      repository.
      </t>
      <t>This document describes how the RIPE NCC RPKI Validator discovers RPKI objects to download, builds certificate
        paths, and validates RPKI objects, independently of what repository access protocol is used. To achieve this,
        it puts downloaded RPKI objects in an object store, where each RPKI
        object can be found by its URI, the hash of its content, the value of its
        Authority Key Identifier (AKI) extension, or a combination of these. It
        also keeps track of the download and validation time for every
        object, to decide which locally stored objects are not used in the
        RPKI tree validation and could be removed.
      </t>
    </section>
    <section numbered="true" toc="default">
      <name>General Considerations</name>
      <section numbered="true" toc="default">
        <name>Hash Comparisons</name>
        <t>This algorithm relies on the collision resistance properties of the
          hash algorithm (defined in <xref target="RFC7935" format="default"/>) to compute the hash of
          repository objects. It assumes that any two objects for which the hash
          value is the same are identical.
        </t>
        <t>The hash comparison is used when matching objects in the repository
          with entries on the manifest (<xref target="mft-entries-val" format="default"/>) and
          when looking up objects in the object store (<xref target="store" format="default"/>).
        </t>
      </section>
      <section numbered="true" toc="default">
        <name>Discovery of RPKI Objects Issued by a CA</name>
        <t>There are several possible ways of discovering potential products of
          a Certification Authority (CA) certificate: one could 1) use all objects located in a repository
          directory designated as a publication point for a CA,  2) only use objects
          mentioned on the manifest located at that publication point (see
          Section 6 of <xref target="RFC6486" format="default"/>), or 3) use all known repository
          objects whose AKI extension matches the Subject Key Identifier (SKI)
          extension (Section 4.2.1 of <xref target="RFC5280" format="default"/>) of a CA
          certificate.
        </t>
        <t>For publication points whose content is consistent with the manifest
          and issuing certificate, all of these approaches should produce the
          same result. For inconsistent publication points, the results might be
          different. Section 6 of <xref target="RFC6486" format="default"/>
          leaves the decision on how to deal with inconsistencies to a local
          policy.
        </t>
        <t>The implementation described here does not rely on content of
          repository directories but uses the Authority Key Identifier (AKI)
          extension of a manifest and a CRL to
          find in an object store (<xref target="store" format="default"/>) a manifest and a CRL
          issued by a particular CA (see <xref target="findRecentValidMftWithCrl" format="default"/>). It further uses the hashes
          of the manifest's fileList entries (Section 4.2.1 of <xref target="RFC6486" format="default"/>) to find other objects issued by the CA, as
          described in <xref target="mft-entries-val" format="default"/>.
        </t>
      </section>
      <section numbered="true" toc="default">
        <name>Manifest Entries versus Repository Content</name>
        <t>Since the current set of RPKI standards (see <xref target="RFC6481" format="default"/>, <xref target="RFC6486" format="default"/>, and <xref target="RFC6487" format="default"/>) requires use of the manifest <xref target="RFC6486" format="default"/>
          to describe the content of a publication point, this implementation
          requires strict consistency between the publication point content and
          manifest content. (This is a more stringent requirement than
          established in <xref target="RFC6486" format="default"/>.) Therefore, it will not
          process objects that are found in the publication point but do not
          match any of the entries of that publication point's manifest (see
          <xref target="mft-entries-val" format="default"/>). It will also issue warnings for
          all found mismatches, so that the responsible operators could be made
          aware of inconsistencies and fix them.
        </t>
      </section>
    </section>
    <section anchor="top-down-validation" numbered="true" toc="default">
      <name>Top-Down Validation of a Single Trust Anchor Certificate Tree</name>
      <t>When several Trust Anchors are configured, validation of their
        corresponding certificate trees is performed concurrently and
        independently from each other. For every configured Trust Anchor, the
        following steps are performed:
      </t>
      <ol spacing="normal" type="1">
        <li>The validation of a TA certificate tree starts from
            its TA certificate. To retrieve the TA certificate, a Trust Anchor
            Locator (TAL) object is used, as described in <xref target="ta-fetch" format="default"/>.
          </li>
        <li>If the TA certificate is retrieved, it is validated according to
            Section 7 of <xref target="RFC6487" format="default"/>
            and Section 2.2 of <xref target="RFC7730" format="default"/>. Otherwise, the
            validation of the certificate tree is aborted and an error is issued.
          </li>
        <li>If the TA certificate is valid, then all its subordinate objects
            are validated as described in
            <xref target="ca-cert-validation" format="default"/>. Otherwise, the validation of
            the certificate tree is aborted and an error is issued.
          </li>
        <li>For each repository object that was validated during this
            validation run, the validation timestamp is updated in the object
            store (see <xref target="store-validation-time" format="default"/>).
          </li>
        <li>Outdated objects are removed from the store as described in <xref target="store-cleanup" format="default"/>. This completes the validation of the
            TA certificate tree.
          </li>
      </ol>
      <section anchor="ta-fetch" numbered="true" toc="default">
        <name>Fetching the Trust Anchor Certificate Using the Trust Anchor Locator</name>
        <t>The following steps are performed in order to fetch a Trust Anchor
          certificate:
        </t>
        <ol spacing="normal" type="1">
          <li>(Optional) If the TAL contains a prefetch.uris
              field, pass the URIs contained in that field to the fetcher (see
              <xref target="fetch-repo" format="default"/>). (This field is a non-standard
              addition to the TAL format. It helps with fetching non-hierarchical
              rsync repositories more efficiently.)
            </li>
          <li>Extract the first TA certificate URI from the TAL's URI section
              (see
              Section 2.1 of <xref target="RFC7730" format="default"/>) and pass it to the
              object fetcher (<xref target="fetch-object" format="default"/>). If the fetcher
              returns an error, repeat this step for every URI in the URI
              section until no error is encountered or no more URIs are left.
            </li>
          <li>From the object store (see <xref target="store-get-cer-by-uri" format="default"/>), retrieve all certificate objects
            for which the URI matches the URI extracted from the TAL
            in the previous step and the public key matches the
            subjectPublicKeyInfo extension of the TAL (see Section 2.1
            of <xref target="RFC7730" format="default"/>).
            </li>
          <li>If no such objects are found or if more than one such objects are found, issue an error
              and abort the certificate tree validation process with an error.
              Otherwise, use the single found object as the TA
              certificate.
            </li>
        </ol>
      </section>
      <section anchor="ca-cert-validation" numbered="true" toc="default">
        <name>CA Certificate Validation</name>
        <t>The following steps describe the validation of a single CA resource
          certificate:
        </t>
        <ol spacing="normal" type="1">
          <li>If both the caRepository (Section 4.8.8.1 of <xref target="RFC6487" format="default"/>) and the id-ad-rpkiNotify (Section 3.2 of <xref target="RFC8182" format="default"/>) instances of an accessMethod are present in
              the Subject Information Access extension of the CA certificate,
              use a local policy
              to determine which pointer to use. Extract the URI from the
              selected pointer and pass it to the object fetcher (that will
              then fetch all objects available from that repository; see
              <xref target="fetch-repo" format="default"/>).
            </li>
          <li>For the CA certificate, find the current manifest and certificate
              revocation list (CRL) using the
              procedure described in <xref target="findRecentValidMftWithCrl" format="default"/>. If no such manifest and CRL could be
              found, stop validation of this certificate, consider it invalid,
              and issue an error.
            </li>
          <li>Compare the URI found in the id-ad-rpkiManifest field (Section
              4.8.8.1 of
              <xref target="RFC6487" format="default"/>) of the SIA extension of the certificate
              with the URI of the manifest found in the previous step. If they
              are different, issue a warning but continue the validation
              process using the manifest found in the previous step. (This warning indicates
              that there is a mismatch between the expected and the
              actual location of an object in a repository. See
              <xref target="mft-dir-mismatch" format="default"/>
              for the explanation of this mismatch and the decision made.)
            </li>
          <li>Perform discovery and validation of manifest entries as described in
              <xref target="mft-entries-val" format="default"/>.
            </li>
          <li>
            <t>Validate all resource certificate objects found on the manifest using the CRL object:
            </t>
            <ul spacing="normal">
              <li>If the strict validation option is enabled by the operator,
                  the validation is performed according to Section 7 of <xref target="RFC6487" format="default"/>.
                </li>
              <li>Otherwise, the validation is performed according to Section 7
                  of <xref target="RFC6487" format="default"/> but with the exception of the
                  resource certification path validation, which is performed
                  according to Section 4.2.4.4 of <xref target="RFC8360" format="default"/>.
                </li>
            </ul>
            <t>
              (Note that this implementation uses the operator configuration to
              decide which algorithm to use for path validation. It applies
              the selected algorithm to all resource certificates, rather than
              applying an appropriate algorithm per resource certificate based on
              the object identifier (OID) for the Certificate Policy found in
              that certificate, as specified in <xref target="RFC8360" format="default"/>.)
            </t>
          </li>
          <li>Validate all Route Origin Authorization (ROA) objects found on
              the manifest using the CRL object found on the manifest, according to
              Section 4 of <xref target="RFC6482" format="default"/>.
            </li>
          <li>Validate all Ghostbusters Record objects found on the manifest using the CRL object found on the
              manifest, according to Section 7 of <xref target="RFC6493" format="default"/>.
            </li>
          <li>For every valid CA certificate object found on the manifest,
              apply the procedure described in
              this section,
              recursively, provided that this CA certificate (identified by its
              SKI) has not yet been validated during current tree validation
              run.
            </li>
        </ol>
        <section anchor="findRecentValidMftWithCrl" numbered="true" toc="default">
          <name>Finding the Most Recent Valid Manifest and CRL</name>
          <t>To find the most recent issued manifest and CRL objects of a
            particular CA certificate, the following steps are performed:
          </t>
          <ol spacing="normal" type="1">
            <li>From the store (see <xref target="store-get-mft-by-aki" format="default"/>), fetch all objects of type
                manifest whose certificate's AKI extension matches the SKI of the
                current CA certificate. If no such objects are found, stop
                processing the current CA certificate and issue an error.
              </li>
            <li>
              <t>Among found objects, find the manifest object with the highest
                manifestNumber field (Section 4.2.1 of <xref target="RFC6486" format="default"/>) for which all following conditions are
                met:
              </t>
              <ul spacing="normal">
                <li>There is only one entry in the manifest for which the store
                    contains exactly one object of type CRL, the hash of which
                    matches the hash of the entry.
                  </li>
                <li>The manifest's certificate AKI equals the above CRL's AKI.
                  </li>
                <li>The above CRL is a valid object according to Section 6.3 of
                    <xref target="RFC5280" format="default"/>.
                  </li>
                <li>The manifest is a valid object according to Section 4.4 of
                    <xref target="RFC6486" format="default"/>, and its EE certificate is not in
                    the CRL found above.
                  </li>
              </ul>
            </li>
            <li>If there is an object that matches the above criteria, consider
                this object to be the valid manifest, and consider the CRL found
                at the previous step to be the valid CRL for the current CA
                certificate's publication point.
              </li>
            <li>Report an error for every other manifest with a number higher
                than the number of the valid manifest.
              </li>
          </ol>
        </section>
        <section anchor="mft-entries-val" numbered="true" toc="default">
          <name>Validating Manifest Entries</name>
          <t>
            For every entry in the manifest object:
          </t>
          <ol spacing="normal" type="1">
            <li>Construct an entry's URI by appending the entry name to the current CA's publication point URI.</li>
            <li>Get all objects from the store whose hash attribute equals the entry's hash (see
                <xref target="store-get-by-hash" format="default"/>).
              </li>
            <li>If no such objects are found, issue an error for this manifest
                entry and progress to the next entry. This case indicates that
                the repository does not have an object at the location listed in
                the manifest or that the object's hash does not match the hash
                listed in the manifest.
              </li>
            <li>
              <t>For every found object, compare its URI with the URI of the
                manifest entry.
              </t>
              <ul spacing="normal">
                <li>For every object with a non-matching URI, issue a warning.
                    This case indicates that the object from the manifest entry
                    is (also) found at a different location in a (possibly
                    different) repository.
                  </li>
                <li>If no objects with a matching URI are found, issue a
                    warning. This case indicates that there is no object found
                    in the repository at the location listed in the manifest
                    entry (but there is at least one matching object found at a
                    different location).
                  </li>
              </ul>
            </li>
            <li>Use all found objects for further validation as per <xref target="ca-cert-validation" format="default"/>.</li>
          </ol>
          <t>Please note that the above steps will not reject objects whose hash
            matches the hash listed in the manifest but whose URI does not.
            See <xref target="mft-dir-mismatch" format="default"/> for additional
            information.
          </t>
        </section>
      </section>
      <section anchor="store-cleanup" numbered="true" toc="default">
        <name>Object Store Cleanup</name>
        <t>At the end of every TA tree validation, some objects are removed from
          the store using the following rules:
        </t>
        <ol spacing="normal" type="1">
          <li>Given all objects that were encountered during the current
              validation run, remove from the store (<xref target="store-delete-other" format="default"/>) all objects whose URI
              attribute matches the URI of one of the encountered objects but
              whose content's hash does not match the hash of any of the
              encountered objects. This removes from the store objects that were
              replaced in the repository by their newer versions with the same
              URIs.
            </li>
          <li>Remove from the store all objects that were last encountered
              during validation a long time ago (as specified by the local
              policy). This removes objects that do not appear on any valid
              manifest anymore (but possibly are still published in a
              repository).
            </li>
          <li>Remove from the store all objects that were downloaded recently
              (as specified by the local policy) but that have never been used in
              the validation process. This removes objects that have never
              appeared on any valid manifest.
            </li>
        </ol>
        <t>Shortening the time interval used in step 2 will free more disk space
          used by the store, at the expense of downloading removed objects again
          if they are still published in the repository.
        </t>
        <t>Extending the time interval used in step 3 will prevent repeated
          downloads of unused repository objects. However, it will also extend
          the interval at which unused objects are removed. This creates a risk
          that such objects will fill up all available disk space if a large enough
          amount of such objects is published in the repository (either by
          mistake or with a malicious intent).
        </t>
      </section>
    </section>
    <section anchor="fetcher" numbered="true" toc="default">
      <name>Remote Objects Fetcher</name>
      <t>The fetcher is responsible for downloading objects from remote repositories (described in Section 3
        of <xref target="RFC6481" format="default"/>) using the rsync protocol <xref target="rsync" format="default"/> or RRDP <xref target="RFC8182" format="default"/>.
      </t>
      <section numbered="true" toc="default">
        <name>Fetcher Operations</name>
        <t>For every visited URI, the fetcher keeps track of the last time a
          successful fetch occurred.
        </t>
        <section anchor="fetch-repo" numbered="true" toc="default">
          <name>Fetch Repository Objects</name>
          <t>This operation receives one parameter -- a URI. For an rsync
            repository, this URI points to a directory. For an RRDP repository, it
            points to the repository's notification file.
          </t>
          <t>The fetcher follows these steps:

          </t>
          <ol spacing="normal" type="1">
            <li>If data associated with the URI has been downloaded recently
                (as specified by the local policy), skip the following steps.
              </li>
            <li>Download remote objects using the URI provided (for an rsync
                repository, use recursive mode). If the URI contains the 
                "https" schema and download has failed, issue a warning, replace
                the "https" schema in the URI with "http", and try to download objects
                again using the resulting URI.
              </li>
            <li>If remote objects cannot be downloaded, issue an error and
                skip the following steps.
              </li>
            <li>Perform syntactic verification of fetched objects. The type of
                every object (certificate, manifest, CRL, ROA, or Ghostbusters
                Record) is determined based on the object's filename extension
                (.cer, .mft, .crl, .roa, and .gbr, respectively). The syntax of
                the object is described in Section 4 of
                <xref target="RFC6487" format="default"/>
                for resource certificates, step 1 of Section 3 of
                <xref target="RFC6488" format="default"/>
                for signed objects, Section 4 of
                <xref target="RFC6486" format="default"/>
                for manifests,
                <xref target="RFC5280" format="default"/>
                for CRLs, Section 3 of
                <xref target="RFC6482" format="default"/>
                for ROAs, and Section 5 of
                <xref target="RFC6493" format="default"/>
                for Ghostbusters Records.
              </li>
            <li>Put every downloaded and syntactically correct object in the
                object store (<xref target="store-object" format="default"/>).
              </li>
          </ol>
          <t>The time interval used in step 1 should be chosen based on the
            acceptable delay in receiving repository updates.
          </t>
        </section>
        <section anchor="fetch-object" numbered="true" toc="default">
          <name>Fetch Single Repository Object</name>
          <t>This operation receives one parameter -- a URI that points to an object in a repository.</t>
          <t>The fetcher follows these steps:
          </t>
          <ol spacing="normal" type="1">
            <li>Download a remote object using the URI provided. If the URI
                contains the "https" schema and download failed, issue a warning,
                replace the "https" schema in the URI with "http", and try to download
                the object using the resulting URI.
              </li>
            <li>If the remote object cannot be downloaded, issue an error
                and skip the following steps.</li>
            <li>Perform syntactic verification of the fetched object. The type of
                object (certificate, manifest, CRL, ROA, or Ghostbusters
                Record) is determined based on the object's filename extension
                (.cer, .mft, .crl, .roa, and .gbr, respectively). The syntax of
                the object is described in Section 4 of
                <xref target="RFC6487" format="default"/>
                for resource certificates, step 1 of Section 3 of
                <xref target="RFC6488" format="default"/>
                for signed objects, Section 4 of
                <xref target="RFC6486" format="default"/>
                for manifests,
                <xref target="RFC5280" format="default"/>
                for CRLs, Section 3 of
                <xref target="RFC6482" format="default"/>
                for ROAs, and Section 5 of
                <xref target="RFC6493" format="default"/>
                for Ghostbusters Records.
              </li>
            <li>If the downloaded object is not syntactically correct, issue an
                error and skip further steps.
              </li>
            <li>Delete all objects from the object store (<xref target="store-delete-by-uri" format="default"/>) whose URI matches
                the URI given.</li>
            <li>Put the downloaded object in the object store (<xref target="store-object" format="default"/>).
              </li>
          </ol>
        </section>
      </section>
    </section>
    <section anchor="store" numbered="true" toc="default">
      <name>Local Object Store</name>
      <section anchor="store-operations" numbered="true" toc="default">
        <name>Store Operations</name>
        <section anchor="store-object" numbered="true" toc="default">
          <name>Store Repository Object</name>
          <t>Put the given object in the store if there is no record with the
            same hash and URI fields. Note
            that in the (unlikely) event of hash collision, the given object will
            not replace the object in the store.
          </t>
        </section>
        <section anchor="store-get-by-hash" numbered="true" toc="default">
          <name>Get Objects by Hash</name>
          <t>Retrieve all objects from the store whose hash attribute
          matches the given hash.
          </t>
        </section>
        <section anchor="store-get-cer-by-uri" numbered="true" toc="default">
          <name>Get Certificate Objects by URI</name>
          <t>Retrieve from the store all objects of type certificate
          whose URI attribute matches the given URI.
          </t>
        </section>
        <section anchor="store-get-mft-by-aki" numbered="true" toc="default">
          <name>Get Manifest Objects by AKI</name>
          <t>Retrieve from the store all objects of type manifest
          whose AKI attribute matches the given AKI.
          </t>
        </section>
        <section anchor="store-delete-by-uri" numbered="true" toc="default">
          <name>Delete Objects for a URI</name>
          <t>For a given URI, delete all objects in the store with
          a matching URI attribute.</t>
        </section>
        <section anchor="store-delete-other" numbered="true" toc="default">
          <name>Delete Outdated Objects</name>
          <t>For a given URI and a list of hashes, delete all objects
          in the store with a matching URI whose hash attribute is not
          in the given list of hashes.
          </t>
        </section>
        <section anchor="store-validation-time" numbered="true" toc="default">
          <name>Update Object's Validation Time</name>
          <t>For all objects in the store whose hash attribute matches
          the given hash, set the last validation time attribute to
          the given timestamp.
          </t>
        </section>
      </section>
    </section>
    <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <section numbered="true" toc="default">
        <name>Hash Collisions</name>
        <t>This implementation will not detect possible hash collisions in the
          hashes of repository objects (calculated using the file hash algorithm
          specified in <xref target="RFC7935" format="default"/>). It considers objects with same
          hash values to be identical.
        </t>
      </section>
      <section numbered="true" toc="default">
        <name>Algorithm Agility</name>
        <t>This implementation only supports hash algorithms and key sizes
          specified in <xref target="RFC7935" format="default"/>. Algorithm agility described
          in <xref target="RFC6916" format="default"/> is not supported.
        </t>
      </section>
      <section anchor="mft-dir-mismatch" numbered="true" toc="default">
        <name>Mismatch between the Expected and Actual Location of an Object in the Repository</name>
        <t>According to Section 2 of <xref target="RFC6481" format="default"/>, all objects
          issued by a particular CA certificate are expected to be located in
          one repository publication point, specified in the SIA extension of
          that CA certificate. The manifest object issued by that CA certificate
          enumerates all other issued objects, listing their filenames and
          content hashes.
        </t>
        <t>However, it is possible that an object whose content hash matches the
          hash listed in the manifest either has a different filename or is
          located at a different publication point in a repository.
        </t>
        <t>On the other hand, all RPKI objects, either explicitly or within
          their embedded EE certificate, have an AKI
          extension that contains the key identifier of their issuing CA
          certificate. Therefore, it is always possible to perform an RPKI
          validation
          of the object whose expected location does not match its actual
          location, provided that the certificate that matches the AKI of the
          object in question is known to the system that performs validation.
        </t>
        <t>In the case of a mismatch as described above, this implementation will not
          exclude an object from further validation merely because its actual
          location or filename does not match the expected location or filename.
          This decision was made because the actual location of a file
          in a repository is taken from the repository retrieval mechanism,
          which, in the case of an rsync repository, does not provide any
          cryptographic security, and in the case of an RRDP repository, provides
          only a transport-layer security with the fallback to unsecured
          transport. On the other hand, the manifest is an RPKI signed
          object, and its content could be verified in the context of the
          RPKI validation.
        </t>
      </section>
      <section numbered="true" toc="default">
        <name>Manifest Content versus Publication Point Content</name>
        <t>This algorithm uses the content of a manifest object to determine
          other objects issued by a CA certificate. It verifies that the
          manifest is located in the publication point designated in the CA
          certificate's SIA extension. However, if there are other (not listed
          in the manifest) objects located in the same publication point
          directory, they are ignored even if they might be valid and
          issued by the same CA as the manifest. (This RP behavior
          is allowed, but not required, by <xref target="RFC6486" format="default"/>.)
        </t>
      </section>
      <section numbered="true" toc="default">
        <name>Possible Denial of Service</name>
        <t>The store cleanup procedure described in <xref target="store-cleanup" format="default"/> tries to minimize removal and
        subsequent re-fetch of objects that are published in a
        repository but not used in the validation. Once such objects
        are removed from the remote repository, they will be discarded
        from the local object store after a period of time specified
        by a local policy. By generating an excessive amount of
        syntactically valid RPKI objects, a man-in-the-middle attack
        between a validating tool and a repository could force an
        implementation to fetch and store those objects in the object
        store (see <xref target="fetch-repo" format="default"/>) before they are
        validated and discarded, leading to out-of-memory or
        out-of-disk-space conditions and, subsequently, a denial of
        service.
        </t>
      </section>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC5280" target="https://www.rfc-editor.org/info/rfc5280">
          <front>
            <title>Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</title>
            <seriesInfo name="DOI" value="10.17487/RFC5280"/>
            <seriesInfo name="RFC" value="5280"/>
            <author initials="D." surname="Cooper" fullname="D. Cooper">
              <organization/>
            </author>
            <author initials="S." surname="Santesson" fullname="S. Santesson">
              <organization/>
            </author>
            <author initials="S." surname="Farrell" fullname="S. Farrell">
              <organization/>
            </author>
            <author initials="S." surname="Boeyen" fullname="S. Boeyen">
              <organization/>
            </author>
            <author initials="R." surname="Housley" fullname="R. Housley">
              <organization/>
            </author>
            <author initials="W." surname="Polk" fullname="W. Polk">
              <organization/>
            </author>
            <date year="2008" month="May"/>
            <abstract>
              <t>This memo profiles the X.509 v3 certificate and X.509 v2 certificate revocation list (CRL) for use in the Internet.  An overview of this approach and model is provided as an introduction.  The X.509 v3 certificate format is described in detail, with additional information regarding the format and semantics of Internet name forms.  Standard certificate extensions are described and two Internet-specific extensions are defined.  A set of required certificate extensions is specified.  The X.509 v2 CRL format is described in detail along with standard and Internet-specific extensions.  An algorithm for X.509 certification path validation is described.  An ASN.1 module and examples are provided in the appendices.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6481" target="https://www.rfc-editor.org/info/rfc6481">
          <front>
            <title>A Profile for Resource Certificate Repository Structure</title>
            <seriesInfo name="DOI" value="10.17487/RFC6481"/>
            <seriesInfo name="RFC" value="6481"/>
            <author initials="G." surname="Huston" fullname="G. Huston">
              <organization/>
            </author>
            <author initials="R." surname="Loomans" fullname="R. Loomans">
              <organization/>
            </author>
            <author initials="G." surname="Michaelson" fullname="G. Michaelson">
              <organization/>
            </author>
            <date year="2012" month="February"/>
            <abstract>
              <t>This document defines a profile for the structure of the Resource Public Key Infrastructure (RPKI) distributed repository.  Each individual repository publication point is a directory that contains files that correspond to X.509/PKIX Resource Certificates, Certificate Revocation Lists and signed objects.  This profile defines the object (file) naming scheme, the contents of repository publication points (directories), and a suggested internal structure of a local repository cache that is intended to facilitate synchronization across a distributed collection of repository publication points and to facilitate certification path construction.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6482" target="https://www.rfc-editor.org/info/rfc6482">
          <front>
            <title>A Profile for Route Origin Authorizations (ROAs)</title>
            <seriesInfo name="DOI" value="10.17487/RFC6482"/>
            <seriesInfo name="RFC" value="6482"/>
            <author initials="M." surname="Lepinski" fullname="M. Lepinski">
              <organization/>
            </author>
            <author initials="S." surname="Kent" fullname="S. Kent">
              <organization/>
            </author>
            <author initials="D." surname="Kong" fullname="D. Kong">
              <organization/>
            </author>
            <date year="2012" month="February"/>
            <abstract>
              <t>This document defines a standard profile for Route Origin Authorizations (ROAs).  A ROA is a digitally signed object that provides a means of verifying that an IP address block holder has authorized an Autonomous System (AS) to originate routes to one or more prefixes within the address block.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC7935" target="https://www.rfc-editor.org/info/rfc7935">
          <front>
            <title>The Profile for Algorithms and Key Sizes for Use in the Resource Public Key Infrastructure</title>
            <seriesInfo name="DOI" value="10.17487/RFC7935"/>
            <seriesInfo name="RFC" value="7935"/>
            <author initials="G." surname="Huston" fullname="G. Huston">
              <organization/>
            </author>
            <author initials="G." surname="Michaelson" fullname="G. Michaelson" role="editor">
              <organization/>
            </author>
            <date year="2016" month="August"/>
            <abstract>
              <t>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 (CRLs), Cryptographic Message Syntax (CMS) signed objects and certification requests as well as for the relying parties (RPs) that verify these digital signatures.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6486" target="https://www.rfc-editor.org/info/rfc6486">
          <front>
            <title>Manifests for the Resource Public Key Infrastructure (RPKI)</title>
            <seriesInfo name="DOI" value="10.17487/RFC6486"/>
            <seriesInfo name="RFC" value="6486"/>
            <author initials="R." surname="Austein" fullname="R. Austein">
              <organization/>
            </author>
            <author initials="G." surname="Huston" fullname="G. Huston">
              <organization/>
            </author>
            <author initials="S." surname="Kent" fullname="S. Kent">
              <organization/>
            </author>
            <author initials="M." surname="Lepinski" fullname="M. Lepinski">
              <organization/>
            </author>
            <date year="2012" month="February"/>
            <abstract>
              <t>This document defines a "manifest" for use in the Resource Public Key Infrastructure (RPKI).  A manifest is a signed object (file) that contains a listing of all the signed objects (files) in the repository publication point (directory) associated with an authority responsible for publishing in the repository.  For each certificate, Certificate Revocation List (CRL), or other type of signed objects issued by the authority that are published at this repository publication point, the manifest contains both the name of the file containing the object and a hash of the file content.  Manifests are intended to enable a relying party (RP) to detect certain forms of attacks against a repository.  Specifically, if an RP checks a manifest's contents against the signed objects retrieved from a repository publication point, then the RP can detect "stale" (valid) data and deletion of signed objects.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6487" target="https://www.rfc-editor.org/info/rfc6487">
          <front>
            <title>A Profile for X.509 PKIX Resource Certificates</title>
            <seriesInfo name="DOI" value="10.17487/RFC6487"/>
            <seriesInfo name="RFC" value="6487"/>
            <author initials="G." surname="Huston" fullname="G. Huston">
              <organization/>
            </author>
            <author initials="G." surname="Michaelson" fullname="G. Michaelson">
              <organization/>
            </author>
            <author initials="R." surname="Loomans" fullname="R. Loomans">
              <organization/>
            </author>
            <date year="2012" month="February"/>
            <abstract>
              <t>This document defines a standard profile for X.509 certificates for the purpose of supporting validation of assertions of "right-of-use" of Internet Number Resources (INRs).  The certificates issued under this profile are used to convey the issuer's authorization of the subject to be regarded as the current holder of a "right-of-use" of the INRs that are described in the certificate.  This document contains the normative specification of Certificate and Certificate Revocation List (CRL) syntax in the Resource Public Key Infrastructure (RPKI).  This document also specifies profiles for the format of certificate requests and specifies the Relying Party RPKI certificate path validation procedure.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6488" target="https://www.rfc-editor.org/info/rfc6488">
          <front>
            <title>Signed Object Template for the Resource Public Key Infrastructure (RPKI)</title>
            <seriesInfo name="DOI" value="10.17487/RFC6488"/>
            <seriesInfo name="RFC" value="6488"/>
            <author initials="M." surname="Lepinski" fullname="M. Lepinski">
              <organization/>
            </author>
            <author initials="A." surname="Chi" fullname="A. Chi">
              <organization/>
            </author>
            <author initials="S." surname="Kent" fullname="S. Kent">
              <organization/>
            </author>
            <date year="2012" month="February"/>
            <abstract>
              <t>This document defines a generic profile for signed objects used in the Resource Public Key Infrastructure (RPKI).  These RPKI signed objects make use of Cryptographic Message Syntax (CMS) as a standard encapsulation format.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC7730" target="https://www.rfc-editor.org/info/rfc7730">
          <front>
            <title>Resource Public Key Infrastructure (RPKI) Trust Anchor Locator</title>
            <seriesInfo name="DOI" value="10.17487/RFC7730"/>
            <seriesInfo name="RFC" value="7730"/>
            <author initials="G." surname="Huston" fullname="G. Huston">
              <organization/>
            </author>
            <author initials="S." surname="Weiler" fullname="S. Weiler">
              <organization/>
            </author>
            <author initials="G." surname="Michaelson" fullname="G. Michaelson">
              <organization/>
            </author>
            <author initials="S." surname="Kent" fullname="S. Kent">
              <organization/>
            </author>
            <date year="2016" month="January"/>
            <abstract>
              <t>This document defines a Trust Anchor Locator (TAL) for the Resource Public Key Infrastructure (RPKI).  This document obsoletes RFC 6490 by adding support for multiple URIs in a TAL.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6493" target="https://www.rfc-editor.org/info/rfc6493">
          <front>
            <title>The Resource Public Key Infrastructure (RPKI) Ghostbusters Record</title>
            <seriesInfo name="DOI" value="10.17487/RFC6493"/>
            <seriesInfo name="RFC" value="6493"/>
            <author initials="R." surname="Bush" fullname="R. Bush">
              <organization/>
            </author>
            <date year="2012" month="February"/>
            <abstract>
              <t>In the Resource Public Key Infrastructure (RPKI), resource certificates completely obscure names or any other information that might be useful for contacting responsible parties to deal with issues of certificate expiration, maintenance, roll-overs, compromises, etc.  This document describes the RPKI Ghostbusters Record containing human contact information that may be verified (indirectly) by a Certification Authority (CA) certificate.  The data in the record are those of a severely profiled vCard.  [STANDARDS- TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8182" target="https://www.rfc-editor.org/info/rfc8182">
          <front>
            <title>The RPKI Repository Delta Protocol (RRDP)</title>
            <seriesInfo name="DOI" value="10.17487/RFC8182"/>
            <seriesInfo name="RFC" value="8182"/>
            <author initials="T." surname="Bruijnzeels" fullname="T. Bruijnzeels">
              <organization/>
            </author>
            <author initials="O." surname="Muravskiy" fullname="O. Muravskiy">
              <organization/>
            </author>
            <author initials="B." surname="Weber" fullname="B. Weber">
              <organization/>
            </author>
            <author initials="R." surname="Austein" fullname="R. Austein">
              <organization/>
            </author>
            <date year="2017" month="July"/>
            <abstract>
              <t>In the Resource Public Key Infrastructure (RPKI), Certificate Authorities (CAs) publish certificates, including end-entity certificates, Certificate Revocation Lists (CRLs), and RPKI signed objects to repositories.  Relying Parties retrieve the published information from those repositories.  This document specifies a new RPKI Repository Delta Protocol (RRDP) for this purpose.  RRDP was specifically designed for scaling.  It relies on an Update Notification File which lists the current Snapshot and Delta Files that can be retrieved using HTTPS (HTTP over Transport Layer Security (TLS)), and it enables the use of Content Distribution Networks (CDNs) or other caching infrastructures for the retrieval of these files.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8360" target="https://www.rfc-editor.org/info/rfc8360">
          <front>
            <title>Resource Public Key Infrastructure (RPKI) Validation Reconsidered</title>
            <seriesInfo name="DOI" value="10.17487/RFC8360"/>
            <seriesInfo name="RFC" value="8360"/>
            <author initials="G." surname="Huston" fullname="G. Huston">
              <organization/>
            </author>
            <author initials="G." surname="Michaelson" fullname="G. Michaelson">
              <organization/>
            </author>
            <author initials="C." surname="Martinez" fullname="C. Martinez">
              <organization/>
            </author>
            <author initials="T." surname="Bruijnzeels" fullname="T. Bruijnzeels">
              <organization/>
            </author>
            <author initials="A." surname="Newton" fullname="A. Newton">
              <organization/>
            </author>
            <author initials="D." surname="Shaw" fullname="D. Shaw">
              <organization/>
            </author>
            <date year="2018" month="April"/>
            <abstract>
              <t>This document specifies an alternative to the certificate validation procedure specified in RFC 6487 that reduces aspects of operational fragility in the management of certificates in the Resource Public Key Infrastructure (RPKI), while retaining essential security features.</t>
              <t>The procedure specified in RFC 6487 requires that Resource Certificates are rejected entirely if they are found to overclaim any resources not contained on the issuing certificate, whereas the validation process defined here allows an issuing Certification Authority (CA) to chose to communicate that such Resource Certificates should be accepted for the intersection of their resources and the issuing certificate.</t>
              <t>It should be noted that the validation process defined here considers validation under a single trust anchor (TA) only.  In particular, concerns regarding overclaims where multiple configured TAs claim overlapping resources are considered out of scope for this document.</t>
              <t>This choice is signaled by a set of alternative Object Identifiers (OIDs) per "X.509 Extensions for IP Addresses and AS Identifiers" (RFC 3779) and "Certificate Policy (CP) for the Resource Public Key                                      Infrastructure (RPKI)" (RFC 6484).  It should be noted that in case these OIDs are not used for any certificate under a trust anchor, the validation procedure defined here has the same outcome as the procedure defined in RFC 6487.</t>
              <t>Furthermore, this document provides an alternative to Route Origin Authorization (ROA) (RFC 6482) and BGPsec Router Certificate (BGPsec PKI Profiles -- publication requested) validation.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6916" target="https://www.rfc-editor.org/info/rfc6916">
          <front>
            <title>Algorithm Agility Procedure for the Resource Public Key Infrastructure (RPKI)</title>
            <seriesInfo name="DOI" value="10.17487/RFC6916"/>
            <seriesInfo name="RFC" value="6916"/>
            <seriesInfo name="BCP" value="182"/>
            <author initials="R." surname="Gagliano" fullname="R. Gagliano">
              <organization/>
            </author>
            <author initials="S." surname="Kent" fullname="S. Kent">
              <organization/>
            </author>
            <author initials="S." surname="Turner" fullname="S. Turner">
              <organization/>
            </author>
            <date year="2013" month="April"/>
            <abstract>
              <t>This document specifies the process that Certification Authorities (CAs) and Relying Parties (RPs) participating in the Resource Public Key Infrastructure (RPKI) will need to follow to transition to a new (and probably cryptographically stronger) algorithm set.  The process is expected to be completed over a timescale of several years. Consequently, no emergency transition is specified.  The transition procedure defined in this document supports only a top-down migration (parent migrates before children).</t>
            </abstract>
          </front>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="rpki-validator" target="https://github.com/RIPE-NCC/rpki-validator">
          <front>
            <title>RIPE-NCC/rpki-validator source code</title>
            <author/>
            <date/>
          </front>
        </reference>
        <reference anchor="rsync" target="https://rsync.samba.org">
          <front>
            <title>rsync</title>
            <author/>
            <date month="October" year="2018"/>
          </front>
        </reference>
      </references>
    </references>
    <section anchor="Acknowledgements" numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>This document describes the algorithm as it is implemented by the
        software development team at the RIPE NCC, which, over time, included
        Mikhail Puzanov, Erik Rozendaal, Miklos Juhasz, Misja Alma, Thiago da
        Cruz Pereira, Yannis Gonianakis, Andrew Snare, Varesh Tapadia, Paolo
        Milani, Thies Edeling, Hans Westerbeek, Rudi Angela, and Constantijn
        Visinescu. The authors would also like to acknowledge contributions by
        Carlos Martinez, Andy Newton, Rob Austein, and Stephen Kent.
      </t>
    </section>
  </back>
</rfc>
