<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [

    
<!ENTITY RFC3986 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml">
<!ENTITY RFC4395 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.4395.xml">
<!ENTITY RFC3629 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.3629.xml">
<!ENTITY RFC5234 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.5234.xml">
]>
     
<?rfc rfcedstyle="yes" ?>
<?rfc compact="yes"?>
<?rfc subcompact="no" ?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>

<rfc category="std" ipr="trust200902" docName="draft-mavrogiannopoulos-tpmuri-00" submissionType="IETF">
   <front>
      <title abbrev="TPMKEY URI">The TPMKEY URI Scheme</title>

      <author initials="C." surname="Latze" fullname="Carolin Latze">
	<organization abbrev="Swisscom"> Swisscom Switzerland Ltd</organization>
	<address>
	  <postal>
	    <street>Ostermundigenstrasse 93</street>
	    <city>Bern</city>
	    <region></region>
	    <code>3008</code>
	    <country>Switzerland</country>
	  </postal>
	  <email>carolin.latze@swisscom.com</email>
	</address>
      </author>

      <author initials="N." surname="Mavrogiannopoulos" fullname="Nikos
      Mavrogiannopoulos">
         <organization abbrev="KU Leuven">ESAT/SCD/COSIC KU Leuven - IBBT</organization>
         <address>
            <postal>
               <street>Kasteelpark Arenberg 10, bus 2446</street>
               <city>Leuven-Heverlee</city>
               <region></region>
               <code>B-3001</code>
               <country>Belgium</country>
            </postal>
            <email>nikos.mavrogiannopoulos@esat.kuleuven.be</email>
         </address>
      </author>

      <date month="January" year="2013"/>
      <area>Security</area>

<!-- [rfced] Please note that after you have approved the document,
post-xml2rfc changes will be made to update the header and boilerplate as
described in RFC 5741. -->

      <abstract>
         <t>
This memo specifies a TPMKEY Uniform Resource Identifier (URI) Scheme
for identifying cryptographic keys stored in TPM chips and access
using the TCG Software Stack (TSS).  The URI is based on how TPM
keys are identified in the TSS specification.
        </t>
      </abstract>
   </front>

   <middle>
      <section anchor="intro" title="Introduction">
        <t>
The Trusted Platform Module (TPM) is a trusted piece of hardware built
into many current devices that has been specified by the Trusted
Computing Group (TCG) <xref target="TPMMAIN"/>. In addition to the chip
itself, the TCG defined one standard way to interface with a TPM,
called the TCG Software Stack (TSS) <xref target="TSS"/>.
</t>
<t>
The TSS defines several layers. The most important ones in the context
of this document are the TCG Service Provider (TSP) and the TCG Core
Services (TCS). The TSP provides the TCG services to applications,
which in turn provide access to the TPM. Each application accesses
a single TSP and there is only one TCS for several TSPs. The
task of the TCS is to provide a common set of services per platform
for all TSPs.
</t>
<t>
TPM keys can be stored either in the TSP (called "user space") or
in the TCS (called "system space").
Furthermore, the TSS assigns a UUID to each key. That UUID is unique
for a specific key hierarchy on a specific platform. Last, keys can
also be stored in so called key blobs, which are basically files.
</t>
        <t>
The URI scheme defined in this document is designed with a mapping to
TPM keys that are accessed via the TSS in mind.  The URI uses only the
scheme and the path components which are required by the Uniform
Resource Identifier generic syntax [RFC3986].  The URI scheme does not
use the hierarchical element for a naming authority in the path since
the authority part could not be mapped to TPM key elements.  The URI
scheme does not use the optional query and fragment elements.  </t>
     </section>

      <section anchor="definition" title="TPMKEY URI Scheme Definition">
        <t>
   In accordance with <xref target="RFC4395"/>, this section provides the information
   required to register the TPMKEY URI scheme.
        </t>

        <section anchor="name" title="TPMKEY URI Scheme Name">
          <t>tsskey</t>
        </section>

        <section anchor="status" title="TPMKEY URI Scheme Status">
          <t>Provisional.</t>
        </section>

        <section anchor="syntax" title="TPMKEY URI Scheme Syntax">
          <t>
   The TPMKEY URI scheme is a sequence of attribute value pairs
   separated by a semicolon.  In accordance with <xref target="RFC3986"/>, the data
   should first be encoded as octets according to the UTF-8 character
   encoding <xref target="RFC3629"/>; then only those octets that do not correspond to
   characters in the unreserved set or to permitted characters from the
   reserved set should be percent-encoded.  Rules "unreserved" and "pct-encoded" in the TPMKEY specification below were imported from
   <xref target="RFC3986"/>.  As a special case, note that according to <xref target="RFC3986"/>, a
   space must be percent-encoded.
	  </t>
	  <t>
      A TPMKEY URI takes the form (for explanation of Augmented BNF, see <xref target="RFC5234"/>):
          </t>
	  <t>
     <figure>
      <artwork><![CDATA[
   tsskey-URI            = "tsskey" ":" tsskey-identifier
   tsskey-identifier     = *1(tsskey-attr *(";" tsskey-attr))
   tsskey-attr           = tsskey-uuid / tsskey-file / pk11-storage
   tsskey-reserved-avail = ":" / "[" / "]" / "@" / "!" / "$" /
                           "&" / "'" / "(" / ")" / "*" / "+" /
                           "," / "="
   tsskey-char           = unreserved / tsskey-reserved-avail /
                           pct-encoded
   tsskey-file          = "file" "=" *tsskey-char
   tsskey-uuid          = "uuid" "=" *tsskey-char
   tsskey-storage       = "storage" "=" *1("user" / "system")
]]></artwork>
</figure>
	  </t>
          <t>
The attribute "file" represents a filename and corresponds to a file
that contains a BER-encoded blob in accordance with the ASN.1 data 
definitions in the Portable Data section of the Trusted 
Computing Group Software Stack Specification Version 1.2. 
The attribute "uuid" represents a unique identifier of a TPM key and
the attribute "storage" corresponds to the storage subsystem used (user or system).
          </t>
        </section>

	<section anchor="semantics" title="TPMKEY URI scheme semantics">
	  <t>
	    The TPMKEY URI scheme is used to reference TPM keys through
	    the TSS. The allowed operations on the URI are defined by
	    the TSS specification.
	  </t>
	</section>

	<section anchor="encoding" title="TPMKEY encoding considerations">
	  <t>
	    Not sure what to write here
	  </t>
	</section>

	<section anchor="applications" title="applications/ protocols that use the TPMKEY URI scheme">
	  <t>
	    The TPMKEY URI scheme SHOULD be used by all application and
	    protocols that use the TPM through the TSS.
	  </t>
	</section>

      </section>



	<section anchor="examples" title="Examples of TPMKEY URI Schemes">
	<t>
   One of the simplest forms is from a key stored in the TSP.

     <figure>
      <artwork><![CDATA[
     tsskey:uuid=7f468c16-cb7f-11e1-824d-b3a4f4b20343;storage=user
]]></artwork>
</figure>
        </t>

	<t>
A TPM key that is stored in a system's file.

     <figure>
      <artwork><![CDATA[
     tsskey:file=/path/to/file
]]></artwork>
</figure>
        </t>
        </section>



      <section anchor="iana" title="IANA Considerations">
        <t>
   This document registers a URI scheme.  The registration template can
   be found in Section 3 of this document.
        </t>
      </section>


      <section anchor="security" title="Security Considerations">
        <t>
             There are security considerations for URI schemes discussed in
   <xref target="RFC3986"/>.

        </t>
        <t>
          Given that the TPMKEY URI is also supposed to be used in command
   line arguments to running programs, and those arguments can be world
   readable on some systems, the URI intentionaly does not allow for
   specifying the TPM key password as a URI attribute.
        </t>
      </section>

      <section title="Acknowledgements">
        <t>
This document derives from <xref target="PKCS11URI"/>. Furthermore the
authors want to thank Greg Kazmierczak for early feedback.
        </t>
      </section>

   </middle>

   <back>
    <references title="Normative References">
    &RFC3986;
    &RFC4395;
    &RFC3629;
    <reference anchor='TPMMAIN'>
      <front>
	<title>TPM Main Specification</title>
	<author>TCG</author>
<!-- http://www.trustedcomputinggroup.org/resources/tpm_main_specification -->
      </front>
    </reference>
    <reference anchor='TSS'>
      <front>
	<title>TCG Software Stack (TSS) Specification</title>
	<author>TCG</author>
<!-- http://www.trustedcomputinggroup.org/resources/tcg_software_stack_tss_specification -->
      </front>
    </reference>
  </references>

  <references title="Informative References">
    &RFC5234;
    <reference anchor='PKCS11URI'>
    <front>
        <title>The PKCS#11 URI Scheme</title>
        <date day="29" month='Feb' year='2012' />
    </front>
    <seriesInfo name="Internet Draft" value=""/>
    </reference>
  </references>

  </back>
</rfc>
