Re: [jose] Secdir review of draft-ietf-jose-json-web-signature-31

Mike Jones <Michael.Jones@microsoft.com> Tue, 23 September 2014 01:29 UTC

Return-Path: <Michael.Jones@microsoft.com>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 91D401A1BF6; Mon, 22 Sep 2014 18:29:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, 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 wJO1aoa-mVAh; Mon, 22 Sep 2014 18:29:47 -0700 (PDT)
Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0719.outbound.protection.outlook.com [IPv6:2a01:111:f400:fc10::719]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DF3401A1B32; Mon, 22 Sep 2014 18:29:46 -0700 (PDT)
Received: from CY1PR0301MB1210.namprd03.prod.outlook.com (25.161.212.144) by CY1PR0301MB1180.namprd03.prod.outlook.com (25.160.165.23) with Microsoft SMTP Server (TLS) id 15.0.1034.13; Tue, 23 Sep 2014 01:29:18 +0000
Received: from CH1PR03CA010.namprd03.prod.outlook.com (10.255.156.155) by CY1PR0301MB1210.namprd03.prod.outlook.com (25.161.212.144) with Microsoft SMTP Server (TLS) id 15.0.1034.13; Tue, 23 Sep 2014 01:29:16 +0000
Received: from BN1AFFO11FD005.protection.gbl (10.255.156.132) by CH1PR03CA010.outlook.office365.com (10.255.156.155) with Microsoft SMTP Server (TLS) id 15.0.1034.13 via Frontend Transport; Tue, 23 Sep 2014 01:29:15 +0000
Received: from mail.microsoft.com (131.107.125.37) by BN1AFFO11FD005.mail.protection.outlook.com (10.58.52.65) with Microsoft SMTP Server (TLS) id 15.0.1029.15 via Frontend Transport; Tue, 23 Sep 2014 01:29:15 +0000
Received: from TK5EX14MBXC286.redmond.corp.microsoft.com ([169.254.1.23]) by TK5EX14HUBC103.redmond.corp.microsoft.com ([157.54.86.9]) with mapi id 14.03.0195.002; Tue, 23 Sep 2014 01:28:36 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Richard Barnes <rlb@ipv.sx>, Tero Kivinen <kivinen@iki.fi>
Thread-Topic: [jose] Secdir review of draft-ietf-jose-json-web-signature-31
Thread-Index: AQHPyDgrWdMUgOdf8EqNa4N9Ytbe4ZvzQwoggArT4gCABW9RgIABPl2AgABFmwCAAFrAgIADfttQgAAuJgCAAB+JAIAAMAGAgAAVnoCAAHsMgIAAYd2AgAAGSYCAAg5/gIAA2IMAgAAELACAAMCY8A==
Date: Tue, 23 Sep 2014 01:28:36 +0000
Message-ID: <4E1F6AAD24975D4BA5B16804296739439BA6A6FA@TK5EX14MBXC286.redmond.corp.microsoft.com>
References: <21512.21725.209461.976375@fireball.kivinen.iki.fi> <4E1F6AAD24975D4BA5B16804296739439AE9DD47@TK5EX14MBXC292.redmond.corp.microsoft.com> <CAL02cgSsi603XL2o4S89pAw64yLv0JRZaDg823uiyuTkm02AHA@mail.gmail.com> <21527.63989.999440.801542@fireball.kivinen.iki.fi> <CAL02cgQKfQr_dQ=0-oY19G4rmYL3928UWFLBfhDAyspwMU7W9g@mail.gmail.com> <21529.16232.880915.215045@fireball.kivinen.iki.fi> <CAL02cgSRmP+iRYqTPUdcgTipeDw1H8TdF3AMP-ORSqOwiWJEcQ@mail.gmail.com> <4E1F6AAD24975D4BA5B16804296739439BA59EB7@TK5EX14MBXC286.redmond.corp.microsoft.com> <CAL02cgRTmsVTkwwDMbHtcqHzCs6GkOz-uZ_SOKNeR3hxJZMdDw@mail.gmail.com> <03a601cfd460$f8d71d70$ea855850$@augustcellars.com> <C9BA46F1-5F30-47C7-A90A-689C5DA084F6@ve7jtb.com> <03c701cfd483$d1cf45e0$756dd1a0$@augustcellars.com> <F70DA0F7-A855-49A8-A514-39AB8862AF74@ve7jtb.com> <043a01cfd4f2$3df75ff0$b9e61fd0$@augustcellars.com> <457A8BF9-8CDF-43C8-8040-CB42BE110805@ve7jtb.com> <CAL02cgQfCRzUjrKLbyyNTFoKGxKrUnOqH1n6WS-SciWeBrgJzQ@mail.gmail.com> <21536.9120.451498.905934@fireball.kivinen.iki.fi> <CAL02cgTGg=9ZXbtom2ty3CwT2gSo2y3UjHhbFP4fc5h7+qgtuA@mail.gmail.com>
In-Reply-To: <CAL02cgTGg=9ZXbtom2ty3CwT2gSo2y3UjHhbFP4fc5h7+qgtuA@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [157.54.51.73]
Content-Type: multipart/alternative; boundary="_000_4E1F6AAD24975D4BA5B16804296739439BA6A6FATK5EX14MBXC286r_"
MIME-Version: 1.0
X-EOPAttributedMessage: 0
X-Forefront-Antispam-Report: CIP:131.107.125.37; CTRY:US; IPV:CAL; IPV:NLI; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(438002)(189002)(199003)(93886004)(44976005)(92726001)(16236675004)(31966008)(19580395003)(19300405004)(85306004)(86362001)(83322001)(6806004)(2656002)(10300001)(120916001)(76482002)(87936001)(19625215002)(92566001)(84326002)(84676001)(106116001)(106466001)(81156004)(95666004)(20776003)(80022003)(90102001)(74662003)(77096002)(85806002)(54356999)(66066001)(55846006)(97736003)(85852003)(86612001)(76176999)(64706001)(230783001)(107046002)(69596002)(26826002)(104016003)(33656002)(46102003)(15202345003)(21056001)(81542003)(79102003)(81342003)(512874002)(74502003)(77982003)(83072002)(71186001)(15975445006)(68736004)(99396002)(4396001)(50986999); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR0301MB1210; H:mail.microsoft.com; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en;
X-Microsoft-Antispam: UriScan:;UriScan:;
X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1210;
X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY)
X-Forefront-PRVS: 0343AC1D30
Received-SPF: Pass (protection.outlook.com: domain of microsoft.com designates 131.107.125.37 as permitted sender) receiver=protection.outlook.com; client-ip=131.107.125.37; helo=mail.microsoft.com;
Authentication-Results: spf=pass (sender IP is 131.107.125.37) smtp.mailfrom=Michael.Jones@microsoft.com;
X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1180;
X-OriginatorOrg: microsoft.onmicrosoft.com
Archived-At: http://mailarchive.ietf.org/arch/msg/jose/eufeu3jkEYLJ5G0UQG_xfi1K6b0
Cc: "ietf@ietf.org" <ietf@ietf.org>, secdir <secdir@ietf.org>, Jim Schaad <ietf@augustcellars.com>, IESG <iesg@ietf.org>, "jose@ietf.org" <jose@ietf.org>, John Bradley <ve7jtb@ve7jtb.com>, "draft-ietf-jose-json-web-signature.all@tools.ietf.org" <draft-ietf-jose-json-web-signature.all@tools.ietf.org>
Subject: Re: [jose] Secdir review of draft-ietf-jose-json-web-signature-31
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Javascript Object Signing and Encryption <jose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jose>, <mailto:jose-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/jose/>
List-Post: <mailto:jose@ietf.org>
List-Help: <mailto:jose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jose>, <mailto:jose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Sep 2014 01:29:49 -0000

My current editor’s draft contains the following security considerations subsection, which is derived from Richard’s proposed text.  I’m sending it now for working group review, with the intent to publish updated drafts addressing all the Gen-ART and secdir comments received, possibly as early as sometime tomorrow.

This subsection is over three times the size of any of the other security considerations subsections.  It’s my hope, as an editor, that people will suggest ways to drastically shorten it, while retaining understandable and actionable content, before I publish an updated draft.

I obviously hope that people will also review it for correctness.

                                                                Thank you,
                                                                -- Mike

10.7.  Algorithm Protection

In some usages of JWS, there is a risk of algorithm substitution attacks, in which an attacker can use an existing signature value with a different signature algorithm to make it appear that a signer has signed something that it has not. These attacks have been discussed in detail in the context of CMS [RFC6211]. The risk arises when all of the following are true:
·         Verifiers of a signature support multiple algorithms.
·         Given an existing signature, an attacker can find another payload that produces the same signature value with a different algorithm.
·         The payload crafted by the attacker is valid in the application context.

For example, suppose a verifier is willing to accept both PS256 and PS384 as alg values, and a signer creates a signature using PS256. If the attacker can craft a payload that has the same SHA-256 digest as the SHA-384 digest of the legitimate payload, then the PS256 signature over the bogus payload will be the same as the PS384 signature over the legitimate payload.

There are several ways for an application to mitigate algorithm substitution attacks:
·         Don't accept signatures using algorithms vulnerable to substitution attacks. Algorithm substitution attacks are not possible for all signature algorithms. The only algorithms defined in JWA [JWA] that may be vulnerable to algorithm substitution attacks are the RSASSA-PSS (PS256, PS384, etc.) algorithms. An implementation that does not support RSASSA-PSS or other vulnerable algorithms is not susceptible to algorithm substitution attacks. Substitution attacks are only feasible if an attacker can compute pre-images for a hash function accepted by the recipient. All JWA-defined algorithms use SHA-2 hashes, for which there are no known pre-image attacks, as of the time of this writing. Until there are attacks against SHA-2 hashes, even implementations that support RSASSA-PSS are not susceptible to substitution attacks.
·         Require that the alg Header Parameter be carried in the protected header. (This is always the case when using the JWS Compact Serialization and is the approach taken by CMS [RFC6211].)
·         Include a field containing the algorithm in the application payload, and require that it be matched with the alg Header Parameter during verification. (This is the approach taken by PKIX [RFC5280].)