One document matched: draft-oiwa-http-mutualauth-00.xml
<?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 RFC2616 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2616.xml">
<!ENTITY RFC2617 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2617.xml">
<!ENTITY RFC3526 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3526.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
(Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
(using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-oiwa-http-mutualauth-00" ipr="full3978">
<!-- 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="Mutual Authentication Protocol for HTTP">Mutual Authentication Protocol for HTTP</title>
<!-- add 'role="editor"' below for the editors if appropriate -->
<!-- Another author who claims to be an editor -->
<author fullname="Yutaka Oiwa" initials="Y." surname="Oiwa">
<organization abbrev="RCIS, AIST">National Institute of Advanced Industrial Science and Technology</organization>
<address>
<postal>
<street>Research Center for Information Security</street>
<street>Akihabara Daibiru #1102</street>
<street>1-18-13 Sotokanda</street>
<city>Chiyoda-ku</city><region>Tokyo</region>
<country>JP</country>
</postal>
<phone>+81 3-5298-4722</phone>
<email>y.oiwa@aist.go.jp</email>
<!-- uri and facsimile elements may also be added -->
</address>
</author>
<author fullname="Hajime Watanabe" initials="H." surname="Watanabe">
<organization abbrev="RCIS, AIST">National Institute of Advanced Industrial Science and Technology</organization>
</author>
<author fullname="Hiromitsu Takagi" initials="H." surname="Takagi">
<organization abbrev="RCIS, AIST">National Institute of Advanced Industrial Science and Technology</organization>
</author>
<author fullname="Hirofumi Suzuki" initials="H." surname="Suzuki">
<organization abbrev="Yahoo! Japan">Yahoo! Japan, Inc.</organization>
<address>
<postal>
<street>Roppongi Hills Mori Tower</street>
<street>6-10-1 Roppongi</street>
<city>Minato-ku</city><region>Tokyo</region>
<country>JP</country>
</postal>
<phone>+81 3-6440-6290</phone>
</address>
</author>
<date month="November" year="2007" />
<!-- 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 -->
<workgroup>Internet Engineering Task Force</workgroup>
<!-- WG name at the upperleft corner of the doc,
IETF is fine for individual submissions.
If this element is not present, the default is "Network Working Group",
which is used by the RFC Editor as a nod to the history of the IETF. -->
<keyword>HTTP, authentication</keyword>
<!-- Keywords will be incorporated into HTML output
files in a meta tag but they have no effect on text or nroff
output. If you submit your draft to the RFC Editor, the
keywords will be used for the search engine. -->
<abstract>
<t>This document defines the "Mutual authentication protocol for
Hyper-Text Transport Protocol". This protocol provides true
mutual authentication between HTTP clients and servers using
simple password-based authentication. Unlike Basic and Digest HTTP
access authentication protocol, the protocol ensures that server
knows the user's entity (encrypted password) upon successful
authentication. This prevents common phishing attacks: phishing
attackers cannot convince users that the user has been authenticated to
the genuine website. Furthermore, even when user has been authenticated
against an illegitimate server, the server can not gain any bit of
information about user's passwords.</t>
</abstract>
</front>
<middle>
<section title="Introduction">
<t>This document defines the "Mutual authentication protocol for
Hyper-Text Transport Protocol". This protocol provides true
mutual authentication between HTTP clients and servers
using simple password-based authentication. Unlike Basic and
Digest HTTP access authentication protocol, the protocol ensures
that server knows the user's entity (encrypted password)
upon successful authentication. This prevents common phishing
attacks: phishing attackers cannot convince users that the user
has been authenticated to the genuine website. Furthermore, even
when user has been authenticated against an illegitimate server,
the server can not gain any bit of information about user's
passwords.</t>
<t>Recently, phishing attacks are getting more and more
sophisticated. Phishers not only steal user's password directly,
but imitate successful authentication to steal user's sensitive
information, check the password validity by forwarding the
password to the legitimate server, or employ a man-in-the-middle
attack to hijack user's login session. Existing countermeasures
such as one-time passwords can not completely solve these
problems.</t>
<t>
The protocol prevents such attacks by providing users a way to
discriminate between true and fake web servers using their own
passwords. Even when a user inputs his/her password to a fake
website, using this authentication method, any information about
the password does not leak to the phisher, and the user certainly
notices that the mutual authentication has failed. Phishers
cannot make such authentication attempt succeed, even if they
forward received data from a user to the legitimate server or
vice versa. Users can safely input sensitive data to the web
forms after confirming that the mutual authentication has
succeeded.
</t>
<t>To achieve this goal, this protocol use a mechanism in <eref target="ISO-11770-4">ISO/IEC
11770-4</eref>, a kind of PAKE (Password-Authenticated Key Exchange)
authentication algorithms as a basis. The use of PAKE
mechanism allows users to use familiar ID/password based
accesses, without fear of leaking any password information to
the communication peer. The protocol, as a whole, is designed
as a natural extension to the current HTTP authentication
schema such as Basic and Digest access authentication (RFC
2617). To use PAKE mechanism for such a purpose, we had to
modify it to prevent credential forwarding (man-in-the-middle)
attacks.</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 <eref target="RFC2119" />.</t>
</section>
</section>
<section anchor="protocol overview" title="Protocol Overview">
<t>The following sequence is a typical sequence for the first access to the resource.
<list style="symbols">
<t> If the server (S) has received a request for mutual-authentication
protected resources from the Client (C) (which is not a req-A1
nor a req-A3 message), it sends a 401-B0 message to C.
<vspace blankLines="1" />
When C has received a 401-B0 message, C SHOULD check validity of the message.
If succeed, C processes the body of the message, and enables the password entry field.
</t>
<t> If the user has input the username and password as a response to
the 401-B0 message, C creates a value s_A, calculates
the value w_A, and construct and send a req-A1 message.
</t>
<t> If S has received an req-A1 message,
S should record the received w_A value, validate
w_A using T(w_A), and then look up the username from the
user table. if the user is found, S prepares a
new session id (sid), record it into a session table, and then
construct s_B, calculate w_B, and then send an 401-B1 message.
<vspace blankLines="1" />
If there is no matching user found, the server SHOULD construct
a fake w_B value, and let the protocol going on by sending an
401-B1 message.
</t>
<t> When C has received an 401-B1 message as a response for a req-A1 message,
C should compute z and K_i, compute o_A, and send
an req-A3 message.
<vspace blankLines="1" />
If C receives any messages other than
401-B1, C MUST NOT process the message body and treat
it as a fatal communication error condition. This case includes
the reception of HTTP OK (200-status) message.
</t>
<t> If S has received an req-A3 message, S should look up the
received sid from the session table. If no matching sid message
is received, or if S has not received the corresponding req-A1
message beforehand, S SHOULD send an 401-B0-stale message.
<vspace blankLines="1" />
Otherwise, S should computes o_A' and check its value.
If the validation has failed, the server SHOULD send an 401-B0
message.
<vspace blankLines="1" />
If the validation has succeed, the server SHOULD calculate
o_B, and send a 200-B4 message.
</t>
<t> When C has received a 401-B0-stale message as a response to
req-A3 message, and it is the first time that it has received a
401-B0-stale message, C SHOULD redo constructing req-A1 message.
<vspace blankLines="1" />
Instead, when C has received an 401-B0 message, it means the
authentication has been failed, possibly due to that the wrong
password has been given. C MAY ignore the body of the 401-B0
message in this case.
<vspace blankLines="1" />
When C has received an 200-B4 message,
C MUST first compute the value of o_B' and validates
the value o_B sent from the server.
If it has not verified successfully, C MUST ignore the
body of the message, and treat it as a fatal communication error
condition. If it has succeed, C will process the body
of the message.
<vspace blankLines="1" />
If C receives any messages other than 401-B0-stale or
401-B1, C SHOULD NOT process the message body and other headers and treat
it as a fatal communication error condition. This case includes
the reception of usual HTTP OK (200-status) messages.
</t>
</list>
</t>
<t>
For the second or later request to the server, if the client knows that
the resource is likely to require the authentication, the client MAY
omit first unauthenticated request and send req-A1 message immediately.
Furthermore, if client owns a valid session ID (sid), the client can
send a req-A3 message using existing sid. In either case, the first
(and only the first) response from the server MAY be a normal,
unauthenticated message, and client MAY accept such messages.
For more detail, see <xref target="cli-decision" />.
</t>
</section>
<section anchor="syntax" title="Message Syntax">
<t>
The Mutual authentication protocol uses four headers: WWW-Authenticate
(in responses with status code 401), Optional-WWW-Authenticate (in
responses with positive status codes), Authorization (in requests),
and Authentication-info (in positive responses). These three headers
share the common syntax described in <xref target="figure-syntax" />.
The syntax is denoted in the augmented BNF syntax defined in <eref target="RFC2616" />,
except that "a"..."b" means any ASCII characters between "a" and "b" inclusive.
The syntax is a subset of the one described in <eref target="RFC2617" />.
</t>
<figure anchor="figure-syntax" title="BNF syntax for the headers used in the protocol">
<artwork>
header = header-name ":" spaces "Mutual" spaces fields
header-name = "WWW-Authenticate" | "Optional-WWW-Authenticate"
| "Authorization" | "Authentication-info"
spaces = 1*(SP | HT | CR LF 1*(SP | HT))+
fields = field 0*("," spaces fields)
field = key "=" value
key = extensive-token
extensive-token = token | extension-token
extension-token = token "@" token
token = 1*("0"..."9" | "A"..."Z" | "a"..."z"
| "-" | "_" | ".")
value = extensive-token | integer | hex-integer
| hex-fixed-number
| base64-fixed-number | string
integer = "0" | ("1"..."9") 0*("0"..."9")
hex-integer = "0" |
("1"..."9" | "A"..."F" | "a"..."f")
0*("0"..."9" | "A"..."F" | "a"..."f")
hex-fixed-number = 1*("0"..."9" | "A"..."F" | "a"..."f")
base64-fixed-number = string
string = <"> *(<TEXT except <"> and "\"> | "\\" |
"\" <"> | "\,")* <">
</artwork>
</figure>
<section title="Tokens and Ext-tokens">
<t>
The tokens MUST be interpreted case-insensitive, and SHOULD be sent
in the same case as shown in the specification. All hex-fixed-number or
hex-integer numbers are case-insensitive, and SHOULD be sent in
lower-case.
</t>
<t>
Extensive-tokens are used where the set of acceptable tokens are
extensible. Any non-standard extensions of this protocol MUST use the
extension-tokens of format "<token>@<domain-name>", where domain-name is
the valid registered (sub-)domain name on the Internet owned by the
party who defines extensions.
</t>
</section>
<section title="Numbers">
<t>
The syntax definitions of integer and
hex-integer only allow representations
which do not contain extra leading 0s.
</t>
<t>
The numbers represented as a hex-fixed-number SHALL have even
characters (i.e. multiple of eight bits). When these are generated
from the cryptographic values, those SHOULD have the natural length:
if these are generated from a hash function, its lengths SHOULD
correspond to the hash size; if these are representing elements of a
mathematical group, its lengths SHOULD be the shortest which can
represent all elements in the group. Other values such as session-id
are represented in any (even) length determined by the side who
generates it first, and the same length SHALL be used throughout the
whole communications by both peers.
</t>
<t>
The numbers represented as a base64-fixed-number MUST be generated as follows:
first, the number is converted to a big-endian octet-string
representation. The length of the representation is determined in the
same way as above. Then, the string is BASE64-converted, and then
surrounded by two double-quotations.
</t>
</section>
<section title="Strings">
<t>
All strings outside ASCII or equivalent character sets SHOULD be
encoded using UTF-8 encoding of the ISO 10646-1 character set.
Both peers SHOULD reject any invalid UTF-8 sequences which causes
decoding ambiguities (e.g. containing <"> in the
second or later byte of the UTF-8 encoded characters).
To encode character strings, these will first be encoded according to UTF-8, then
all occurrences of characters <"> and
"\" will be escaped by prepending "\", and
two <">s will be put around the string.
If the contents of the strings are comma-separated values, the commas
in the values are also quoted by "\".
</t>
<t>
If strings are representing a domain name or URI which contains
non-ASCII characters, the host parts SHOULD be encoded
using puny-code instead of UTF-8, and SHOULD use lower-case ASCII characters.
</t>
<t>
For Base64-fixed-numbers, which use the string syntax, see the previous section.
</t>
</section>
</section>
<section title="Messages">
<section title="401-B0" anchor="401-B0">
<t>
Every 401-B0 message must be an valid HTTP 401 (Authentication Required) message
containing one (and only one: hereafter not explicitly noticed)
"WWW-Authenticate" header of the following format.
</t>
<t>
WWW-Authenticate: Mutual algorithm=xxxx, validation=xxxx, realm=xxxx, stale=0
</t>
<t>
The header MUST contain the fields with the following keys:
<list style="hanging" hangIndent="15">
<t hangText="algorithm:">(extensive-token) specifies the authentication algorithm to be used.
The value MUST be one of the tokens described in <xref target="algorithm" />,
or the tokens specified in other supplemental specification documentations.
</t>
<t hangText="validation:">(extensive-token) specifies the method of host validation.
The value MUST be one of the tokens described in <xref target="validation" />,
or the tokens specified in other supplemental specification documentations.
</t>
<t hangText="realm:">(string) is a UTF-8 encoded name of the authentication
domain inside the server.
</t>
<t hangText="pwdhash:">(optional, extensive-token) specifies the hash algorithm
(referred to by ph) used for additionally hashing the password.
The valid tokens are
<list style="symbols" hangIndent="3">
<t> none: ph(p) = p</t>
<t> md5: ph(p) = MD5(p)</t>
<t> digest-md5: ph(p) defined as A1 in <eref target="RFC2617" />.</t>
<t> sha1: ph(p) = SHA1(p)</t>
</list>
If omitted, the value "none" is assumed.
</t>
<t hangText="auth-domain:">(optional, string) MUST currently be equal to the
host-part of the requested URI, and assumed to have that
value if omitted. The triple of auth-domain, algorithm,
and realm determines the "authentication realm" which
defines the area where the same user-name and passwords are applicable.
</t>
<t hangText="stale:">(token) MUST be "0".
</t>
</list>
</t>
<t>
Any additional fields MUST NOT be contained in the header,
except those explicitly specified in supplement specifications of the "authentication algorithm".
</t>
<t>
The algorithm will determine the values for w_A, w_B, o_A and o_B.
</t>
</section>
<section title="401-B0-stale">
<t>
A 401-B0-stale message is a variant of 401-B0 message, which means that
the client has sent a request message which is not for any active session.
</t>
<t>
WWW-Authenticate: Mutual algorithm=xxxx, validation=xxxx, realm=xxxx, stale=1
</t>
<t>
The header MUST contain the same fields as in 401-B0, except the stale field holds the integer 1.
</t>
</section>
<section title="req-A1">
<t>
Every req-A1 message MUST be a valid HTTP request message containing a
"Authorization" header of the following format.
</t>
<t>
Authorization: Mutual algorithm=xxxx, validation=xxxx, user=xxxx, realm=xxxx, wa=xxxx
</t>
<t>
The header MUST contain the fields with the following keys:
</t>
<t>
<list style="hanging" hangIndent="15">
<t hangText="algorithm, validation, auth-domain, realm:">MUST be the same value as it is received from S.
</t>
<t hangText="user:">(string) is the UTF-8 encoded name of the user.
</t>
<t hangText="wa:">(algorithm-determined) is the value of w_A specified by the used algorithm.
</t>
</list>
</t>
</section>
<section title="401-B1">
<t>
Every 401-B1 message MUST be an valid HTTP 401 (Authentication Required) message
containing a "WWW-Authenticate" header of the following format.
</t>
<t>
WWW-Authenticate: Mutual sid=xxxx, wb=xxxx, nc-max=x, nc-window=x, time=x, path=xxxx
</t>
<t>
The header MUST contain the fields with the following keys:
</t>
<t>
<list style="hanging" hangIndent="15">
<t hangText="sid:">(hex-fixed-number) MUST be a session id, which is a random
integer. The sid SHOULD have uniqueness of at least 80 bits or
the square of the maximal estimated transactions
concurrently available in the session table, whichever is
larger. Sids are local to each authentication realm
concerned: the same sids for different authentication realms
SHALL be treated as independent ones.
</t>
<t hangText="wb:">(algorithm-determined) is the value of w_B specified by the algorithm.
</t>
<t hangText="nc-max:">(hex-integer) is the maximal value of nonce counts which S accepts.
</t>
<t hangText="nc-window:">(hex-integer) the number of available nonce slots which S prepares.
The value of nc-window is RECOMMENDED to be thirty-two ("20" in hex-integer) or more.
</t>
<t hangText="time:">(integer) represents the suggested time (in
seconds) which C can reuse the session key represented by sid. It SHOULD at
least be 60. The value of this field is not directly linked to the
duration that S keeps track of the session represented by sid.
</t>
<t hangText="path:">(string) specifies for which path in the URI space the same
authentication is expected to apply. The value is the same format
as it is specified in <eref target="RFC2617" /> for the Digest authentications, and
client is RECOMMENDED to recognize it. The all paths contained in the field SHALL be
inside the specified auth-domain: if not, client SHOULD ignore such elements.
</t>
</list>
</t>
</section>
<section title="req-A3">
<t>
Every req-A3 message MUST be a valid HTTP request message containing a
"Authorization" header of the following format.
</t>
<t>
Authorization: Mutual sid=xxxx, nc=x, oa=xxxx
</t>
<t>
The fields contained in the header is as follows:
<list style="hanging" hangIndent="15">
<t hangText="sid:">(hex-fixed-number) MUST be one of the sid values which has been received from S.
</t>
<t hangText="nc:">(hex-integer) is a nonce value which is unique among the requests sharing the same sid.
The valie of nc MUST satisfy the following properties:
<list style="symbols" hangIndent="2">
<t> It is not larger than the nc-max value which has been
sent from S in the session represented by the sid.</t>
<t> C have not sent the same value in the same session.</t>
<t> It is not smaller than (largest-nc - nc-window),
where largest-nc is the maximal value of nc
which has previously been sent in the session,
and nc-window is the value of the nc-window field
which has been sent from S in the session.</t>
</list>
</t>
<t hangText="oa:">(algorithm-determined) is the value of o_A specified by the algorithm.
</t>
</list>
</t>
</section>
<section title="200-B4">
<t>
Every 200-B1 message MUST be an valid HTTP message
which is not 401 (Authentication Required) type,
containing an "Authentication-Info" header of the following format.
</t>
<t>
Authentication-Info: Mutual sid=xxxx, ob=xxxx
</t>
<t>
The fields contained in the header is as follows:
</t>
<t>
<list style="hanging" hangIndent="15">
<t hangText="sid:">(hex-fixed-number) MUST be the value received from C.
</t>
<t hangText="ob:">(algorithm-determined) is the value of o_B specified by the algorithm.
</t>
<t hangText="logout-timeout:">(optional, integer) is a number of seconds after which the
client should re-validate the user's password for the authentication realm. As a special
case, the value 0 means that the client SHOULD automatically
forget the user-inputed password to the current
authentication realm and revert to the unauthenticated state (i.e.~server-initiated
logout). This does not, however, mean that the long-term
memories for the passwords (such as password reminders and
auto fill-in) should be removed.
If new value of timeout is received for the same authentication realm,
it overrides the previous timeout.
</t>
</list>
</t>
</section>
</section>
<section title="Decision procedure for the client" anchor="cli-decision">
<t>
To securely implementing the protocol, the user client must be careful
to accepting authenticated responses from the server.
</t>
<t>Clients SHOULD implement the decision procedure equivalent to the one shown below.
(Unless implementers understand what is required for security, they should not alter this.)
<list style="format Step %d">
<t>
If the client software need to get a new Web resource, check
whether the resource is expected to be inside some authentication realm for which the user
has already authenticated.
if yes, go to Step 2. Otherwise, go to Step 5.
</t>
<t>
Check whether there is an available sid for the authentication realm you expects.
If there is one, go to Step 3. Other wise, go to Step 4.
</t>
<t>
Send a req-A3 request.
<list style="symbols">
<t>If you receive a 401-B0 message with a different authentication realm than expected,
go to Step 6.</t>
<t>If you receive a 401-B0-stale message, go to Step 9.</t>
<t>If you receive a 401-B0 message, go to Step 13.</t>
<t>If you receive a valid 200-B4 message, go to Step 14.</t>
<t>If you receive a normal response (without Mutual-specific headers), go to Step 11.</t>
</list>
</t>
<t>Send a req-A1 request.
<list style="symbols">
<t>If you receive a 401-B0 message with a different authentication realm than expected,
go to Step 6.</t>
<t>If you receive a 401-B0-stale message, go to Step 9.</t>
<t>If you receive a 401-B1 message, go to Step 10.</t>
<t>If you receive a normal response (without Mutual-specific headers), go to Step 10.</t>
</list>
</t>
<t>Send a request without any authentication headers.
<list style="symbols">
<t>If you receive a 401-B0 message, go to Step 6.</t>
<t>If you receive a normal response (without Mutual-specific headers), go to Step 11.</t>
</list>
</t>
<t>Check whether you know the user's password for the requested authentication realm.
If yes, go to Step 7. Otherwise, go to Step 12.</t>
<t>
Check whether there is an available sid for the authentication realm you expects.
If there is one, go to Step 8. Other wise, go to Step 9.
</t>
<t>
Send a req-A3 request.
<list style="symbols">
<t>If you receive a 401-B0 message with a different authentication realm than expected,
go to Step 6.</t>
<t>If you receive a 401-B0-stale message, go to Step 9.</t>
<t>If you receive a 401-B0 message, go to Step 13.</t>
<t>If you receive a valid 200-B4 message, go to Step 14.</t>
</list>
</t>
<t>Send a req-A1 request.
<list style="symbols">
<t>If you receive a 401-B1 message, go to Step 10.</t>
</list>
</t>
<t>
Send a req-A3 request.
<list style="symbols">
<t>If you receive a 401-B0 message, go to Step 13.</t>
<t>If you receive a valid 200-B4 message, go to Step 14.</t>
</list>
</t>
<t>
This case means that the resource requested is out of the authenticated contents area.
The client will be in "UNAUTHENTICATED" status.
</t>
<t>
This case means that the resource requested requires mutual
authentication, and the user is not authenticated yet. The client
will be in "AUTH_REQUESTED" status, is RECOMMENDED to process the
content sent from the server and, SHOULD ask user a username and password.
If the user has input those, go to Step 9.
</t>
<t>
This case means that in some reason the authentication failed:
possibly the password or username is invalid for the authenticated
resource. Forget the password for the authentication realm and go to Step 12.
</t>
<t>
This case means that the mutual authentication has been succeeded.
The client will be in "AUTH_SUCCEEDED" status.
</t>
</list>
</t>
<t>
All other kind of responses than shown in above procedure SHOULD be
interpreted as fatal communication error, and in such cases user
clients MUST NOT process any data sent from the server.
</t>
<t>
The client software SHOULD show the three client status to the end-user.
</t>
<!--
<t>
The following figure shows the full client-side flow-chart of the message processing.
</t>
<t>
\begin{center}
\includegraphics[width=\textwidth]{mutual-client-dia}
\end{center}
</t> -->
</section>
<section title="Authentication Algorithms" anchor="algorithm">
<t>
This specification specified only one family of the authentication
algorithm. The family consist of four authentication algorithms, which
only differ in underlying mathematical groups and security parameters.
The algorithms do not add any additional fields. The tokens for
algorithms are
<list style="symbols">
<t> "iso11770-4-ec-p256" for the 256-bit prime-field elliptic-curve setting.</t>
<t> "iso11770-4-ec-p521" for the 521-bit prime-field elliptic-curve setting.</t>
<t> "iso11770-4-dl-2048" for the 2048-bit discrete-logarithm setting.</t>
<t> "iso11770-4-dl-4096" for the 4096-bit discrete-logarithm setting.</t>
</list>
</t>
<t>
The clients SHOULD support at least "iso11770-4-dl-2048"
algorithm, and RECOMMENDED to support all of the above four algorithms if possible.
The server software implementations SHOULD support at least "iso11770-4-dl-2048"
algorithm, unless it is known that users will not use it.
</t>
<t>
This algorithm uses Key-exchange-method-3 defined in <eref target="ISO-11770-4">ISO-11770-4</eref> as a basis.
</t>
<t>
For the elliptic-curve settings, the underlying fields and the curves used
for elliptic-curve cryptography are the prime field and the Curve P-256
and P-511, respectively, specified in the appendix of FIPS PUB 186-2
specification. The hash functions H are SHA-256 for P-256 curve and
SHA-512 for P-521 curve, respectively. The representation of fields
wa, wb, oa, and ob is hex-fixed-number.
</t>
<t>
For discrete-logarithm settings, the underlying groups are 2048-bit
and 4096-bit MODP group defined in <eref target="RFC3526" /> respectively.
The hash functions H are SHA-256 for
2048-bit field and SHA-512 for 4096-bit field, respectively.
The representation of fields wa, wb, oa, and ob is base64-fixed-number.
</t>
<t>
The password-based string pi used by this authentication is derived in the
following manner:
</t>
<t>
pi = H(VS(algorithm) | VS(auth-domain) | VS(realm) | VS(username) | VS(ph(password)).
</t>
<t>
The values of algorithm, realm and auth-domain are taken from the values contained
in the 401-B0 message.
When pi is used in the context of an octet string, it MUST have
the natural length derived from the bit-length of the output of function
H (e.g. 32 octets for SHA-256). The function ph is defined by
the value of the pwdhash given in a 401-B0 message.
</t>
<t>
The function VS encodes variable-length octet string into decodable
octet string, as in the following manner:
</t>
<t>
VS(s) = VI(length(s)) | s,
</t>
<t>
where length(s) is a number of octets (not characters) in s and the function
VI converts integer into octet string in the manner which is used
for the length field in DER format. Shortly, integers are represented in
big-endian radix-128 string, where each digit is represented by a octet
0x80–0xff except for the last digit represented by 0x00–0x7f.
The first octet MUST NOT be 0x80.
For example, VI(i) = octet(i) for i < 128,
and VI(i) = octet(0x80 | (i >> 7)) | octet(i & 127) for 128 <= i < 16384.
</t>
<t>
The equation for J, w_A, T, z, K_i, and w_B is the one specified in the
documentation of ISO-11770-4, given that pi is derived in the above equation.
</t>
<t>
The value o_A (o_A') and o_B (o_B') is derived by the following equation, instead of ones specified in ISO 11770-4.
</t>
<t>
o_A = H(hex(04) | GEtoOS_x(w_A) | GEtoOS_x(W_B) | GEtoOS_x(z) | GEtoOS_x(g_1) | VI(nc) | VS(v))
<vspace blankLines="1" />
o_B = H(hex(03) | GEtoOS_x(w_A) | GEtoOS_x(W_B) | GEtoOS_x(z) | GEtoOS_x(g_1) | VI(nc) | VS(v))
</t>
</section>
<section title="Validation Methods" anchor="validation">
<t>
The "validation methods" specifies a method to "relates" the mutual
authentication processed by this protocol with other authentications
already performed in the underlying layers. It decides the value of v,
which is an input to the authentication protocol.
</t>
<t>
The meaning of the validation method field and corresponding values of v
is as follows:
</t>
<t>
<list style="hanging" hangIndent="15">
<t hangText="host:"> hostname validation: v will be the ASCII string in the
following format: "scheme://host:port".
The scheme and host are lower-case, and the port is in a shortest
decimal representation. Even if the request-URI do not have a
port part, v will include the one.</t>
<t hangText="tls-cert:"> TLS certificate validation: v will be the octet string of
the fingerprint of the public key certificate used in underlying
TLS/SSL connection.</t>
<t hangText="tls-key:"> TLS shared-key validation: v will be the octet string of
the pre-shared secret negotiated in underlying TLS/SSL connection.</t>
</list>
</t>
<t>
If HTTP protocol is used on unencrypted channel, the validation type
MUST be "host". If HTTPS protocol with server certificates is
used, the validation type MUST be either "tls-cert" or
"tls-key". If HTTPS protocol is used with anonymous
Diffie-Hellman key exchange, the validation type MUST be
"tls-key" (but see the note below).
</t>
<t>
The client MUST validate this field upon reception of 401-B0 messages.
</t>
<t>
However, when the protocol is used on web browsers with any scripting
capabilities, anonymous Diffie-Hellman family of TLS/SSL cipher-suite
MUST NOT be used even if "tls-key" validated Mutual
authentication has been employed, and the certificate shown in TLS/SSL
negotiation MUST be verified using PKI. For other systems, if the
"tls-key" validation is used on TLS/SSL protocol without
certificate verification using PKI, those systems MUST ensure that all
transactions with authenticated peer server MUST use and be validated by
the Mutual authentication protocol, regardless of the existence of the
401-B0 responses.
</t>
</section>
<section title="Session Management" anchor="session">
<t>
By the first 4 messages (first request, 401-B0, req-A1 and 401-B1), a
session represented by a sid is generated. This session can be used
for 1 or more requests for resources protected by the same realm in the
same server.
</t>
<t>
The server SHOULD accept at least one req-A3 request for each sessions
(given that the request reaches to the server in a time window specified
by the timeout field specified in the 401-B1 message). After that, the
server can discard any session at any time and send 401-B0-stale
messages for any req-A3 requests.
</t>
<t>
The client can send more than 1 requests using a single session
specified by the sid. However, for all such requests, the values of the
nonce-counter (nc field) MUST be different from each other. The server
MUST check for duplication of the received nonces, and if any
duplication is detected, the server MUST discard the session and respond
by a 401-B1-stale message.
</t>
<t>
In addition, for each sessions, if the client has already sent a request
with nonce value x, it SHOULD NOT sent requests with nonce value not
larger than (x - nc-window) afterwards. The server MAY reject
any requests with nonces violating this rule with 401-B1-stale responses.
</t>
<t>
The value of nonces and nonce-related values MUST always be treated as a
natural number within infinite range. Implementations using fixed-width
integers or fixed-precision floating numbers MUST handle integer
overflow correctly and carefully. Such implementations are RECOMMENDED
to accept any larger values from the peer which cannot be represented in
the fixed-width integer representations, as long as other limits such as
internal header-length restrictions are involved.
The protocol is designed carefully so that both clients and servers
can be implemented the protocol only with
fixed-width integers, by rounding any
overflowed value into the maximum possible value.
</t>
</section>
<section title="Extension 1: Optional Mutual Authentication">
<t>
In several Web applications, users can access the same contents both as
a guest user and as a authenticated users. In usual Web applications,
it is implemented using Cookies and custom form-based authentications.
The extension described in this section provides a replacement for
those authentication systems.
</t>
<t>
Every HTTP successful responses (response code 200, 206 and others) to
GET requests which do not contain Authentication-Info: header can
contain the Optional-WWW-Authenticate header. Such messages are
hereafter called 200-Optional-B0 messages.
<list>
<t>
HTTP/1.1 200 OK<vspace blankLines="0" />
Optional-WWW-Authenticate: Mutual algorithm=xxxx,
validation=xxxx, realm=xxxx, stale=0
</t>
</list>
</t>
<t>
The fields contained in the Optional-WWW-Authenticate header is the same as
the 401-B0 message described in <xref target="401-B0" />.
The client software supporting the mutual authentication protocol receiving
a 200-Optional-B0 message will process the contents of the message and
enables an authentication input field.
</t>
<t>
When the user input the username and password, the client resends the
request with req-A1 header. The server MUST respond with a 401-B1
message. 200-Optional-B0 response SHOULD NOT be sent as a response to
req-A1 and req-A3 messages, unless the authentication realm sent from
the client (or indicated by sid) is different from the one which the server requests.
</t>
<t>
The client software supporting optional mutual authentication MUST
recognize the "Path" field contained in 200-B4 message, and MUST send
either req-A1 or req-A3 request for the URI space inside the specified
"path"s, instead of unauthenticated requests.
</t>
</section>
<section title="Methods to extend this protocol">
<t>
If a non-standard extensions to the this protocol is implemented,
it SHOULD use the extension-tokens defined in
<xref target="syntax" /> to avoid conflicts with this protocol and other
extensions.
</t>
<t>
Authentication algorithms other than those defined in this document
MAY use other representations for keys "wa", "wb", "oa" and
"ob", replace those keys, and/or add fields to the messages containing
those fields by supplemental specifications.
Those specifications are RECOMMENDED to use extension-tokens
to avoid any key-name conflict with the future extension of this protocol.
</t>
</section>
<section anchor="IANA" title="IANA Considerations">
<t>The tokens used for authentication-algorithm, pwd-hash, validation
MUST be registered to and assigned by IANA. All registered tokens
must be defined by at least Informational RFC or similar
standardization processes. Extension-tokens MAY be freely used for
any non-standard or experimental uses for those fields provided that
the domain part in the token is appropriately used.
</t>
</section>
<section anchor="Security" title="Security Considerations">
<t>
<list style="symbols">
<t> To securely implement the protocol, the Authentication-Info
headers in the 200-B4 messages MUST always be validated by the
client. If the validation is failed, the client MUST NOT process
any content sent with the message, including the body part.
Non-compliance to this will enable the phishing attacks.
</t>
<t>
The authentication status on the client-side SHOULD be visible to
the users of the client. In addition, the method for asking
user's name and passwords SHOULD be carefully designed so that
(1) the user can easily distinguish request of this
authentication methods from existing insecure authentication
methods such as Basic methods, and (2) the Web contents cannot
imitate the user-interfaces of this protocol.
</t>
<t>
For TLS communications, when a web form is submitted from
PAKE-authenticated pages with the validation methods of
"tls-cert" to an URI which is protected by the same realm (so
indicated by the path parameter), if server certificate
has been changed since the pages has been received, the peer
is RECOMMENDED to be revalidated using a req-A1 message with an
"Expect: continue" header. The same applies when the
page is received with the validation methods of "tls-key", and
when the TLS session has been expired.
</t>
<t>
Server-side storage of the user passwords is RECOMMENDED to have
the values encrypted by one-way function J(pi),
instead of the real passwords, those hashed by ph, or pi.
</t>
</list>
</t>
</section>
<section title="Notice on intellectual properties">
<t>
The National Institute of Advanced Industrial Science and Technology (AIST) and
Yahoo! Japan, Inc. has jointly submitted a patent application about the
protocol proposed in this documentation to the Patent Office of Japan.
The patent is intended to be open to any implementors of this protocol
and its variants under non-exclusive royalty-free manner without any
contracts with the patent owners once the protocol is accepted as a
Internet standard.
For the detail of the patent application, contact the author of this document.
</t>
<t>
The elliptic-curve based authentication algorithms might involve several
existing patents of third-parties. The authors of the document take no
position regarding the validity or scope of such patents, and other patents
as well.
</t>
</section>
</middle>
<!-- *****BACK MATTER ***** -->
<back>
<references title="Normative References">
<!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
&RFC2119;
&RFC3526;
<reference anchor="ISO-11770-4">
<!-- the following is the minimum to make xml2rfc happy -->
<front>
<title>ISO/IEC 11770-4:2006: 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" />
</front>
</reference>
</references>
<references title="Informative References">
<!-- Here we use entities that we defined at the beginning. -->
&RFC2616;
&RFC2617;
<!-- A reference written by by an organization not a person. -->
</references>
</back>
</rfc>
| PAFTECH AB 2003-2026 | 2026-04-24 19:31:42 |