<?xml version="1.0" encoding="US-ASCII"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<?rfc sortrefs="yes"?>
<?rfc subcompact="no"?>
<?rfc symrefs="yes"?>
<?rfc toc="yes"?>
<?rfc tocdepth="3"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>

<rfc category="info" docName="draft-ietf-sidrops-rpki-rsc-00" ipr="trust200902">

<front>

  <title abbrev="RPKI Signed Checklists">
    RPKI Signed Checklists
  </title>

  <author fullname="Job Snijders" initials="J." surname="Snijders">
    <organization>Fastly</organization>
    <address>
      <postal>
        <street />
        <code />
        <city>Amsterdam</city>
        <country>Netherlands</country>
      </postal>
      <email>job@fastly.com</email>
    </address>
  </author>

  <date />

  <abstract>
    <t>
      This document defines a Cryptographic Message Syntax (CMS) profile for a general purpose listing of checksums (a 'checklist'), for use with the Resource Public Key Infrastructure (RPKI).
      The objective is to allow an attestation, in the form of a listing of one or more checksums of arbitrary digital objects (files), to be signed "with resources", and for validation to provide a means to confirm a specific Internet Resource Holder produced the signed checklist.
      The profile is intended to provide for the signing of a checksum listing with an arbitrary set of Internet Number Resources.
    </t>
  </abstract>

  <note title="Requirements Language">

    <t>
      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 <xref target="RFC2119"/> <xref
      target="RFC8174"/> when, and only when, they appear in all
      capitals, as shown here.
    </t>

  </note>

</front>

<middle>

  <section anchor="intro" title="Introduction">
    <t>
      This document defines a Cryptographic Message Syntax (CMS) <xref target="RFC5652"/> profile for a general purpose listing of checksums (a 'checklist'), for use with the Resource Public Key Infrastructure (RPKI) <xref target="RFC6480" />.
      The objective is to allow an attestation, in the form of a listing of one or more checksums of arbitrary files, to be signed "with resources", and for validation to provide a means to confirm a given Internet Resource Holder produced the RPKI Signed Checklist (RSC).
      The profile is intended to provide for the signing of a checksum listing with an arbitrary set of Internet Number Resources.
    </t>

    <t>
      RSC files are expected to facilitate Bring Your Own IP (BYOIP) authentication, inter-domain interconnection provisioning, and resource holdership verification processes.
    </t>

    <t>
      The RSC concept borrows heavily from <xref target="I-D.ietf-sidrops-rpki-rta">RTA</xref>, Manifests <xref target="RFC6486" />, and OpenBSD's <xref target="signify" /> utility. The main difference between RSC and RTA is that an RTA enables multiple signers to attest a single anonymous digital object through a checksum of its content, while an RSC allows a single signer to attest the checksums of multiple named digital objects. This difference is expected to represent a simplification for implementers and operators.
    </t>
  </section>

  <section anchor="profile" title="RSC Profile and Distribution">
    <t>
      RSC follows the Signed Object Template for the RPKI <xref target="RFC6488" /> with one exception.
      Because RSCs MUST NOT be distributed through the global RPKI repository system, the Subject Information Access (SIA) extension is omitted from the RSC's X.509 EE certificate.
    </t>
    <t>
      What constitutes suitable transport for RSC files is deliberately unspecified.
      It might be a USB stick, a web interface secured with conventional HTTPS, PGP-signed email, a T-shirt printed with a QR code, or a carrier pigeon.
    </t>
  </section>

  <section anchor="content" title="The RSC ContentType">
    <t>
      The ContentType for an RSC is defined as rpkiSignedChecklist, and has the numerical value of 1.2.840.113549.1.9.16.1.TBD.
    </t>
    <t>
      This OID MUST appear both within the eContentType in the encapContentInfo object as well as the ContentType signed attribute in the signerInfo object (see <xref target="RFC6488"/>).
    </t>
  </section>

  <section anchor="econtent" title="The RSC eContent">
    <t>
      The content of an RSC indicates that an a checklist for arbitrary named digital objects has been signed "with resources".
      An RSC is formally defined as:
    </t>
<figure><artwork>
   RpkiSignedChecklist-2021
     { iso(1) member-body(2) us(840) rsadsi(113549)
       pkcs(1) pkcs9(9) smime(16) mod(0) TBD }

   DEFINITIONS EXPLICIT TAGS ::=
   BEGIN

   IMPORTS
     CONTENT-TYPE, Digest, DigestAlgorithmIdentifier
     FROM CryptographicMessageSyntax-2009 -- in [RFC5911]
       { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
         pkcs-9(9) smime(16) modules(0) id-mod-cms-2004-02(41) }

     ASIdOrRange, IPAddressFamily
     FROM IPAddrAndASCertExtn -- in [RFC3779]
       { iso(1) identified-organization(3) dod(6) internet(1)
         security(5) mechanisms(5) pkix(7) mod(0)
         id-mod-ip-addr-and-as-ident(30) } ;

   ct-rpkiSignedChecklist CONTENT-TYPE ::=
       { TYPE RpkiSignedChecklist IDENTIFIED BY
         id-ct-signedChecklist }

   id-ct-signedChecklist OBJECT IDENTIFIER ::=
       { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
         pkcs-9(9) id-smime(16) id-ct(1) TBD }

   RpkiSignedChecklist ::= SEQUENCE {
     version  [0]          INTEGER DEFAULT 0,
     resources             ResourceBlock,
     digestAlgorithm       DigestAlgorithmIdentifier,
     checkList             SEQUENCE SIZE (1..MAX) OF FileAndHash }

   FileAndHash ::= SEQUENCE {
     file            IA5String OPTIONAL,
     hash            Digest }

   ResourceBlock ::= SEQUENCE {
       asID         [0]       AsList OPTIONAL,
       ipAddrBlocks [1]       IPList OPTIONAL }
       -- at least one of asID or ipAddrBlocks MUST be present
       ( WITH COMPONENTS { ..., asID PRESENT} |
         WITH COMPONENTS { ..., ipAddrBlocks PRESENT } )

   AsList ::= SEQUENCE (SIZE(1..MAX)) OF ASIdOrRange

   IPList ::= SEQUENCE (SIZE(1..MAX)) OF IPAddressFamily

   END
</artwork></figure>

    <section title="version">
      <t>
        The version number of the RpkiSignedChecklist MUST be 0.
      </t>
    </section>

    <section title="resources">
      <t>
        The resources contained here are the resources used to mark the attestation, and MUST match the set of resources listed by the EE certificate carried in the CMS certificates field.
      </t>
    </section>

    <section title="digestAlgorithm">
      <t>
        The digest algorithm used to create the message digest of the attested digital object.
        This algorithm MUST be a hashing algorithm defined in <xref target="RFC7935" />.
      </t>
    </section>

    <section title="checkList">
      <t>
        This field is a sequence of FileAndHash objects.
        There is one FileAndHash entry for each arbitrary object referenced from the RSC.
        Each FileAndHash is an ordered pair consisting an optional name of the file containing the object, and the message digest of the digital object.
      </t>
    </section>
  </section>

  <section title="Operational Considerations">
    <t>
      When working with objects of a plain-text nature (ASCII, UTF-8, HTML, Javascript, XML, etc) it is RECOMMENDED to distribute such objects in a lossless compressed form, and sign the compressed form.
      Wrapping plain-text objects in a compression envelope can help make those appear as a single octet string to any intermediate systems, which hopefully discourages in-transit modification of the file contents.
      The use of lossless compression can help avoid checksum verification errors.
    </t>
  </section>

  <section title="RSC Validation">
    <t>
      To validate an RSC the relying party MUST perform all the validation checks specified in <xref target="RFC6488"/> as well as the following additional RSC-specific validation steps.
    </t>
    <t>
      <list style="symbols">
        <t>
          The message digest of each referenced digital object, using the digest algorithm specified in the the digestAlgorithm field, MUST be calculated and MUST match the value given in the messageDigest field of the associated FileAndHash.
        </t>
        <t>
          If a filename is present, the filename MUST NOT contain a '/' (slash) or '\' (backslash) character.
        </t>
      </list>
    </t>
  </section>

  <section anchor="Security" title="Security Considerations">
    <t>
      Relying parties are hereby warned that the data in a RPKI Signed Checklist is self-asserted.
      These data have not been verified by the CA that issued the CA certificate to the entity that issued the EE certificate used to validate the Signed Checklist.
    </t>
  </section>

  <section title="Implementation status - RFC EDITOR: REMOVE BEFORE PUBLICATION">
    <t>
     This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft, and is based on a proposal described in RFC 7942.
     The description of implementations in this section is intended to assist the IETF in its decision processes in progressing drafts to RFCs.
     Please note that the listing of any individual implementation here does not imply endorsement by the IETF.
     Furthermore, no effort has been spent to verify the information presented here that was supplied by IETF contributors.
     This is not intended as, and must not be construed to be, a catalog of available implementations or their features.
     Readers are advised to note that other implementations may exist.
   </t>
    <t>
     According to RFC 7942, "this will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature.
     It is up to the individual working groups to use this information as they see fit".
    </t>
    <t>
      <list style="symbols">
        <t>
          A signer and validator implementation <xref target="rpki-rsc-demo"/> based on perl and OpenSSL was provided by Tom Harrison from APNIC.
        </t>
        <t>
          A validator implementation based on OpenBSD's rpki-client is expected to be published after IANA Early Allocation of the OIDs.
        </t>
      </list>
    </t>
  </section>

  <section anchor="IANA" title="IANA Considerations">
    <section title="OID">
      <t>
        The IANA has registered the OID for the RPKI Signed Checklist in the registry created by [RFC6488] as follows:
      </t>
<figure><artwork>
   Name          OID                          Specification
   ---------------------------------------------------------
   Checklists    1.2.840.113549.1.9.16.1.TBD  [RFC-TBD]
</artwork></figure>
    </section>
    <section title="File Extension">
      <t>
        The IANA has added an item for the signed Checklist file extension to the "RPKI Repository Name Scheme" created by <xref target="RFC6481"/> as follows:
      </t>
<figure><artwork>
   Filename Extension  RPKI Object           Reference
   -----------------------------------------------------------
      .sig             Signed Checklist      [RFC-TBD]
</artwork></figure>
    </section>
    <section title="Media Type">
      <t>
        The IANA has registered the media type application/rpki-checklist as follows:
      </t>
<figure><artwork><![CDATA[
   Type name: application
   Subtype name: rpki-checklist
   Required parameters: None
   Optional parameters: None
   Encoding considerations: binary
   Security considerations: Carries an RPKI Signed Checklist
                            [RFC-TBD].
   Interoperability considerations: None
   Published specification: This document.
   Applications that use this media type: RPKI operators.
   Additional information:
     Content: This media type is a signed object, as defined
         in [RFC6488], which contains a payload of a list of
         checksums as defined above in this document.
     Magic number(s): None
     File extension(s): .sig
     Macintosh file type code(s):
   Person & email address to contact for further information:
     Job Snijders <job@fastly.com>
   Intended usage: COMMON
   Restrictions on usage: None
   Author: Job Snijders <job@fastly.com>
   Change controller: Job Snijders <job@fastly.com>
]]></artwork></figure>
     </section>
  </section>

</middle>

<back>

  <references title="Normative References">
    <?rfc include="reference.RFC.2119.xml"?>
    <?rfc include="reference.RFC.5652.xml"?>
    <?rfc include="reference.RFC.6481.xml"?>
    <?rfc include="reference.RFC.6486.xml"?>
    <?rfc include="reference.RFC.6488.xml"?>
    <?rfc include="reference.RFC.8174.xml"?>
    <?rfc include="reference.RFC.7935.xml"?>
    </references>

  <references title="Informative References">
    <?rfc include="reference.I-D.draft-ietf-sidrops-rpki-rta-00.xml"?>
    <?rfc include="reference.RFC.6480.xml"?>
    <reference anchor="signify" target="https://man.openbsd.org/signify">
      <front>
        <title>signify - cryptographically sign and verify files</title>
        <author initials="T." surname="Unangst"><organization /></author>
        <author initials="M." surname="Espie"><organization /></author>
        <date year="2014" month="May" />
      </front>
    </reference>
    <reference anchor="rpki-rsc-demo" target="https://github.com/APNIC-net/rpki-rsc-demo">
      <front>
        <title>A proof-of-concept for constructing and validating RPKI Signed Checklists (RSCs).</title>
	<author initials="T." surname="Harrison"><organization>APNIC</organization></author>
        <date year="2021" month="February" />
      </front>
    </reference>

  </references>

  <section anchor="Acknowledgements" title="Acknowledgements">
    <t>
      The author wishes to thank George Michaelson,
        Tom Harrison,
        Geoff Huston,
        Randy Bush,
        Stephen Kent,
        Matt Lepinski,
        Rob Austein,
        Ted Unangst,
        and Marc Espie
     for prior art.
     The author thanks Russ Housley for reviewing the ASN.1 notation and providing suggestions.
     The author would like to thank Nimrod Levy,
     Tom Harrison,
     Ben Maddison,
     and
     Tim Bruijnzeels
     for document review and suggestions.
    </t>
  </section>

</back>

</rfc>
