Re: [Cfrg] Point format endian (was: Adoption of draft-ladd-spake2 as a RG document)

Mike Hamburg <mike@shiftleft.org> Mon, 26 January 2015 06:42 UTC

Return-Path: <mike@shiftleft.org>
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 5702D1A700E for <cfrg@ietfa.amsl.com>; Sun, 25 Jan 2015 22:42:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.555
X-Spam-Level: *
X-Spam-Status: No, score=1.555 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FH_HOST_EQ_D_D_D_D=0.765, FH_HOST_EQ_D_D_D_DB=0.888, HELO_MISMATCH_ORG=0.611, HOST_MISMATCH_NET=0.311, RDNS_DYNAMIC=0.982, SPF_HELO_PASS=-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 A8ehSSlSew-P for <cfrg@ietfa.amsl.com>; Sun, 25 Jan 2015 22:42:23 -0800 (PST)
Received: from aspartame.shiftleft.org (199-116-74-168-v301.PUBLIC.monkeybrains.net [199.116.74.168]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 254251A1EFF for <cfrg@irtf.org>; Sun, 25 Jan 2015 22:42:22 -0800 (PST)
Received: from [192.168.1.102] (unknown [192.168.1.1]) by aspartame.shiftleft.org (Postfix) with ESMTPSA id 017B63AA0F; Sun, 25 Jan 2015 22:42:01 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shiftleft.org; s=sldo; t=1422254522; bh=N2yyhOFMRKoTg1TZ199YTJZPZIFi4fSTUUQGD6I1nVY=; h=Date:From:To:CC:Subject:References:In-Reply-To:From; b=ZijTkgcRU9s/DKv+l8Oc7aiEskoFY188nGjGdc3NMtBSjAUsfDXR7SEItekf6wqVW PHkXmwOIf34W3sL84vic6VDNfj69PhySqgwcXnte+VqTGE5XgWukg75MFHly6830aj eRNM69NgS59lOYExPjHToVAXBJZUTbfYlajl2Kv8=
Message-ID: <54C5E1CD.9070707@shiftleft.org>
Date: Sun, 25 Jan 2015 22:42:21 -0800
From: Mike Hamburg <mike@shiftleft.org>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
MIME-Version: 1.0
To: Dan Harkins <dharkins@lounge.org>, Watson Ladd <watsonbladd@gmail.com>
References: <20150125083018.10434.qmail@cr.yp.to> <93c73db0ce2b40c90324e89ce404abc1.squirrel@www.trepanning.net> <54C53542.60904@shiftleft.org> <CACsn0c=bA=dRR8Y3vOp9o+Cmmdu7ZPr3vYbuRdBczRL2Uu+Gog@mail.gmail.com> <feba0d7b1ebb594574ecfd34cb836ad8.squirrel@www.trepanning.net>
In-Reply-To: <feba0d7b1ebb594574ecfd34cb836ad8.squirrel@www.trepanning.net>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/cfrg/JjjLX0HjPH6GaKjgOhMgnHj8oxQ>
Cc: "cfrg@irtf.org" <cfrg@irtf.org>
Subject: Re: [Cfrg] Point format endian (was: Adoption of draft-ladd-spake2 as a RG document)
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, 26 Jan 2015 06:42:24 -0000

On 1/25/2015 10:31 PM, Dan Harkins wrote:
>
> On Sun, January 25, 2015 12:35 pm, Watson Ladd wrote:
>> On Sun, Jan 25, 2015 at 10:26 AM, Mike Hamburg <mike@shiftleft.org>; wrote:
>>> I think that this is actually an interesting question, so maybewe can
>>> put aside religion and mockery thereof for little bit...
>>>
>>> Does anyone know of existing code which processes cryptography over
>>> multiple fields using a generic bignums package (hopefully with
>>> fixed-size
>>> bignums for timing resistance), and would be complicated by inconsistent
>>> endian practices in a new curve?  If so, it might be worth considering a
>>> consistent endian.
>    Yes Mike, there are numerous crypto libraries, both open source and
> proprietary, that use a generic bignum package. And it is that "might be
> worth considering" that is making me raise this issue.
This is only half an answer.  I'm well aware that many crypto libraries 
use generic bignum packages.  But will the endian complicate the 
implementation of the new curves?  That is, do they lack little-endian 
serialization code?  Or is their EC point codec generic enough to handle 
Montgomery/Edwards point formats over whatever field, and yet not 
generic enough to pass a little-endian flag?

I mean, if some real library will need to byte-reverse a buffer, then 
that's a wart, if only a minor one.  If it will need to pass -1 instead 
of 1 to bn_export in a newly-written serialization routine, then this 
really just doesn't matter at all.

Cheers,
-- Mike