Re: [Cfrg] A way out of the little/big endian dispute?

Phillip Hallam-Baker <phill@hallambaker.com> Mon, 30 March 2015 14:59 UTC

Return-Path: <hallam@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 C40C01ACDD4 for <cfrg@ietfa.amsl.com>; Mon, 30 Mar 2015 07:59:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.621
X-Spam-Level:
X-Spam-Status: No, score=0.621 tagged_above=-999 required=5 tests=[BAYES_40=-0.001, 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 fIfSHkqXjTSc for <cfrg@ietfa.amsl.com>; Mon, 30 Mar 2015 07:59:03 -0700 (PDT)
Received: from mail-lb0-x22a.google.com (mail-lb0-x22a.google.com [IPv6:2a00:1450:4010:c04::22a]) (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 25B3D1AC406 for <cfrg@irtf.org>; Mon, 30 Mar 2015 07:58:59 -0700 (PDT)
Received: by lbdc10 with SMTP id c10so43273809lbd.2 for <cfrg@irtf.org>; Mon, 30 Mar 2015 07:58:57 -0700 (PDT)
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=L2xhLnVFr/Jy9L0NrOiSnOItU4VogCUGa+t9CW0Nb4A=; b=wVI2hRupqwUKvfH5h+u18w6NNU6utmSEtId/UarsvonEalYQumJq2HLnqKv6lPfFnP DMfT5PVAQcTKUb2zFhUwbeok6ZkxGj8udzLzjO2mOlSMlb2I25H7xkInqKjC14vWjtFw JE1orTL+HXd2lYA3bOWLB4btLd2adgYXEN7F7MO95ki7C62ZwQIFWW0QmIHimndJe+1j ioLk6pY+Kv7FK7xgd6c2yzdcs39btaeOhJnSVFjpWl3SX4KVpLpUkafEg4KSpLL5ylMq oE/uClBId9WnpRUXuHkZBNtvLP5WjOYpq8TuyLt9vWYdLXm4bD+qHcOexL/ChACTK6JK BBJA==
MIME-Version: 1.0
X-Received: by 10.112.161.66 with SMTP id xq2mr26984412lbb.103.1427727537577; Mon, 30 Mar 2015 07:58:57 -0700 (PDT)
Sender: hallam@gmail.com
Received: by 10.112.147.165 with HTTP; Mon, 30 Mar 2015 07:58:57 -0700 (PDT)
In-Reply-To: <CACsn0ckBxAxWuEjM+rxZodFf6dipfTBX-TyOJQCq8__AyFunhg@mail.gmail.com>
References: <CAMm+LwhVtKjYjTa-RwQ0_mGCqXDSsAQKApQUdoTZrXXfsUPokA@mail.gmail.com> <55166117.9070208@akr.io> <5d421abc84b3118b86f99fe7a9897e26.squirrel@www.trepanning.net> <CACsn0cm5hjKcQefws8omhiC0CmSv8ewr-7cXfRfx20bbsGY2Ug@mail.gmail.com> <CACsn0ckBxAxWuEjM+rxZodFf6dipfTBX-TyOJQCq8__AyFunhg@mail.gmail.com>
Date: Mon, 30 Mar 2015 10:58:57 -0400
X-Google-Sender-Auth: 3GJIPBlrjeFhtvrcLxLLtCwgs5Q
Message-ID: <CAMm+LwhuVJFtx63BZfLKmjM8yd=dYMYHAbJ_u7=aieC1G+cBhg@mail.gmail.com>
From: Phillip Hallam-Baker <phill@hallambaker.com>
To: Watson Ladd <watsonbladd@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <http://mailarchive.ietf.org/arch/msg/cfrg/L3TTtpfbpCAMGAXXy2Du6tTfpCU>
Cc: "cfrg@irtf.org" <cfrg@irtf.org>
Subject: Re: [Cfrg] A way out of the little/big endian dispute?
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <http://www.irtf.org/mail-archive/web/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <http://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Mar 2015 14:59:04 -0000

On Mon, Mar 30, 2015 at 9:59 AM, Watson Ladd <watsonbladd@gmail.com> wrote:

> Perhaps its
> because you've never been able to point to code

Watson, I am almost 50. I have been earning a full time wage as a
professional programmer since I was 14 and it is now several decades
since I handed in my doctoral thesis.

In what universe do you think you can win that game?

This particular topic was being discussed in IETF before you were born:

https://www.ietf.org/rfc/ien/ien137.txt


> in SSH that is more
> complicated because of the use of little-endian in Curve25519, or
> explain why a convention for the representation of short lengths in
> network protocols has to determine the representation of opaque values
> (which, as MD5 shows, it doesn't).

My concern isn't the complexity of code I am not going to have to
write, it is the fact that this proposal has to pass multiple levels
of IETF review and there can be no confidence in the outcome until the
final IESG sign off.

I know that if the TLS WG chooses big-endian there is absolutely no
possibility of the decision being overriden at a higher level and so I
can start telling folk to implement stuff the minute that there is a
spec.

Given that there is already TLS code and a spec, the scope for an
overturn there is quite small. But that argument does not carry over
to PKIX because there isn't PKIX code for Curve25519.

A proposal that attempts to re-open the network byte order decision
taken long before the IETF existed is almost certain to get a DISCUSS
vote and there is a very high probability of an appeal.


> The whole issue is writing the function that computes the scalarmult.
> You've never explained why this is made more difficult by
> little-endian, while it's clear that parsing half of all fields in a
> packet as little-enedian and half as big-endian is a pain. But it's
> very clear that defining two functions with the same name is a bad
> idea.

Umm, my code that does bit packing has no connection whatsoever to my
scalarmult code. I cannot conceive of a situation in which I would
want the two to have any relationship whatsoever. It is called
structured programming.