Re: [Cfrg] RGLC on draft-irtf-cfrg-randomness-improvements-05

"Stanislav V. Smyshlyaev" <smyshsv@gmail.com> Tue, 09 July 2019 05:34 UTC

Return-Path: <smyshsv@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 3229212023F for <cfrg@ietfa.amsl.com>; Mon, 8 Jul 2019 22:34:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.702
X-Spam-Level:
X-Spam-Status: No, score=-0.702 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, HTML_MESSAGE=0.001, PDS_NO_HELO_DNS=1.295, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no 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 qLGHcyfGd85L for <cfrg@ietfa.amsl.com>; Mon, 8 Jul 2019 22:34:31 -0700 (PDT)
Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) (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 4650F12030F for <cfrg@irtf.org>; Mon, 8 Jul 2019 22:34:31 -0700 (PDT)
Received: by mail-lj1-x234.google.com with SMTP id z28so9337040ljn.4 for <cfrg@irtf.org>; Mon, 08 Jul 2019 22:34:31 -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=RFXWPlE5rOnyKi9sWsNPz9KPiaZV6L11Noe68v3wCo4=; b=Lw7kRZTb9gw5dTCOo8TAeJFdIVOX25KF+v+1Ws4VdkmIAbRGAhiSA4r3lamaF2Z84h m8JwCxLWA/v3WqY8JTzlowYxURP5RHBEdf11rZDLLw6i9y+k0K5drXdTUJ1KEg+Bskly nRc1p1qYzSbdi+njFP5ENf4f4xwpIjhYuR1Hw6VEeHLMW0ENcwM1yFnvevBggBpOyxGj rCfWXYBsmEU0BUDEM6yZnb6ifgx8zD8IgPoS98VIEh/H985v1DMduJHSJcMWLJWvvnrk vJP9E0OmfnbKZ/qWLKvkKIlbLwasxgwDHH+yfr54Jr/HTgEUPtM/mSXnqKPqvqrm2sYM RCXQ==
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=RFXWPlE5rOnyKi9sWsNPz9KPiaZV6L11Noe68v3wCo4=; b=SP3M/rfitOlmv1H4cfMveJI8+qmzrGDKcN8s8ZXH2Qttl0eUatqH7qUEza057o6WN8 8Cm/OCFemKTTsceusnO2qOL9MhMt+Ge7YKbzARYMmIZnpAwDN9iO1AX/6mLbav/j/lvs Fy+Kn5uWAPptWsj6RvOWbZMNdZ07q7f6wPz+5s6Uo4W3mNByt4dkIgCuguX6L3NI16SE 2NZsEjoGIfroQuZN/rfn/kQj6exIfXdhow6f9OmBocGB09R/sr0IDVlCxe2tOIsLHGe1 rbCHRHtS1seKpqQVabgJMXxPyqEYA5TSQnOjN0vFUXPH4LvE19oaETYymzyFBKmrLGwQ bv2A==
X-Gm-Message-State: APjAAAW4f27ygmVA4PC9X01vj4W70acUqHYXaBQCA0mI6qSIIdjB+uOw nNCJ2VOaaJwe0YYwvJlPSb253sFmuHAqSrKgAdI=
X-Google-Smtp-Source: APXvYqwe5akYYDTMb51KVbjQHuivKU2XzpPjnGbAPygVvxEN+2z6w1YUihGag/x8AhdtOSxBBSGH79BeHKu9LicMASo=
X-Received: by 2002:a2e:8583:: with SMTP id b3mr12746256lji.171.1562650469395; Mon, 08 Jul 2019 22:34:29 -0700 (PDT)
MIME-Version: 1.0
References: <3644133e-93c2-e5bf-b39b-04e4423becc5@isode.com> <4fd28f76-0bde-4c91-8ddc-2b3fab0b298e@www.fastmail.com>
In-Reply-To: <4fd28f76-0bde-4c91-8ddc-2b3fab0b298e@www.fastmail.com>
From: "Stanislav V. Smyshlyaev" <smyshsv@gmail.com>
Date: Tue, 9 Jul 2019 08:35:53 +0300
Message-ID: <CAMr0u6mV0Zs29tpTZ-KEGi713xDNLiQehVdA53HgOpx4Dbyruw@mail.gmail.com>
To: Martin Thomson <mt@lowentropy.net>, "Salz, Rich" <rsalz@akamai.com>
Cc: CFRG <cfrg@irtf.org>
Content-Type: multipart/alternative; boundary="00000000000022efd7058d38eac9"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/qw4_0L9MxREjkF0s2pdaR2U0gSw>
Subject: Re: [Cfrg] RGLC on draft-irtf-cfrg-randomness-improvements-05
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: Tue, 09 Jul 2019 05:34:34 -0000

Dear Martin and Rich,

Many thanks for your positive feedback, for your comments and
considerations!

Regarding the last question of Martin, we (Cas, Christopher, Luke, Nick,
Liliya and I) believe that the following additional statement in the I-D
after
"Let Extract(salt, IKM) be a randomness extraction function, which accepts
a salt and input keying material (IKM) parameter and produces a
pseudorandom key of length L suitable for cryptographic use."
will help:
«It must be a secure PRF (for salt as a key) and preserve uniformness of
IKM (for details see [SecAnalysis])».
It should be sufficient to avoid any confusion and point to the right place
as well. We'll add this statement after the I-D submission is open again.

Regarding the other minor concerns – we've addressed a few of them in the
updated version of the I-D, which we managed to submit yesterday before the
cut-off; after the submission is open again, we'll address all other ones.

Kindest regards,
Stanislav

чт, 4 июл. 2019 г. в 03:57, Martin Thomson <mt@lowentropy.net>et>:

> This is good, though I have a number of editorial comments, and a question
> (the answer to which seems important, but I am happy to be wrong).
>
> The use of "let x be" in the first paragraph of Section 2 isn't
> necessary.  You don't use 'x' anywhere but in that statement, so it could
> be rephrased more simply.
>
>    When properly instantiated, the output of a CSPRNG should be
> indistinguishable from a random string of bits.  However, as previously
> discussed, this is not always true.  To mitigate this problem, we propose
> an approach for wrapping CSPRNG output with a construction that mixes
> secret data into a value that may be lacking randomness.
>
> In Section 2, the rules about release of Sig(..) are repeated:
>
>    Sig(sk, tag1) should only be computed once for the lifetime of the
>    randomness wrapper, and MUST NOT be used or exposed beyond its role
>    in this computation.
>
> I believe that this is a "need only" rather than a "should only".  There
> is no requirement that the signature not be recalculated or replaced over
> time, only that there is no need to do so.  Use of "should" implies
> recommendation.  This follows from text that repeats this later: "In
> systems where signature computations are expensive, Sig(sk, tag1) may be
> cached."  Maybe only say this once.
>
>   To achieve this, tag1 may have the format that
>    is not supported (or explicitly forbidden) by other applications
>    using sk.
>
> The "may have the format" statement implies permissiveness in a 2119
> sense, but the intent is to communicate a strategy for achieving the hard
> requirement.  Perhaps this could be reworded to say "If sk could be used
> for other purposes, then selecting a value for tag1 that is different than
> the form allowed by those other uses ensures that the signature is not
> exposed."  Is this statement better moved to Section 3, with only a forward
> reference here?
>
>    In that case the relative cost of using G'(n) instead
>    of G(n) tends to be negligible with respect to cryptographic
>    operations in protocols such as TLS.
>
> You might instead say that the relatively inexpensive computational cost
> of HKDF dominates when comparing G' to G.
>
> In Section 3, the "it" in this sentence isn't clear: "It is needed to
> address the problem of CSPRNG state cloning (see [RY2010]). "
>
> The construction of tag2 is confusing.  I would instead say: "A nonce.
> That is, a value that is unique for each use of the same combination of
> G(n), tag1, and sk values.  The tag2 value can be implemented using a
> counter, or a timer, provided that the timer is guaranteed to be different
> for each invocation of G'(n)."
>
> In Section 4, the recommended construction for tag1 fails to take into
> account some of the advice from Sections 3 and 7.  Specifically, it does
> not encode include information about the host.  And it does not explicitly
> point out that the value is constructed in a way as to be illegal in TLS
> 1.3 (because TLS 1.3 signature inputs all start with a sequence of 0x20).
>
> And, buried at the bottom, the question:
>
> I'm sure that the analysis covers this, but what are the concrete
> requirements on the randomness extraction and expansion functions?  You use
> HKDF as an example, but you don't restrict this to HKDF.  That implies some
> properties, but as we learned from TLS analysis, there are properties that
> HKDF provides that we might rely on that are different than a generic KDF
> function.  For TLS, one property we rely on HKDF providing is collision
> resistance (which follows from its use of collision-resistant hash
> functions).  It would appear here that this relies on preimage resistance.
> As the intro says H(x, sk) might be sufficient, but that implies that H()
> provides preimage resistance.  This is never stated, but it seems rather
> important.
>
> On Wed, Jul 3, 2019, at 23:57, Alexey Melnikov wrote:
> > Dear CFRG participants,
> >
> > This message is starting 2 weeks RGLC on
> > draft-irtf-cfrg-randomness-improvements-05 ("Randomness Improvements
> > for Security Protocols"), that will end on July 17th 2019. If you've
> > read the document and think that it is ready (or not ready) for
> > publication as an RFC, please send a message in reply to this email or
> > directly to CFRG chairs (Kenny Paterson <kenny.paterson@inf.ethz.ch>
> > and Alexey Melnikov <alexey.melnikov@isode.com> in this case). If you
> > also have detailed comments, these woulbe be very helpful at this point.
> >
> > Thank you,
> >
> > Alexey, for CFRG chairs.
> >
> >
> >
> > _______________________________________________
> > 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
>