Re: [CFRG] Questions regarding draft-irtf-cfrg-spake2-15.txt

Watson Ladd <watsonbladd@gmail.com> Fri, 18 December 2020 14:36 UTC

Return-Path: <watsonbladd@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 E2B143A06E7 for <cfrg@ietfa.amsl.com>; Fri, 18 Dec 2020 06:36:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_NONE=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=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 DULdgttsqFrJ for <cfrg@ietfa.amsl.com>; Fri, 18 Dec 2020 06:36:06 -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 CE3D23A061B for <cfrg@ietf.org>; Fri, 18 Dec 2020 06:36:05 -0800 (PST)
Received: by mail-lf1-x133.google.com with SMTP id y19so5852318lfa.13 for <cfrg@ietf.org>; Fri, 18 Dec 2020 06:36:05 -0800 (PST)
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:content-transfer-encoding; bh=iMvI3U7OdA671dt8zWpkUGQtLL1Ja4gZwqYYuHm3K3s=; b=Q0xyYt+q8YgNX3H8HFo3F7u0YApHan93lj0FHfZE9uWBvO29sZTR7cZb3EoWVcUjTN 53XZYynN3Rlcb7oUwnmoJy1U/LGBVKZvU1i8bkrKN8hkwJAoVOAy4TUEt3mJSRCNxd8q BzIMGTFcQqnHhm+rX637VRZBMDaesM7zzKgh9FPCVb0tq0L0y3AG5TXdjSBj8QU5RvkJ L45McX0exS+49KErugf/Vl+PqazyHGRjLt5FC1zJxZ7CTX4aITYx7p4ddKKugNPFbRTL NjOCdcpck5u7KCvj95Y0efGJFG3eYOQG1xPu4YzPufLq849o9XgXh/BzMfKzIfp6Qto+ ufNg==
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:content-transfer-encoding; bh=iMvI3U7OdA671dt8zWpkUGQtLL1Ja4gZwqYYuHm3K3s=; b=UBDY6dWYsjgRwQL/gFx6cdCFFAtJdYzEPtIHlc7N3pUStNoWTRfB17WN+vFaSe4qpJ S3yFm/ipMhKpNXNWBnszyF1f5RJdWnMOCDRFz48rGaJtrUEfKX53Ryg/AW7ovAGSf6Er PYxhx9/ohwbol1HbQuDdaYBHLWoSBqOGbyK3l7kW7OhBF1gRz0GSwLeXu7eS6BvzNHur +SkH0ERzJ7Y3vKJrp8SacsklEYNy5/zyJh86FNpoXixraPSNLRScBoKnHnvFldJqAPxY AyV36Y7DbWYRnaUKnZG8ccHoDLMfhLvVJadqyDPTE7Nx7GXmcDhXW6RO04ZqhNLJI8T3 24+A==
X-Gm-Message-State: AOAM533FuljOHYlPHlmO5vuBPsmkBuVvddJPvCtY0fbum4eQS93V+SrH orTpY+lFL5DVncT6zX68a6wupY6f6qHmwBUXQx0=
X-Google-Smtp-Source: ABdhPJxrQToC67DxxiWlS8heYUjCcHKSnfj6EHieT8gaT0aRh6vMQC3X3CCfLgu3M63lHQ7XOauaveWqloPuLzxWIYc=
X-Received: by 2002:ac2:544d:: with SMTP id d13mr1553265lfn.397.1608302163688; Fri, 18 Dec 2020 06:36:03 -0800 (PST)
MIME-Version: 1.0
References: <CACi_p6ZMpo-LES9PGqoB33ydTBbCF_bKAc4hiCq6xDUpjEAvGg@mail.gmail.com> <CACsn0c=d+VyQqM0F0bEpYuS=TRMUKXZ5AU=HF69iKT8b6U3HTA@mail.gmail.com> <CACi_p6Zr6Hc3Fm1Ua-=-qhU95u89MCjGAjcr8Qxxs_X-hBYRHw@mail.gmail.com>
In-Reply-To: <CACi_p6Zr6Hc3Fm1Ua-=-qhU95u89MCjGAjcr8Qxxs_X-hBYRHw@mail.gmail.com>
From: Watson Ladd <watsonbladd@gmail.com>
Date: Fri, 18 Dec 2020 06:35:52 -0800
Message-ID: <CACsn0cnOmnZtvUqUcVyB=Vr_8Ck+sPif4m8pOrCnMPPvmp84Fw@mail.gmail.com>
To: Лилия Ахметзянова <ahmzliliya@gmail.com>
Cc: "<cfrg@ietf.org>" <cfrg@ietf.org>, Benjamin Kaduk <kaduk@mit.edu>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/eJLfg4jBO6jSyV3b5mK-Cr9hjUE>
Subject: Re: [CFRG] Questions regarding draft-irtf-cfrg-spake2-15.txt
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: Fri, 18 Dec 2020 14:36:08 -0000

This weekend I will upload a revised version that clarifies the usage
of the KDF and addresses RFC 2104.

On Fri, Dec 18, 2020 at 3:42 AM Лилия Ахметзянова <ahmzliliya@gmail.com> wrote:
>
> Hello Watson!
>
> Thank you for your clarifications! I have no additional questions, just a minor comment regarding key schedule and ciphersuites: it would be great if the arguments you mentioned were added in Security Considerations.
>
> Best wishes,
> Liliya
>
> вс, 6 дек. 2020 г. в 23:08, Watson Ladd <watsonbladd@gmail.com>:
>>
>> On Sun, Dec 6, 2020 at 11:44 AM Лилия Ахметзянова <ahmzliliya@gmail.com> wrote:
>> >
>> > Hello CRFG, Watson and Benjamin,
>> >
>> > Recently, I’ve interested in the draft https://tools.ietf.org/html/draft-irtf-cfrg-spake2-15.  I have come up with several thoughts and comments (hope I'm not late).
>> >
>> > Considerations on key schedule:
>> > In section 4 the following key schedule is defined:
>> >
>> > Both parties use TT to derive shared symmetric secrets Ke and Ka as Ke || Ka = Hash(TT), with |Ke| = |Ka|.
>> >
>> > A and B compute them as KcA || KcB = KDF(nil, Ka, "ConfirmationKeys" || AAD)
>> >
>> >
>> > 1. If one chooses a ciphersuite, e.g., with P-256 and SHA-512 to produce keys Ke and Ka of length 256 bits, then the SHA-512 function seems to be used here as a PRG function. However, as far as I know, it is not the standard properties of the hash functions. It seems better to directly use the extract and expand concept to produce Ke, KcA, KcB. Could you explain, what caused the keys to be produced in such a way?
>>
>> In most applications where the scheme is used the higher level
>> protocol will derive keys and hash the transcript itself. Hashing the
>> transcript and key works fine and I don't think there were any
>> questions about not using HMAC during RGLC or the reviews as part of
>> the PAKE selection process.
>>
>> >
>> > 2. The keys KcA, KcB can be used as a key input for HMAC(SHA-256). If HKDF(SHA-256) was used for producing these keys, then |KcA| = |KcB| = 128 bits. However, RFC 2104 points out the following recommendation: In any case the minimal recommended length for K is L bytes (as the hash output length).  Does using these ciphersuites contradict the document RFC 2104?
>>
>> The text of RFC 2104: " The key for HMAC can be of any length (keys
>> longer than B bytes are first hashed using H).  However, less than L
>> bytes is strongly discouraged as it would decrease the security
>> strength of the function." But we don't need the mac to be 256 bits
>> long. 128 would be fine in that case.
>>
>> >
>> > Considerations on Key confirmation
>> > For key confirmation the following procedure is used:  F = MAC(KcA, TT). Here tag is computed for data TT that contains the D-H key K. This may complicate the implementation of the protocol since many secure API does not allow to use “naked” keys in such a way. Is adding the K value crucial for the security here?
>>
>> No, but it's easier to have one transcript versus 2.
>>
>> >
>> > And a few editorial comments:
>> > 1. The words that one needs to check points for belonging to a group are specified in Security Consideration. It seems important to indicate these checks directly when describing the protocol.
>> > 2. Page 3, in the sentence "Common choices for H are SHA256 or SHA512 [RFC6234]", H should be replaced with Hash.
>> > 3. During the document. the following KDF interface is used:
>> >             KDF (salt, IKM, info)
>> > -- It seems better to swap salt and IKM, because now it looks a little unnatural.
>> > -- It seems better to write the length L as the fourth parameter everywhere (since it was introduced in the introduction)
>>
>> Thanks for your comment. This seems like the sort of minor
>> nonsubstantive fix I can apply easily, and is something I noticed when
>> coding the test vector generation.
>>
>> >
>> >
>> > Best wishes,
>> > Liliya Akhmetzyanova
>>
>>
>>
>>
>> --
>> Astra mortemque praestare gradatim



-- 
Astra mortemque praestare gradatim