Re: [jose] comments on draft-jones-json-web-signature and draft-jones-json-web-encryption

Anthony Nadalin <tonynad@microsoft.com> Wed, 16 November 2011 01:50 UTC

Return-Path: <tonynad@microsoft.com>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EB20D11E8166 for <jose@ietfa.amsl.com>; Tue, 15 Nov 2011 17:50:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.167
X-Spam-Level:
X-Spam-Status: No, score=-7.167 tagged_above=-999 required=5 tests=[AWL=-0.300, BAYES_00=-2.599, J_CHICKENPOX_34=0.6, RCVD_IN_DNSWL_HI=-8, UNRESOLVED_TEMPLATE=3.132]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 73AdIcptEHfB for <jose@ietfa.amsl.com>; Tue, 15 Nov 2011 17:50:21 -0800 (PST)
Received: from smtp.microsoft.com (smtp.microsoft.com [131.107.115.214]) by ietfa.amsl.com (Postfix) with ESMTP id 0169A11E815E for <jose@ietf.org>; Tue, 15 Nov 2011 17:50:20 -0800 (PST)
Received: from TK5EX14HUBC104.redmond.corp.microsoft.com (157.54.80.25) by TK5-EXGWY-E803.partners.extranet.microsoft.com (10.251.56.169) with Microsoft SMTP Server (TLS) id 8.2.176.0; Tue, 15 Nov 2011 17:50:20 -0800
Received: from TX2EHSOBE004.bigfish.com (157.54.51.113) by mail.microsoft.com (157.54.80.25) with Microsoft SMTP Server (TLS) id 14.1.355.3; Tue, 15 Nov 2011 17:50:20 -0800
Received: from mail19-tx2-R.bigfish.com (10.9.14.247) by TX2EHSOBE004.bigfish.com (10.9.40.24) with Microsoft SMTP Server id 14.1.225.22; Wed, 16 Nov 2011 01:49:47 +0000
Received: from mail19-tx2 (localhost.localdomain [127.0.0.1]) by mail19-tx2-R.bigfish.com (Postfix) with ESMTP id AFD7B4E01A3 for <jose@ietf.org.FOPE.CONNECTOR.OVERRIDE>; Wed, 16 Nov 2011 01:50:05 +0000 (UTC)
X-SpamScore: -19
X-BigFish: PS-19(z1725nz9371Kc89bh542Mzz1202h1082kzz1033IL8275dhz31h2a8h668h839h93fh61h)
X-Spam-TCS-SCL: 0:0
X-Forefront-Antispam-Report: CIP:157.55.157.141; KIP:(null); UIP:(null); IPV:SKI; H:SN2PRD0304HT003.namprd03.prod.outlook.com; R:internal; EFV:INT
Received-SPF: softfail (mail19-tx2: transitioning domain of microsoft.com does not designate 157.55.157.141 as permitted sender) client-ip=157.55.157.141; envelope-from=tonynad@microsoft.com; helo=SN2PRD0304HT003.namprd03.prod.outlook.com ; .outlook.com ;
Received: from mail19-tx2 (localhost.localdomain [127.0.0.1]) by mail19-tx2 (MessageSwitch) id 1321408205470106_16882; Wed, 16 Nov 2011 01:50:05 +0000 (UTC)
Received: from TX2EHSMHS039.bigfish.com (unknown [10.9.14.251]) by mail19-tx2.bigfish.com (Postfix) with ESMTP id 68891170004F; Wed, 16 Nov 2011 01:50:05 +0000 (UTC)
Received: from SN2PRD0304HT003.namprd03.prod.outlook.com (157.55.157.141) by TX2EHSMHS039.bigfish.com (10.9.99.139) with Microsoft SMTP Server (TLS) id 14.1.225.22; Wed, 16 Nov 2011 01:49:47 +0000
Received: from SN2PRD0304MB235.namprd03.prod.outlook.com ([169.254.10.245]) by SN2PRD0304HT003.namprd03.prod.outlook.com ([10.111.196.122]) with mapi id 14.16.0082.000; Wed, 16 Nov 2011 01:50:18 +0000
From: Anthony Nadalin <tonynad@microsoft.com>
To: David McGrew <mcgrew@cisco.com>, "jose@ietf.org" <jose@ietf.org>
Thread-Topic: [jose] comments on draft-jones-json-web-signature and draft-jones-json-web-encryption
Thread-Index: AQHMo5WGmAGphJhNsEmOTNiaIK6swpWuvFLg
Date: Wed, 16 Nov 2011 01:50:16 +0000
Message-ID: <B26C1EF377CB694EAB6BDDC8E624B6E73A8BEDC2@SN2PRD0304MB235.namprd03.prod.outlook.com>
References: <9509AB72-10CC-4BA6-A61C-AD9C4AC7944A@cisco.com>
In-Reply-To: <9509AB72-10CC-4BA6-A61C-AD9C4AC7944A@cisco.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.111.196.26]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OrganizationHeadersPreserved: SN2PRD0304HT003.namprd03.prod.outlook.com
X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn%
X-FOPE-CONNECTOR: Id%59$Dn%CISCO.COM$RO%2$TLS%6$FQDN%131.107.125.5$TlsDn%
X-FOPE-CONNECTOR: Id%59$Dn%IETF.ORG$RO%2$TLS%6$FQDN%131.107.125.5$TlsDn%
X-OriginatorOrg: microsoft.com
X-CrossPremisesHeadersPromoted: TK5EX14HUBC104.redmond.corp.microsoft.com
X-CrossPremisesHeadersFiltered: TK5EX14HUBC104.redmond.corp.microsoft.com
Subject: Re: [jose] comments on draft-jones-json-web-signature and draft-jones-json-web-encryption
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.12
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: Wed, 16 Nov 2011 01:50:25 -0000

At the same time we don't want to confuse folks the other way to have them think we are not addressing signature. The WG name does have signing in it. One option would be to split out the MAC from the signing

-----Original Message-----
From: jose-bounces@ietf.org [mailto:jose-bounces@ietf.org] On Behalf Of David McGrew
Sent: Tuesday, November 15, 2011 4:40 AM
To: jose@ietf.org
Subject: [jose] comments on draft-jones-json-web-signature and draft-jones-json-web-encryption

Hi

I would like to contribute the following comments.  I have not been closely following the WG, so apologies in advance if I'm rehashing something.

The json-web-signature draft should be changed by using the more generic "authentication" instead of "signature", as suggested in  
Section 9.   HMAC is a (symmetric) message authentication code, and  
not an (asymmetric) digital signature algorithm.  See RFC 4949 for instance for the appropriate definitions.  Calling HMAC a signature method will confuse readers going forward and potentially set incorrect expectations. I suggest the following changes (not because I think these are the only good alternatives, but because I want to be
constructive):

"JSON Web Signature" -> "JSON Web Authentication"
"sign" -> "authenticate"
"signing" -> "authenticating"
"signature" -> "authentication data"

The security considerations of json-web-signature should explain the difference between symmetric and asymmetric encryption.

Section 9 mentions the possibility of including an unkeyed checksum based on SHA-256.  If that is done, then that will potentially confuse the issue further.  What would the value of that checksum be, and  
would it be a security mechanism?   If it is defined, I suggest that  
it be done in a different draft.

Why are we allowing unauthenticated encryption in draft-jones-json-web- 
encryption?   Authenticated Encryption with Associated Data (AEAD) is  
recommended (in the form of AES-GCM) in the draft, and it avoids all sorts of security issues that are present with unauthenticated encryption (besides being theoretically vulnerable, it has fallen victim to practical attacks [1][2][3][4][5][6][7][8]).  Note that some of these attacks apply when encryption is loosely bound to authentication.  I suggest that AEAD be the only encryption method, and that an RFC 5116 interface be included.  Since GCM is recommended, the interface is already there, but not called out.  Omitting unauthenticated encryption will simplify the spec, and improve security.  If there is some percieved issue with AES-GCM, there are other AEAD algorithms that can be used, AES-SIV (synthetic IV mode)  
for instance, or a generic CBC+HMAC composition.   In any case, I  
offer to help craft and/or review this text.

A minor point: JWE recommends AES-GCM; why not have json-web-signature recommend AES-GMAC?

json-web-signature says that "Related encryption capabilities are  
described in the separate JSON Web Encryption (JWE) specification".   
The JWE specification says that "In general, senders SHOULD sign the message and then encrypt the result (thus encrypting the  
signature)".   There ought to be better recommendations for security.   
For instance, encryption without authentication should be disallowed.

regards,

David

--


[1] Vaudenay, "Security Flaws Induced by CBC Padding Applications to SSL, IPSEC, WTLS...", EUROCRYPT 2002.

[2] Rizzo, Duong, "Practical Padding Oracle Attacks", Black Hat Europe, 2010.

[3] Jager, Somorovsky, "How To Break XML Encryption", 18th ACM Conference on Computer and Communications Security (CCS), 2011.

[4] Bellare, Kohno, Namprempre, "Breaking and provably repairing the SSH authenticated encryption scheme: A case study of the Encode-then- Encrypt-and-MAC paradigm", ACM Transactions on Information and System Security, May 2004.

[5] Rizzo, Thai, "BEAST: Surprising crypto attack against HTTPS", Ekoparty, 2011.

[6] Bellovin, “Problem Areas for the IP Security Protocols”, Sixth Usenix Unix Security Symposium, 1996.

[7] Paterson, Yau, “Cryptography in theory and practice: The case of encryption in IPsec”, EUROCRYPT 2006,

[8] Degabriele, Paterson, "Attacking the IPsec Standards in Encryption- only Configurations", IEEE Symposium on Security and Privacy, 2007.




_______________________________________________
jose mailing list
jose@ietf.org
https://www.ietf.org/mailman/listinfo/jose