Re: [secdir] [Last-Call] [TLS] Secdir last call review of draft-ietf-tls-certificate-compression-07

Victor Vasiliev <vasilvv@google.com> Mon, 09 December 2019 09:13 UTC

Return-Path: <vasilvv@google.com>
X-Original-To: secdir@ietfa.amsl.com
Delivered-To: secdir@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E70E112004D for <secdir@ietfa.amsl.com>; Mon, 9 Dec 2019 01:13:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.5
X-Spam-Level:
X-Spam-Status: No, score=-17.5 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] 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 FIiRgCfluxmG for <secdir@ietfa.amsl.com>; Mon, 9 Dec 2019 01:13:51 -0800 (PST)
Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (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 CB958120168 for <secdir@ietf.org>; Mon, 9 Dec 2019 01:13:50 -0800 (PST)
Received: by mail-lf1-x133.google.com with SMTP id y19so10051811lfl.9 for <secdir@ietf.org>; Mon, 09 Dec 2019 01:13:50 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5hy2x8RiB0o7SG7DsRtAm56omGvRAzKw1uXMVHRAJU8=; b=ujcx81nAyeREwPg7RxCL2PhQ+jcapYvk1WPLkQaL9xS4kfYkSo1zssyNjEzfTMgI89 3XQS93NXTeikKytH4VehleAXPtAH5YYbzhUJq5ilhFLf029/5tqwYDAXQ8XGfQP2ZRTo +WkFDFmLOAPOU6irQGvbGfoUl9fvj8k7fC8Jmp3kOgUnhfS+rYot5Rg1NxbXvp98jDiY QXBH9Dz7bVyvhk1ujMTzWyHyYITKAFr2S2o2HXWfuNaQhIOwGxchJanEYQVYUTh1ENED bGE+UigNwLTgr3ix1+2QMS7Vz2HOf8hm6PYBUt53050KPR5PbG99nQa9qMgLAndPtFv0 TrMA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5hy2x8RiB0o7SG7DsRtAm56omGvRAzKw1uXMVHRAJU8=; b=i97nGjyHTdkgDVDuL6aNKS+QrEB6vb9t2jEAyD+xhnO+PtdlcqlB52FnmwaAkMK7al zSODkwwO7WMP11j80Hdkiygj0HY8jBL5ZyS9DLGHnCgg37f2Xo6cEo6n5mRBQ1WDx3jl DrSz78dEM5A3/i4uz/6+AXjFrnRCGpsd/OFPkqam3hs9prVppsrzYZnghj/oFLYV/FzD BoUSsLeSdn+i1Ww2gXQ3nXQkZpAkFQkW/5apNlBw/fuXyVsYMjv/KEcCCLwu75bEPdJ0 IkT2wO/XG0vldRWdYFO3gQXNmAgpM0wwvRX0ckYxGH3mWXUepFjGfQW4hxBlbTfiTuNz 4x+g==
X-Gm-Message-State: APjAAAX3lCnLQqrtmpSqf1E8vVUa0Mc+Nztn07YpUjAfAYp3gEH9CaHS ZDCX3bwVPcg50ovL/CzCaOoolvY73FXNHC0XjGK/Tw==
X-Google-Smtp-Source: APXvYqwu8jqgC3QOIoXl07K5nCZJf7w1bFyLrjLsQuvuhZQ0+noHazt9+UeNVjuhK6V4vMoXl61O2CDRrvet0PuTKis=
X-Received: by 2002:ac2:5549:: with SMTP id l9mr14613172lfk.53.1575882828621; Mon, 09 Dec 2019 01:13:48 -0800 (PST)
MIME-Version: 1.0
References: <157498929764.5575.7815291384505057169@ietfa.amsl.com> <20191205164212.GB12839@sokka.flat11.house> <1740c80a-498f-e706-5622-82d8115cf773@huitema.net>
In-Reply-To: <1740c80a-498f-e706-5622-82d8115cf773@huitema.net>
From: Victor Vasiliev <vasilvv@google.com>
Date: Mon, 9 Dec 2019 04:13:37 -0500
Message-ID: <CAAZdMaePdNDY3gUqhLRKOeMRnuL8O8OfnnjKWeUjZO2SaKGO3Q@mail.gmail.com>
To: Christian Huitema <huitema@huitema.net>
Cc: Alessandro Ghedini <alessandro@ghedini.me>, last-call@ietf.org, draft-ietf-tls-certificate-compression.all@ietf.org, "tls@ietf.org" <tls@ietf.org>, secdir@ietf.org
Content-Type: multipart/alternative; boundary="00000000000035a0aa059941d0c2"
Archived-At: <https://mailarchive.ietf.org/arch/msg/secdir/QiVhaXVwPEqbu-bYPe4IrFIn1Wc>
Subject: Re: [secdir] [Last-Call] [TLS] Secdir last call review of draft-ietf-tls-certificate-compression-07
X-BeenThere: secdir@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Security Area Directorate <secdir.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/secdir>, <mailto:secdir-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/secdir/>
List-Post: <mailto:secdir@ietf.org>
List-Help: <mailto:secdir-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/secdir>, <mailto:secdir-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 09 Dec 2019 09:13:53 -0000

On Thu, Dec 5, 2019 at 4:42 PM Christian Huitema <huitema@huitema.net>;
wrote:

> >> Second, my actual concern. Compression may leak information, because
> different
> >> certificate chains will compress differently. The authors mention that
> an
> >> attacker will not be able to inject data in the certificate chain, and
> thus
> >> that attacks of the CRIME variety are unlikely. That's correct, but
> that's not
> >> the entire story.
> >>
> >> TLS 1.3 will encrypt the compressed certificate message but the length
> of that
> >> message could be deduced from the length of the server's encrypted
> message.
> >> Attackers might be able to derive from that length the identity of the
> server,
> >> even if the SNI is encrypted.
> >>
> >> One could say that in the absence of compression the length of the
> certificate
> >> chain is also available. Indeed, the problem is flagged in
> >> draft-ietf-tls-esni-05, which states in section 5.3 that "it (the
> server)
> >> SHOULD pad the Certificate message, via padding at the record layer,
> such that
> >> its length equals the size of the largest possible Certificate (message)
> >> covered by the same ESNI key."
> >>
> >> Certificate compression introduces a level of complexity here. If only
> some
> >> servers in the anonymity set support compression, attackers can work
> with a
> >> smaller anonymity subset. If all attackers support compression, the
> padding
> >> should try to match the largest Compressed Certificate.
> >>
> >> It might be good to discuss this issue in the security consideration
> section.
> > I agree tha this is worth discussing, but it seems like it belongs in
> the ESNI
> > draft itself, so implementers of ESNI will be more likely to take
> compression
> > into consideration. That is, we can expand the section you quoted to also
> > explicitly mention certificate compression. What do you think? I can
> look into
> > proposing a PR for this.
>
> I agree with you that the bulk of the work belongs in the ESNI draft.
> However, it would be nice to have a short reminder of the issue in the
> security section of the compression draft. Something like:
>
> Although the Certificate extension is encrypted in TLS 1.3, third
> parties can deduce some information about the certificate from the
> length of the handshake messages. Compression does not prevent this
> issue, as different certificate chains will compress to different
> lengths. When privacy is desired, implementers need to consider
> appropriate padding strategies. Discussion of these padding strategies
> is out of scope for this document.
>
> -- Christian Huitema
>

Thanks!

Filed a PR addressing this issue:
https://github.com/tlswg/certificate-compression/pull/31

Cheers,
  Victor.