<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
    which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
    There has to be one entity for each item to be referenced. 
    An alternate method (rfc include) is described in the references. -->

<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY RFC5226 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5226.xml">
<!ENTITY RFC7250 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7250.xml">
<!ENTITY RFC6507 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6507.xml">
<!ENTITY RFC5480 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5480.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
    please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
    (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
    (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-wang-tls-eccsi-00">
 <!-- category values: std, bcp, info, exp, and historic
    ipr values: trust200902, noModificationTrust200902, noDerivativesTrust200902,
       or pre5378Trust200902
    you can add the attributes updates="NNNN" and obsoletes="NNNN" 
    they will automatically be output with "(if approved)" -->

 <!-- ***** FRONT MATTER ***** -->

 <front>
   <!-- The abbreviated title is used in the page header - it is only necessary if the 
        full title is longer than 39 characters -->

   <title abbrev="TLS-ECCSI-Public-Key">Using ECCSI Public Keys in Transport Layer Security (TLS) </title> 

   <!-- add 'role="editor"' below for the editors if appropriate -->

   <!-- Another author who claims to be an editor -->

   <author fullname="Haiguang Wang" initials="H.W." role="editor"
           surname="Wang">
		   
     <organization>Huawei Technology Pte. Ltd.</organization>

     <address>
       <postal>
         <street>20 Secience Park Road, #3-30/31</street>

         <!-- Reorder these if your country does things differently -->

         <city>Singapore</city>

         <region></region>

         <code>117687</code>

         <country>SG</country>
       </postal>

       <phone>+65 6825 4200</phone>

       <email>wang.haiguang1@huawei.com</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
   </author>

   
      <author fullname="Yanjiang Yang" initials="Y.Y."
           surname="Yang">
		   
     <organization>Huawei Technology Pte. Ltd.</organization>

     <address>
       <postal>
         <street>20 Secience Park Road, #3-30/31</street>

         <!-- Reorder these if your country does things differently -->

         <city>Singapore</city>

         <region></region>

         <code>117687</code>

         <country>SG</country>
       </postal>

       <phone>+65 6825 4200</phone>

       <email>yang.yanjiang@huawei.com</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
   </author>
   
   <date year="2017" />

   <!-- If the month and year are both specified and are the current ones, xml2rfc will fill 
        in the current day for you. If only the current year is specified, xml2rfc will fill 
	 in the current day and month for you. If the year is not the current one, it is 
	 necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the 
	 purpose of calculating the expiry date).  With drafts it is normally sufficient to 
	 specify just the year. -->

   <!-- Meta-data Declarations -->

   <area>General</area>

   <workgroup>Internet Engineering Task Force</workgroup>

   <!-- WG name at the upperleft corner of the doc,
        IETF is fine for individual submissions.  
	 If this element is not present, the default is "Network Working Group",
        which is used by the RFC Editor as a nod to the history of the IETF. -->

   <keyword>template</keyword>

   <!-- Keywords will be incorporated into HTML output
        files in a meta tag but they have no effect on text or nroff
        output. If you submit your draft to the RFC Editor, the
        keywords will be used for the search engine. -->

   <abstract>
     <t>This document specifies a new certificate type and a TLS extension
   for authentication with ECCSI public keys in Transport Layer Security (TLS). 
   The new certificate type allows ECCSI public keys to be used for mutual 
   authentication over TLS protocol.</t>
   </abstract>
 </front>

 <middle>
   <section title="Introduction">
     <t>DISCLAIMER: This is a personal draft and has not yet seen significant 
	 security analysis. </t>

<t> Traditionally, TLS client and server exchange public keys based on [PKIX] 
certificates. It is considered complicated and may cause security weakness 
[Defeating-SSL]. To simplify the public key exchange, a light weight public 
key exchange protocol for TLS, using RAW public key in TLS/DTLS, has been 
standardized in [RFC7250]. However, using RAW public key requires out of 
band mechanisms to bind the public key to the entity presenting the key.  
This may require additional mechanism to resolve the binding relationship 
for each raw public key. </t>

<t>3GPP SA3 has adopted the EAP for 5G authentication framework and EAP-TLS 
is considered as authentication method for IOT devices. For use cases such as 
authentication between IOT devices and networks, identity of an entity provide 
the public key is necessary.</t>

<t>To simplify the binding between the public key and entity presenting the 
key, this document proposes to use ECCSI public key for authentication. Different 
from the X.509 certificate and raw public key, the ECCSI public key takes the 
identity itself as a public key, which simplify the binding between public key 
and entity presenting the public key.</t>

<t>ECCSI public key can be used by IOT devices to perform mutual authentication. 
Comparing to the PKIX based certificate, the ECCSI public key is shorter and 
requires less computation, and CA signing required by PKIX certificate is 
unnecessary for identity-based public key. Comparing to the RAW public key, 
ECCSI public key inherently provides entity authentication, which is required in 
many IOT network since IOT devices and networks need mutual authentication; the 
client/server does not need to have an out of band mechanism to bind the public 
key with the entity presenting the public key as required by raw public key.</t>

<t>Elliptic Curve-Based Certificateless Signatures for Identity-Based 
Encryption (ECCSI) public key in [RFC6507] specifies an identity-based 
signature scheme. The scheme is defined over Elliptic Curves. </t>

<t>According to the RFC6507, to use the ECCSI public key, a Key Management 
System (KMS) is required to generate private keys and then distribute the 
generatedkeys to clients thereafter.  The functionality of the KMS is similar to 
a Certificate Authority (CA).  A KMS owns a KMS Secret Authentication Key (KSAK), 
which is the root trust for all other keys. A KMS Public Authentication 
Key (KPAK) derived from this KSAK is globally public, and can be used to verify 
signatures. </t>

<t>To get an ECCSI-based private key for generating signatures, an entity need 
to provide its identity to the KMS, and then the KMS generates a Signer Secret 
Key (SSK) and a Public Validation Token (PVT), with the received Identity, the 
KSAK, the KPAK, and the pre-configured Elliptic curve as input. KMS delivers 
the SSK and PVT to the requestor who sends in the identity. For each identity, 
the generated SSK and PVT are specific to it. The identity and the PVT are used 
together with the KPAK to verify the signatures generated with the corresponding 
SSK. The signature generation and verification algorithms have been specified in 
[RFC6507].</t>

<t>To support ECCSI public key over TLS protocol, this document further extends the 
Certificate structure defined in [RFC7250] by including a type for ECCSI public 
key. The SubjectPublicKeyInfo structure defined in [PKIX] is extended since 
additional information for ECCSI public keys is required. The 
client_certificate_type and server_certificate_type defined in the RFC7250 are 
reused for ECCSI public key negotiation.</t>

<t>Section 3 defines structure for ECCSI public key; Section 4 defines key 
exchange algorithm over TLS with the ECCSI public key. Section 5 specifies 
TLS client and server handshake behaviour; Section 6 give examples. </t>

  </section>
  
     <section title="Terms">
       <t>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 <xref
       target="RFC2119">RFC 2119</xref>.</t>
     </section>
 

   <section title="Structure of the ECCSI Public Key Extension">
    
	<t>This section defines the structures for using ECCSIpublic keys over TLS 
	 protocols. To carry the Identity-based public key within the TLS handshake 
	 messages, the Certificate payload is used as a container, as shown in 
	 Figure 1. The shown Certificate structure is an adaptation of its original 
	 form [RFC7250].</t>

	 <figure align="center" anchor="xml_certificate_container" title="Certificate Payload as a Container for the Raw Public Key.">

       <artwork align="left"><![CDATA[
opaque ASN.1Cert<1..2^24-1>;

struct {
select(certificate_type){
// certificate type defined in this document.
case IdentityBasedPublicKey:
opaque ASN.1_subjectIdentityBasedPublicKeyInfo<1..2^24-1>;

// certificate type defined in RFC 7250.
case RawPublicKey:
opaque ASN.1_subjectPublicKeyInfo<1..2^24-1>;

// X.509 certificate defined in RFC 5246
case X.509:
ASN.1Cert certificate_list<0..2^24-1>;

// Additional certificate type based on
// "TLS Certificate Types" subregistry
};
} Certificate;
           ]]></artwork>
     </figure>
	 
	 <t>The structure SubjectIdentityBasedPublicKeyInfo is defined in this document. 
	 It contains AlgorithmIdentifier, identity and parameters. The structure of 
	 Algorithm identifer is defined in RFC 5280 [PKIX]. Identity is a string 
	 provided by client or server. Parameters are specific to the chosen 
	 identity-based public key algorithm. In this document, structure for ECCSI-based 
	 public key is specified. It contains an PVT field. </t>
	 
	 
	 	 <figure align="center" anchor="xml_subjectPublicKey" title="SubjectECCSIPublicKeyInfo ASN.1 Structure">

       <artwork align="left"><![CDATA[
subjectECCSIPublicKeyInfo  ::=  SEQUENCE  {
           algorithm               	AlgorithmIdentifier,    
	   identity			BIT STRING,
           PVT                        BIT STRING,      
           parameters         		ANY DEFINED BY algorithm OPTIONAL }


AlgorithmIdentifier   ::=  SEQUENCE  {
           algorithm               OBJECT IDENTIFIER,
           parameters              ANY DEFINED BY algorithm OPTIONAL  }	   
	       ]]></artwork>
		  </figure>  
		   
	<t>The algorithm identifiers are Object identifiers (OIDs). It is defined in the following table.</t>	

	<texttable anchor="table_obj_id" title="Algorithm Object Identifiers">

         <ttcol align="center">Key Type</ttcol>

         <ttcol align="center">Document</ttcol>
		 
		 <ttcol align="center">OID</ttcol>

         <c>Elliptic Curve-Based Signatureless For Identitiy-based Encryption (ECCSI)</c>

         <c>This document </c>

         <c>1.3.xxx.xxx.x.x (need to apply)</c>

       </texttable>
	   
	   
	   <t>PVT is an ECPoint. The encoding of the PVT has the following syntax: </t>
	   
	   <t>PVT ::= OCTET STRING</t>
	   
	   <t>The PVT (a value of type ECPoint that is an OCTET STRING) is mapped to a 
	   subjectPublicKey (a value of type BIT STRING) as follows: the most significant 
	   bit of the OCTET STRING value becomes the most significant bit of the BIT 
	   STRING value, and so on; the least significant bit of the OCTET STRING becomes 
	   the least significant bit of the BIT STRING. [From RFC 5480]</t>
	   
	   <t>The first octet of the OCTET STRING indicates whether the key is compressed 
	   or uncompressed.  The uncompressed form is indicated by 0x04 and the compressed 
	   form is indicated by either 0x02 or 0x03 (see 2.3.3 in [SEC1]).  The public key
	   MUST be rejected if any other value is included in the first octet.</t>
	   
	   <t>Similar to the certificate negotiation specified for raw public key, the 
	   'extension_data' field in the client and server hello fields are used to carry 
	   the ClientCertTypeExtension and ServerCertTypeExtension structures, which are 
	   defined in [RFC7250] for raw public key negotiation. According to RFC7250, the 
	   CertificateType structure is an enum with values taken from the 'TLS Certificate 
	   Types' subregistry of the 'Transport Layer Security (TLS) Extensions' registry 
	   [TLS-Ext-Registry].</t>
	   
	   	 	 <figure align="center" anchor="xml_cert_type_extension" title="CertTypeExtension Structure">

       <artwork align="left"><![CDATA[
   struct {
           select(ClientOrServerExtension) {
               case client:
                 CertificateType client_certificate_types<1..2^8-1>;
               case server:
                 CertificateType client_certificate_type;
           }
   } ClientCertTypeExtension;

   struct {
           select(ClientOrServerExtension) {
               case client:
                 CertificateType server_certificate_types<1..2^8-1>;
               case server:
                 CertificateType server_certificate_type;
           }
   } ServerCertTypeExtension;   
	       ]]></artwork>
		  </figure> 
		   
   </section>

   <section title="Key Exchange Algorithm">
   
     <t>In addition to [RFC4492], this document introduces one new ECC-based key exchange 
	 algorithm for TLS. It uses ephemeral ECDH keys to compute the TLS premaster secret, 
	 while the ECCSI scheme is used to authenticate them. The derivation of the TLS 
	 master secret from the premaster secret and the subsequent generation of bulk 
	 encryption/MAC keys and initialization vectors is independent of the key exchange 
	 algorithm and not impacted by the use of the ECCSI scheme. </t>

     <t> Below shows the new key exchange algorithm: </t>
	 
	<texttable anchor="table_key_exchange_algo" title="ECC Key Exchange Algorithms">

         <ttcol align="center">Key Exchange Algorithm</ttcol>

         <ttcol align="center">Description</ttcol>
		 
		 <c>ECDHE_ECCSI</c>
		 <c>Ephemeral ECDH with ECCSI signatures</c>		 
	</texttable>
	
	<t>The ECDHE_ECCSI key exchange mechanism requires the verifier to acquire the KPAK. </t>
	<t>To support the ECDHE_ECCSI key exchange mechanism, the following new Cipher suites 
	are specified:  <list style="letters">
	<t>CipherSuite TLS_ECDHE_ECCSI_WITH_AES_128_CBC_SHA = {0xXX, 0xXX}</t>
	<t>CipherSuite TLS_ECDHE_ECCSI_WITH_AES_256_CBC_SHA = {0xXX, 0xXX}</t>
	</list></t>
	
   </section>
   
   <section title="TLS Client and Server Handshake Behaviour">
   <t>The exchange of the TLS hello message with Identity-based public key is the same as 
   the procedure specified in RFC 7250[RFC7250], but with an appropriate Cipher suite being chosen 
   if the ECCSI public key is used. </t>
   
   <t>New Cipher suites specific to ECCSI public key are required.</t>
   <figure align="center" anchor="xml_hello_procedure" title="Basic ECCSI Public Key TLS Exchange">

       <artwork align="left"><![CDATA[
client_hello,
    client_certificate_type,
    server_certificate_type   ->

                              <-  server_hello,
                                  client_certificate_type,
                                  server_certificate_type,
                                  certificate,
                                  server_key_exchange,
                                  certificate_request,
                                  server_hello_done
    certificate,
    client_key_exchange,
    certificate_verify,
    change_cipher_spec,
    finished                  ->

                              <- change_cipher_spec,
                                 finished

   Application Data        <------->     Application Data	   
	   ]]></artwork>
	   
	  </figure>
	   <section title="Client Hello">
	   <t>To indicate the support of ECCSI public keys, clients include the 
	   client_certificate_type and/or the server_certificate_type extensions in an extended
	   client hello message. The usage of client_certificate_type and server_certificate_type 
	   are specified in the RFC7250. At the meantime, an appropriate cipher_suites needs to 
	   be specified too if it is to support ECCSI public keys.</t>
	   </section>
	   
	   <section title="Server Hello">
	   <t>If the server receives a client hello that contains the client_certificate_type 
	   extension and/or the server_certificate_type extension, then three outcomes are 
	   possible: <list style="letters">
	   <t> The server does not support the extension. In this case, the server returns the 
	   server hello without the extensions defined in this document.</t>
	   <t> The server supports the extension, but it does not have any certificate type in 
	   common with the client. Then, the server terminates the session with a fatal alert 
	   of type "unsupported_certificate". </t>
	   <t> The server supports the extensions and has at least one certificate type in 
	   common with the client.  In this case, the processing rules described below are 
	   followed. </t>
	   </list></t>
	   
	   <t>The details for the server in processing the client_certificate_type and 
	   server_certificate_type are specified in section 4.2 of RFC7250. Meanwhile, an 
	   appropriate cipher_suites needs to be specified too if it is to support ECCSI 
	   public keys. </t>

	   </section>
	   
	   <section title="Client Authentication">
	   <t>When the TLS server has specified an ECCSI public key type, e.g. as the 
	   client_certificate_type, authentication of the TLS client to the TLS server is 
	   supported through authentication of the received client subjectECCSIPublicKeyInfo 
	   and signature. </t>
	   </section>
	   
	   <section title="Server Authentication">
	   <t>When the TLS server has specified ECCSIPublicKey as the server_certificate_type, 
	   authentication of the TLS server to the TLS client is supported only through 
	   authentication of the received client SubjectPublicKeyInfo via an out-of-band method.</t>
	   </section>
   </section>
   
   <section title="Examples">
   <t>Figures 6 illustrates example exchanges.  Note that TLS ciphersuites using a 
   Diffie-Hellman exchange offering forward secrecy can be used with ECCSI public key, 
   although this document does not show the information exchange at that level with the 
   subsequent message flows.</t>
	  <section title="TLS Client and Server Use ECCSI Public Keys">
	  <t>This section shows an example where the TLS client as well as the TLS server use 
	  ECCSI public keys.  This is one of the use cases envisioned for IOT devices 
	  authenticate with networks.  The TLS client in this case is an IOT device that is 
	  configured with a ECCSI public/private keys for use with TLS and is also able to 
	  process ECCSI public key sent by the server. Therefore, it indicates these 
	  capabilities in (1).  The server fulfills the client's request, indicates this via 
	  the ECCSIPublicKey value in the server_certificate_type payload (2), and provides 
	  an ECCSI public key with the ECCSIPublicKeyInfo structure in the Certificate 
	  payload back to the client (see (3)).  The TLS server demands client authentication, 
	  and therefore includes a certificate_request (4).  The client_certificate_type 
	  payload in (5) indicates that the TLS server accepts an ECCSI public key.  The TLS 
	  client, which has an ECCSI public key pre-provisioned, returns it in the Certificate 
	  payload (6) to the server in the form of ECCSIPublicKeyInfo structure.</t>
	  
	     <figure align="center" anchor="xml_example_hello_procedure" title="Example with ECCSI Public Key provided by the TLS Server and the Client">

       <artwork align="left"><![CDATA[
	   client_hello,
client_certificate_type=(ECCSIPublicKey) // (1)
server_certificate_type=(ECCSIPublicKey) // (1)
                         ->
                         <-  server_hello,
                             server_certificate_type=ECCSIPublicKey // (2)
                             certificate, // (3)
                             client_certificate_type=ECCSIPublicKey // (5)
                             certificate_request, // (4)
                             server_key_exchange,
                             server_hello_done

certificate, // (6)
client_key_exchange,
change_cipher_spec,
finished                  ->

                         <- change_cipher_spec,
                            finished

Application Data        <------->     Application Data
	  	   ]]></artwork>	   
	  </figure>
	  
	  </section>
   </section>
   
   <section title="Security Considerations">
   </section>

   <section title="IANA Considerations">
   </section>

   <section title="Acknowledgements">
   </section>

   <section title="References">
      <section title="Normative References">
	  </section>

      <section title="Informative References">
	  </section>
	  
   </section>
   

 </middle>

 <!--  *****BACK MATTER ***** -->

 <back>
   <!-- References split into informative and normative -->

   <!-- There are 2 ways to insert reference entries from the citation libraries:
    1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
    2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
       (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

    Both are cited textually in the same manner: by using xref elements.
    If you use the PI option, xml2rfc will, by default, try to find included files in the same
    directory as the including file. You can also define the XML_LIBRARY environment variable
    with a value containing a set of directories to search.  These can be either in the local
    filing system or remote ones accessed by http (http://domain/dir/... ).-->

   <references title="Normative References">
     <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
     &RFC2119;

     <reference anchor="PKIX">
       <!-- the following is the minimum to make xml2rfc happy -->

       <front>
         <title>Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List(CRL) Profile
		</title>

         <author surname="Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R., and W. Polk">
           <organization></organization>
         </author>

         <date month="June" year="2008" />
       </front>
     </reference>
	 
	 &RFC7250;

     &RFC6507;

     &RFC5480;

   </references>

   <references title="Informative References">
     <!-- Here we use entities that we defined at the beginning. -->


     <!-- A reference written by by an organization not a person. -->

     <reference anchor="Defeatting-SSL"
                target="http://www.blackhat.com/presentations/bh-dc-09/Marlinspike/BlackHat-DC-09-Marlinspike-Defeating-SSL.pdf">
       <front>
         <title>New Tricks for Defeating SSL in Practice</title>

         <author surname="Marlinspike, M.,">
           <organization></organization>
         </author>

         <date month="Feb" year="2009" />
       </front>
     </reference>
   </references>

   <section anchor="app-additional" title="Examples">
   </section>

   <!-- Change Log

v00 2006-03-15  EBD   Initial version

v01 2006-04-03  EBD   Moved PI location back to position 1 -
                     v3.1 of XMLmind is better with them at this location.
v02 2007-03-07  AH    removed extraneous nested_list attribute,
                     other minor corrections
v03 2007-03-09  EBD   Added comments on null IANA sections and fixed heading capitalization.
                     Modified comments around figure to reflect non-implementation of
                     figure indent control.  Put in reference using anchor="DOMINATION".
                     Fixed up the date specification comments to reflect current truth.
v04 2007-03-09 AH     Major changes: shortened discussion of PIs,
                     added discussion of rfc include.
v05 2007-03-10 EBD    Added preamble to C program example to tell about ABNF and alternative 
                     images. Removed meta-characters from comments (causes problems).

v06 2010-04-01 TT     Changed ipr attribute values to latest ones. Changed date to
                     year only, to be consistent with the comments. Updated the 
                     IANA guidelines reference from the I-D to the finished RFC.  -->
 </back>
</rfc>
