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

<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

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

<rfc number="7859" category="exp" submissionType="IETF" consensus="yes" ipr="trust200902">

  <front>

	<title abbrev="Identity-Based Signatures">Identity-Based Signatures
	for Mobile&nbsp;Ad&nbsp;Hoc&nbsp;Network&nbsp;(MANET)&nbsp;Routing&nbsp;Protocols
	</title>

    <author initials="C.M." surname="Dearlove" fullname="Christopher Dearlove">
      <organization abbrev="BAE Systems">BAE Systems Applied Intelligence Laboratories</organization>
      <address>
        <postal>
          <street>
            West Hanningfield Road
          </street>
          <city>
            Great Baddow, Chelmsford
          </city>
          <country>
            United Kingdom
          </country>
        </postal>
        <phone>+44 1245 242194</phone>
        <email>chris.dearlove@baesystems.com</email>
        <uri>http://www.baesystems.com/</uri>
      </address>
    </author>

	<date month="May" year="2016"/>
	<area/>
	<workgroup>Mobile Ad hoc Networking (MANET)</workgroup>
	<keyword>MANET</keyword>
	<keyword>TLV</keyword>
	<keyword>OLSRv2</keyword>
	<keyword>integrity check value</keyword>
	<keyword>ICV</keyword>
	<keyword>ECCSI</keyword>
	<keyword>elliptic curve</keyword>
	<keyword>identity-based signature</keyword>
	<keyword>IBS</keyword>
	<keyword>identity-based encryption</keyword>
	<keyword>IBE</keyword>

	<abstract>
	  <t>
         This document extends RFC 7182, which specifies a framework for (and
	 specific examples of) Integrity Check Values (ICVs) for packets and
	 messages using the generalized packet/message format specified in RFC
	 5444. It does so by defining an additional cryptographic function
	 that allows the creation of an ICV that is an Identity-Based
	 Signature (IBS), defined according to the Elliptic Curve-Based
	 Certificateless Signatures for Identity-Based Encryption (ECCSI)
	 algorithm specified in RFC 6507.
	  </t>
	</abstract>

  </front>

  <middle>

<section title="Introduction">

  <t>
    <xref target="RFC7182"/> defines Integrity Check Value (ICV) TLVs for use
    in packets and messages that use the generalized MANET packet/message
    format defined in <xref target="RFC5444"/>. This specification extends the
    TLV definitions therein by defining two new cryptographic function code
    points from within the registries set up by <xref target="RFC7182"/>. This
    allows the use of an Identity-Based Signature (IBS) as an ICV. An IBS has
    an additional property that is not shared by all of the previously
    specified ICVs; it not only indicates that the protected packet or message
    is valid, but also verifies the originator of the packet/message. 
  </t>

  <t>
    This specification assumes that each router (i.e., each originator of
    <xref target="RFC5444"/> format packets/messages) has an identity that may
    be tied to the packet or message. The router may have more than one
    identity but will only use one for each ICV TLV. The cryptographic
    strength of the IBS is not dependent on the choice of identity. 
  </t>

  <t>
  Two options for the choice of identity are supported (as reflected by
  the two code points allocated).  In the first option, the identity
  can be any octet sequence (up to 255 octets) included in the ICV TLV.
  In the second option, the octet sequence is preceded by an address,
  either the IP source address for a Packet TLV or the message
  originator address for a Message TLV  or an Address Block TLV.
  In particular, the second option allows just the
  address to be used as an identity. 
  </t>

  <t>
    Identity-based signatures allow identification of the originator of
    information in a packet or message. 

They thus allow additional security functions, such as revocation of an
identity. (A router could also then remove all information recorded as from
that revoked originator; the Optimized Link State Routing Protocol Version 2 (OLSRv2)
<xref target="RFC7181"/>, an expected user of this specification, can do this.)

 When applied to messages (rather than packets), this can significantly reduce the damage that a compromised router can inflict on the network.
  </t>

  <t>
    Identity-based signatures are based on forms of asymmetric (public key) cryptography -
    Identity-Based Encryption (IBE). Compared to symmetric cryptographic
    methods (such as HMAC and AES), IBE
    and IBS methods avoid requiring a shared secret key that results in a
    single point of failure vulnerability. Compared to more widely used
    asymmetric (public key) cryptographic methods (such as RSA and ECDSA), IBE and IBS methods have a major advantage and a major disadvantage.
  </t>

  <t>
    The advantage referred to is that each router can be configured once (for its key lifetime) by a trusted authority, independently of all other routers. Thus, a router can connect to the authority (typically in a secure environment) to receive a private key or can have a private key delivered securely (out of band) from the authority. During normal operation of the MANET, there is no need for the trusted authority to be connected to the MANET or even to still exist. Additional routers can be authorized with no reference to previously authorized routers (the trusted authority must still exist in this case). A router's public key is its identity, which when tied to a packet or message (as is the case when using an address as, or as part of, the identity) means that there is no need for public key certificates or a certificate authority, and a router need not retain key material for any other routers.
  </t>

  <t>
    The disadvantage referred to is that the trusted authority has complete authority, even more so than a conventional certificate authority. Routers cannot generate their own private keys, only the trusted authority can do that. Through the master secret held by the trusted authority, it could impersonate any router (existing or not). When used for IBE (not part of this specification), the trusted authority can decrypt anything. However, note that the shared secret key options described in <xref target="RFC7182"/> also have this limitation.
  </t>

  <t>
There are alternative mathematical realizations of identity-based
signatures.  This specification uses one that has been previously
published as <xref target="RFC6507"/>, known as Elliptic Curve-Based
Certificateless Signatures for Identity-Based Encryption (ECCSI).
Similar to other IBE/IBS approaches, it is based on the use of elliptic
curves.  Unlike some, it does not use "pairings" (bilinear maps from a product of two
elliptic curve groups to another group).  It thus may be easier to implement and more
efficient than some alternatives, although with a greater signature 
size than some. This specification allows the use
of any elliptic curve that may be used by <xref target="RFC6507"/>.
  </t>

  <t>
    The computational load imposed by ECCSI (and, perhaps more so by other IBS
    methods) is not trivial, though it depends significantly on the quality of implementation of the required elliptic curve and other mathematical functions. For a security level of 128 bits, the ICV data length is 129 octets, which is longer than for alternative ICVs specified in <xref target="RFC7182"/> (e.g., 32 octets for the similar strength HMAC-SHA-256). The signature format used could have been slightly shortened (to 97 octets) by using a compressed representation of an elliptic curve point, however, at the expense of some additional work when verifying a signature and loss of direct compatibility with <xref target="RFC6507"/>, and implementations thereof.
  </t>

  <t>
    The trusted authority is referred to in <xref target="RFC6507"/> as the
    Key Management Service (KMS). That term will be used in the rest of this specification.
  </t>

</section>

<section title="Terminology" anchor="terminology">

  <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
    <xref target="RFC2119"/>.
  </t>

  <t>
    Additionally, this document uses the terminology of <xref target="RFC5444"/>, <xref target="RFC6507"/>, and <xref target="RFC7182"/>.
  </t>

</section>

<section title="Applicability Statement">

  <t>
    This specification adds an additional option to the framework specified in
    <xref target="RFC7182"/> for use by
    packets and messages formatted as described in <xref target="RFC5444"/>. It is applicable as described in <xref
    target="RFC7182"/> and is subject to the additional comments in <xref target="security"/>, particularly regarding the role of the trusted authority (KMS).
  </t>
  <t>
    Specific examples of protocols for which this specification is suitable
    are Neighborhood Discovery Protocol (NHDP) <xref target="RFC6130"/> and OLSRv2 <xref target="RFC7181"/>.
  </t>

</section>

<section title="Specification">

  <section title="Cryptographic Function">

    <t>
      This specification defines a cryptographic function named ECCSI that is
      implemented as specified as the "sign" function in Section 5.2.1 of
      <xref target="RFC6507"/>. To use that
      specification:
      <list style="symbols">
        <t>
          The ICV is not calculated as
	  cryptographic-function(hash-function(content)) as defined in <xref
	  target="RFC7182"/> but (like the HMAC ICVs defined in <xref
	  target="RFC7182"/>) uses the hash function within the cryptographic
	  function. The option "none" is not permitted for hash-function,
	  and the hash function must have a known fixed length of N octets (as
	  specified in <xref target="parameters"/>). 
        </t>
        <t>
          M, used in <xref target="RFC6507"/>, is "content" as specified in <xref target="RFC7182"/>.
        </t>
        <t>
          ID, used in <xref target="RFC6507"/>, is as specified in <xref target="identity"/>.
        </t>
        <t>
          Key Management Service Public Authentication Key (KPAK), Secret
	  Signing Key (SSK), and Public Validation Token (PVT), which are
	  provided by the KMS, are as specified in Sections 4.2 and 5.1.1 of <xref target="RFC6507"/>.
        </t>
      </list>
    </t>

    <t>
      The length of the signature is 4N+1 octets (as specified in <xref target="RFC6507"/>) whose affine coordinate format (including an octet valued 0x04 to identify this) is used unchanged.
    </t>

    <t>
      Verification of the ICV is not implemented by the receiver recalculating the ICV and comparing with the received ICV, as it is necessarily incapable of doing so. Instead, the receiver evaluates the "verify" function described in Section 5.2.2 of <xref target="RFC6507"/>, which may pass or fail.
    </t>

    <t>
      To use that function M, KPAK, SSK, and PVT are as specified above, while
    the Identifier (ID) is deduced from the received packet or message (as specified in <xref target="identity"/>) using the &lt;key-id&gt; element in the &lt;ICV-value&gt;. This element need not match that used by the receiver, and thus when using this cryptographic function, multiple ICV TLVs differing only in their &lt;key-id&gt; or in the choice of cryptographic function from the two defined in this specification SHOULD NOT be used unless routers are administratively configured to recognize which to verify.</t>

    <t>
Routers MAY be administratively configured to reject an
  ICV TLV using ECCSI based on part or all of &lt;key-id&gt;: for
  example, if this encodes a time after which this identity is no
  longer valid (as described in <xref target="identity"/>).
    </t>

  </section>

  <section title="ECCSI Parameters" anchor="parameters">

    <t>
      Section 4.1 of <xref target="RFC6507"/> specifies parameters n, N, p, E, B, G, and q. The first of these, n, is specified as "A security parameter; the size in bits of the prime p over which elliptic curve cryptography is to be performed." For typical security levels (e.g., 128, 192, and 256 bits), n must be at least twice the required bits of security; see Section 5.6.1 of <xref target="NIST-SP-800-57"/>.
    </t>
    <t>
Selection of an elliptic curve, and all related parameters, MUST be
made by administrative means, and known to all routers.
Following <xref target="RFC6507"/>, it is RECOMMENDED that the curves and base
points defined in Appendix D.1.2 of <xref target="NIST-FIPS-186-4"/> be used
(note that n in that document is q in <xref target="RFC6507"/>). However, an
alternative curve MAY be used. 
    </t>
    <t>
The parameter that is required by this specification is N, which is
defined as Ceiling(n/8).   The hash function used must create an
output of size N octets.  For example, for 128 bit security, with 
n = 256 and N = 32, the RECOMMENDED hash function is SHA-256.
The signature (i.e., &lt;ICV-data&gt;) length is 4N+1 octets, i.e., 129 octets for N = 32.
    </t>
    <t>
      Note that <xref target="RFC6507"/> actually refers to the predecessor to <xref target="NIST-FIPS-186-4"/>, but the latest version is specified here; there are no significant differences in this regard.
    </t>

  </section>

  <section title="Identity" anchor="identity">

    <t>
  There are two options for ID as used by <xref target="RFC6507"/>, which are
  indicated by there being two code points allocated for this
  cryptographic function, see <xref target="IANA"/>.
      <list style="symbols">
        <t>
          For the cryptographic function ECCSI, ID is the element &lt;key-id&gt; defined in Section 12.1 of <xref target="RFC7182"/>. This MUST NOT be empty.
        </t>
<t>For the cryptographic function ECCSI-ADDR, ID is the concatenation of an
address (in network byte order) and the element &lt;key-id&gt; defined 
in Section 12.1 of <xref target="RFC7182"/>, where the latter MAY be empty.
          <list style="symbols">
            <t>
	      For a Packet TLV, this address is the IP source address of the IP datagram in which this packet is included.
            </t>
            <t>
	      For a Message TLV or an Address Block TLV, this address is the
              message originator address (the element &lt;msg-orig-addr&gt;
	      defined in <xref target="RFC5444"/>)  if that address is present;
	      if it is not present and the message is known to have traveled only one hop, then
	      the IP source address of the IP datagram in which this message
              is included is used. Otherwise, no address is
	      defined and the message MUST be rejected. (Note that HELLO
	      messages specified in NHDP <xref target="RFC6130"/> and used in
	      OLSRv2 <xref target="RFC7181"/> always only travel one hop;
	      hence, their IP source address SHOULD be used if no originator address is present.)
            </t>
          </list>
     </t>
      </list>
    </t>

    <t>
      The element &lt;key-id&gt; MAY be (for the cryptographic function ECCSI-ADDR) or include (for either cryptographic function) a representation of the identity expiry time. This MAY use one of the representations of time defined for the TIMESTAMP TLV in <xref target="RFC7182"/>. A RECOMMENDED approach is to use the cryptographic function ECCSI-ADDR with element &lt;key-id&gt; containing the single octet representing the type of the time, normally used as the TIMESTAMP TLV Type Extension (defined in <xref target="RFC7182"/>, Table 9), or any extension thereof, followed by the time as so represented, normally used as the TIMESTAMP TLV Value.
    </t>

    <t>
      Note that the identity is formatted as specified in <xref target="RFC6507"/> and thus does not need a length field incorporated into it by this specification.
    </t>

  </section>

</section>

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

  <t>
    IANA has allocated the following two new values in the
    "Cryptographic Functions" registry under "Mobile Ad Hoc NETwork    
    Parameters" registry and modified the unassigned range accordingly.
  </t>

  <texttable anchor="table_cryptographic_registry" title="Cryptographic Function Registry">
    <ttcol align='center'>Value</ttcol>
    <ttcol align='center'>Algorithm</ttcol>
    <ttcol align='center'>Description</ttcol>
    <ttcol align='center'>Reference</ttcol>
          
    <c>7</c>
    <c>ECCSI</c>
    <c>ECCSI <xref target="RFC6507"/></c>
    <c>RFC 7859</c>

    <c>8</c>
    <c>ECCSI-ADDR</c>
    <c>ECCSI <xref target="RFC6507"/> with an address (source or originator) joined to identity</c>
    <c>RFC 7859</c>

    <c>9-251</c>
    <c></c>
    <c>Unassigned; Expert Review</c>
    <c></c>

  </texttable>

</section>

<section title="Security Considerations" anchor="security">

  <t>
    This specification extends the security framework for MANET routing
    protocols specified in <xref target="RFC7182"/> by adding cryptographic
    functions (in two forms, according to how identity is specified). 
  </t>

  <t>
  This cryptographic function implements a form of IBS; a stronger form
  of ICV that verifies not just that the received packet or message is
  valid but that the packet or message originated at a router that was
  assigned a private key for the specified identity.
  </t>

  <t>
    It is recommended that the identity include an address unique to that
    router: for a message, its originator address, and for a packet, the corresponding IP packet source address. If additional information is included in the identity, this may be to indicate an expiry time for signatures created using that identity.
  </t>

  <t>
    In common with other forms of IBS, a feature of the form of IBS (known as ECCSI) used in this specification is that it requires a trusted KMS that issues all private keys and has complete cryptographic information about all possible private keys. However, to set against that, the solution is scalable (as all routers can be independently keyed) and does not need the KMS in the network. If no future keys will be required, then the KMS's master secret can be destroyed. As routers are individually keyed, key revocation (by blacklist and/or time expiry of keys) is possible.
  </t>

  <t>
    ECCSI is based on elliptic curve mathematics. This specification follows <xref target="RFC6507"/> in its recommendation of elliptic curves, but any suitable (prime power) elliptic curve may be used; this must be administratively specified. Implementation of this specification will require an available implementation of suitable mathematical functions. Unlike some other forms of IBS, ECCSI requires only basic elliptic curve operations; it does not require "pairings" (bilinear functions of a product of two elliptic curve groups). This increases the available range of suitable mathematical libraries.
  </t>

  <section title="Experimental Status">

    <t>
      The idea of using identity-based signatures for authentication of ad hoc
      network signaling goes back at least as far as 2005 <xref
      target="Dearlove"/>. The specific implementation of an IBS used in this
      specification, ECCSI, was published as an Internet Draft in 2010 before
      publication as an Informational RFC <xref target="RFC6507"/>. ECCSI is
      now part of standards such as <xref target="ETSI"/> for LTE
      Proximity-based Services. An open-source implementation of cryptographic
      software that includes ECCSI is available, see <xref
      target="SecureChorus"/>. 
    </t>

    <t>
      However, although this specification has been implemented for use in an OLSRv2 <xref target="RFC7181"/> routed network, there are only limited reports of such use. There are also no reports of the use of ECCSI within the IETF, other than in this specification. There are no reports of independent public scrutiny of the algorithm, although ECCSI is reported <xref target="RFC6507"/> as being based on <xref target="ECDSA"/> with similar properties.
    </t>

    <t>
	This specification is thus published as Experimental in order to
	encourage its use and encourage reports on its use. Once experiments have
been carried out and reported on (and when some public analysis of the
underlying cryptographic algorithms is available), it is intended to advance
this specification, with any changes identified by such experimentation and
analysis, to Standards Track. 
    </t>

  </section>

</section>

  </middle>

  <back>

<references title="Normative References">

<reference  anchor='RFC2119' target='http://www.rfc-editor.org/info/rfc2119'>
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='S. Bradner'><organization /></author>
<date year='1997' month='March' />
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='2119'/>
<seriesInfo name='DOI' value='10.17487/RFC2119'/>
</reference>

<reference  anchor='RFC5444' target='http://www.rfc-editor.org/info/rfc5444'>
<front>
<title>Generalized Mobile Ad Hoc Network (MANET) Packet/Message Format</title>
<author initials='T.' surname='Clausen' fullname='T. Clausen'><organization /></author>
<author initials='C.' surname='Dearlove' fullname='C. Dearlove'><organization /></author>
<author initials='J.' surname='Dean' fullname='J. Dean'><organization /></author>
<author initials='C.' surname='Adjih' fullname='C. Adjih'><organization /></author>
<date year='2009' month='February' />
</front>
<seriesInfo name='RFC' value='5444'/>
<seriesInfo name='DOI' value='10.17487/RFC5444'/>
</reference>

<reference  anchor='RFC6507' target='http://www.rfc-editor.org/info/rfc6507'>
<front>
<title>Elliptic Curve-Based Certificateless Signatures for Identity-Based Encryption (ECCSI)</title>
<author initials='M.' surname='Groves' fullname='M. Groves'><organization /></author>
<date year='2012' month='February' />
</front>
<seriesInfo name='RFC' value='6507'/>
<seriesInfo name='DOI' value='10.17487/RFC6507'/>
</reference>

<reference  anchor='RFC7182' target='http://www.rfc-editor.org/info/rfc7182'>
<front>
<title>Integrity Check Value and Timestamp TLV Definitions for Mobile Ad Hoc Networks (MANETs)</title>
<author initials='U.' surname='Herberg' fullname='U. Herberg'><organization /></author>
<author initials='T.' surname='Clausen' fullname='T. Clausen'><organization /></author>
<author initials='C.' surname='Dearlove' fullname='C. Dearlove'><organization /></author>
<date year='2014' month='April' />
</front>
<seriesInfo name='RFC' value='7182'/>
<seriesInfo name='DOI' value='10.17487/RFC7182'/>
</reference>

</references>

<references title="Informative References">

  <reference anchor="Dearlove"
	     target="http://interop.thomasclausen.org/Interop05/Papers/Papers/paper-01.pdf">
    <front>
      <title>OLSR Developments and Extensions</title>
      <author initials="C.M." surname="Dearlove" fullname="Christopher Dearlove">
      </author>
      <date month="July" year="2005"/>
    </front>
    <seriesInfo name="Proceedings of the 2nd OLSR"
		value="Interop and Workshop"/>
  </reference>

  <reference anchor="ECDSA">
    <front>
      <title>Public Key Cryptography for the Financial Services Industry: The Elliptic Curve Digital Signature Algorithm (ECDSA)</title>
      <author><organization>American National Standards Institute</organization></author>
      <date month="November" year="2005"/>
    </front>
    <seriesInfo name="ANSI" value="X9.62-2005"/>
  </reference>


  <reference anchor="ETSI" target="http://www.etsi.org/deliver/etsi_ts/133300_133399/133303/13.02.00_60/ts_133303v130200p.pdf">
    <front>
      <title>Universal Mobile Telecommunications System (UMTS); LTE; Proximity-based Services (ProSe); Security aspects</title>
      <author><organization>ETSI/3GPP</organization>
      </author>
      <date month="January" year="2016"/>
    </front>
    <seriesInfo name="ETSI TS 33.303," value="V13.2.0, Release 13"/>
  </reference>

  <reference anchor="NIST-FIPS-186-4">
    <front>
      <title>Digital Signature Standard (DSS)</title>
      <author><organization>National Institute of Standards and Technology</organization>
      </author>
      <date month="July" year="2013"/>
    </front>
    <seriesInfo name="FIPS" value="186-4"/>
    <seriesInfo name="DOI" value="10.6028/NIST.FIPS.186-4"/>
  </reference>

  <reference anchor="NIST-SP-800-57">
    <front>
      <title>Recommendation for Key Management - Part 1: General (Revision 3)</title>
      <author><organization>National Institute of Standards and Technology</organization>
      </author>
      <date month="July" year="2012"/>
    </front>
    <seriesInfo name="NIST Special Publication" value="800-57, Part 1, Revision 3"/>
    <seriesInfo name="DOI" value="10.6028/NIST.SP.800-57pt1r4"/>
  </reference>

<reference  anchor='RFC5497' target='http://www.rfc-editor.org/info/rfc5497'>
<front>
<title>Representing Multi-Value Time in Mobile Ad Hoc Networks (MANETs)</title>
<author initials='T.' surname='Clausen' fullname='T. Clausen'><organization /></author>
<author initials='C.' surname='Dearlove' fullname='C. Dearlove'><organization /></author>
<date year='2009' month='March' />
</front>
<seriesInfo name='RFC' value='5497'/>
<seriesInfo name='DOI' value='10.17487/RFC5497'/>
</reference>

<reference  anchor='RFC6130' target='http://www.rfc-editor.org/info/rfc6130'>
<front>
<title>Mobile Ad Hoc Network (MANET) Neighborhood Discovery Protocol (NHDP)</title>
<author initials='T.' surname='Clausen' fullname='T. Clausen'><organization /></author>
<author initials='C.' surname='Dearlove' fullname='C. Dearlove'><organization /></author>
<author initials='J.' surname='Dean' fullname='J. Dean'><organization /></author>
<date year='2011' month='April' />
</front>
<seriesInfo name='RFC' value='6130'/>
<seriesInfo name='DOI' value='10.17487/RFC6130'/>
</reference>

<reference  anchor='RFC7181' target='http://www.rfc-editor.org/info/rfc7181'>
<front>
<title>The Optimized Link State Routing Protocol Version 2</title>
<author initials='T.' surname='Clausen' fullname='T. Clausen'><organization /></author>
<author initials='C.' surname='Dearlove' fullname='C. Dearlove'><organization /></author>
<author initials='P.' surname='Jacquet' fullname='P. Jacquet'><organization /></author>
<author initials='U.' surname='Herberg' fullname='U. Herberg'><organization /></author>
<date year='2014' month='April' />
</front>
<seriesInfo name='RFC' value='7181'/>
<seriesInfo name='DOI' value='10.17487/RFC7181'/>
</reference>

<reference anchor="SecureChorus" target="http://www.securechorus.com/">
  <front>
    <title>Secure Chorus: Interoperable and secure enterprise communications</title>
    <author/>
    <date/>
  </front>
</reference>

</references>

<section title="Example" anchor="example">

  <t>
    Appendix C of <xref target="RFC6130"/> contains this example of a HELLO
    message. (Note that normally a TIMESTAMP ICV would also be added before
    the ICV TLV, but for simplicity, that step has been omitted here.) 
  </t>

  <t>
    <figure>
      <artwork>
   0                   1                   2                   3  
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |     HELLO     | MF=7  | MAL=3 |      Message Length = 45      |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | Hop Limit = 1 | Hop Count = 0 |    Message Sequence Number    |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | Message TLV Block Length = 8  | VALIDITY_TIME |  MTLVF = 16   |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | Value Len = 1 | Value (Time)  | INTERVAL_TIME |  MTLVF = 16   |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | Value Len = 1 | Value (Time)  | Num Addrs = 5 |   ABF = 128   |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | Head Len = 3  |                     Head                      |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |     Mid 0     |     Mid 1     |     Mid 2     |     Mid 3     |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |     Mid 4     | Address TLV Block Length = 14 |   LOCAL_IF    |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |  ATLVF = 80   |   Index = 0   | Value Len = 1 |    THIS_IF    |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |  LINK_STATUS  |   ATLV = 52   | Strt Indx = 1 | Stop Indx = 4 |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | Value Len = 4 |     HEARD     |     HEARD     |   SYMMETRIC   |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |     LOST      |
  +-+-+-+-+-+-+-+-+
      </artwork>
    </figure>
  </t>

  <t>
    In order to provide an example of an ECCSI ICV Message TLV that may be
    added to this message, the fields shown need to all have numerical values,
    both by inserting defined numerical values (e.g., 0 for HELLO) and by
    selecting example values where needed. The latter means that
    <list style = "symbols">
      <t>
        The message sequence number will be zero.
      </t>
      <t>
        The five addresses will be 192.0.2.1 to 192.0.2.5.
      </t>
      <t>
        The message validity time will be six seconds and the message interval
	time will be two seconds, each encoded with a constant value C =
	1/1024 seconds (as described in <xref target="RFC5497"/> and as referenced from <xref target="RFC6130"/>).
      </t>
    </list>
  </t>

  <t>
    In addition, when calculating an ICV, the hop count and hop limit are both set to zero. This results in the message:
  </t>

  <t>
    <figure>
      <artwork>
   0                   1                   2                   3  
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |0 0 0 0 0 0 0 0|0 1 1 1 0 0 1 1|0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |0 0 0 0 0 0 0 0|0 0 0 0 0 0 0 0|0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0|0 0 0 0 0 0 0 1|0 0 0 1 0 0 0 0|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |0 0 0 0 0 0 0 1|0 1 1 0 0 1 0 0|0 0 0 0 0 0 0 0|0 0 0 1 0 0 0 0|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |0 0 0 0 0 0 0 1|0 1 0 1 1 0 0 0|0 0 0 0 0 1 0 1|1 0 0 0 0 0 0 0|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |0 0 0 0 0 0 1 1|1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |0 0 0 0 0 0 0 1|0 0 0 0 0 0 1 0|0 0 0 0 0 0 1 1|0 0 0 0 0 1 0 0|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |0 0 0 0 0 1 0 1|0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0|0 0 0 0 0 0 1 0|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |0 1 0 1 0 0 0 0|0 0 0 0 0 0 0 0|0 0 0 0 0 0 0 1|0 0 0 0 0 0 0 0|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |0 0 0 0 0 0 1 1|0 0 1 1 0 1 0 0|0 0 0 0 0 0 0 1|0 0 0 0 0 1 0 0|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |0 0 0 0 0 1 0 0|0 0 0 0 0 0 1 0|0 0 0 0 0 0 1 0|0 0 0 0 0 0 0 1|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |0 0 0 0 0 0 0 0|
  +-+-+-+-+-+-+-+-+
      </artwork>
    </figure>
  </t>

  <t>
    Or, in hexadecimal form:
  </t>

  <t>
    <figure>
      <artwork>
   M         := 0x 0073002D  00000000  00080110  01640010
                   01580580  03C00002  01020304  05000E02
                   50000100  03340104  04020201  00
      </artwork>
    </figure>
  </t>

  <t>
    The ICV TLV that will be added will have cryptographic function ECCSI-ADDR
    and hash function SHA-256. This message has no originator address, but it
    travels a single hop and its IP source address can be used. This will be
    assumed to be 192.0.2.0 with an empty &lt;key-id&gt;; thus, the sender's
    identity will be (in hexadecimal form):
  </t>

  <t>
    <figure>
      <artwork>
   ID        := 0x  C0000200
      </artwork>
    </figure>
  </t>

  <t>
    Parameters for <xref target= "RFC6507"/> will thus be n = 256, N = 32. The same parameters and master key will be used as in Appendix A of <xref target="RFC6507"/>, i.e., the elliptic curve P-256, with parameters:
  </t>

  <t>
    <figure>
      <artwork>
   p         := 0x  FFFFFFFF 00000001 00000000 00000000
                    00000000 FFFFFFFF FFFFFFFF FFFFFFFF

   B         := 0x  5AC635D8 AA3A93E7 B3EBBD55 769886BC
                    651D06B0 CC53B0F6 3BCE3C3E 27D2604B

   q         := 0x  FFFFFFFF 00000000 FFFFFFFF FFFFFFFF
                    BCE6FAAD A7179E84 F3B9CAC2 FC632551

   G         := 0x  04
                    6B17D1F2 E12C4247 F8BCE6E5 63A440F2
                    77037D81 2DEB33A0 F4A13945 D898C296
                    4FE342E2 FE1A7F9B 8EE7EB4A 7C0F9E16
                    2BCE3357 6B315ECE CBB64068 37BF51F5

   KSAK      := 0x  12345;

   KPAK      := 0x  04
                    50D4670B DE75244F 28D2838A 0D25558A
                    7A72686D 4522D4C8 273FB644 2AEBFA93
                    DBDD3755 1AFD263B 5DFD617F 3960C65A
                    8C298850 FF99F203 66DCE7D4 367217F4
      </artwork>
    </figure>
  </t>

  <t>
    The remaining steps to creating a private key for the ID use the same "random" value v as Appendix A of <xref target="RFC6507"/> and are:
  </t>

  <t>
    <figure>
      <artwork>
   v         := 0x  23456

   PVT       := 0x  04
                    758A1427 79BE89E8 29E71984 CB40EF75
                    8CC4AD77 5FC5B9A3 E1C8ED52 F6FA36D9
                    A79D2476 92F4EDA3 A6BDAB77 D6AA6474
                    A464AE49 34663C52 65BA7018 BA091F79

   HS        := hash( 0x 04
                         6B17D1F2 E12C4247 F8BCE6E5 63A440F2
                         77037D81 2DEB33A0 F4A13945 D898C296
                         4FE342E2 FE1A7F9B 8EE7EB4A 7C0F9E16
                         2BCE3357 6B315ECE CBB64068 37BF51F5
                         04
                         50D4670B DE75244F 28D2838A 0D25558A
                         7A72686D 4522D4C8 273FB644 2AEBFA93
                         DBDD3755 1AFD263B 5DFD617F 3960C65A
                         8C298850 FF99F203 66DCE7D4 367217F4
                         C0000200
                         04
                         758A1427 79BE89E8 29E71984 CB40EF75
                         8CC4AD77 5FC5B9A3 E1C8ED52 F6FA36D9
                         A79D2476 92F4EDA3 A6BDAB77 D6AA6474
                         A464AE49 34663C52 65BA7018 BA091F79 )

              = 0x  F64FFD76 D2EC3E87 BA670866 C0832B80
                    B740C2BA 016034C8 1A6F5E5B 5F9AD8F3
      </artwork>
    </figure>
  </t>

  <t>
    The remaining steps to creating a signature for M use the same "random" value j as Appendix A of <xref target="RFC6507"/> and are:
  </t>

  <t>
    <figure>
      <artwork>
   j         := 0x  34567

   J         := 0x  04
                    269D4C8F DEB66A74 E4EF8C0D 5DCC597D
                    DFE6029C 2AFFC493 6008CD2C C1045D81
                    6DDA6A13 10F4B067 BD5DABDA D741B7CE
                    F36457E1 96B1BFA9 7FD5F8FB B3926ADB

   r         := 0x  269D4C8F DEB66A74 E4EF8C0D 5DCC597D
                    DFE6029C 2AFFC493 6008CD2C C1045D81

   HE        := hash( 0x
                      F64FFD76 D2EC3E87 BA670866 C0832B80
                      B740C2BA 016034C8 1A6F5E5B 5F9AD8F3
                      269D4C8F DEB66A74 E4EF8C0D 5DCC597D
                      DFE6029C 2AFFC493 6008CD2C C1045D81
                      0073002D 00000000 00080110 01640010
                      01580580 03C00002 01020304 05000E02
                      50000100 03340104 04020201 00       )

              = 0x  FE236B30 CF72E060 28E229ED 5751D796
                    91DED33C 24D2F661 28EA0804 30D8A832

   s'        := 0x  C8C739D5 FB3EFB75 221CB818 8CAAB86A
                    2E2669CF 209EA622 7D7072BA A83C2509

   s         := 0x  C8C739D5 FB3EFB75 221CB818 8CAAB86A
                    2E2669CF 209EA622 7D7072BA A83C2509

   Signature := 0x  269D4C8F DEB66A74 E4EF8C0D 5DCC597D
                    DFE6029C 2AFFC493 6008CD2C C1045D81
                    C8C739D5 FB3EFB75 221CB818 8CAAB86A
                    2E2669CF 209EA622 7D7072BA A83C2509
                    04
                    758A1427 79BE89E8 29E71984 CB40EF75
                    8CC4AD77 5FC5B9A3 E1C8ED52 F6FA36D9
                    A79D2476 92F4EDA3 A6BDAB77 D6AA6474
                    A464AE49 34663C52 65BA7018 BA091F79

      </artwork>
    </figure>
  </t>

</section>

<section title="Acknowledgments" numbered="no">

  <t>The author would like to thank his colleagues who have been involved in
    identity-based security for ad hoc networks, including (in alphabetical
    order) Alan Cullen, Peter Smith, and Bill Williams. He would also like to 
    thank Benjamin Smith (INRIA/Ecole Polytechnique) for independently
    recreating the signature and other values in <xref target="example"/> to 
    ensure their correctness, and Thomas Clausen (Ecole Polytechnique) for additional comments. </t>

</section>
  </back>

</rfc>
