Re: [TLS] draft-ietf-tls-curve25519-01 and the X25519 significant bit.

Adam Langley <agl@imperialviolet.org> Tue, 22 December 2015 21:59 UTC

Return-Path: <alangley@gmail.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5FFDA1A90D5 for <tls@ietfa.amsl.com>; Tue, 22 Dec 2015 13:59:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.278
X-Spam-Level:
X-Spam-Status: No, score=-1.278 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=no
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 Z36L3HSXT-uT for <tls@ietfa.amsl.com>; Tue, 22 Dec 2015 13:59:02 -0800 (PST)
Received: from mail-qk0-x235.google.com (mail-qk0-x235.google.com [IPv6:2607:f8b0:400d:c09::235]) (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 E6DEE1A90D3 for <tls@ietf.org>; Tue, 22 Dec 2015 13:59:01 -0800 (PST)
Received: by mail-qk0-x235.google.com with SMTP id n135so34419937qka.2 for <tls@ietf.org>; Tue, 22 Dec 2015 13:59:01 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=RC63svDI8QGySPaMtkW/96xCWZlAjEqO1o1t1BywPZA=; b=S5vo5FOEbwm8k/7MSoL5NiNGRHwfbPl2V43jNL2DsWFAdcyZdlnEqOe2KYKBMgjY3S fd6YQqf7jnlNPe1ZxBjhYrseHP2SB1Rbu0TM4U8Xlz61sc6qhM0qsPe7u2pvUc45pwwD mGWmz6xiGH/nZHjhkxdStOirFt8ngphPzlshqx8tkmVZSpInJgh7dg0gXVHDfQnmTVd4 d5tYvc4Llb0nOCSNGPWu/805kodM3BYMmPzUiRnfkSGord3NwDI+8/5ZMq+6VXEKWPmf yMpFAN+c9C1GsvKlFE21c/LBCu6slb0dkE0P8QeE1u/JKZMtu8SiWljQrx2oJiQsob1q Sbtw==
MIME-Version: 1.0
X-Received: by 10.55.74.200 with SMTP id x191mr35741861qka.28.1450821540974; Tue, 22 Dec 2015 13:59:00 -0800 (PST)
Sender: alangley@gmail.com
Received: by 10.140.93.12 with HTTP; Tue, 22 Dec 2015 13:59:00 -0800 (PST)
In-Reply-To: <CAFewVt7A_hBXBNzqaU6cQaU5Ysk86xo+fn69zDOn0oHYPiJazg@mail.gmail.com>
References: <CAMfhd9XDfwmoze+BdFVedhCGDQRNbL63ZT=KZc-7dEr0UMk4dA@mail.gmail.com> <CAFewVt7A_hBXBNzqaU6cQaU5Ysk86xo+fn69zDOn0oHYPiJazg@mail.gmail.com>
Date: Tue, 22 Dec 2015 13:59:00 -0800
X-Google-Sender-Auth: rWHVRFP7Kht_2x9G4r0X68G8vL4
Message-ID: <CAMfhd9WxSubu2dy9=RO94NSemzaRfr0TRoYGD7DS9L-9XdK=QA@mail.gmail.com>
From: Adam Langley <agl@imperialviolet.org>
To: Brian Smith <brian@briansmith.org>
Content-Type: text/plain; charset=UTF-8
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/oLPoYNyimReSAvmV3Oa6tiF806I>
Cc: Simon Josefsson <simon@josefsson.org>, "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] draft-ietf-tls-curve25519-01 and the X25519 significant bit.
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 22 Dec 2015 21:59:03 -0000

On Tue, Dec 22, 2015 at 1:36 PM, Brian Smith <brian@briansmith.org> wrote:
> First, maybe I'm overlooking something obvious, but I'm not seeing it: Why
> are we concerned only with whether the high bit has been set, instead of
> whether the public value has been reduced mod q (q == 2^255-19)? Aren't
> there ~19 interesting values that don't have the high bit set but which are
> also relevant to this issue?

You're correct, but I'm trying to say that the CFRG document defines a
function that operates on bytestrings so that higher-level protocols
don't have to worry about things like this. I think TLS should handle
the byte strings opaquely so that we have uniform behaviour for
X25519/X448 and only a single place where it needs to be tested. The
behaviour of X25519/X448 for non-reduced values is also specified in
the CFRG document.


Cheers

AGL

-- 
Adam Langley agl@imperialviolet.org https://www.imperialviolet.org