Re: [Cfrg] On the differences of Ed25519/448 and how it affects a vote on twoshakes-d

Bryan A Ford <brynosaurus@gmail.com> Sat, 12 December 2015 08:33 UTC

Return-Path: <brynosaurus@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 9BD791A1BFA for <cfrg@ietfa.amsl.com>; Sat, 12 Dec 2015 00:33:51 -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 njcIcSVnlFpa for <cfrg@ietfa.amsl.com>; Sat, 12 Dec 2015 00:33:49 -0800 (PST)
Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (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 D3E121A1BF4 for <cfrg@irtf.org>; Sat, 12 Dec 2015 00:33:48 -0800 (PST)
Received: by mail-wm0-x229.google.com with SMTP id n186so59494612wmn.1 for <cfrg@irtf.org>; Sat, 12 Dec 2015 00:33:48 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type; bh=b+VKA52EiPlG/8vDMKk3WX8SeQj7U463i0BJy8/DUEE=; b=jgxh6vvxZ750KIlGW6M94REzM1MrnFobl8bxU7RenfLfUWz7ZYnhquocGF5+zn5gkH zxgGpiVZSFcWEtmzO0Uh0ThgOxnYMxZkLd4BvMLnGVCBq8F1yJ6cAUkzhit2iqWgDnL2 4xWhzDk1f4j5VLRQWX2wR1xT+e7d8P2XgMozHZGS/2YNP7/DhhmSJDnotRuHc9yJFJl3 tjHHGd49Ep0685hZoE+lbtVtOqXCrQ0ECDSnHeRhnHOeIHQxhunWssRcB8ZuL7N6UEit POJjcj2ZF2CNr5kh+SJy7DkdrJ0BO3h+MDRZ+Bay3ZFmKeeNnbSJcLfbH+PYQQuJhnSH oDVw==
X-Received: by 10.194.116.133 with SMTP id jw5mr24908566wjb.110.1449909227482; Sat, 12 Dec 2015 00:33:47 -0800 (PST)
Received: from proz.dclient.lsne.ch (85-218-12-53.dclient.lsne.ch. [85.218.12.53]) by smtp.gmail.com with ESMTPSA id z10sm6688111wmg.4.2015.12.12.00.33.45 for <cfrg@irtf.org> (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Dec 2015 00:33:46 -0800 (PST)
To: cfrg@irtf.org
References: <CAA4PzX18bcS_awPg-YDAoo90537Ot=s_nf7k_Vt75OVSdvtDrQ@mail.gmail.com> <87fuzcng51.fsf@latte.josefsson.org> <20151209125944.GA26766@LK-Perkele-V2.elisa-laajakaista.fi> <566AEB08.9070302@st.com>
From: Bryan A Ford <brynosaurus@gmail.com>
X-Enigmail-Draft-Status: N1110
Message-ID: <566BDBE9.4000808@gmail.com>
Date: Sat, 12 Dec 2015 09:33:45 +0100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version: 1.0
In-Reply-To: <566AEB08.9070302@st.com>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-256"; boundary="------------ms080806060200000703060109"
Archived-At: <http://mailarchive.ietf.org/arch/msg/cfrg/GBJk3ht6noJBN3wDXrc7EAiP_18>
Subject: Re: [Cfrg] On the differences of Ed25519/448 and how it affects a vote on twoshakes-d
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: Sat, 12 Dec 2015 08:33:51 -0000

On 12/11/15 4:26 PM, Gilles Van Assche wrote:
> On Wed, Dec 09, 2015 at 10:08:26AM +0100, Simon Josefsson wrote:
>> If we select twoshakes-d, I believe we should consider separating
>> Ed25519(ph) and Ed448 into two documents. While sharing some elements,
>> they have become different beasts. Ed25519(ph) is domain separated by
>> naming, Ed448 will be domain separated by parameters. The separate
>> algorithm Ed448ph no longer makes any sense; whether to prehash or not
>> becomes a parameter to the process instead. 
> 
> Another point of view could be that Ed448 and Ed448ph are still
> distinctly-named algorithms (i.e., symmetrically with Ed25519 and
> Ed25519ph), but thanks to the domain separation brought by twoshakes-d
> in the internal hash they enjoy the property that a public key can be
> certified for one, for the other or for both. As far as I have seen,
> twoshakes-d is the only proposal so far that offers that property.
> 
>> If the twoshakes-d domain separation is a good domain separation
>> algorithm or not is something I don't feel qualified to judge, but I
>> don't feel comfortable with it as it is novel.  The algorithms will
>> behave different and have different security considerations.
> 
> With the point of view above, there is no problem if a public key is
> used in either Ed448 or Ed448ph. This follows from that if f(x) is a
> sound hash function, then so is f(dom|x) for a fixed prefix "dom".
> 
> With a public key used for both Ed448 and Ed448ph, the internal hash can
> be viewed as a tree-hash mode on top of SHAKE256, such as:
>     without pre-hashing:
>         H(x|M)=SHAKE256(dom00|x|M), or
>     with pre-hashing:
>         H(x|M)=SHAKE256(dom10|x|SHAKE256(dom11|M)),
> where "domXY" follows Bryan's coding with X separating between PureEdDSA
> and HashEdDSA and Y separating between the internal hash and the
> prehash. The security of this domain separation scheme follows from
> checking the sufficient conditions defined in [1].

+1

Also, similar reason applies at the API level to the addition of the
optional context parameter.  Even if many applications/protocols simply
choose not to specify a context and just leave it as the default of
"empty", that can't make security worse than it would be with Ed25519 or
any other signing scheme with no domain separation.

B

> 
> Kind regards,
> Gilles
> 
> [1] Bertoni et al., Sufficient conditions for sound tree and sequential
> hashing modes, IJS 2013
> 
> _______________________________________________
> Cfrg mailing list
> Cfrg@irtf.org
> https://www.irtf.org/mailman/listinfo/cfrg
>