Re: [Trans] STH Discipline & Security Considerations
Al Cutter <al@google.com> Fri, 03 March 2017 19:53 UTC
Return-Path: <alcutter@google.com>
X-Original-To: trans@ietfa.amsl.com
Delivered-To: trans@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 216281299A8 for <trans@ietfa.amsl.com>; Fri, 3 Mar 2017 11:53:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
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 2hJMuST4-b_r for <trans@ietfa.amsl.com>; Fri, 3 Mar 2017 11:53:30 -0800 (PST)
Received: from mail-yw0-x232.google.com (mail-yw0-x232.google.com [IPv6:2607:f8b0:4002:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D355D1295D2 for <trans@ietf.org>; Fri, 3 Mar 2017 11:53:29 -0800 (PST)
Received: by mail-yw0-x232.google.com with SMTP id p77so87836541ywg.1 for <trans@ietf.org>; Fri, 03 Mar 2017 11:53:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=4NVgEkcQVkzvnpOZcY4v5rL81XmcwVvLZIJagCI/bCg=; b=S+hi6fztqOeVXi5fx19UEXnANFliL3eknNcxLAQMUTJ/Yv812Jp0DQHrekYDkR0/8J tjLzXSHTXhp0Xl/BlROva2BAK1o9n0LOYe1Oas1M9D+FQGEIS+OeTJ4dU/YzBOxjjl5/ NF+iSVbjHeUCf+yFuVJcCMHAylR3EUVDuot/krEWYUsC0SWUFv3xMD/xW1WK1Dj4JCrn uOy9Uc5WD3rT0oDe+7qpEWvlHG+Iy0rjlfgjJYIgmCRiOEgdJR5EUiKtU8vZ/Z7u/GLH RMuHoE/svDEBqJpA/KuGwsZdxqa/7shwd1wgZQo+PwVluJwQbyCHJCi0SB8iWZ1Io2OY Cm8w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=4NVgEkcQVkzvnpOZcY4v5rL81XmcwVvLZIJagCI/bCg=; b=erwVNr3OpXrOdOlOoFYDHY7By4eomqAkPB/uslFtEv/ue22D9tFuWTESJpXDZ7cMwQ bRqYQYbSsbfnWIgm8OXtFgl2ktJ+Z8Ud2Vi/O9Qry+a3FDlea9DrfyboYi19Xqq20sEM 8GqN9qDuyogfqZ4bRhATjd/L1FNyD1+dMnWa0xuMeIKwuWDKlVNyVqBksW3ShU9KtrUF 4XjAaxrgm2k52JNd34NNtJXBsN+ACgdp4xmEzf5Hwbz1rlS0er+fLkAq87ajk8Mgn076 uNuM7xvXrTUGsV87ZLwD0YZ7WMVC3JFYqqULO78ClHrSNHcD1iaJkPf4iGcqJcjJntbY xPaA==
X-Gm-Message-State: AMke39kQWEQkCHuFmUwBZY4vXkOVY1XAgseEi0yKleQUDQKefR353rkCVfjTHyIuXa1RjiIQvijj/G70+odQ7SM8
X-Received: by 10.37.33.133 with SMTP id h127mr2972741ybh.159.1488570808705; Fri, 03 Mar 2017 11:53:28 -0800 (PST)
MIME-Version: 1.0
Received: by 10.37.76.65 with HTTP; Fri, 3 Mar 2017 11:53:27 -0800 (PST)
In-Reply-To: <CAL02cgSr_G6HdS7f28cgBE4G_DAhnz6ios2EsTGEx==t6ONOZw@mail.gmail.com>
References: <CAL02cgSr_G6HdS7f28cgBE4G_DAhnz6ios2EsTGEx==t6ONOZw@mail.gmail.com>
From: Al Cutter <al@google.com>
Date: Fri, 03 Mar 2017 19:53:27 +0000
Message-ID: <CACM=_OegA+4AuCmzuEGgKe0D1i7B31+TrNkzdtiUJZg+Tpee4w@mail.gmail.com>
To: Richard Barnes <rlb@ipv.sx>
Content-Type: multipart/alternative; boundary="001a1143e92a47139f0549d8e608"
Archived-At: <https://mailarchive.ietf.org/arch/msg/trans/vxOAzdpOeRaXTSeTXhISBCRyVSU>
Cc: Trans <trans@ietf.org>
Subject: Re: [Trans] STH Discipline & Security Considerations
X-BeenThere: trans@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Public Notary Transparency working group discussion list <trans.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/trans>, <mailto:trans-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/trans/>
List-Post: <mailto:trans@ietf.org>
List-Help: <mailto:trans-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/trans>, <mailto:trans-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 03 Mar 2017 19:53:32 -0000
On Fri, Mar 3, 2017 at 6:24 PM, Richard Barnes <rlb@ipv.sx> wrote: > Hey all, > > I wanted to follow up on my earlier comments and a bunch of side > conversations > I've had with people since then with a revised change proposal that I > think can > get -rfc6962-bis to a point we can live with. > > tl;dr: > 1. We/Mozilla can live with the Merkle tree for now, though we/community > might > ultimately want something different later > 2. At a systemic level, we need to move toward servers providing inclusion > proofs, but -rfc6962-bis provides sufficient tools for this > 3. We need to better document "STH discipline", and define a "canonical > STH" > for each element in the log > 4. We need to update the security considerations to describe more clearly > the > implications of various levels of auditing > > I'm willing to write up a PR for (2); EKR has volunteered for (3). > > > # Auditing Models > > There are basically two approaches to auditing available to clients: > > 1. Prospective: Browser does auditing checks at TLS connection time > 2. Retrospective: Browser does auditing checks after TLS connection time > > Prospective checking provides better assurance than retrospective, since it > prevents any harm that would come from a mis-issued, improperly-attested > certificate. The cost is that the server has to send enough information > the > cert and the browser has to cache enough information about the log that > the two > can be married up without further requests. > > In practice, however, it looks like some degree of retrospective checking > will > be necessary even in browsers that support the cache enough information for > prospective checking. On the one hand, if an inclusion proof can't be > embedded > in a cert, then we can't count on all server operators providing it (via > OCSP / > TLS). On the other hand, including proofs in certs imposes issuance delays > that will not be acceptable in many circumstances, even if it is > O(minutes). > > And given Eran's SSL proxy proposal, with the amendments I suggested, I'm > now > pretty well convinced that the fetches you need for retrospective > validation > can be done privately with something short of Tor (just). The scalability > problems are bad, but probably ultimately workable. > > It should be clear that either of these models work much better if the > server > provides inclusion proofs. Together with the STH discipline notions below, > this would enable prospective auditing for all but very new certificates > if a > browser is willing to cache STHs. Even in cases where CT information must > be > fetched, having the server send an inclusion proof would mean that the only > fetch would be for consistency, which is a less privacy-sensitive, more > cacheable query. > Here's a half-baked idea for a third (well, kinda), following on from today's theme of embedded proofs + STH, and an ecosystem with more open logs. Can we trust that some fraction of the logs in the ecosystem are honest? If so, then it feels like mostly the danger comes come allowing an issuer of cert to select which logs they want to log to, because they can choose their naughty log operator friends who'll collude. How about if we reduce the choice of logs, for example: 1. we define a function of, say, the hash of the log's public key to determine which of a fixed number of "groups" each log belongs to 2. we define a function of the hash of a precert (might be the same as [1]) which returns 1 (or perhaps several) groups to which that precert must be logged. 2. anyone creating a precert must log to the logs in the group(s) defined by the function in [2] 3. logs & CAs do their thing, proofs + STHs are embedded, certs are built, and websites updated. 4. the RP can verify the validity of the proofs, and the sigs on the STHs, but they can also verify that the STHs are from the set of logs the well known function [2] says they should for the precertificate they re-construct from the cert they were served (similar to how embedded SCTs are verified currently) IANAC, but I'm thinking that perhaps if the functions in [1] and [2] are sufficiently indistinguishable from random the client has reasonable confidence (given that we trust some fraction of the ecosystem is honest) that a bad cert will be detected by monitors and the game's up, and no need to talk to anyone (unless the proofs/sigs don't work and they want to tell someone about it). I suspect this precise scheme might be weak because of the low number of groups; perhaps it's too easy to "mine" log keys and percerts to line up groups, but maybe there are mitigations for that (e.g. making the hashing more expensive*, and/or requiring the not_before to be within some window of the embedded SCT timestamps so your mining work is wasted if you take too long, or maybe the groups functions also take issuance time into account, or only takes the domain from the first SAN, or the OU, or ... - I dunno, I said it was half-baked! Anyway, I'm sure there are people here who know a lot more about this sort of thing than I do. Perhaps you can pull a similar trick for logs too - forcing logs to commit to tree timelines in a set of locations defined by a function of the hash tree root from the STH they're logging (this is really a tweak to an idea Ben had about gossip a while back). * On the expensive hashing, I realise that it'd be undesirable for some classes of UAs (mobiles in particular) to have to perform the expensive hashing to verify the set of logs, but since I'm rattling on anyway, I vaguely recall a scheme from somewhere else (I don't remember where, sadly) which was cute: we define the hashing function to be, say, 100,000,000 rounds of SHA256 where each round is SHA256(hash_n-1||precert hash), then we embed the 99,999,999th hash somewhere in the cert so that the client can recalculate the last round using that and the reconstructed precert and verify the STHs come from the right group(s) - expensive for the logger, but cheap for the verifier. Ok, I'll stop now. Have a nice weekend, all. > > # STH Discipline > > Either style of auditing also works better if logs have a notion of "STH > discipline", in the following sense: > > 1. The official state of the log comprises a sequence of STHs issued at > specified intervals. > > 2. For each certificate in the log, there is a single "canonical STH" to > which > the log will produce an inclusion proof. Proofs to other STHs are done > by > adding a consistency proof to the inclusion proof. > > This property makes things work more smoothly in both auditing models: > > - If the browser is willing to cache STHs, this tells the browser exactly > which > STHs it needs to cache in order to validate all inclusion proofs. > > - Everything is more cacheable, since there's only one inclusion proof per > certificate, and a limited set of heads among which consistency needs to > be > calculated. > > - Cacheability means that the fetches of inclusion proofs get greater > privacy > benefit from caching, since they depend only on the certificate, not the > STH > that the client is using. Likewise for consistency proofs, because of > the > reduced variety. > > From a protocol point of view, I haven't done a thorough evaluation of the > document, but there are at least a few things you would want to make this > model > work: > > - Prose that articulates the above bounds on logs / inclusion proofs / > STHs. > Probably a notion of "STH issuance frequency" parallel to MMD. > > - A field in an SCT that indicates the canonical STH for the certificate in > question. Possibly a serial number in STH that SCTs could refer to. > > - An API endpoint for fetching STHs in the official sequence (in addition > to > the current one, which is the only option right now). > > If this line of thinking sounds generally sane to people, I'll take a pass > through the document and make some concrete proposals. > > Thanks, > --Richard > > _______________________________________________ > Trans mailing list > Trans@ietf.org > https://www.ietf.org/mailman/listinfo/trans > >
- [Trans] STH Discipline & Security Considerations Richard Barnes
- Re: [Trans] STH Discipline & Security Considerati… Andrew Ayer
- Re: [Trans] STH Discipline & Security Considerati… Richard Barnes
- Re: [Trans] STH Discipline & Security Considerati… Ben Laurie
- Re: [Trans] STH Discipline & Security Considerati… Richard Barnes
- Re: [Trans] STH Discipline & Security Considerati… Al Cutter