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

"Dan Harkins" <dharkins@lounge.org> Sun, 25 January 2015 17:48 UTC

Return-Path: <dharkins@lounge.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 A9A9D1A873B for <cfrg@ietfa.amsl.com>; Sun, 25 Jan 2015 09:48:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.968
X-Spam-Level:
X-Spam-Status: No, score=-1.968 tagged_above=-999 required=5 tests=[BAYES_20=-0.001, IP_NOT_FRIENDLY=0.334, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_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 mrAjcKITp__6 for <cfrg@ietfa.amsl.com>; Sun, 25 Jan 2015 09:48:14 -0800 (PST)
Received: from colo.trepanning.net (colo.trepanning.net [69.55.226.174]) by ietfa.amsl.com (Postfix) with ESMTP id 38ABC1A8739 for <cfrg@irtf.org>; Sun, 25 Jan 2015 09:48:14 -0800 (PST)
Received: from www.trepanning.net (localhost [127.0.0.1]) by colo.trepanning.net (Postfix) with ESMTP id C386110224008 for <cfrg@irtf.org>; Sun, 25 Jan 2015 09:48:13 -0800 (PST)
Received: from 69.12.173.8 (SquirrelMail authenticated user dharkins@lounge.org) by www.trepanning.net with HTTP; Sun, 25 Jan 2015 09:48:14 -0800 (PST)
Message-ID: <93c73db0ce2b40c90324e89ce404abc1.squirrel@www.trepanning.net>
In-Reply-To: <20150125083018.10434.qmail@cr.yp.to>
References: <20150125083018.10434.qmail@cr.yp.to>
Date: Sun, 25 Jan 2015 09:48:14 -0800 (PST)
From: "Dan Harkins" <dharkins@lounge.org>
To: cfrg@irtf.org
User-Agent: SquirrelMail/1.4.14 [SVN]
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal
Archived-At: <http://mailarchive.ietf.org/arch/msg/cfrg/qUK-zNAcAysLzyHvivysnXrcg7A>
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: Sun, 25 Jan 2015 17:48:15 -0000

On Sun, January 25, 2015 12:30 am, D. J. Bernstein wrote:
>> a long-standing tradition of the on-the-wire format
>
> Just to make sure that I understand, after reviewing a ton of tcpdump
> output: You're referring to the HTTP tradition of variable-length ASCII
> decimal encodings for integers on the wire (cache times, data lengths,
> version numbers, etc.)? Does this mean that IETF pushed this HTTP
> tradition into AES-GCM's internal integer encodings before deploying
> AES-GCM, and plans to do the same for other cryptographic systems?

  No, you could not be more wrong in that assumption.

>> better looking and more maintainable code
>
> You're absolutely right: being able to reuse existing variable-length
> ASCII decimal integer encoders and decoders has always been a critical
> part, I daresay the most important part, of implementing, reading,
> auditing, and maintaining cryptographic software. RFC 1321 (MD5) got
> this totally wrong---the integers are _backwards_ and _non-decimal_ and
> _non-ASCII_---and we all know what happened to MD5 as a result.
>
> Now that you've reminded me of what really matters for cryptographic
> code complexity and security, I would love to put together an ASCII
> decimal version of Curve25519, but I have to admit that I'm not
> _completely_ clear on the details of the HTTP tradition that you're
> talking about. For example, are leading zeros allowed? This would allow
> simpler integer encoding for some embedded systems, but it would cause
> trouble for existing parsers that switch to octal for a leading 0, such
> as base-0 strtol(). Also, can the integers exceed 2147483647?

  Do you want to be taken seriously when you respond like this?

  Dan.