Re: [Cfrg] Fwd: New Version Notification for draft-harkins-pkex-00.txt

Dan Harkins <dharkins@lounge.org> Tue, 13 September 2016 16:20 UTC

Return-Path: <dharkins@lounge.org>
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 97CB512B3C8 for <cfrg@ietfa.amsl.com>; Tue, 13 Sep 2016 09:20:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.201
X-Spam-Level:
X-Spam-Status: No, score=-4.201 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 okjKY925dhzj for <cfrg@ietfa.amsl.com>; Tue, 13 Sep 2016 09:19:59 -0700 (PDT)
Received: from colo.trepanning.net (colo.trepanning.net [69.55.226.174]) by ietfa.amsl.com (Postfix) with ESMTP id 86AE812B42B for <cfrg@irtf.org>; Tue, 13 Sep 2016 08:59:36 -0700 (PDT)
Received: from dhcp-16-207.meeting.verilan.com (unknown [194.247.2.13]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by colo.trepanning.net (Postfix) with ESMTPSA id 6AC7F10224062; Tue, 13 Sep 2016 08:59:35 -0700 (PDT)
To: Andy Lutomirski <luto@amacapital.net>
References: <147367129321.14577.4302361405783294005.idtracker@ietfa.amsl.com> <3e9341e6-d826-a028-df40-a4e0dff98635@lounge.org> <CALCETrXo3AQNJGzvVQ-O3YtGhPOu45Y6S13u3WUJO8PjkU6EJQ@mail.gmail.com> <e0fe2661-7012-ca38-de81-5941d64a0ec2@lounge.org> <CALCETrUoQKN3Pw+aNej5sXaTY_d-tbbA4Qjx32KhL0kPa9XFfQ@mail.gmail.com> <e8864929-45f2-0767-8ecc-dc7c2da8d066@lounge.org> <CALCETrXFD1gDVJ7GVX9cxhpiQty2C4WpzHLFX=7QesQMn-mOWw@mail.gmail.com>
From: Dan Harkins <dharkins@lounge.org>
Message-ID: <31e67ed0-da2b-fd25-9da9-9bf6191bc036@lounge.org>
Date: Tue, 13 Sep 2016 08:59:33 -0700
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
MIME-Version: 1.0
In-Reply-To: <CALCETrXFD1gDVJ7GVX9cxhpiQty2C4WpzHLFX=7QesQMn-mOWw@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------B71FE5766A4865354227662C"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/RQQMqTdmw_Fgc22LgGbZb8IxUxs>
Cc: cfrg@irtf.org
Subject: Re: [Cfrg] Fwd: New Version Notification for draft-harkins-pkex-00.txt
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.17
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: Tue, 13 Sep 2016 16:20:02 -0000

On 9/13/16 7:59 AM, Andy Lutomirski wrote:
>
> On Sep 13, 2016 12:39 AM, "Dan Harkins" <dharkins@lounge.org 
> <mailto:dharkins@lounge.org>> wrote:
> >
> > On 9/12/16 2:43 PM, Andy Lutomirski wrote:
> >> Alice and Bob start running the protocol with one password pw1.  Alice
> >> sends X + Qa = X + F(pw1) * Pi where F is a function that an attacker
> >> can compute.  The attacker interrupts the exchange and Alice and Bob
> >> retry using a different pasword.  The draft *says* that the keys are
> >> ephemeral, but that's really hard to believe because the whole stated
> >> point is to establish a long-term key.  So Alice how sends X + F(pw2)
> >> * Pi.
> >
> >
> >   So your "attack" is based on the supposition that it's "really hard
> > to believe" an ephemeral key is ephemeral? Hmmm.
> >
> >   What you have done is to look at the _very first_ of the Security
> > Considerations, decided to ignore the statement that says you void
> > the security of the exchange if you reuse ephemeral keys and then claim
> > you have discovered an "attack" on the protocol?
>
> No, I read a different version of the protocol that really did seem to 
> do this, and I didn't notice that this part changed.
>
> But what's the point, then?  Why are you inventing a brand new PAKE 
> that doesn't have a security proof?  What benefit do you gain over 
> using a real, proven PAKE?
>
> But you are still reusing the ephemeral keys yourself in the very same 
> protocol! Suppose Bob *doesn't* know the password but does know a.  
> (He *shouldn't*, but still.)  Bob can run most of the protocol anyway 
> by sending random made-up values and Alice will send u.  Bob can now 
> calculate what Alice would have sent as u for any given pw value and 
> thus brute-force the password.
>

   If Bob knows a then Bob knows the private key to Alice's long-term 
identity
key. He can also trivially determine A. So he can impersonate Alice in 
TLS/IKEv2
or any other protocol using a trusted "raw" key for authentication. The 
point
of him attacking PKEX to determine an, essentially, one time use 
password is....?

   Granted, this does, I guess, technically violate one of the 
properties of PKEX
(active attack only learns whether one guess of the password was right 
or wrong)
but as an attack is so contrived as to be pointless, as are most 
"attacks" that
begin, "Assuming I have the private key...."

   I guess I could add some note in the assumptions that private keys 
are private
but I figured that went without saying. Thank you for your comment 
though, it may
result in a change to the draft.

> For this type of protocol, you should be building on real primitives 
> with provable security, and you should use them as intended so the 
> security proof works.
>

   It is possible to build something, as you suggest, that approximates 
PKEX using
some other PAKE plus an AEAD scheme plus some PKCS#10 blob but it has 
its own
security critical moving parts. And then you end up with something like 
TLS-pwd
authenticating EST, which is a tad heavyweight and not the kind of PAKE 
usage that
the PAKE requirements draft is referring to; PKEX is.

> >> Step 1: define clearly what you're actually trying to do.  I'll guess
> >> what you're trying to do: Alice and Bob are devices with keyboards,
> >> and there's a user (an actual person) who will come up with a
> >> temporary password to use to pair the devices.  Both devices have
> >> keyboards.
> >>
> >> Step 1: User chooses a password and types it in to both devices.
> >>
> >> Step 2: Alice and Bob run a balanced PAKE (DH-EKE, SPAKE2, whatever)
> >> using that password.  They do this the normal way, using fresh
> >> ephemeral random numbers as prescribed by the PAKE in use, and they do
> >> not keep any internal values around that they are supposed to discard.
> >> The result is a shared secret.  They do this PAKE exchange exactly
> >> once and they do not retry without explicit input from the user.
> >
> >
> >   Interesting that now "fresh ephemeral random numbers as prescribed
> > by the PAKE" are eminently believable yet you find such behavior
> > "really hard to believe" for PKEX.
> >
> >
> >>
> >> This has the usual balanced PAKE security property: an attacker gets
> >> exactly one guess with which to try cracking the password, and no
> >> off-line attack against the password is possible.
> >>
> >> Step 3: Alice uses her favorite authenticated encryption protocol,
> >> keyed by the shared secret, to send Bob her public key.  Bob now knows
> >> that whoever sent this key knows the password or got extremely lucky
> >> on their one and only chance to guess the password.
> >
> >
> >   And this provides absolutely no proof-of-possession. Bob got a public
> > key and he knows that Alice sent it to him but there is nothing that
> > Alice does to prove that she holds the corresponding private key.
>
> Did you read the very next sentence of my email?
>

   Yes. Merely signing your public key does not provide proof of ownership.
To demonstrate ownership you need to additionally sign something that binds
your statement to the authenticated state already established (which is what
PKEX does). It's tricky to do right and you don't seem to understand that
which demonstrates the kind of dangerous hubris you seem to be accusing me
of having.

   So you could perhaps build something that, if done right, did what 
PKEX does
but uses 3+ different crypto tools each with its own set of assumptions that
you better make sure you operate inside. Or you could just do PKEX.

   Thank you again for your comment and suggestion.

   Dan.