[OAUTH-WG] draft-ietf-oauth-spop-04: a way of making code_challenge

takamichi saito <saito@cs.meiji.ac.jp> Fri, 14 November 2014 01:28 UTC

Return-Path: <tan1tan2tan3tan4@gmail.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 3DF021A1A8D for <oauth@ietfa.amsl.com>; Thu, 13 Nov 2014 17:28:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.65
X-Spam-Level:
X-Spam-Status: No, score=-1.65 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=no
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 VFe0EOINeDn7 for <oauth@ietfa.amsl.com>; Thu, 13 Nov 2014 17:28:34 -0800 (PST)
Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DA1481A1A20 for <oauth@ietf.org>; Thu, 13 Nov 2014 17:28:33 -0800 (PST)
Received: by mail-wi0-f176.google.com with SMTP id ex7so1221487wid.15 for <oauth@ietf.org>; Thu, 13 Nov 2014 17:28:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:content-type:content-transfer-encoding:subject :message-id:date:to:mime-version; bh=6mS2/baBQuqIcYBfWSVnP4g8g4lMB1FgHR+6KMMCVzc=; b=ah042x+hXflg5ff7dH2+L7A0TgBjHNbgjDWtJeqs8voO32IsJikBjIJSewTo1VNcs+ r5d6hEq6wpZEFEcm6Esvx+DHMqmHviTdKEzHdDnpOWyTgF5k6n+AMr0PClU4U+qsGE+6 CbXZtS9/8wOKyoTYMunI3/sOu+rgl0umg49iXfviIOyh0+T5HM6Pat3qEikJwxdHD2qq MgHjTmO/cWAdhxPfqgeRJn38ku+7bFVLELvRUvsFwsUzsVbPLMeKIxdmS1NDJFBe2Oh1 kSscvk9cUwClcMaGv283gjRirO/Eosg4lZ17djjMuo13IvSIiEMC+9rZxVb2F5YKm6hc lHlQ==
X-Received: by 10.180.108.144 with SMTP id hk16mr3023155wib.68.1415928512699; Thu, 13 Nov 2014 17:28:32 -0800 (PST)
Received: from t2001067c03700160b95e3636f93d7909.wireless.v6.meeting.ietf.org (t2001067c03700160b95e3636f93d7909.wireless.v6.meeting.ietf.org. [2001:67c:370:160:b95e:3636:f93d:7909]) by mx.google.com with ESMTPSA id g16sm26675847wjq.20.2014.11.13.17.28.31 for <oauth@ietf.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Nov 2014 17:28:32 -0800 (PST)
Sender: "saito@cs.meiji.ac.jp" <tan1tan2tan3tan4@gmail.com>
From: takamichi saito <saito@cs.meiji.ac.jp>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Message-Id: <5EBF39FB-8930-449D-AFE0-755D5A4EE6AA@cs.meiji.ac.jp>
Date: Fri, 14 Nov 2014 10:28:23 +0900
To: oauth@ietf.org
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
X-Mailer: Apple Mail (2.1878.6)
Archived-At: http://mailarchive.ietf.org/arch/msg/oauth/u4WW2b8RnSb1VQBzNL7eAyHooo4
Subject: [OAUTH-WG] draft-ietf-oauth-spop-04: a way of making code_challenge
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, 14 Nov 2014 01:33:08 -0000

Hi all,

I appreciate this idea, simple and powerful to achieve proof of possession.
But, I have some questions against the scheme.
Sorry if these ware already discussed.

I worry about using a hash function in simple way.
I mean, a simple use of random as code_verifier may cause that malicious client can have any code_verifier and code_challenge.
All combinations of random and its hash can be obtained, it may not be risk?

So, we should use:
S256 "code_challenge" = BASE64URL(SHA256("code_verifier" + “client ID”))
or
S256 "code_challenge" = BASE64URL(SHA256("code_verifier" + “client ID” + “server ID”))
Where, you know that client ID is client’s unique name.


Other problem is the following, using Nat’s slide:
http://www.slideshare.net/nat_sakimura/1112-spoppresso .

0.    Attacker prepares own code_verifier and code_challenge.
1.    replage legitimate challenge with malicious code_challenge.
5. Attacker can submits own code_verifier.

It may be out of the draft, I think.

Best regards,


;; takamixhi saito