Re: [Cfrg] I-D Action: draft-irtf-cfrg-spake2-03.txt

Watson Ladd <watsonbladd@gmail.com> Fri, 19 February 2016 18:24 UTC

Return-Path: <watsonbladd@gmail.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CCBA61B2F57 for <cfrg@ietfa.amsl.com>; Fri, 19 Feb 2016 10:24:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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, SPF_PASS=-0.001] autolearn=ham
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 CZMMtb0C9unm for <cfrg@ietfa.amsl.com>; Fri, 19 Feb 2016 10:24:42 -0800 (PST)
Received: from mail-yw0-x22f.google.com (mail-yw0-x22f.google.com [IPv6:2607:f8b0:4002:c05::22f]) (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 033711B2A9C for <cfrg@irtf.org>; Fri, 19 Feb 2016 10:24:42 -0800 (PST)
Received: by mail-yw0-x22f.google.com with SMTP id g127so74267866ywf.2 for <cfrg@irtf.org>; Fri, 19 Feb 2016 10:24:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=9U3r7S+vGqMJ6girh/puOBYLZSflGBCFYrhl6HiIVvQ=; b=vObuj0zM6u7sjukdzQXiqrZI3P9W+4Wl0A2p64Te/wQUpnv3R5GXgMp+VkCqUvvauW lONUnWFKo/B43wHKZP3/E+/qqqNTAVbqMTASQSt7NUDQMfMxIJ3PCrEXE9BODdoWGf8P g3hX3nQqdpCv3XKaI3Hx8rJ+eWlGoQi7nyS3WuOYutSRjjAkxMaV+JtKux684twRXSxj 2i1fM/XtXiGNPSRA/UWNiTgGp1aFPQxpmrOzApAGudTbHjXYswO/4HBaU+HBn0fG1MvQ qiWAFLwH+ys/7WSyAEwTL1muFUAfomeVryGsolMDioEi9leGKo8qjMKTZbXVizzNLyMa biUQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=9U3r7S+vGqMJ6girh/puOBYLZSflGBCFYrhl6HiIVvQ=; b=F+nMKDEYSXW1m8O1XELfLUU3DYWXOVj3SlRlwbLlvPO1WPD8TXzQUj6tF1TYEAxnY8 zkx4g0CK15PD9MES2Hdcy+qZ6avId1S8atkvZIVbKUMPsneAiPQ27vwKeBVXp0MzE/ZV MmAmNfJfueNll/kbiFgQ9O35vH4jGTgTBHlk+ySmupAPu8glVNW4a1HCWx+jQ7r48oLb A1Turko1/27qE9v4qV4oyJCre9UdzziF9cadxIX1QbgBSz5TVTMaDPRzLuFM44qqx3u/ 4CmhyxIKbRTn8G+alSDzYnUlSnGFMUcy9bv/i51Zx4CHGCAXAGRW8MCnQJcmpajyZWcW yYpQ==
X-Gm-Message-State: AG10YOTf4KHpK/Dx+QEW/L/mHNpQ33TBBd8ou86LEwgQ5arQa+qjanSXY9v6BxVHok+JOADJbw78wfmfhQ8ALg==
MIME-Version: 1.0
X-Received: by 10.13.229.71 with SMTP id o68mr8428493ywe.326.1455906281215; Fri, 19 Feb 2016 10:24:41 -0800 (PST)
Received: by 10.13.216.138 with HTTP; Fri, 19 Feb 2016 10:24:41 -0800 (PST)
In-Reply-To: <na713j$kqr$1@ger.gmane.org>
References: <20160215145643.14144.52226.idtracker@ietfa.amsl.com> <56C1FB64.1080309@mit.edu> <na713j$kqr$1@ger.gmane.org>
Date: Fri, 19 Feb 2016 10:24:41 -0800
Message-ID: <CACsn0cmyGA_QLWx+xYn3VGibdmqD+r+XFg6HVV4yGL4FvgODWg@mail.gmail.com>
From: Watson Ladd <watsonbladd@gmail.com>
To: Alex Elsayed <eternaleye@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <http://mailarchive.ietf.org/arch/msg/cfrg/rTqLZmONvepG1IReqenAKY56Khg>
Cc: "cfrg@irtf.org" <cfrg@irtf.org>
Subject: Re: [Cfrg] I-D Action: draft-irtf-cfrg-spake2-03.txt
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.15
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: Fri, 19 Feb 2016 18:24:44 -0000

Write the code and the text, and if I can run it, it goes in.

On Fri, Feb 19, 2016 at 4:16 AM, Alex Elsayed <eternaleye@gmail.com> wrote:
> On Mon, 15 Feb 2016 11:23:00 -0500, Greg Hudson wrote:
>
>> On 02/15/2016 09:56 AM, internet-drafts@ietf.org wrote:
>>>      Filename        : draft-irtf-cfrg-spake2-03.txt
>>
>> I am pleased to see progress on this draft.
>>
>> The formatting of the new formula for K' in section 2.2 is a little off
>> in its use of whitespace.
>>
>> SPAKE2+ doesn't use w0 or w1 in the derivation of K'.  Obviously it
>> can't use w1 as B doesn't have it, but can we call this an augmented
>> version of SPAKE2 if it more closely resembles SPAKE1?  Should it use
>> w0?
>>
>> The description of SPAKE2+ still refers to "Bob" in one place.
>>
>> In section 3, the formatting of the Python code is mangled.  Calls to
>> ec.canon_pointstr() should be changed to canon_pointstr() since you've
>> defined that as a function.
>>
>> In section 3, the description of the algorithm still doesn't match the
>> actual algorithm used, although it's closer some details.  The first
>> mismatch comes from these two passages:
>>
>>     This string is turned into an infinite sequence of bytes by hashing
>>     with SHA256, and hashing that output again to generate the next 32
>>     bytes, and so on.
>>
>>     If this is impossible, then the next non-overlapping segment of
>>     sufficient length is taken.
>>
>> The actual algorithm doesn't use non-overlapping segments of an infinite
>> sequence of bytes; instead it uses overlapping concatenations of hash
>> blocks for successive trials.  For P-521, the first trial uses H1|H2|H3
>> (where H1 is hash of the string, H2 is the hash of H1, etc.) truncated
>> to 65 bytes; the second trial uses H2|H3|H4 truncated, etc..
>
> OOI, why not use HKDF, with the string as the IKM? Personally, I'd much
> prefer that to inventing Yet Another Ad-Hoc Way To Extract Arbitrary-
> Length Randomness.
>
>
>> The second mismatch comes from this passage:
>>
>>     We multiply that point by the cofactor h, and if that is not the
>>     identity, output it.
>>
>> The Python code multiplies the point by the generator order (p), and if
>> that *is* the identity, outputs the point.  The difference is that the
>> Python code discards points of order 2p, 4p, ..., hp.  This difference
>> is irrelevant for P-256 and P-521 which have cofactor 1.
>
>
> _______________________________________________
> Cfrg mailing list
> Cfrg@irtf.org
> https://www.irtf.org/mailman/listinfo/cfrg



-- 
"Man is born free, but everywhere he is in chains".
--Rousseau.