Re: [Cfrg] draft-irtf-cfrg-eddsa -- one final proposal for domain separation (context labels) for ed25519

Martin Thomson <martin.thomson@gmail.com> Thu, 21 April 2016 05:58 UTC

Return-Path: <martin.thomson@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 7A77012DE66 for <cfrg@ietfa.amsl.com>; Wed, 20 Apr 2016 22:58:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-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 oRqLZtLr7Y5k for <cfrg@ietfa.amsl.com>; Wed, 20 Apr 2016 22:58:23 -0700 (PDT)
Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (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 E762C12D1E2 for <cfrg@ietf.org>; Wed, 20 Apr 2016 22:58:22 -0700 (PDT)
Received: by mail-ig0-x22c.google.com with SMTP id g8so71822058igr.0 for <cfrg@ietf.org>; Wed, 20 Apr 2016 22:58:22 -0700 (PDT)
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; bh=2B+8cZAIP4y77OwnrdKD5zpl/u4+YMZ4GcNUdkOj1+0=; b=xTEDvjoVeBCobpGlKJTfYNZVy2R9XdqmPn6Xo5hNljUKhDpmvRHMU0/V7ggQampsX6 aqP7SgGSQrOyhd1gUU46x+B0M9Rqo3ZkVcCCGXs9gJs1UDdM1H0Ti689eEwafLubtnmv EJtX7z7BCW5RuIkA1/WsihYJigVvqkZ0QEfS2i42eFvtMebWztkyhFQf6TzpJHZ0H2QW RfE2iZA32QbWu4btuR2Xfxj9uzpNa9C38RdA+IXaiz6TWdiNZ/EqgcqIdWpAvWgiS3bP ICzsWLCOhWaf7R5PH8yG1FS/RPdI08FCXqeDSvXLAMN27TiC4S60bW8/zL5hZFYTkhvU bVSw==
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; bh=2B+8cZAIP4y77OwnrdKD5zpl/u4+YMZ4GcNUdkOj1+0=; b=amwnUNAjbPTUVW+ykCzRjiQTJTvoL/niVkI3ooO/wESXsxRzZ6xWXUPgIX+VfrXeOb W1vXa7cBrq6TsEvAGAmQW/ZBvyLRgGzhvulzl0pfqPSQO8aFifgwjjFrzGFfedunXBV2 oUoG08x6V3b+BQhrbpuv89RcaHvGrRb9j+CEPxLjEvKwOA032k/snpjv8s72YZhvlVRS 4L+klg5xPlFx0To5m7faLtu3Tv6zqq1EzduJ71Q5ABw5sYEwn+5RtJLx0p+jJuxaWV/s v8Lw2ssq7PKHduzoPTdpmMDxDekSZ0xtr8z2LAGY3tloe3lL5Bq0f+Mz004lnGur5kDv Z8qQ==
X-Gm-Message-State: AOPr4FWjE7+B0A2JHLrBwba2YwV0Dmm+TVsgcLR3MAh5rt5eIOl916AcX3qbOya3KZsaDKd4c0YfIHYd2t173A==
MIME-Version: 1.0
X-Received: by 10.50.23.80 with SMTP id k16mr1421897igf.94.1461218302301; Wed, 20 Apr 2016 22:58:22 -0700 (PDT)
Received: by 10.36.43.82 with HTTP; Wed, 20 Apr 2016 22:58:22 -0700 (PDT)
In-Reply-To: <57186958.1040907@sbcglobal.net>
References: <20160420205120.28700.qmail@cr.yp.to> <878u080w22.fsf@alice.fifthhorseman.net> <alpine.GSO.1.10.1604201928520.26829@multics.mit.edu> <57186958.1040907@sbcglobal.net>
Date: Thu, 21 Apr 2016 15:58:22 +1000
Message-ID: <CABkgnnXPqaZcx_Yg_EozUG1Lv2rN592JOyXE=e3wcJWws_po3A@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: David Jacobson <dmjacobson@sbcglobal.net>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <http://mailarchive.ietf.org/arch/msg/cfrg/ts-hlzuC-mIYwATA7wbgX9uXqNc>
Cc: cfrg@ietf.org, "D. J. Bernstein" <djb@cr.yp.to>
Subject: Re: [Cfrg] draft-irtf-cfrg-eddsa -- one final proposal for domain separation (context labels) for ed25519
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: Thu, 21 Apr 2016 05:58:24 -0000

On 21 April 2016 at 15:47, David Jacobson <dmjacobson@sbcglobal.net> wrote:
> If you want to include a NUL byte to separate the context from the following
> stuff, then to avoid ambiguity you need to require that the context not
> contain any NUL bytes.   And this rules out general binary blobs as context
> values, including general ASN.1 objects.

Yes, we can be more concrete if you like:

It's possible to say that only necessary requirement is that no label
be a prefix of any other.  One way of doing that is with a proper
bijective mapping like the length-and-value encoding used in Ed448.
However, that makes zero-length contexts incompatible with existing,
context-free signatures; or to retcon existing uses into being good
citizens.

BTW, the plan is to submit this as a -00 soon, but here's our recommendation:

  https://unicorn-wg.github.io/context-labels/#rfc.section.4

I'm sure that this will stimulate many fruitful discussions, much like this one.