Return-Path: <bcampbell@pingidentity.com>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1])
 by ietfa.amsl.com (Postfix) with ESMTP id 349451A3B9D
 for <oauth@ietfa.amsl.com>; Fri, 30 Jan 2015 12:16:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.578
X-Spam-Level: 
X-Spam-Status: No, score=-3.578 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001,
 RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44])
 by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id ABLs903F6W43 for <oauth@ietfa.amsl.com>;
 Fri, 30 Jan 2015 12:16:15 -0800 (PST)
Received: from na3sys009aog118.obsmtp.com (na3sys009aog118.obsmtp.com
 [74.125.149.244])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by ietfa.amsl.com (Postfix) with ESMTPS id B3D0B1A1EEF
 for <oauth@ietf.org>; Fri, 30 Jan 2015 12:16:13 -0800 (PST)
Received: from mail-ie0-f177.google.com ([209.85.223.177]) (using TLSv1) by
 na3sys009aob118.postini.com ([74.125.148.12]) with SMTP
 ID DSNKVMvmjbTS6/PYoZiiCYo29Jbd2lSUXXpg@postini.com;
 Fri, 30 Jan 2015 12:16:13 PST
Received: by mail-ie0-f177.google.com with SMTP id vy18so5900451iec.8
 for <oauth@ietf.org>; Fri, 30 Jan 2015 12:16:12 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:in-reply-to:references:from:date
 :message-id:subject:to:cc:content-type;
 bh=p6obOiPy6xFbMrjtorrsS33C1QmgQYIWZh1nigz0Aog=;
 b=J2PjPG6WEGSSCcpOnpfy7Eut8a2rtgiRR64v37M4jujlsf+JZ6eqTm5ArTg4V38X/I
 7wmG7PHmbwGR2Oz3zH/XtG4Hz/YKgoL/o/SK1ekLlnnnXiuzga2SMsWjMUW9N04nBx1Q
 FBxcLec6Oknl793a7rTVwx5BT3cQvzm2d107U40IaA1b/cjhghUzwH6HRO0yeoGVjhvB
 3utASmF5lloF6HM6yQ177nI4iWdzGg7TrZb1/z3sDDDRUqpws5/vKrDUsX7QtO2ZlUze
 20fGcSPBu81H3y0KyBTdd65FoZT2vtMT4nI/p0EZqYT1MS4mD93I2LnupU6/JB25auX7
 8GIA==
X-Gm-Message-State: ALoCoQkihzhnIM533eczHp5SILRIM5TzbtEvvKz0oReYK2IBlHCdXbH+vUibyzd6kcSgPevzWl06mo4iNfRTWD9NxSEKdgdS8NOATFCLiHwUgmBDwkwNP518wjUyhyM/fRmZh7tU3kJd
X-Received: by 10.42.200.82 with SMTP id ev18mr8062565icb.44.1422648972878;
 Fri, 30 Jan 2015 12:16:12 -0800 (PST)
X-Received: by 10.42.200.82 with SMTP id ev18mr8062546icb.44.1422648972728;
 Fri, 30 Jan 2015 12:16:12 -0800 (PST)
MIME-Version: 1.0
Received: by 10.64.33.75 with HTTP; Fri, 30 Jan 2015 12:15:42 -0800 (PST)
In-Reply-To: <4E1F6AAD24975D4BA5B1680429673943A2201928@TK5EX14MBXC291.redmond.corp.microsoft.com>
References: <CA+k3eCQHZJYJ3mMfdGTdO=S3VVQdU+qhjVz+QsEeobJokNSHEA@mail.gmail.com>
 <FD9F9F2A-8B32-4A26-95CC-59C8C465A202@sakimura.org>
 <CA+k3eCRn0xT+_fA0G3Q3OjjH9Lq-2AfC+Mv7Gq8bYnHqH5TFDw@mail.gmail.com>
 <CABzCy2CWnjmeBGT8hgQY-R9Z6u=UFM8AAvHDr1MV81kJXST9WQ@mail.gmail.com>
 <CA+k3eCTp3xyRuLdCtd3CK_uaACEOYvwYFb4DBs6Cy7UvVMX_ZA@mail.gmail.com>
 <EE51DE36-7566-4713-8AE3-9F815FA1EE77@ve7jtb.com>
 <4E1F6AAD24975D4BA5B1680429673943A2201928@TK5EX14MBXC291.redmond.corp.microsoft.com>
From: Brian Campbell <bcampbell@pingidentity.com>
Date: Fri, 30 Jan 2015 13:15:42 -0700
Message-ID: <CA+k3eCQe9ZweUeoVD+U0H+fsLkbm73bD5ZT6r-wOxusgrq_1wg@mail.gmail.com>
To: Mike Jones <Michael.Jones@microsoft.com>
Content-Type: multipart/alternative; boundary=20cf30223d83a8f18d050de44685
Archived-At: <http://mailarchive.ietf.org/arch/msg/oauth/T5OWZ7w-3euvqX_poaF9fOWrg7c>
Cc: oauth <oauth@ietf.org>, Naveen Agarwal <naa@google.com>
Subject: Re: [OAUTH-WG] PKCE: SHA256(WAT?)
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/oauth>,
 <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/oauth/>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>,
 <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 30 Jan 2015 20:16:19 -0000

--20cf30223d83a8f18d050de44685
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I agree with Mike here. Though PKCE only needs the ASCII(STRING) one.

On Fri, Jan 30, 2015 at 12:38 PM, Mike Jones <Michael.Jones@microsoft.com>
wrote:

>
> http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-41#section-=
1.1
> uses this notation:
>
>
>
>    UTF8(STRING) denotes the octets of the UTF-8 [RFC3629
> <http://tools.ietf.org/html/rfc3629>] representation
>
>    of STRING, where STRING is a sequence of zero or more Unicode
>
>    [UNICODE
> <http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-41#ref-UNI=
CODE>]
> characters.
>
>
>
>    ASCII(STRING) denotes the octets of the ASCII [RFC20
> <http://tools.ietf.org/html/rfc20>] representation
>
>    of STRING, where STRING is a sequence of zero or more ASCII
>
>    characters.
>
>
>
> This is unambiguous and has already been vetted by the IESG and SecDir, s=
o
> I would use exactly this wording.
>
>
>
> OCTETS(STRING) is ambiguous, since for the same string there are many
> possible representations as octets, including ASCII, UTF-8, UTF-16, UTF-3=
2,
> and EBCDIC.
>
>
>
>                                                                 -- Mike
>
>
>
> *From:* OAuth [mailto:oauth-bounces@ietf.org] *On Behalf Of *John Bradley
> *Sent:* Friday, January 30, 2015 11:33 AM
> *To:* Brian Campbell
> *Cc:* oauth; Naveen Agarwal
> *Subject:* Re: [OAUTH-WG] PKCE: SHA256(WAT?)
>
>
>
> Have a look at the latest version I added OCTETS(STRING) to show the
> conversion.   ASCII(STRING) seemed more confusing by drawing character
> encoding back in.
>
>
>
> I was tempted to call it a octet array without the terminating NULL of
> STRING but didn=E2=80=99t want to introduce array.
>
>
>
> Let me know what you think.
>
>
>
>  On Jan 30, 2015, at 1:56 PM, Brian Campbell <bcampbell@pingidentity.com>
> wrote:
>
>
>
> But, while it may be clear to you, what I'm saying here is that it's not
> clear to a reader/implementer.
>
> Somehow the conversion from a character string to an octet string needs t=
o
> be clearly and unambiguously stated. It doesn't have to be the text I
> suggested but it's not sufficient as it is now.
>
> Something like this might work, if you don't want to touch the parts in
> 4.2 and 4.6: "SHA256(STRING) denotes a SHA2 256bit hash [RFC6234] of the
> octets of the ASCII [RFC0020] representation of STRING."
>
> An "octet sequence using the url and filename safe Alphabet [...], with
> length less than 128 characters." is ambiguous. Octets and characters are
> intermixed with no mention of encoding. But they're not interchangeable.
>
>
>
>
>
> On Fri, Jan 30, 2015 at 7:15 AM, Nat Sakimura <sakimura@gmail.com> wrote:
>
>  I do not think we need ASCII(). It is quite clear without it, I suppose.
>
>
>
> In 4.1, I would rather do like:
>
>
>
>  code_verifier =3D high entropy cryptographic random
>    octet sequence using the url and filename safe Alphabet [A-Z] / [a-z]
>    / [0-9] / "-" / "_" from Sec 5 of RFC 4648 [RFC4648], with length
>    less than 128 characters.
>
>
>
> Nat
>
>
>
> 2015-01-30 22:51 GMT+09:00 Brian Campbell <bcampbell@pingidentity.com>:
>
>  That's definitely an improvement (to me anyway).
>
> Checking that the rest of the document uses those notations appropriately=
,
> I think, yields a few other changes. And probably begs for the
> "ASCII(STRING) denotes the octets of the ASCII representation of STRING"
> notation/function, or something like it, to be put back in. Those changes
> might look like the following:
>
>   In 4.1.:
>
> OLD:
>    code_verifier =3D high entropy cryptographic random ASCII [RFC0020]
>    octet sequence using the url and filename safe Alphabet [A-Z] / [a-z]
>    / [0-9] / "-" / "_" from Sec 5 of RFC 4648 [RFC4648], with length
>    less than 128 characters.
>
> NEW (maybe):
>   code_verifier =3D high entropy cryptographically strong random STRING
>   using the url and filename safe Alphabet [A-Z] / [a-z]
>    / [0-9] / "-" / "_" from Sec 5 of RFC 4648 [RFC4648], with length
>    less than 128 characters.
>
>
> In 4.2.:
>
> OLD:
>    S256  "code_challenge" =3D BASE64URL(SHA256("code_verifier"))
>
> NEW (maybe):
>    S256  "code_challenge" =3D BASE64URL(SHA256(ASCII("code_verifier")))
>
>   In 4.6.:
>
> OLD:
>    SHA256("code_verifier" ) =3D=3D BASE64URL-DECODE("code_challenge").
>
> NEW (maybe):
>    SHA256(ASCII("code_verifier")) =3D=3D BASE64URL-DECODE("code_challenge=
").
>
>
>
>
>
> On Thu, Jan 29, 2015 at 8:37 PM, Nat Sakimura (=3Dnat) <nat@sakimura.org>
> wrote:
>
>  I take your point, Brian.
>
>
>
> In our most recent manuscript, STRING is defined inside ASCII(STRING) as
>
>
>
> STRING is a sequence of zero or more ASCII characters
>
>
>
> but it is kind of circular, and we do not seem to use ASCII().
>
>
>
> What about re-writing the section like below?
>
>
>
> STRING denotes a sequence of zero or more ASCII  [RFC0020]
> <http://xml2rfc.ietf.org/cgi-bin/xml2rfc.cgi#RFC0020> characters.
>
> OCTETS denotes a sequence of zero or more octets.
>
> BASE64URL(OCTETS) denotes the base64url encoding of OCTETS, per Section 3
> <http://xml2rfc.ietf.org/cgi-bin/xml2rfc.cgi#Terminology> producing a
> ASCII[RFC0020] <http://xml2rfc.ietf.org/cgi-bin/xml2rfc.cgi#RFC0020>
>  STRING.
>
> BASE64URL-DECODE(STRING) denotes the base64url decoding of STRING, per Se=
ction
> 3 <http://xml2rfc.ietf.org/cgi-bin/xml2rfc.cgi#Terminology>, producing a
> sequence of octets.
>
> SHA256(OCTETS) denotes a SHA2 256bit hash [RFC6234]
> <http://xml2rfc.ietf.org/cgi-bin/xml2rfc.cgi#RFC6234> of OCTETS.
>
>
>
>
>
>
>
>
>
>
>
>  On Jan 30, 2015, at 08:15, Brian Campbell <bcampbell@pingidentity.com>
> wrote:
>
>
>
> In =C2=A72 [1] we've got "SHA256(STRING) denotes a SHA2 256bit hash [RFC6=
234]
> of STRING."
>
> But, in the little cow town where I come from anyway, you hash bits/octet=
s
> not character strings (BTW, "STRING" isn't defined anywhere but it's kind
> of implied that it's a string of characters).
>
> Should it say something more like "SHA256(STRING) denotes a SHA2 256bit
> hash [RFC6234] of the octets of the ASCII [RFC0020] representation of
> STRING."?
>
> I know it's kind of pedantic but I find it kind of confusing because the
> code_verifier uses the url and filename safe alphabet, which has me secon=
d
> guessing if SHA256(STRING) actually means a hash of the octet produced by
> base64url decoding the string.
>
> Maybe it's just me but, when reading the text, I find the transform
> process to be much more confusing than I think it needs to be. Removing a=
nd
> clarifying some things will help. I hate to suggest this but maybe an
> example showing the computation steps on both ends would be helpful?
>
>
>
> Also "UTF8(STRING)" and "ASCII(STRING)" notations are defined in =C2=A72 =
but
> not used anywhere.
>
> And =C2=A72 also says, "BASE64URL-DECODE(STRING) denotes the base64url de=
coding
> of STRING, per Section 3, producing a UTF-8 sequence of octets." But what
> is a UTF-8 sequence of octets? Isn't it just a sequence octets? The
> [RFC3629] reference, I think, could be removed.
>
>
>
> [1] https://tools.ietf.org/html/draft-ietf-oauth-spop-06#section-2
>
>
>
> Nat Sakimura
>
> nat@sakimura.org
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
>
> Nat Sakimura (=3Dnat)
>
> Chairman, OpenID Foundation
> http://nat.sakimura.org/
> @_nat_en
>
>
>
>
>

--20cf30223d83a8f18d050de44685
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I agree with Mike here. Though PKCE only needs the ASCII(S=
TRING) one.<br></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Fri, Jan 30, 2015 at 12:38 PM, Mike Jones <span dir=3D"ltr">&lt;<a h=
ref=3D"mailto:Michael.Jones@microsoft.com" target=3D"_blank">Michael.Jones@=
microsoft.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link=3D"blue" vlink=3D"purple" lang=3D"EN-US">
<div>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ca=
libri&quot;,sans-serif;color:#002060"><a href=3D"http://tools.ietf.org/html=
/draft-ietf-jose-json-web-signature-41#section-1.1" target=3D"_blank">http:=
//tools.ietf.org/html/draft-ietf-jose-json-web-signature-41#section-1.1</a>
 uses this notation:<u></u><u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ca=
libri&quot;,sans-serif;color:#002060"><u></u>=C2=A0<u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Courier New&quot;" =
lang=3D"EN">=C2=A0=C2=A0 UTF8(STRING) denotes the octets of the UTF-8 [<a h=
ref=3D"http://tools.ietf.org/html/rfc3629" title=3D"&quot;UTF-8, a transfor=
mation format of ISO 10646&quot;" target=3D"_blank">RFC3629</a>]
 representation<u></u><u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Courier New&quot;" =
lang=3D"EN">=C2=A0=C2=A0 of STRING, where STRING is a sequence of zero or m=
ore Unicode<u></u><u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Courier New&quot;" =
lang=3D"EN">=C2=A0=C2=A0 [<a href=3D"http://tools.ietf.org/html/draft-ietf-=
jose-json-web-signature-41#ref-UNICODE" title=3D"&quot;The Unicode Standard=
&quot;" target=3D"_blank">UNICODE</a>] characters.<u></u><u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Courier New&quot;" =
lang=3D"EN"><u></u>=C2=A0<u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Courier New&quot;" =
lang=3D"EN">=C2=A0=C2=A0 ASCII(STRING) denotes the octets of the ASCII [<a =
href=3D"http://tools.ietf.org/html/rfc20" title=3D"&quot;ASCII format for N=
etwork Interchange&quot;" target=3D"_blank">RFC20</a>] representation<u></u=
><u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Courier New&quot;" =
lang=3D"EN">=C2=A0=C2=A0 of STRING, where STRING is a sequence of zero or m=
ore ASCII<u></u><u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Courier New&quot;" =
lang=3D"EN">=C2=A0=C2=A0 characters.<u></u><u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ca=
libri&quot;,sans-serif;color:#002060"><u></u>=C2=A0<u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ca=
libri&quot;,sans-serif;color:#002060">This is unambiguous and has already b=
een vetted by the IESG and SecDir, so I would use exactly this wording.<u><=
/u><u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ca=
libri&quot;,sans-serif;color:#002060"><u></u>=C2=A0<u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ca=
libri&quot;,sans-serif;color:#002060">OCTETS(STRING) is ambiguous, since fo=
r the same string there are many possible representations as octets, includ=
ing ASCII, UTF-8, UTF-16, UTF-32, and EBCDIC.<u></u><u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ca=
libri&quot;,sans-serif;color:#002060"><u></u>=C2=A0<u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ca=
libri&quot;,sans-serif;color:#002060">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -- Mike<u></u><u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ca=
libri&quot;,sans-serif;color:#002060"><u></u>=C2=A0<u></u></span></p>
<div>
<div style=3D"border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in =
0in 0in">
<p class=3D"MsoNormal"><b><span style=3D"font-size:11.0pt;font-family:&quot=
;Calibri&quot;,sans-serif">From:</span></b><span style=3D"font-size:11.0pt;=
font-family:&quot;Calibri&quot;,sans-serif"> OAuth [mailto:<a href=3D"mailt=
o:oauth-bounces@ietf.org" target=3D"_blank">oauth-bounces@ietf.org</a>]
<b>On Behalf Of </b>John Bradley<br>
<b>Sent:</b> Friday, January 30, 2015 11:33 AM<br>
<b>To:</b> Brian Campbell<br>
<b>Cc:</b> oauth; Naveen Agarwal<br>
<b>Subject:</b> Re: [OAUTH-WG] PKCE: SHA256(WAT?)<u></u><u></u></span></p>
</div>
</div><div><div class=3D"h5">
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<p class=3D"MsoNormal">Have a look at the latest version I added OCTETS(STR=
ING) to show the conversion. =C2=A0 ASCII(STRING) seemed more confusing by =
drawing character encoding back in.<u></u><u></u></p>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">I was tempted to call it a octet array without the t=
erminating NULL of STRING but didn=E2=80=99t want to introduce array.<u></u=
><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">Let me know what you think.<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<div>
<blockquote style=3D"margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class=3D"MsoNormal">On Jan 30, 2015, at 1:56 PM, Brian Campbell &lt;<a h=
ref=3D"mailto:bcampbell@pingidentity.com" target=3D"_blank">bcampbell@pingi=
dentity.com</a>&gt; wrote:<u></u><u></u></p>
</div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<div>
<div>
<p class=3D"MsoNormal">But, while it may be clear to you, what I&#39;m sayi=
ng here is that it&#39;s not clear to a reader/implementer.<br>
<br>
Somehow the conversion from a character string to an octet string needs to =
be clearly and unambiguously stated. It doesn&#39;t have to be the text I s=
uggested but it&#39;s not sufficient as it is now.<br>
<br>
Something like this might work, if you don&#39;t want to touch the parts in=
 4.2 and 4.6: &quot;SHA256(STRING) denotes a SHA2 256bit hash [RFC6234] of =
the octets of the ASCII [RFC0020] representation of STRING.&quot;<br>
<br>
An &quot;octet sequence using the url and filename safe Alphabet [...], wit=
h length less than 128 characters.&quot; is ambiguous. Octets and character=
s are intermixed with no mention of encoding. But they&#39;re not interchan=
geable.
<u></u><u></u></p>
<div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<div>
<p class=3D"MsoNormal">On Fri, Jan 30, 2015 at 7:15 AM, Nat Sakimura &lt;<a=
 href=3D"mailto:sakimura@gmail.com" target=3D"_blank">sakimura@gmail.com</a=
>&gt; wrote:<u></u><u></u></p>
<blockquote style=3D"border:none;border-left:solid #cccccc 1.0pt;padding:0i=
n 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class=3D"MsoNormal">I do not think we need ASCII(). It is quite clear wi=
thout it, I suppose.=C2=A0<u></u><u></u></p>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">In 4.1, I would rather do like:=C2=A0<u></u><u></u><=
/p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0code_verifier =3D high entropy cryptographic r=
andom=C2=A0<br>
=C2=A0=C2=A0 octet sequence using the url and filename safe Alphabet [A-Z] =
/ [a-z]<br>
=C2=A0=C2=A0 / [0-9] / &quot;-&quot; / &quot;_&quot; from Sec 5 of RFC 4648=
 [RFC4648], with length<br>
=C2=A0=C2=A0 less than 128 characters.<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">Nat<u></u><u></u></p>
</div>
</div>
<div>
<div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<div>
<p class=3D"MsoNormal">2015-01-30 22:51 GMT+09:00 Brian Campbell &lt;<a hre=
f=3D"mailto:bcampbell@pingidentity.com" target=3D"_blank">bcampbell@pingide=
ntity.com</a>&gt;:<u></u><u></u></p>
<blockquote style=3D"border:none;border-left:solid #cccccc 1.0pt;padding:0i=
n 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt">That&#39;s definitely=
 an improvement (to me anyway).
<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt">Checking that the res=
t of the document uses those notations appropriately, I think, yields a few=
 other changes. And probably begs for the &quot;ASCII(STRING) denotes the o=
ctets of the ASCII representation of STRING&quot;
 notation/function, or something like it, to be put back in. Those changes =
might look like the following:<br>
<br>
<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt">In 4.1.: <br>
<br>
OLD:<br>
=C2=A0=C2=A0 code_verifier =3D high entropy cryptographic random ASCII [RFC=
0020]<br>
=C2=A0=C2=A0 octet sequence using the url and filename safe Alphabet [A-Z] =
/ [a-z]<br>
=C2=A0=C2=A0 / [0-9] / &quot;-&quot; / &quot;_&quot; from Sec 5 of RFC 4648=
 [RFC4648], with length<br>
=C2=A0=C2=A0 less than 128 characters.<br>
<br>
NEW (maybe):<br>
=C2=A0 code_verifier =3D high entropy cryptographically strong random STRIN=
G<br>
=C2=A0 using the url and filename safe Alphabet [A-Z] / [a-z]<br>
=C2=A0=C2=A0 / [0-9] / &quot;-&quot; / &quot;_&quot; from Sec 5 of RFC 4648=
 [RFC4648], with length<br>
=C2=A0=C2=A0 less than 128 characters.<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt"><br>
In 4.2.: <br>
<br>
OLD:<br>
=C2=A0=C2=A0 S256=C2=A0 &quot;code_challenge&quot; =3D BASE64URL(SHA256(&qu=
ot;code_verifier&quot;))<br>
<br>
NEW (maybe):<br>
=C2=A0=C2=A0 S256=C2=A0 &quot;code_challenge&quot; =3D BASE64URL(SHA256(ASC=
II(&quot;code_verifier&quot;)))<br>
<br>
<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt">In 4.6.: <br>
<br>
OLD:<br>
=C2=A0=C2=A0 SHA256(&quot;code_verifier&quot; ) =3D=3D BASE64URL-DECODE(&qu=
ot;code_challenge&quot;).<br>
<br>
NEW (maybe):<br>
=C2=A0=C2=A0 SHA256(ASCII(&quot;code_verifier&quot;)) =3D=3D BASE64URL-DECO=
DE(&quot;code_challenge&quot;).<br>
<br>
<u></u><u></u></p>
</div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<div>
<p class=3D"MsoNormal">On Thu, Jan 29, 2015 at 8:37 PM, Nat Sakimura (=3Dna=
t) &lt;<a href=3D"mailto:nat@sakimura.org" target=3D"_blank">nat@sakimura.o=
rg</a>&gt; wrote:<u></u><u></u></p>
<blockquote style=3D"border:none;border-left:solid #cccccc 1.0pt;padding:0i=
n 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif">I take your point, Brian.=C2=A0</span><u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">In our most recent manuscript, STRING is defined ins=
ide ASCII(STRING) as=C2=A0<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:&quot;Ve=
rdana&quot;,sans-serif">STRING is a sequence of zero or more ASCII characte=
rs</span><u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif">but it is kind of circular, and we do not seem to use ASCII().=C2=A0=
</span><u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif">What about re-writing the section like below?=C2=A0</span><u></u><u>=
</u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-right:24.0pt;margin-left:24.0pt">
<span style=3D"font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif"=
>STRING denotes a sequence of zero or more ASCII =C2=A0<a href=3D"http://xm=
l2rfc.ietf.org/cgi-bin/xml2rfc.cgi#RFC0020" target=3D"_blank"><span style=
=3D"text-decoration:none">[RFC0020]</span></a>=C2=A0characters.=C2=A0<u></u=
><u></u></span></p>
<p class=3D"MsoNormal" style=3D"margin-right:24.0pt;margin-left:24.0pt">
<span style=3D"font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif"=
>OCTETS denotes a sequence of zero or more octets.=C2=A0<u></u><u></u></spa=
n></p>
<p class=3D"MsoNormal" style=3D"margin-right:24.0pt;margin-left:24.0pt">
<span style=3D"font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif"=
>BASE64URL(OCTETS) denotes the base64url encoding of OCTETS, per=C2=A0<a hr=
ef=3D"http://xml2rfc.ietf.org/cgi-bin/xml2rfc.cgi#Terminology" target=3D"_b=
lank"><span style=3D"text-decoration:none">Section 3</span></a>=C2=A0produc=
ing
 a ASCII<a href=3D"http://xml2rfc.ietf.org/cgi-bin/xml2rfc.cgi#RFC0020" tar=
get=3D"_blank"><span style=3D"text-decoration:none">[RFC0020]</span></a>=C2=
=A0STRING.<u></u><u></u></span></p>
<p class=3D"MsoNormal" style=3D"margin-right:24.0pt;margin-left:24.0pt">
<span style=3D"font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif"=
>BASE64URL-DECODE(STRING) denotes the base64url decoding of STRING, per=C2=
=A0<a href=3D"http://xml2rfc.ietf.org/cgi-bin/xml2rfc.cgi#Terminology" targ=
et=3D"_blank"><span style=3D"text-decoration:none">Section
 3</span></a>, producing a sequence of octets.<u></u><u></u></span></p>
<p class=3D"MsoNormal" style=3D"margin-right:24.0pt;margin-left:24.0pt">
<span style=3D"font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif"=
>SHA256(OCTETS) denotes a SHA2 256bit hash=C2=A0<a href=3D"http://xml2rfc.i=
etf.org/cgi-bin/xml2rfc.cgi#RFC6234" target=3D"_blank"><span style=3D"text-=
decoration:none">[RFC6234]</span></a>=C2=A0of OCTETS.<u></u><u></u></span><=
/p>
<p class=3D"MsoNormal" style=3D"margin-right:24.0pt;margin-left:24.0pt">
<span style=3D"font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif"=
><u></u>=C2=A0<u></u></span></p>
</div>
<div>
<div>
<div>
<div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<div>
<blockquote style=3D"margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class=3D"MsoNormal">On Jan 30, 2015, at 08:15, Brian Campbell &lt;<a hre=
f=3D"mailto:bcampbell@pingidentity.com" target=3D"_blank">bcampbell@pingide=
ntity.com</a>&gt; wrote:<u></u><u></u></p>
</div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<div>
<div>
<div>
<div>
<div>
<div>
<p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt">In =C2=A72 [1] we&#39=
;ve got &quot;SHA256(STRING) denotes a SHA2 256bit hash [RFC6234] of STRING=
.&quot;
<u></u><u></u></p>
</div>
<p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt">But, in the little co=
w town where I come from anyway, you hash bits/octets not character strings=
 (BTW, &quot;STRING&quot; isn&#39;t defined anywhere but it&#39;s kind of i=
mplied that it&#39;s a string of characters).=C2=A0
<u></u><u></u></p>
</div>
<p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt">Should it say somethi=
ng more like &quot;SHA256(STRING) denotes a SHA2 256bit hash [RFC6234] of t=
he octets of the ASCII [RFC0020] representation of STRING.&quot;?
<u></u><u></u></p>
</div>
<p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt">I know it&#39;s kind =
of pedantic but I find it kind of confusing because the code_verifier uses =
the url and filename safe alphabet, which has me second guessing if SHA256(=
STRING) actually means a hash of the octet
 produced by base64url decoding the string. <u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">Maybe it&#39;s just me but, when reading the text, I=
 find the transform process to be much more confusing than I think it needs=
 to be. Removing and clarifying some things will help. I hate to suggest th=
is but maybe an example showing the computation
 steps on both ends would be helpful?<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<p class=3D"MsoNormal">Also &quot;UTF8(STRING)&quot; and &quot;ASCII(STRING=
)&quot; notations are defined in =C2=A72 but not used anywhere.<br>
<br>
And =C2=A72 also says, &quot;BASE64URL-DECODE(STRING) denotes the base64url=
 decoding of STRING, per Section 3, producing a UTF-8 sequence of octets.&q=
uot; But what is a UTF-8 sequence of octets? Isn&#39;t it just a sequence o=
ctets? The [RFC3629] reference, I think, could be removed.<u></u><u></u></p=
>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<div>
<div>
<p class=3D"MsoNormal">[1] <a href=3D"https://tools.ietf.org/html/draft-iet=
f-oauth-spop-06#section-2" target=3D"_blank">
https://tools.ietf.org/html/draft-ietf-oauth-spop-06#section-2</a><u></u><u=
></u></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<p class=3D"MsoNormal"><span style=3D"color:#888888">Nat Sakimura<u></u><u>=
</u></span></p>
</div>
<div>
<p class=3D"MsoNormal"><span style=3D"color:#888888"><a href=3D"mailto:nat@=
sakimura.org" target=3D"_blank">nat@sakimura.org</a><u></u><u></u></span></=
p>
</div>
<div>
<p class=3D"MsoNormal"><span style=3D"color:#888888"><u></u>=C2=A0<u></u></=
span></p>
</div>
<div>
<p class=3D"MsoNormal"><span style=3D"color:#888888"><u></u>=C2=A0<u></u></=
span></p>
</div>
</div>
<p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt"><span style=3D"color:=
#888888"><u></u>=C2=A0<u></u></span></p>
</div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
</blockquote>
</div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
</div>
</blockquote>
</div>
<p class=3D"MsoNormal"><br>
<br clear=3D"all">
<u></u><u></u></p>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
</div>
</div>
<p class=3D"MsoNormal"><span style=3D"color:#888888">-- <u></u><u></u></spa=
n></p>
<div>
<p class=3D"MsoNormal"><span style=3D"color:#888888">Nat Sakimura (=3Dnat)<=
u></u><u></u></span></p>
<div>
<p class=3D"MsoNormal"><span style=3D"color:#888888">Chairman, OpenID Found=
ation<br>
<a href=3D"http://nat.sakimura.org/" target=3D"_blank">http://nat.sakimura.=
org/</a><br>
@_nat_en<u></u><u></u></span></p>
</div>
</div>
</div>
</blockquote>
</div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
</div></div></div>
</div>

</blockquote></div><br></div>

--20cf30223d83a8f18d050de44685--

