Re: [OAUTH-WG] WGLC on draft-ietf-oauth-mtls-07

Neil Madden <> Fri, 13 April 2018 10:49 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id E8290124319 for <>; Fri, 13 Apr 2018 03:49:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Status: No, score=-2.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id msKUsLURkdck for <>; Fri, 13 Apr 2018 03:49:05 -0700 (PDT)
Received: from ( [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id BB2261200C5 for <>; Fri, 13 Apr 2018 03:49:05 -0700 (PDT)
Received: by with SMTP id b21so3399540wme.4 for <>; Fri, 13 Apr 2018 03:49:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gBhgFJ9tXprmSQVEKMsjOMQ/pBDU7NPtyhLLRHgSAU8=; b=LfMBTYkrGqf35/YDxtmiz1IN2qQBwIW5lAkaKa4LoN9rRlnczREQOxR79b4Y5aahlI jSwhcF5bzRk0SP6h6WGheFIMTNk8FlN8OYs1YY9DOv9naXIZ1vu6Y5zxBAYClG96MIhl jt+9cwsLAJ0U1ENxPifmXtyrcrABKnOJVaLO0=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gBhgFJ9tXprmSQVEKMsjOMQ/pBDU7NPtyhLLRHgSAU8=; b=lEGD1ILxBg/LM+5JM/VWhwCi8bSFIV3vn8l0AOakAEntCuzvmkBnwSMNr7v8/OPZdW qeHEGDvYXj0bC2d926SZXKxyum0I9QSkVnQqzETw4HTaB2XKZr6CvtvYwAex6TWQCAR0 OsAVfyqB4tTdrAvFbAFRQH3W1RGhn3yc+iSaadSY4nQ6nuTP7jYswVwtbYLucfnjxMgv FU45JZoR3YJdgYcyDdHUx2zvaFS4btL8kzuxMpX2a0Sib3WgChvsg/+6+B7bxhUObTaj 5i+QmGir/HA1z44z6GbKYU0lJwyGnwbGHYf/VlzjVzODSt2L1p+Xeadz3mTZigflfjK7 cAVg==
X-Gm-Message-State: ALQs6tBQh/iZVNj4KRmBnl1TZsNbuFb65+wNhJJg0HEri76yUubvoZYE O+3lILbSOp2DGxnNkhpU+24HJA==
X-Google-Smtp-Source: AIpwx4/Hd0OVFX/E4NE74Q/qnx4PantJrsVmcRMHzza8PBSlDOz9+W/EXv5ECdPeiSrHrW3vl7KPAA==
X-Received: by with SMTP id m186mr3228918wmb.113.1523616543943; Fri, 13 Apr 2018 03:49:03 -0700 (PDT)
Received: from guest2s-mbp.home ( []) by with ESMTPSA id p4sm1528925wma.5.2018. (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Apr 2018 03:49:03 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\))
From: Neil Madden <>
In-Reply-To: <>
Date: Fri, 13 Apr 2018 11:49:00 +0100
Cc: oauth <>
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <> <> <> <5758ae34-1d2d-4946-9190-7a2e2bc184d2@Canary> <> <> <>
To: Brian Campbell <>, John Bradley <>
X-Mailer: Apple Mail (2.3445.6.18)
Archived-At: <>
Subject: Re: [OAUTH-WG] WGLC on draft-ietf-oauth-mtls-07
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: OAUTH WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 13 Apr 2018 10:49:09 -0000

I’m not particularly wedded to SHA-512, just that it should be possible to use something else. At the moment, the draft seems pretty wedded to SHA-256. SHA-512 may be overkill, but it is fast (faster than SHA-256 on many 64-bit machines) and provides a very wide security margin against any future crypto advances (quantum or otherwise). I’d also be happy with SHA-384, SHA3-512, Blake2 etc but SHA-512 seems pretty widely available. 

I don’t think short-lived access tokens is a help if the likelihood is that certs will be reused for many access tokens. 

Public Web PKI certs tend to only use SHA-256 as it has broad support, and I gather there were some compatibility issues with SHA-512 certs in TLS. There are a handful of SHA-384 certs - e.g., the Comodo CA certs for are signed with SHA-384 (although with RSA-2048, which NSA estimates at only ~112-bit security). SHA-512 is used on some internal networks where there is more control over components being used, which is also where people are mostly likely to care about security beyond 128-bit level (eg government internal networks). 

By the way, I just mentioned quantum attacks as an example of something that might weaken the hash in future. Obviously, quantum attacks completely destroy RSA, ECDSA etc, so SHA-512 would not solve this on its own, but it provides a considerable margin to hedge against future quantum *or classical* advances while allowing the paranoid to pick a stronger security level now. We have customers that ask for 256-bit AES already.

(I also misremembered the quantum attack - “Serious Cryptography” by Aumasson tells me the best known quantum attack against collision resistance is O(2^n/3) - so ~2^85 for SHA-256 but also needs O(2^85) space so is impractical. I don’t know if that is the last word though).  

As for SHA-1, doesn’t that prove the point? SHA-1 is pretty broken now with practical collisions having been demonstrated. The kind of attacks on CA certs demonstrated for MD5 [1] are probably not too far off for SHA-1 now. As far as I am aware, we’re nowhere near those kinds of attacks on SHA-256, but I’d prefer that there was a backup plan in place already rather than waiting to see (and waiting for everyone to have hard-coded SHA-256 everywhere).

Now I have to get back to my daughter’s birthday party… :-)



On Thursday, Apr 12, 2018 at 10:07 pm, John Bradley <> wrote:
The WG discusses RS meta-data as part of one of Dick’s proposals.   I am unclear on who is going to work on it in what draft.

If the client is doing mtls to both the Token endpoint and RS the information in the confirmation method is not relevant to the client as long as the AS and RS are in agreement like with most tokens.

The hash on the certificate and length of the signing key are equally or more vulnerable to any sort of attack.
At least with AT the tokens are not long lived.

Doing anything better than SHA256 only makes sense if the cert is signed by something stronger like SHA512 with a 2048bit RSA key.   That seems sort of unlikely in the near term.  

I prefer to wait to see what general fix is proposed before we jump the gun with a bandade for a small part of the overall problem.

People are typically using SHA1 fingerprints.  We added SHA256 for JWT and got push back on that as overkill. 
I don’t think this is the correct place to be deciding this.   

We could say that if new thumbprints are defined the AS and RS can decide to use them as necessary.
That is sort of the situation we have now.

The correct solution may be a thousand rounds of PBKDF2 or something like that to make finding collisions more difficult rather than longer hashes.

John B.

> On Apr 12, 2018, at 5:20 PM, Brian Campbell <> wrote:
> That's true about it being opaque to the client. I was thinking of client metadata (config or registration) as a way for the AS to decide if to bind the AT to a cert. And moving from a boolean to a conf method as an extension of that. It would be more meaningful in RS discovery, if there was such a thing.
> I don’t know that SHA512 would be the best choice either but it is something that is stronger and could be included now. If there's consensus to do more than SHA256 in this doc.  
> On Thu, Apr 12, 2018 at 1:52 PM, John Bradley <> wrote:
> Inline
> Snip
>> 12. The use of only SHA-256 fingerprints means that the security strength of the sender-constrained access tokens is limited by the collision resistance of SHA-256 - roughly “128-bit security" - without a new specification for a new thumbprint algorithm. An implication of this is that is is fairly pointless for the protected resource TLS stack to ever negotiate cipher suites/keys with a higher level of security. In more crystal ball territory, if a practical quantum computer becomes a possibility within the lifetime of this spec, then the expected collision resistance of SHA-256 would drop quadratically, allowing an attacker to find a colliding certificate in ~2^64 effort. If we are going to pick just one thumbprint hash algorithm, I would prefer we pick SHA-512.
>> The idea behind haveing just one thumbprint hash algorithm was to keep things simple. And SHA-256 seems good enough for the reasonably foreseeable future (and space aware). Also a new little spec to register a different hash algorithm, should the need arise, didn't seem particularity onerous. 
>> That was the thinking anyway. Maybe it is too short sighted though?
>> I do think SHA-256 should stay regardless. 
>> But the draft could also define SHA-512 (and maybe others). What do you and WG folks think about that?
>> *** Yes please. 
>> It would probably then be useful for the metadata in §3.3 and §3.4 to change from just boolean values to something to convey what hash alg/cnf method the client expects and the list of what the server supports. That's maybe something that should be done anyway. That'd be a breaking change to the metadata. But there's already another potential breaking change identified earlier in this message. So maybe it's worth doing...
>> How do folks feel about making this kind of change? 
> The confirmation method is opaque to the client.  I don’t think adding hash algs to discovery will really help.
> The AS selection needs to be based on what the RS can support.
> If anyplace it should be in RS discovery. 
> As a practical matter you art going to find a client certificate with more than a SHA256 hash anytime in the near future. 
> So for a short lived access token 128bits of collision resistance is quite good.   We are going to have issues with certificates long before this becomes a problem.
> SHA256 is appropriate for AES128 256bit elliptic curves and 3072bit RSA keys, but again that is over the long term.  
> We are using short lived access tokens.  People should rotate the certificate more often than once a year if this is a real issue.
> I am not against new hash for the fingerprint, but I also don’t know that SHA512 would be the best choice if we are concerned about quantum crypto resistance.   That is a issue beyond mtls and should be addressed by CFRG etc.
> Regards
> John B.
> CONFIDENTIALITY NOTICE: This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by e-mail and delete the message and any file attachments from your computer. Thank you.