<?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 RFC7030 SYSTEM "http://www.rfc-editor.org/refs/bibxml/reference.RFC.7030.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="info" docName="draft-anoopmis-eap-autoadd-00" ipr="trust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     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="AutoAdd">AutoAdd - Automatic Bootstrapping of IoT Devices</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

     <author fullname="Anoop Kumar Pandey"   surname="Anoop Kumar Pandey">
      <organization>C-DAC Bangalore</organization>

      <address>
        <postal>
          <street>#68, Electronics City</street>

          <!-- Reorder these if your country does things differently -->
          <city>Bangalore</city>

          <region/>

          <code>560100</code>

          <country>India</country>
        </postal>

        <phone/>

        <email>anoop@cdac.in</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>
	
	
	
	<date day="23" month="December" year="2019" />

    <!-- 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>IETF</area> -->

    <workgroup>IETF</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>IoT, Bootstrapping, EST, EAP-NooB, BRSKI, AutoAdd</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> 	IoT devices are fast getting embedded into our lives, and when put together
	   they have the potential to generate a precise and detailed history of our lives 
	   and store them forever. Their networking and communicational power can be unleashed
	   for malicious and sabotage purposes, by a motivated attacker sitting in the far corner
	   of the world. Attacks on Industrial IoT systems can cause greater disasters. It is therefore
	   essential to inculcate the security aspect, right from design to development to operations. 
	   The first operation of an IoT device is to bootstrap itself, and due importance should be placed 
	   to ensure that this operation is carried out securely and with due diligence. However, it's 
	   easier said than done, and this paper outlines several approaches for secure automated 
	   bootstrapping and also proposes a new method, which is compared against the existing mechanisms 
	   for several qualitative factors. 
		</t>
    </abstract>
  </front>

  <middle>
	<section title="Prologue">
	<t>Amazon launched "Amazon Alexa" in November 2014. Alexa is a virtual assistant which
	comes with Echo line of smart speakers.  It is capable of voice interaction, control of
	smart home devices, music playback, setting alarms, making calls, checking weather and news and much more.
	<vspace />
Google Home series smart speakers were launched in November 2016.
 Google Assistant can be used to control thousands of smart-home products from several brands like LG,
 GE, Whirlpool, Nest etc... Google Home can be asked to change the temperature, dim the lights, turn on 
 a microwave or kettle, and also start Roomba (robotic vacuum cleaners). It can also turn the TV on<![CDATA[/]]>off using Chromecast.
 <vspace />
 The concept of smart home and devices is taking off very fast. It appears to make our lives quite easy and comfortable. 
 But turning your home into a computer means facing computer<![CDATA[-]]>like problems. 
 The security and performance issues associated are much scary. 
 <vspace />
 It creates a method for transformation of the physical world into computer-based systems, 
 resulting in performance and efficiency enhancement, financial gains, and reduces human involvement. 
 The number of IoT devices increased 31<![CDATA[%]]> year-over-year to 8.4 billion in 2017 and it is estimated
 to have 30 billion IoT devices by 2020 <xref target="iotscale"/>. Many more devices are<![CDATA[/]]>will be connected through serial link. 
</t>
	</section>
    <section title="Introduction">
       <t>
	   Kevin Ashton coined the term "Internet of Things (IoT)" and defined it as a system where 
	   the internet is connected to the physical world via ubiquitous sensors. While, the scale
	   of IoT is going pretty bigger day by day, the task of adding new devices and bootstrapping it at such a large scale, remains at large. 
	   Manual bootstrapping requires a human to add an IoT device to a network (network discovery),
	  connect to registrar (system where a device can be registered), setting up the key for future secure
	  communication and finally all configuration of the device for its functioning in the network domain.
	  Automatic bootstrapping methods are still evolving and are under testing and scrutiny for various 
	  environments and scenarios.
	  While security experts and engineers are toiling hard to mitigate risks associated with automatic bootstrapping,
	  we propose a system AutoAdd (work in progress), which ensures automatic addition and initial bootstrapping of an
	  IoT device while it is put on the network. 
	There are billions of devices and at least thousands of manufacturers. So how do we identify and trust 
	a device? Similarly there are many networks, how does the device know that I am working only with my owner and
	not with some imposter network?
    Remember, there are hostile devices on the network, and there are hostile networks that might attempt 
	to take over the device. Basically, we need to establish the identity/authenticity of the device; Check
	if device is compromised or not; establish the identity of the network/domain; and finally check if the domain
	is the correct one.
	  </t>

      <section title="Requirements Language">
        <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>
		
	<section anchor="PriorWork"
             title="Prior and Ongoing Contributions">
      <section title="TOFU (Trust on First Use)">
        <t> TOFU (Trust on First Use) calls for accepting and
		storing a public key or credential associated with an asserted identity, without authenticating 
		that assertion. Subsequent communication that is authenticated using the cached key or credential 
		is secure against an MiTM attack, if such an attack did not succeed during the vulnerable initial
		communication.</t>
      </section>
	  <section title="Resurrecting Duckling">
        <t> In <xref
        target="stajano1999resurrecting">'Resurrecting Duckling' </xref>, a device recognises as its owner
		the first entity that sends it a secret key and will stay loyal to its owner for the rest of the life.
		It may come to EoL (end of life), or may be reset. The ownership of the device may also be transferred. 
		It is analogous to imprinting in ducks, where duckling emerging from its egg will recognise as its mother
		the first moving object it sees that makes a sound, regardless of what it looks like.</t>
      </section>
	  <section title="Enrollment over Secure Transport">
        <t> In Enrollment over Secure Transport (EST) <xref
        target="RFC7030">RFC 7030</xref>, the client starts a TLS based
		HTTPS session with an EST server. Through a part of URI, a specific EST service is requested during the session.
		The client authenticates the server and the server authenticates the client. The server verifies if the client
		is authorized to use the requested service. Similarly the client verifies if the server has proper authorization
		to serve this client. Upon complete authentication and authorization check of both the parties, the server responds 
		to the client request.</t>
      </section>
	  	  <section title="BRSKI">
        <t> An ongoing internet draft BRSKI (Bootstrapping Remote Secure Key Infrastructures) <xref target="I-D.ietf-anima-bootstrapping-keyinfra"/> lists steps for
		auto bootstrapping as follow:
		<list style="symbols">
    <t>Pledge discovers a communication channel to a Registrar.</t>
    <t>Pledge identifies itself. This is done by presenting an X.509 IDevID credential to the discovered Registrar
	(via the Proxy) in a TLS handshake. (The Registrar credentials are only provisionally accepted at this time) </t>
	<t>Pledge requests to join the discovered Registrar using a voucher request.</t>
	<t>Registrar sends the voucher request to the MASA (manufacturer). URL of MASA can be in the voucher request or embedded in Registrar.</t>
	<t>MASA sends the voucher which is passed to pledge.</t>
	<t>MASA sends the voucher which is passed to pledge.</t>
	<t>Pledge verifies the voucher and imprints to the registrar by send voucher status telemetry.</t>
	<t>Registrar verifies the voucher and enrolls the pledge to the domain</t>
 </list>

Here pledge is the device to be added to network<![CDATA[/]]>domain; registrar is the registration authority where devices
 are registered; MASA is manufacturer authorized signing authority; IDevID is an Initial Device Identity X.509 certificate
 installed by the vendor on new equipment and voucher is a signed statement from the MASA service that indicates to a 
 Pledge the cryptographic identity of the Registrar it should trust. </t>
      </section>
	   <section title="EAP-NooB">
        <t> EAP-NooB (Extensible Authentication Protocol Nimble out of Band) <xref target="I-D.aura-eap-noob"/> method is intended
		for bootstrapping all kinds of Internet-of-Things (IoT) devices that have a minimal user interface and no pre-configured 
		authentication credentials. The method makes use of a user-assisted one-directional OOB (out of band) channel between 
		the peer device and authentication server.
The secure bootstrapping in this specification makes use of a user-assisted out-of-band (OOB) channel. 
 The security is based on the assumption that attackers are not able to observe or modify the messages conveyed through the OOB channel.  
 EAP-NooB follows the common approach of performing a Diffie-Hellman key exchange over the insecure network and authenticating the established
 key with the help of the OOB channel in order to prevent impersonation and man-in-the-middle (MitM) attacks.</t>
      </section>
	  <section title="AutoAdd (Work in Progress)">
        <t>We propose AutoAdd: an automatic bootstrapping method for IoT devices. This is a work in progress and open for comments.
		<vspace/>When a device is purchased in real world, usually an invoice is issued in the name of the purchaser with stamp of vendor<![CDATA[/]]>manufacturer. 
		We propose that similarly, a digital invoice can be issued which will contain the public key(s) of the &lt;domain owner(s)<![CDATA[/]]>Registrar(s)&gt; and digitally 
		signed by the manufacturer. The digital invoice may be embedded in the device along with the IDevID.
A digital invoice may be contain the IDevID of the device and Public key of Registrars (Ri), digital signed by Manufacturer (M) and can be represented as below. 
<vspace blankLines="1"/>	
	<![CDATA[Dig_Invoice = DigSignM {IDevID, PubKey: [R1, R2, .., Rn]}]]>
	<vspace blankLines="1"/>
When the device starts the registration process, it will present the digital invoice along with IDevID. The Registrar can verify the digital signature of the manufacturer
 on the digital invoice and sent a signed note of acceptance to the device. 
<vspace blankLines="1"/>
Flag = VerifyDigSignManufacturer (Dig_Invoice, PubKeyM)
<vspace />
	if (flag) Acceptance_Note = DigSignRi {Note}
<vspace blankLines="1"/>
The device can verify the signed note using the public key(s) mentioned in the digital invoice, thereby verifying its true owner. 
<vspace blankLines="1"/>VerifyDigSignRegistrar (Acceptance_Note, PublicKeyFromDigInvoiceRi)<vspace blankLines="1"/>
This process with eliminate all the communication overhead with MASA and multiple level verification (voucher request, voucher, telemetry etc.
 at Registrar<![CDATA[/]]> MASA<![CDATA[/]]>Device. From security point of view, we can claim that given that the digital invoice is digitally signed by manufacturer, 
 the public key of domain owner embedded in the digital invoice can't be changed, otherwise verification of digital signature of manufacturer at Registrar end will fail.
 We would also like to share few use cases for the sake of understanding the complete ecosystem of AutoAdd.</t>
 <section title="Expiration of owner certificate">
 <t>The device has domain owner<![CDATA[']]>s or registrar<![CDATA[']]>s public key embedded in its digital invoice which is used to verify the digital signature on the note of acceptance and thereby authenticating the owner. If the owner<![CDATA[']]>s digital signature certificate expires or is changed or is revoked, the digital signature of the owner can<![CDATA[']]>t be verified and the owner authentication will fail. </t>
 <t>To overcome such situation, before the expiration of the certificate, the owner will require to create another digital invoice by specifying it<![CDATA[']]>s own new public key digitally signed by his old private key and embedding it into the device. This will basically create a chain of digital invoices. This process is similar to attestation of own signature in real world. The verification will basically verify the chain of digital invoices.
 <vspace/>
 For the sake of clarity, let us consider R1_old as old public key of Registrar and original digital invoice be
 <vspace blankLines="1"/>
 <![CDATA[ Dig_Invoice_Original = DigSign (PvtM,  {IDevID, PubKey: [R1_old]})]]>
 <vspace blankLines="1"/>
 Let R1_new be the new public key of the registrar and Pvt_R1_Old be the old private key of the reigstrar. The registrar need to create a new digital invoice digitally signed by his old private key. 
 <vspace blankLines="1"/>
 <![CDATA[ Dig_Invoice_New = DigSign (Pvt_R1_Old , {IDevID, PubKey: [R1_new]} )]]>
 <vspace blankLines="1"/>
 Let note of acceptance signed with new private key of R1 as follow:
 <vspace blankLines="1"/>
 <![CDATA[ Acceptance_Note = DigSign(Pvt_R1_new, {Note})]]>
 <vspace blankLines="1"/>
 Verification will be done as per following steps:
 <vspace blankLines="1"/>
 <![CDATA[ Flag1 = VerifyDigSignDigInvoiceNew (Dig_Invoice_New, PublicKeyFromDigInvoiceOriginalR1)]]>
 <vspace blankLines="1"/>
 <vspace blankLines="1"/>
 <![CDATA[ If(flag1)	flag2 = VerifyDigSignRegistrar (Acceptance_Note, PublicKeyFromDigInvoiceNewR1)]]>
 <vspace blankLines="1"/>
 <vspace blankLines="1"/>
 <![CDATA[ If(flag2)	Output "Registrar or Owner verified" ]]>
 <vspace blankLines="1"/>
 These steps can be chained for multiple chain of digital invoices.
 </t>
 </section>
 <section title="Selling a device">
 <t>
 A device may be resold and in the new environment, the public key of the new owner may need to be embedded in the device, else owner verification will fail. Addition of the public key of the new owner will follow similar steps as described in the previous section (3.6.1) where the old owner will create a new digital invoice by specifying the new owner<![CDATA[']]>s public key and digitally signing it. The verification of the note of acceptance by the new owner will follow similar steps as illustrated in section 3.6.1.
 </t>
 </section>
      </section>
	</section >
	
	<section title="Comparison Chart">
	<texttable anchor="table_ex" title="Comparison of various bootstrapping methods" style="all">
    <ttcol align='center'>Approach</ttcol>
    <ttcol align='center'>Security</ttcol>
    <ttcol align='center'>Constraints<![CDATA[/]]>Consequence</ttcol>
    <c>TOFU</c>
    <c>Vulnerable initial communication</c>
    <c>No authentication of initial assertion</c>
	<c>Resurrecting Duckling</c>
    <c>No owner authentication</c>
    <c>Anyone can be the owner</c>
    <c>EST</c>
    <c>TLS secured HTTP session between client and Server</c>
    <c>Need some pre-provisioned credentials to establish secure communication</c>
    <c>BRSKI</c>
    <c>Online service authenticating both device and domain</c>
    <c>Online service authenticating both device and domain <![CDATA[&]]> MASA should be always online; No autorun of BRSKI on network or ownership change</c>
	<c>EAP-NooB</c>
    <c>Security dependent on Ephemeral Elliptic
   Curve Diffie-Hellman (ECDHE) key exchange and manual assistance</c>
    <c>Manual intervention for  OOB authentication; Not Scalable</c>
	<c>AutoAdd</c>
    <c>Easy offline authentication of both device and domain</c>
    <c>Public key is required for each buyer.</c>
    <postamble></postamble>
</texttable>

	</section>
	<section title="Conclusion">
	<t>We have outlined a number of approaches that are currently followed for bootstrapping of IoT devices along with their merits and demerits. We have also highlighted several security concerns that would have to be addressed for booting up and bringing an IoT device for operations. We have also presented AutoAdd and have done a qualitative comparison against the existing methods in terms of security and ease-of-use. AutoAdd can serve as a secure automatic bootstrapping method for IoT devices. 
	<vspace/>
	We are also working on a internet draft to incorporate device certificates with EAP-NOOB.
	</t>
	</section>
	
	
      
    <!-- Possibly a 'Contributors' section ... -->

    <section anchor="IANA" title="IANA Considerations">
      <t>This memo includes no request to IANA.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This draft proposes an automatic bootstrapping method for IoT devices. 
	  The security of the protocol is inherent from the security of unforgeable digital signature and PKI. 
	  A detailed security analysis is pending.</t>
    </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"?-->
      &RFC7030;
	  &RFC2119;
	  

    </references>

    <references title="Informative References">
      <!-- Here we use entities that we defined at the beginning. -->
	  
      
      <?rfc include='reference.I-D.ietf-anima-bootstrapping-keyinfra'?> 	  
	  <?rfc include="reference.I-D.aura-eap-noob.xml"?>  	
      <!-- A reference written by by an organization not a person. -->
   	  
	  <reference anchor="stajano1999resurrecting"
                 target="https://cis.temple.edu/~wu/teaching/fall_2004_files/secure2.pdf">
        <front>
          <title>The resurrecting duckling</title>
          <author initials="Stajano" surname="Frank">
		  <organization>Springer</organization>
          </author>
		  
          <date year="1999" />
        </front>
      </reference>
	  
	  <reference anchor="iotscale"
                 target="https://spectrum.ieee.org/tech-talk/telecom/internet/popular-internet-of-things-forecast-of-50-billion-devices-by-2020-is-outdated">
        <front>
          <title>Popular Internet of Things Forecast of 50 Billion Devices by 2020 Is Outdated</title>
          <author initials="Amy" surname="Nordrum">
		  <organization>IEEE</organization>
          </author>
		  
          <date year="2016" />
        </front>
      </reference>
	  
	  
    </references>

    <!-- 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).  -->
  </back>
</rfc>
