<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc private="Draft"?>
<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<?rfc compact="yes"?>
<rfc category="std" docName="RTA Profile">
  <front>
 <title abbrev="RTA">A profile for Resource Tagged Attestations (RTAs)</title>
 <author fullname="Geoff Huston" initials="G." surname="Huston">
  <organization abbrev="APNIC">Asia Pacific Network Information Centre</organization>
      <address>
        <postal>
          <street>6 Cordelia St</street>
          <city>South Brisbane</city>
          <region>QLD</region>
          <code>4101</code>
          <country>Australia</country>
        </postal>
        <email>gih@apnic.net</email>
        <uri>http://www.apnic.net</uri>
      </address>
    </author>
 <author fullname="George Michaelson" initials="G." surname="Michaelson">
  <organization abbrev="APNIC">Asia Pacific Network Information Centre</organization>
      <address>
        <postal>
          <street>6 Cordelia St</street>
          <city>South Brisbane</city>
          <region>QLD</region>
          <code>4101</code>
          <country>Australia</country>
        </postal>
        <email>gih@apnic.net</email>
        <uri>http://www.apnic.net</uri>
      </address>
    </author>
 <author fullname="Tim Bruijnzeels" initials="T." surname="Bruijnzeels">
  <organization abbrev="RIPE NCC">RIPE Network Coordination Centre</organization>
      <address>
        <postal>
          <street>Singel 258</street>
          <city>Amsterdam</city>
          <code>1016 AB</code> 
          <country>The Netherlands</country>
        </postal>
        <email>tim@ripe.net</email>
        <uri>http://www.ripe.net</uri>
      </address>
    </author> 

 <date year="2012" />
    <abstract>

      <t>This document defines a Cryptographic Mesage Syntax (CMS)
      profile for a general purpose Resource Tagged Attestation (RTA),
      for use with the Resource Public Key Infrastructure (RPKI). The
      objective is to allow an attestation, in the form of an
      arbitrary digital object, to be signed "with resources," and for
      validation to provide an outcome of "valid with resources." The
      profile is intended to provide for the signing of an attestion
      with an arbitrary set of resources.</t>

    </abstract>
  </front>
  <middle>
    <section title="Introduction">

      <t>This document defines a Cryptographic Mesage Syntax (CMS)
      <xref target="RFC5652"/> profile for a general purpose Resource
      Tagged Attestation (RTA), for use with the Resource Public Key
      Infrastructure (RPKI) <xref target="RFC6480"/>. An RTA
      allows an arbitrary digital object to be signed "with
      resources," and for validation of the digital signature to
      provide an outcome of "valid with resources." The profile is
      intended to provide for the signing of a arbitrary attestion
      with a set of resources by the duly delegated resource
      holder(s).</t>
  
      <t>The RTA makes use of the template for RPKI Digitally Signed
      Objects <xref target="RFC6488"/>, which defines a
      CMS wrapper for the RTA content, as well as a generic validation
      procedure for RPKI signed objects. However, this specification
      does not comply to the profile in <xref
      target="RFC6488"/> in all respects. This document
      describes the areas of difference to the template profile, the
      ASN.1 syntax for the RTA eContent, and the additional steps
      required to validate RTAs (in addition to the validation steps
      specified in <xref target="RFC6488"/>.</t>
    </section>
 <section title="RTA Profile">

  <t>An RTA conforms to the template for RPKI Digitally Signed Objects
  <xref target="RFC6488"/>, with the exception that in
  order to allow for arbitrary resource sets to be used to sign an
  RTA, it may be necessary to use multiple signatures to sign an
  RTA</t>

  <t>The differences between this RTA profile and the profile
  specified by the RPKI Digitally Signed Object template are as
  follows:</t>
   
  <t><list style="symbols"><t>Section 2.1 of <xref target="RFC6488"/> specifies a
  single SignerInfo object. An RTA MAY contain more than one
  SignerInfo object.<vspace blankLines="1"/></t>
   
  <t>Section 2.1.4, and Section 3 of <xref
  target="RFC6488"/> specify that the certificates field
  contains a single EE certificate. The certificates field of an RTA
  contains precisely the same number of EE certificates as there are
  SignerInfo objects in the RTA, where each EE certificate is needed
  to validate the signature in each SignerInfo. Each EE certificate
  MUST correspond to a unique public/private key pair. In addition, the 
  certifiates field MAY contain a collection of CA certificates that would
  allow a RP to validate the EE certificates.<vspace blankLines="1"/></t>

  <t>Section 2.1.5 of <xref
  target="RFC6488"/> specifies that the crls field be omitted. For RTAs the
  crls field MUST contain the current CRL for each CA certificate that has been included in the
  certificates field of the RTA.<vspace blankLines="1"/></t>

  <t>Section 3 of <xref target="RFC6488"/> describes the
  signed object validation checks that are to be performed by a
  Relying Party. Additional validation checks for an RTA are required,
  as described in section 5 of this profile.</t></list></t>

 </section>

<section title="The RTA ContentType">

  <t>The ContentType for a RTA is defined as
  resourceTaggedAttestation, and has the numerical value of
  1.2.840.113549.1.9.16.1.36.</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 title="The RTA eContent">

  <t>The content of a RTA indicates that an arbitrary digital object
  has been signed "with resources". A RTA is formally defined as:</t>
  <figure><artwork><![CDATA[

ResourceTaggedAttestationDefinitions DEFINITIONS ::=
BEGIN

  -- definition from rfc3029
 id-ct OBJECT IDENTIFIER ::= { iso(1) member-body(2)
            us(840) rsadsi(113549) pkcs(1) pkcs-9(9) id-smime(16) 1 }

 id-ct-resourceTaggedAttestation OBJECT IDENTIFIER ::= 
            { id-ct(1) 36 }

  ResourceTaggedAttestation ::= SEQUENCE {
      version  [0]          INTEGER DEFAULT 0,
      subjectKeyIdentifers  SubjectKeys,
      resources             ResourceBlock,
      attestation           Content }

   SubjectKeys         ::= SET SIZE (1..MAX) OF SubjectKeyIdentifier
          -- defined in RFC5280

   ResourceBlock       ::= SEQUENCE {
     asID         [0]       AsList OPTIONAL,
     ipAddrBlocks [1]       IPList OPTIONAL } 
         -- at least one of asID or ipAddrBlocks must be present

   AsList              ::= SEQUENCE (SIZE(1..MAX)) OF ASIdOrRange

   ASIdOrRange         ::= CHOICE {
      id                   ASId,
      range                ASRange }

   ASRange             ::= SEQUENCE {
      min                  ASId,
      max                  ASId }

   ASId                ::= INTEGER

   IPList              ::= SEQUENCE (SIZE(1..MAX)) OF IPAddressFamily

   IPAddressFamily     ::= SEQUENCE {    -- AFI & optional SAFI --
      addressFamily        OCTET STRING (SIZE (2..3)),
      addressesOrRanges    SEQUENCE OF IPAddressOrRange }

   IPAddressOrRange    ::= CHOICE {
      addressPrefix        IPAddress,
      addressRange         IPAddressRange }

   IPAddressRange      ::= SEQUENCE {
      min                  IPAddress,
      max                  IPAddress }

   IPAddress           ::= BIT STRING

   Content             ::= ANY

END
            
]]></artwork></figure>

   <t>Note that this content appears as the eContent within the
   encapContentInfo (see <xref target="RFC6488"/>).</t>


 <section title="version">
  <t>The version number of the ResourceTaggedAttestation MUST be
  0.</t>
 </section>
 
 <section title="subjectKeyIdentifiers">
  <t>The subjectKeyIdentifiers MUST be the set of SubjectKeyIdentifier
  values contained in each of the EE certificates carried in the CMS
  certificates field.</t>
 </section>
 <section title="resources">
   <t>The resources are contained here are the resources used to tag
   the attestation, and MUST match the set of resources listed by the
   set of EE certificates carried in the CMS certificates field.</t>
   
   <t>The ordering of resources is defined in <xref
   target="RFC3779"/>.</t>
   </section>
   </section>

 <section title="RTA Validation">

  <t>To validate a RTA the relying party MUST perform all the
  validation checks specified in <xref
  target="RFC6488"/> as well as the following additional
  RTA-specific validation steps.</t>

   <t><list style="symbols"> <t>The signature verification process
   defined section 5.6 of <xref target="RFC5652"/> MUST be performed
   for all public keys referenced in each SignerInfo of the CMS. If
   any signature cannot be verified then the RTA cannot be
   validated.<vspace blankLines="1"/></t>
   
   <t>The set of public keys contained in the subjectKeyIdentifers of
   the RTA MUST exactly match the set of subjectKeyIdentifiers
   contained in the set of SignerInfo objects of the CMS
   object.<vspace blankLines="1"/></t>

   <t>The set of resources contained in resources of the RTA MUST
   exactly match the set of resources contained in the set of EE
   certificates of the CMS object.<vspace blankLines="1"/></t>
   
   <t>The number of certificates in the CMS object MUST equal the
   number of signerInfo objects in the CMS, and the
   subjectKeyidentifiers in these certificates MUST match one and only
   one subjectkeyidentifier of a signerinfo object.</t> </list></t>
   
 </section>

  </middle>
  <back>
    <references title="Normative References">
      <?rfc include='./rfcs/bibxml/reference.RFC.5652.xml'?>
      <?rfc include='./rfcs/bibxml/reference.RFC.3779.xml'?>
      <?rfc include='./rfcs/bibxml/reference.RFC.6488.xml'?>
      <?rfc include='./rfcs/bibxml/reference.RFC.6480.xml'?>
    </references>

  </back>
</rfc>
