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

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "reference.RFC.2119.xml">
<!ENTITY RFC3526 SYSTEM "reference.RFC.3526.xml">
<!ENTITY RFC6090 SYSTEM "reference.RFC.6090.xml">

<!ENTITY _S_c1 "S_c1">
<!ENTITY _S_s1 "S_s1">
<!ENTITY _K_c1 "K_c1">
<!ENTITY _K_s1 "K_s1">
<!ENTITY _kc1 "kc1">
<!ENTITY _ks1 "ks1">
<!ENTITY _VK_c "VK_c">
<!ENTITY _VK_s "VK_s">
<!ENTITY _vkc "vkc">
<!ENTITY _vks "vks">

<!ENTITY _iso-kam3-dl-2048-sha256 "iso&nbhy;kam3&nbhy;dl&nbhy;2048&nbhy;sha256">
<!ENTITY _iso-kam3-dl-4096-sha512 "iso&nbhy;kam3&nbhy;dl&nbhy;4096&nbhy;sha512">
<!ENTITY _iso-kam3-ec-p256-sha256 "iso&nbhy;kam3&nbhy;ec&nbhy;p256&nbhy;sha256">
<!ENTITY _iso-kam3-ec-p521-sha512 "iso&nbhy;kam3&nbhy;ec&nbhy;p521&nbhy;sha512">

]>

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

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

  <front>
    <title abbrev="HTTP Mutual Authentication: Algorithms">Mutual
    Authentication Protocol for HTTP: Cryptographic Algorithms Based&nbsp;on
the Key Agreement Mechanism 3 (KAM3)</title>

    <author fullname="Yutaka Oiwa" initials="Y." surname="Oiwa">
      <organization abbrev="ITRI, AIST">National Institute of Advanced Industrial Science and Technology</organization>
      <address>
        <postal>
          <street>Information Technology Research Institute</street>
          <street>Tsukuba Central 1</street>
          <street>1-1-1 Umezono</street>
          <city>Tsukuba-shi</city><region>Ibaraki</region>
          <country>Japan</country>
        </postal>
        <email>y.oiwa@aist.go.jp</email>
      </address>
    </author>

    <author fullname="Hajime Watanabe" initials="H." surname="Watanabe">
      <organization abbrev="ITRI, AIST">National Institute of Advanced Industrial Science and Technology</organization>
      <address>
        <postal>
          <street>Information Technology Research Institute</street>
          <street>Tsukuba Central 1</street>
          <street>1-1-1 Umezono</street>
          <city>Tsukuba-shi</city><region>Ibaraki</region>
          <country>Japan</country>
        </postal>
        <email>h-watanabe@aist.go.jp</email>
      </address>
    </author>

    <author fullname="Hiromitsu Takagi" initials="H." surname="Takagi">
      <organization abbrev="ITRI, AIST">National Institute of Advanced Industrial Science and Technology</organization>
      <address>
        <postal>
          <street>Information Technology Research Institute</street>
          <street>Tsukuba Central 1</street>
          <street>1-1-1 Umezono</street>
          <city>Tsukuba-shi</city><region>Ibaraki</region>
          <country>Japan</country>
        </postal>
        <email>takagi.hiromitsu@aist.go.jp</email>
      </address>
    </author>

    <author fullname="Kaoru Maeda" initials="K." surname="Maeda">
      <organization abbrev="Individual Contributor">Individual Contributor</organization>
      <address>
        <email>kaorumaeda.ml@gmail.com</email>
      </address>
    </author>

    <author fullname="Tatsuya Hayashi" initials="T." surname="Hayashi">
      <organization abbrev="Lepidum">Lepidum Co. Ltd.</organization>
      <address>
        <postal>
          <street>Village Sasazuka 3, Suite #602</street>
	  <street>1-30-3 Sasazuka</street>
          <city>Shibuya-ku</city><region>Tokyo</region>
          <country>Japan</country>
        </postal>
        <email>hayashi@lepidum.co.jp</email>
      </address>
    </author>

    <author fullname="Yuichi Ioku" initials="Y." surname="Ioku">
      <organization abbrev="Individual Contributor">Individual Contributor</organization>
      <address>
        <email>mutual-work@ioku.org</email>
      </address>
    </author>

    <date month="April" year="2017"/>

    <keyword>HTTP, authentication</keyword>

    <abstract>
      <t>
   This document specifies cryptographic algorithms for use with the
   Mutual user authentication method for the Hypertext Transfer Protocol
   (HTTP).</t>
    </abstract>
  </front>

<middle>

<section title="Introduction">

     <t>This document specifies algorithms for use with
     <xref target="RFC8120">the Mutual authentication protocol
     for the Hypertext Transfer Protocol (HTTP)</xref> (hereafter
     referred to as the "core specification"). The algorithms are
     based on augmented password-based authenticated key exchange
     (augmented PAKE) techniques. In particular, it uses one of
     three key exchange algorithms defined in 
     <xref target="ISO.11770-4.2006">ISO 11770-4 ("Information
     technology - Security techniques - Key management - Part 4:
     Mechanisms based on weak secrets")</xref> as its basis.
     </t>

     <t>
     To briefly summarize, the Mutual authentication protocol
     exchanges four values -- &_K_c1;, &_K_s1;, &_VK_c;,
     and &_VK_s; -- to perform authenticated key exchanges, using the
     password-derived secret pi and its "augmented version" J(pi).
     This document defines the set of functions &_K_c1;, &_K_s1;,
     and J for a specific algorithm family.
     </t>

     <t>
     Please note that from the point of view of literature related to
     cryptography, the original functionality of augmented PAKE is
     separated into the functions &_K_c1; and &_K_s1; as defined in
     this document, and the functions &_VK_c; and &_VK_s;, which are
     defined in Section&nbsp;12.2 of <xref target="RFC8120"/> as
     "default functions". For the purpose of security analysis, please
     also refer to these functions.
     </t>

  <section title="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>The term "natural numbers" refers to non-negative integers
    (including zero) throughout this document.</t>

    <t>This document treats both the input (domain) and the output (codomain)
    of hash functions as octet strings. When a natural&nbhy;number output
    of hash function H is required, it will be notated, for example, as
    INT(H(s)).</t>

  </section>

</section>

<section title="Cryptographic Overview (Non-normative)">
<t>
The cryptographic primitive used in this algorithm specification is
based on a variant of augmented PAKE called "APKAS-AMP" (augmented
password-authenticated key agreement scheme, version AMP), proposed by
T.&nbsp;Kwon and originally submitted to <xref target="IEEE-1363.2_2008"/>.
The general flow of the successful exchange is shown below for
informative purposes only. The multiplicative notations are used for
group operators, and all modulus operations for finite groups
(mod q and mod r) are omitted.
</t>

<figure>
<artwork><![CDATA[
   C: S_c1 = random
   C: K_c1 = g^(S_c1)
                    ----- ID, K_c1 ----->
   C: t_1 = H1(K_c1)                S: t_1 = H1(K_c1)
                                    S: fetch J = g^pi by ID
                                    S: S_s1 = random
                                    S: K_s1 = (J * K_c1^(t_1))^(S_s1)
                    <----- K_s1 -----
   C: t_2 = H2(K_c1, K_s1)          S: t_2 = H2(K_c1, K_s1)
   C: z = K_s1^((S_c1 + t_2) / (S_c1 * t_1 + pi))
                                    S: z' = (K_c1 * g^(t_2))^(S_s1)
   (assumption at this point: z = z' if authentication succeeded)

   C: VK_c = H4(K_c1, K_s1, z)      S: VK_c' = H4(K_c1, K_s1, z')
                    ----- VK_c ------->
                                    S: assert(VK_c = VK_c')

   C: VK_s' = H3(K_c1, K_s1, z)     S: VK_s = H3(K_c1, K_s1, z')
                    <----- VK_s ------
   C: assert(VK_s = VK_s')]]>
</artwork></figure>
<t>
Note that the concrete (binary) message formats (mapping to HTTP messages), as
well as the formal definitions of equations for the latter two messages, are
defined in the core specification <xref target="RFC8120" />.
The formal definitions for values corresponding to the first two messages are
defined in the following sections.
</t>
</section>


<section title="Authentication Algorithms" anchor="algorithms">

<t>
This document specifies one family of algorithms based on
APKAS-AMP, to be used with <xref target="RFC8120"/>. This family
consists of four authentication algorithms, which differ only in their
underlying mathematical groups and security parameters.  These
algorithms do not add any additional parameters.  The tokens for
these algorithms are as follows:
<list style="symbols">
 <t> &_iso-kam3-dl-2048-sha256;: for the 2048-bit discrete&nbhy;logarithm
 setting with the SHA-256 hash function.</t>

 <t> &_iso-kam3-dl-4096-sha512;: for the 4096-bit discrete&nbhy;logarithm
 setting with the SHA-512 hash function.</t>

 <t> &_iso-kam3-ec-p256-sha256;: for the 256-bit prime-field
 elliptic&nbhy;curve setting with the SHA-256 hash function.</t>

 <t> &_iso-kam3-ec-p521-sha512;: for the 521-bit prime-field
 elliptic&nbhy;curve setting with the SHA-512 hash function.</t>

</list>
</t>

<t>
For discrete&nbhy;logarithm settings, the underlying groups are the
2048&nbhy;bit and 4096-bit Modular Exponential (MODP) groups
defined in <xref target="RFC3526" />. See <xref target="modp-groups" /> for
the exact specifications for the groups and associated parameters.
Hash function H is SHA-256 for the 2048-bit group and SHA-512 for the
4096-bit group, respectively, as defined
in <xref target="FIPS.180-4.2015">FIPS&nbsp;PUB&nbsp;180&nbhy;4</xref>.
The hash iteration count nIterPi is 16384. The representation of the
parameters "&_kc1;", "&_ks1;", "&_vkc;", and "&_vks;" is
base64&nbhy;fixed&nbhy;number.
</t>

<t>
For the elliptic-curve settings, the underlying groups are the elliptic curves
over the prime fields P&nbhy;256 and P&nbhy;521, respectively, as specified
in Appendix&nbsp;D.1.2 of the
<xref target="FIPS.186-4.2013">FIPS&nbsp;PUB&nbsp;186&nbhy;4</xref>
specification.  Hash function H is SHA&nbhy;256 for the P&nbhy;256 curve
and SHA&nbhy;512 for the P&nbhy;521 curve, respectively. Cofactors of
these curves are 1. The hash iteration count nIterPi is 16384. The
representation of the parameters "&_kc1;", "&_ks1;", "&_vkc;", and
"&_vks;" is hex&nbhy;fixed&nbhy;number.
</t>

<t>
Note: This algorithm is based on the Key Agreement Mechanism 3 (KAM3)
as defined in Section&nbsp;6.3 of
<xref target="ISO.11770-4.2006">ISO/IEC 11770-4</xref>, with a few
modifications/improvements. However, implementers should consider this
document as normative, because several minor details of the algorithm
have changed and major improvements have been made.
</t>

<section title="Support Functions and Notations">

<t>The algorithm definitions use the support functions and notations defined
below.</t>

<t>Decimal notations are used for integers in this specification by default.
Integers in hexadecimal notations are prefixed with "0x".</t>

<t>In this document, the octet(), OCTETS(), and INT() functions are
used as defined in the <xref target="RFC8120">core specification</xref>.</t>

<t>Note: The definition of OCTETS() is different from the function
GE2OS_x in the original ISO specification; GE2OS_x takes the
shortest representation without preceding zeros.
</t>

<t>All of the algorithms defined in this specification use the default
functions defined in Section&nbsp;12.2 of <xref target="RFC8120"/> for
computing the values pi, &_VK_c;, and &_VK_s;.</t>

</section>

<section title="Functions for Discrete-Logarithm Settings">

<t>
In this section, an equation (x / y mod z) denotes a natural number w less
than z that satisfies (w * y) mod z = x mod z.
</t>

<t>
For the discrete logarithm, we refer to some of the domain parameters
by using the following symbols:

<list style="symbols">
<t>q: for "the prime" defining the MODP group.</t>
<t>g: for "the generator" associated with the group.</t>
<t>r: for the order of the subgroup generated by g.</t>
</list>
</t>

<t>
The function J is defined as
</t>

<figure><artwork><![CDATA[
   J(pi) = g^(pi) mod q
]]></artwork></figure>

<t>
The value of &_K_c1; is derived as 
</t>

<figure><artwork><![CDATA[
   K_c1 = g^(S_c1) mod q
]]></artwork></figure>

<t>
where &_S_c1; is a random integer within the range [1, r&minus;1]
and r is the size of the subgroup generated by g. In addition,
&_S_c1; MUST be larger than log(q)/log(g) (so that g^(&_S_c1;) > q).
</t>

<t>
The server MUST check the condition 1 &lt; &_K_c1; &lt; q&minus;1 upon
reception.
</t>

<t>
Let an intermediate value t_1 be
</t>

<figure><artwork><![CDATA[
   t_1 = INT(H(octet(1) | OCTETS(K_c1)))
]]></artwork></figure>

<t>
The value of &_K_s1; is derived from J(pi) and &_K_c1; as
</t>

<figure><artwork><![CDATA[
   K_s1 = (J(pi) * K_c1^(t_1))^(S_s1) mod q
]]></artwork></figure>

<t>
where &_S_s1; is a random number within the range [1, r&minus;1].
The value of &_K_s1; MUST satisfy 1 &lt; &_K_s1; &lt; q&minus;1.
If this condition is not held, the server MUST reject the exchange.
The client MUST check this condition upon reception.
</t>

<t>
Let an intermediate value t_2 be
</t>

<figure><artwork><![CDATA[
   t_2 = INT(H(octet(2) | OCTETS(K_c1) | OCTETS(K_s1)))
]]></artwork></figure>

<t>
The value z on the client side is derived by the following equation:
</t>

<figure><artwork><![CDATA[
   z = K_s1^((S_c1 + t_2) / (S_c1 * t_1 + pi) mod r) mod q
]]></artwork></figure>

<t>
The value z on the server side is derived by the following equation:
</t>

<figure><artwork><![CDATA[
   z = (K_c1 * g^(t_2))^(S_s1) mod q
]]></artwork></figure>

<t>
(Note: The original ISO specification contained a message pair
containing verification of value z along with the "transcript" of the
protocol exchange.  This functionality is contained in the
functions &_VK_c; and &_VK_s;.)</t>
</section>

<section title="Functions for Elliptic-Curve Settings">

<t>
For the elliptic-curve settings, we refer to some of the domain parameters
by the following symbols:

<list style="symbols">
<t>q: for the prime used to define the group.</t>
<t>G: for the point defined with the underlying group
   called "the&nbsp;generator".</t>
<t>h: for the cofactor of the group.</t>
<t>r: for the order of the subgroup generated by G.</t>
</list>
</t>

<t>
The function P(p) converts a curve point p into an integer representing
point p, by computing x * 2 + (y mod 2), where (x, y) are the coordinates
of point p. P'(z) is the inverse of function P; that is, it converts an
integer z to a point p that satisfies P(p)&nbsp;=&nbsp;z.  If such p
exists, it is uniquely defined.  Otherwise, z&nbsp;does not represent
a valid curve point.
</t>
<t>
The operator "+" indicates the elliptic-curve group operation, and
the operation [x] * p denotes an integer-multiplication of point p:
it calculates p + p + ... (x times) ... + p. See the literature on
elliptic&nbhy;curve cryptography for the exact algorithms used for those
functions (e.g., Section&nbsp;3 of <xref target="RFC6090" />; however,
note that <xref target="RFC6090" /> uses different notations). &nbsp;0_E
represents the infinity point. The equation (x / y mod z) denotes a
natural number w less than z that satisfies (w * y) mod z = x mod z.
</t>

<t>
The function J is defined as
</t>

<figure><artwork><![CDATA[
   J(pi) = [pi] * G
]]></artwork></figure>

<t>
The value of &_K_c1; is derived as 
</t>

<figure><artwork><![CDATA[
   K_c1 = P(K_c1'), where K_c1' = [S_c1] * G
]]></artwork></figure>

<t>
where &_S_c1; is a random number within the range [1, r&minus;1].
The server MUST check that (1)&nbsp;the value of
received &_K_c1; represents a valid curve point
and (2)&nbsp;[h] * &_K_c1;' is not equal to 0_E.
</t>

<t>
Let an intermediate integer t_1 be
</t>

<figure><artwork><![CDATA[
   t_1 = INT(H(octet(1) | OCTETS(K_c1)))
]]></artwork></figure>

<t>
The value of &_K_s1; is derived from J(pi) and &_K_c1;' = P'(&_K_c1;) as
</t>

<figure><artwork><![CDATA[
   K_s1 = P([S_s1] * (J(pi) + [t_1] * K_c1'))
]]></artwork></figure>

<t>
where &_S_s1; is a random number within the range [1, r&minus;1].
The value of &_K_s1; MUST represent a valid curve point and 
satisfy [h]&nbsp;*&nbsp;P'(&_K_s1;)&nbsp;&lt;&gt;&nbsp;0_E. If this
condition is not satisfied, the server MUST reject the exchange. The
client MUST check this condition upon reception.
</t>

<t>
Let an intermediate integer t_2 be
</t>

<figure><artwork><![CDATA[
   t_2 = INT(H(octet(2) | OCTETS(K_c1) | OCTETS(K_s1)))
]]></artwork></figure>

<t>
The value z on the client side is derived by the following equation:
</t>

<figure><artwork><![CDATA[
   z = P([(S_c1 + t_2) / (S_c1 * t_1 + pi) mod r] * P'(K_s1))
]]></artwork></figure>

<t>
The value z on the server side is derived by the following equation:
</t>

<figure><artwork><![CDATA[
   z = P([S_s1] * (P'(K_c1) + [t_2] * G))
]]></artwork></figure>

</section>

</section>


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

This document defines four new tokens that have been
added to the "HTTP Mutual Authentication Algorithms" registry:
</t>

<?rfc compact="no"?>
<texttable>
<ttcol>Token</ttcol><ttcol>Description</ttcol><ttcol>Reference</ttcol>
<c>&_iso-kam3-dl-2048-sha256;</c><c>ISO-11770-4 KAM3, &nbsp;&nbsp;2048-bit DL</c><c>RFC 8121</c>
<c>&_iso-kam3-dl-4096-sha512;</c><c>ISO-11770-4 KAM3, &nbsp;&nbsp;4096-bit DL</c><c>RFC 8121</c>
<c>&_iso-kam3-ec-p256-sha256;</c><c>ISO-11770-4 KAM3, &nbsp;&nbsp;&nbsp;256-bit EC</c><c>RFC 8121</c>
<c>&_iso-kam3-ec-p521-sha512;</c><c>ISO-11770-4 KAM3, &nbsp;&nbsp;&nbsp;521-bit EC</c><c>RFC 8121</c>
</texttable>
<?rfc compact="yes"?>

</section>

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

<t>
Please refer to the Security Considerations section
of the <xref target="RFC8120">core specification</xref> for
algorithm-independent considerations.
</t>

<section title="General Implementation Considerations">
<t>
<list style="symbols">
<t>During the exchange, the value &_VK_s;, defined in
<xref target="RFC8120"/>, MUST only be sent when the server has
received a correct (expected) value of &_VK_c;.  This is a
cryptographic requirement, as stated in
<xref target="ISO.11770-4.2006" />.</t>

<t>All random numbers used in these algorithms MUST be
cryptographically secure against forward
and backward guessing attacks.
</t>

<t>To prevent timing-based side-channel attacks, computation times
of all numerical operations on discrete&nbhy;logarithm group elements and
elliptic-curve points MUST be normalized and made independent of
the exact values.</t>

</list>
</t>

</section>

<section title="Cryptographic Assumptions and Considerations">
<t>
The notes in this subsection are for those who analyze the security
of this algorithm and those who might want to make a derived work
from this algorithm specification.
</t>
<t>
<list style="symbols">
<t>
The treatment of an invalid &_K_s1; value in the exchange has been
changed from the method defined in the original ISO specification,
which specifies that the sender should retry with another random
&_S_s1; value. We specify that the exchange must be rejected. This is
due to an observation that this condition is less likely to result
from a random error caused by an unlucky choice of &_S_s1; but is
more likely the result of a systematic failure caused by an invalid
J(pi) value (even implying possible denial-of-service attacks).
</t>
<t>
The usual construction of authenticated key exchange algorithms
consists of a key exchange phase and a key verification phase.
To avoid security risks or vulnerabilities caused by mixing values from
two or more key exchanges, the latter usually involves some kinds of
exchange transactions to be verified.
In the algorithms defined in this document, such verification steps are
provided in the generalized definitions of &_VK_c; and &_VK_s; in
<xref target="RFC8120"/>. If the algorithm defined above is used in
other protocols, this aspect MUST be given careful consideration.
</t>
<t>
The domain parameters chosen and specified in this document are based on a few
assumptions. In the discrete-logarithm setting, q&nbsp;has to be a safe prime
([(q - 1) / 2] must also be prime), and r&nbsp;should be the largest possible
value [(q - 1) / 2]. In the elliptic-curve setting, r has to be prime.
Implementers defining a variation of this algorithm using a different
domain parameter SHOULD be attentive to these conditions.
</t>
</list>
</t>

</section>
</section>

</middle>

  <back>

    <references title="Normative References">
      &RFC2119;
      &RFC3526;

      <reference anchor="FIPS.180-4.2015" target="http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf">
        <front>
          <title>Secure Hash Standard (SHS)</title>
          <author>
            <organization>National Institute of Standards and Technology</organization>
          </author>
          <date year="2015" month="August" />
        </front>
	<seriesInfo name="FIPS" value="PUB 180-4" />
        <seriesInfo name='DOI' value='10.6028/NIST.FIPS.180-4' />
      </reference>

      <reference anchor="FIPS.186-4.2013" target="http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf">
        <front>
          <title>Digital Signature Standard (DSS)</title>
          <author>
            <organization>National Institute of Standards and Technology</organization>
          </author>
          <date year="2013" month="July" />
        </front>
	<seriesInfo name="FIPS" value="PUB 186-4" />
        <seriesInfo name='DOI' value='10.6028/NIST.FIPS.186-4' />
      </reference>

<!-- draft-ietf-httpauth-mutual (RFC 8120) -->
    <reference anchor="RFC8120" target="http://www.rfc-editor.org/info/rfc8120">
      <front>
      <title>Mutual Authentication Protocol for HTTP</title>
      <author initials="Y" surname="Oiwa" fullname="Yutaka Oiwa">
          <organization />
      </author>
      <author initials="H" surname="Watanabe" fullname="Hajime Watanabe">
          <organization />
      </author>
      <author initials="H" surname="Takagi" fullname="Hiromitsu Takagi">
          <organization />
      </author>
      <author initials="K" surname="Maeda" fullname="Kaoru Maeda">
            <organization />
      </author>
      <author initials="T" surname="Hayashi" fullname="Tatsuya Hayashi">
          <organization />
      </author>
      <author initials="Y" surname="Ioku" fullname="Yuichi Ioku">
          <organization />
      </author>
      <date year="2017" month="April" />
      </front>
      <seriesInfo name="RFC" value="8120"/>
      <seriesInfo name="DOI" value="10.17487/RFC8120"/>
    </reference>
   </references>

    <references title="Informative References">

      <reference anchor='IEEE-1363.2_2008' target='http://ieeexplore.ieee.org/servlet/opac?punumber=4773328'>
	<front>
	  <title>IEEE Standard Specifications for Password-Based Public-Key Cryptographic Techniques</title>
	  <author>
	    <organization>IEEE</organization>
	  </author>
          <date/>
	</front>
	<seriesInfo name='IEEE' value='1363.2-2008' />
	<seriesInfo name='DOI' value='10.1109/ieeestd.2009.4773330' />
      </reference>

      <reference anchor="ISO.11770-4.2006" target="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=39723">
        <front>
          <title>Information technology -- Security techniques -- Key management -- Part 4: Mechanisms based on weak secrets</title>
          <author>
            <organization>International Organization for Standardization</organization>
          </author>
          <date year="2006" month="May" />
        </front>
	<seriesInfo name="ISO" value="Standard 11770-4" />
      </reference>

      &RFC6090;

    </references>

<section anchor="modp-groups" title="(Informative) Group Parameters for
Algorithms Based on the Discrete Logarithm">

<t>The MODP group used for the &_iso-kam3-dl-2048-sha256; algorithm
is defined by the following parameters:</t>

<t>The prime is</t>

<figure>
<artwork>
   q = 0xFFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
         29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
         EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
         E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED
         EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D
         C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F
         83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D
         670C354E 4ABC9804 F1746C08 CA18217C 32905E46 2E36CE3B
         E39E772C 180E8603 9B2783A2 EC07A28F B5C55DF0 6F4C52C9
         DE2BCBF6 95581718 3995497C EA956AE5 15D22618 98FA0510
         15728E5A 8AACAA68 FFFFFFFF FFFFFFFF
</artwork>
</figure>

<t>The generator is</t>

<figure>
<artwork>
   g = 2
</artwork>
</figure>

<t>The size of the subgroup generated by g is</t>

<figure>
<artwork>
   r = (q - 1) / 2 =
       0x7FFFFFFF FFFFFFFF E487ED51 10B4611A 62633145 C06E0E68
         94812704 4533E63A 0105DF53 1D89CD91 28A5043C C71A026E
         F7CA8CD9 E69D218D 98158536 F92F8A1B A7F09AB6 B6A8E122
         F242DABB 312F3F63 7A262174 D31BF6B5 85FFAE5B 7A035BF6
         F71C35FD AD44CFD2 D74F9208 BE258FF3 24943328 F6722D9E
         E1003E5C 50B1DF82 CC6D241B 0E2AE9CD 348B1FD4 7E9267AF
         C1B2AE91 EE51D6CB 0E3179AB 1042A95D CF6A9483 B84B4B36
         B3861AA7 255E4C02 78BA3604 650C10BE 19482F23 171B671D
         F1CF3B96 0C074301 CD93C1D1 7603D147 DAE2AEF8 37A62964
         EF15E5FB 4AAC0B8C 1CCAA4BE 754AB572 8AE9130C 4C7D0288
         0AB9472D 45565534 7FFFFFFF FFFFFFFF
</artwork>
</figure>

    <t>The MODP group used for the &_iso-kam3-dl-4096-sha512; algorithm
    is defined by the following parameters:</t>


<t>The prime is</t>

<figure>
<artwork>
   q = 0xFFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
         29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
         EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
         E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED
         EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D
         C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F
         83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D
         670C354E 4ABC9804 F1746C08 CA18217C 32905E46 2E36CE3B
         E39E772C 180E8603 9B2783A2 EC07A28F B5C55DF0 6F4C52C9
         DE2BCBF6 95581718 3995497C EA956AE5 15D22618 98FA0510
         15728E5A 8AAAC42D AD33170D 04507A33 A85521AB DF1CBA64
         ECFB8504 58DBEF0A 8AEA7157 5D060C7D B3970F85 A6E1E4C7
         ABF5AE8C DB0933D7 1E8C94E0 4A25619D CEE3D226 1AD2EE6B
         F12FFA06 D98A0864 D8760273 3EC86A64 521F2B18 177B200C
         BBE11757 7A615D6C 770988C0 BAD946E2 08E24FA0 74E5AB31
         43DB5BFC E0FD108E 4B82D120 A9210801 1A723C12 A787E6D7
         88719A10 BDBA5B26 99C32718 6AF4E23C 1A946834 B6150BDA
         2583E9CA 2AD44CE8 DBBBC2DB 04DE8EF9 2E8EFC14 1FBECAA6
         287C5947 4E6BC05D 99B2964F A090C3A2 233BA186 515BE7ED
         1F612970 CEE2D7AF B81BDD76 2170481C D0069127 D5B05AA9
         93B4EA98 8D8FDDC1 86FFB7DC 90A6C08F 4DF435C9 34063199
         FFFFFFFF FFFFFFFF
</artwork>
</figure>

<t>The generator is</t>

<figure>
<artwork>
   g = 2
</artwork>
</figure>

<t>The size of the subgroup generated by g is</t>

<figure>
<artwork>
   r = (q - 1) / 2 =
       0x7FFFFFFF FFFFFFFF E487ED51 10B4611A 62633145 C06E0E68
         94812704 4533E63A 0105DF53 1D89CD91 28A5043C C71A026E
         F7CA8CD9 E69D218D 98158536 F92F8A1B A7F09AB6 B6A8E122
         F242DABB 312F3F63 7A262174 D31BF6B5 85FFAE5B 7A035BF6
         F71C35FD AD44CFD2 D74F9208 BE258FF3 24943328 F6722D9E
         E1003E5C 50B1DF82 CC6D241B 0E2AE9CD 348B1FD4 7E9267AF
         C1B2AE91 EE51D6CB 0E3179AB 1042A95D CF6A9483 B84B4B36
         B3861AA7 255E4C02 78BA3604 650C10BE 19482F23 171B671D
         F1CF3B96 0C074301 CD93C1D1 7603D147 DAE2AEF8 37A62964
         EF15E5FB 4AAC0B8C 1CCAA4BE 754AB572 8AE9130C 4C7D0288
         0AB9472D 45556216 D6998B86 82283D19 D42A90D5 EF8E5D32
         767DC282 2C6DF785 457538AB AE83063E D9CB87C2 D370F263
         D5FAD746 6D8499EB 8F464A70 2512B0CE E771E913 0D697735
         F897FD03 6CC50432 6C3B0139 9F643532 290F958C 0BBD9006
         5DF08BAB BD30AEB6 3B84C460 5D6CA371 047127D0 3A72D598
         A1EDADFE 707E8847 25C16890 54908400 8D391E09 53C3F36B
         C438CD08 5EDD2D93 4CE1938C 357A711E 0D4A341A 5B0A85ED
         12C1F4E5 156A2674 6DDDE16D 826F477C 97477E0A 0FDF6553
         143E2CA3 A735E02E CCD94B27 D04861D1 119DD0C3 28ADF3F6
         8FB094B8 67716BD7 DC0DEEBB 10B8240E 68034893 EAD82D54
         C9DA754C 46C7EEE0 C37FDBEE 48536047 A6FA1AE4 9A0318CC
         FFFFFFFF FFFFFFFF
</artwork>
</figure>

    </section>

    <section anchor="other-values" title="(Informative) Derived Numerical Values">
    <t>
    This section provides several numerical values for implementing this
    protocol. These values are derived from the specifications provided
    in <xref target="algorithms"/>. The values shown in this section
    are for informative purposes only.
    </t>

    <?rfc compact="no"?>
    <texttable>
    <ttcol></ttcol>
    <ttcol>dl&nbhy;2048</ttcol>
    <ttcol>dl&nbhy;4096</ttcol>
    <ttcol>ec&nbhy;p256</ttcol>
    <ttcol>ec&nbhy;p521</ttcol>
    <ttcol></ttcol>

    <c>Size of &_K_c1;, etc.</c>
    <c>2048</c>
    <c>4096</c>
    <c>257</c>
    <c>522</c>
    <c>(bits)</c>

    <c>hSize, size of H(...)</c>
    <c>256</c>
    <c>512</c>
    <c>256</c>
    <c>512</c>
    <c>(bits)</c>

    <c>Length of OCTETS(&_K_c1;), etc.</c>
    <c>256</c>
    <c>512</c>
    <c>33</c>
    <c>66</c>
    <c>(octets)</c>
    
    <c>Length of &_kc1;, &_ks1; param. values</c>
    <c>344*</c>
    <c>684*</c>
    <c>66</c>
    <c>132</c>
    <c>(octets)</c>

    <c>Length of &_vkc;, &_vks; param. values</c>
    <c>44*</c>
    <c>88*</c>
    <c>64</c>
    <c>128</c>
    <c>(octets)</c>

    <c>Minimum allowed &_S_c1;</c>
    <c>2048</c>
    <c>4096</c>
    <c>1</c>
    <c>1</c>
    <c></c>
    </texttable>
    <?rfc compact="yes"?>

    <t>(The numbers marked with an "*" do not include any enclosing
    quotation marks.)</t>

    </section>

  </back>
</rfc>
