Re: [Cfrg] [Ntp] Last minute annoying discovery about NTS

Daniel Franke <dfoxfranke@gmail.com> Thu, 21 March 2019 14:07 UTC

Return-Path: <dfoxfranke@gmail.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D18521277D6 for <cfrg@ietfa.amsl.com>; Thu, 21 Mar 2019 07:07:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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=gmail.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 BUk458tGU_ab for <cfrg@ietfa.amsl.com>; Thu, 21 Mar 2019 07:07:14 -0700 (PDT)
Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) (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 98744126F72 for <cfrg@irtf.org>; Thu, 21 Mar 2019 07:07:14 -0700 (PDT)
Received: by mail-qk1-x736.google.com with SMTP id k130so16365157qke.3 for <cfrg@irtf.org>; Thu, 21 Mar 2019 07:07:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BciTUm1yyLBoATnxoPI+TZu74T2Zj5KGzyGSGqMeql4=; b=CfiYvrdmc8/uALzRkxn6CdEGQ2NCR/vfEMp4x8IcHBPdWutAO+IAtiJMTPby5bJAd/ JraO2rCbAdNAZHOx9GMq3jOKR4V5th8hdMvG+j/09eX3wx8mUuynAS4KMMU3gvDtASwe b7n3ZytSMjF1d0xbbr0ip9Qb5YSUZeV91ZVsIGviJ0ZQR3reUitaE96e+XMWOplkm2MH IsmMGk+T4DHXnDPLPAS25kXyljQYZMW1ZWs/qyVN21qJqw2xox4T0PQJD4EzXkiONh9s afvrlhMA6HKlxs8dWbR8w0uJGtAazvxmttl+IcyI0LOXYbtYAvr1kOH3T+RqS7XTkWwa w1Pg==
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=BciTUm1yyLBoATnxoPI+TZu74T2Zj5KGzyGSGqMeql4=; b=itTNGEZ68PbByNkGNcYAZ6LGh17cBofKKQKLujCKeqabOvdvsJwebD2Wc8IDh22hel a5qyW3YX/c6oe4eEG5fqU9ElKy8qcMhvrilp33D0iPNZYkmLSzsLCv88KovzzJINUIZF S7JLKwAanVtTVXC7woL5wokZDbLdNBRWYFNcRn6mxITzWOOpl5nIenpRf0m7pDo8Tkdh ERJfq4ZbawD7IT07qw4snCdcXgx8b7xlymgMBg8Y6znoAPvs8yGDCAmbIF4UTsf3ZNoe QMCnpFRmtbOVdjqJf2G1tYGr7HcxZyNoBx0aO4g5zROAR+uQSaRMmO4n5nfxkJChK+/2 796A==
X-Gm-Message-State: APjAAAV+zP2QqMyEC76/mZcnVNbMka/mJZ7647HL4NSRnzIlX7VhzlW9 5hPBNpWEQVtoBQLcbRiIZcKa0ufVLASZAcV/X/w=
X-Google-Smtp-Source: APXvYqyJuk089XbpFf2WRostgPaRGZFcMMw98V4TCtYnpECKn8SapyBWyrl06BJ8dmU+y749HHEq+PH9+i+oConUmdg=
X-Received: by 2002:a37:68cc:: with SMTP id d195mr2785287qkc.131.1553177233622; Thu, 21 Mar 2019 07:07:13 -0700 (PDT)
MIME-Version: 1.0
References: <CAN2QdAH3f58FsfPoLquUh-ZgQe-X4EoCgiJAF7zf5X1M_r+zEA@mail.gmail.com> <CAJm83bDnyHx+wA21xsodL+tZkXSjDceFtyqPVNAnVOLJZVgmJA@mail.gmail.com> <CAN2QdAG8szTQyCw41XkioW7de3WxF59UaWmLazk3ak4wX8ps4Q@mail.gmail.com> <CAMbs7ktP_pmC5x256U38L0f_MXTWh9=Xy0KZ79AH=PtROxA5pQ@mail.gmail.com> <CACsn0cmedxYQoQSoCFLj3xWoSNPKSzy6RaCPC6P+L98ShEwLBA@mail.gmail.com>
In-Reply-To: <CACsn0cmedxYQoQSoCFLj3xWoSNPKSzy6RaCPC6P+L98ShEwLBA@mail.gmail.com>
From: Daniel Franke <dfoxfranke@gmail.com>
Date: Thu, 21 Mar 2019 10:07:02 -0400
Message-ID: <CAJm83bBWCY6tSWaRDPyfomR+ZKsvTwvuaju=GSLSvLWEN-NywQ@mail.gmail.com>
To: Watson Ladd <watsonbladd@gmail.com>
Cc: Aanchal Malhotra <aanchal4@bu.edu>, ntp@ietf.org, cfrg@irtf.org, Watson Ladd <watson=40cloudflare.com@dmarc.ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/FY5uEh3ei497JQSBQnV7SIsdgR4>
Subject: Re: [Cfrg] [Ntp] Last minute annoying discovery about NTS
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Mar 2019 14:07:17 -0000

I think I might nonetheless spend my flight to Prague formalizing a
security proof, mostly as an exercise to improve my proficiency
working in the standard model. My intuition here is mostly that, even
if the adversary is given K1, it still can't distinguish E_{K2}(K1)
from E{K2}(R) for random R; there therefore shouldn't be anything
"special" about using E_{K2}(K1) as an input to E_{K1}(.). A colleague
has sketched out a plausible hybrid argument which sort of matches
this intuition. I'm going to take that argument and see if I can run
with it.

On Wed, Mar 20, 2019 at 8:46 PM Watson Ladd <watsonbladd@gmail.com> wrote:
>
> I've managed to convince myself Daniel is right and there is no problem.
>
> On Wed, Mar 20, 2019, 1:31 PM Aanchal Malhotra <aanchal4@bu.edu> wrote:
>>
>> This reference for KDM security might be useful.
>> https://eprint..iacr.org/2010/513.pdf
>>
>> On Wed, Mar 20, 2019 at 1:29 PM Watson Ladd <watson=40cloudflare.com@dmarc.ietf.org> wrote:
>>>
>>> On Wed, Mar 20, 2019 at 1:18 PM Daniel Franke <dfoxfranke@gmail.com> wrote:
>>> >
>>> > Are you certain the standard security definitions don't suffice? If
>>> > the S2C key were directly being encrypted under itself, then a
>>> > circular-secure cipher would be needed. Ditto if you were to encrypt
>>> > the S2C key under the master key and also encrypted the master key
>>> > under the S2C key. We're producing the cookie by encrypting the S2C
>>> > key under the master key, and then for transmission we're encrypting
>>> > the resulting ciphertext under the S2C key. But at no point does the
>>> > master key ever get encrypted under the S2C key; the master key never
>>> > leaves the server even as ciphertext. So I don't think we actually
>>> > have a loop here.
>>>
>>> Any sort of encryption of a function of the key is a call the experts
>>> situation. So the question for the experts: if E_K(M) is an AEAD
>>> scheme, and K1, K2 keys
>>> is E_{K1}(E_{K2}(K1)) a sane thing to do, or is it a problem from a
>>> proof perspective? What if I am allowed to change the inner or outer
>>> schemes to any AEAD scheme?
>>>
>>> >
>>> > On Wed, Mar 20, 2019 at 3:34 PM Watson Ladd
>>> > <watson=40cloudflare.com@dmarc.ietf.org> wrote:
>>> > >
>>> > > Dear all,
>>> > >
>>> > > I really apologize for sending this message so late in the process,
>>> > > but there is a problem with NTS in draft-17.
>>> > >
>>> > > The cookie encrypts S2C and C2S under a key known to the server, but
>>> > > then the response encrypts the cookie under S2C. This creates a
>>> > > situation where we are encrypting plaintext that depends on the key,
>>> > > which complicates the security analysis. (And by complicates I mean
>>> > > there are contrived ciphers meeting the ordinary security notion that
>>> > > would be completely insecure in such a protocol: one has to not use
>>> > > generic analysis: it's a pain to deal with. see
>>> > > https://eprint.iacr.org/2010/144.pdf)
>>> > >
>>> > > One solution would be for the cookie to contain the new keys which the
>>> > > server picks at random (and of course the client strips them out
>>> > > before sending the rest of the cookie to the server). Again, I
>>> > > apologize for only just noticing this detail.
>>> > >
>>> > > Sincerely,
>>> > > Watson Ladd
>>> > >
>>> > > _______________________________________________
>>> > > ntp mailing list
>>> > > ntp@ietf.org
>>> > > https://www.ietf.org/mailman/listinfo/ntp
>>>
>>> _______________________________________________
>>> ntp mailing list
>>> ntp@ietf.org
>>> https://www.ietf.org/mailman/listinfo/ntp
>>
>> _______________________________________________
>> Cfrg mailing list
>> Cfrg@irtf.org
>> https://www.irtf.org/mailman/listinfo/cfrg
>
> _______________________________________________
> Cfrg mailing list
> Cfrg@irtf.org
> https://www.irtf.org/mailman/listinfo/cfrg