Re: [openpgp] Fingerprints

ianG <iang@iang.org> Fri, 17 April 2015 17:14 UTC

Return-Path: <iang@iang.org>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B3FDF1A8979 for <openpgp@ietfa.amsl.com>; Fri, 17 Apr 2015 10:14:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] 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 OOH7HKwHvq58 for <openpgp@ietfa.amsl.com>; Fri, 17 Apr 2015 10:14:55 -0700 (PDT)
Received: from virulha.pair.com (virulha.pair.com [209.68.5.166]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BADBE1A8980 for <openpgp@ietf.org>; Fri, 17 Apr 2015 10:14:54 -0700 (PDT)
Received: from tormenta.local (iang.org [209.197.106.187]) by virulha.pair.com (Postfix) with ESMTPSA id 625EF6D78A; Fri, 17 Apr 2015 13:14:53 -0400 (EDT)
Message-ID: <55313F8C.6070400@iang.org>
Date: Fri, 17 Apr 2015 18:14:52 +0100
From: ianG <iang@iang.org>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.6.0
MIME-Version: 1.0
To: openpgp@ietf.org
References: <CAMm+LwhbB+-MnGRBCvprgAGOuu+5CJ2rgod7EBGOQR5UNVrspQ@mail.gmail.com> <87y4m0ozlt.fsf@vigenere.g10code.de> <20150415135105.GJ3106@singpolyma-liberty> <FE2717DC-3950-4536-B83D-BD005D2F26A6@callas.org> <1429128262.1702.41.camel@scientia.net> <E07D3736-038C-4C97-B96B-77284A5A9B02@jabberwocky.com> <1429131461.1702.52.camel@scientia.net> <sjmegnkccau.fsf@securerf.ihtfp.org>
In-Reply-To: <sjmegnkccau.fsf@securerf.ihtfp.org>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/openpgp/TX7CTpDEnJ4qX1-0d0VrCEkCQSI>
Subject: Re: [openpgp] Fingerprints
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/openpgp>, <mailto:openpgp-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/openpgp/>
List-Post: <mailto:openpgp@ietf.org>
List-Help: <mailto:openpgp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/openpgp>, <mailto:openpgp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 17 Apr 2015 17:14:56 -0000

On 16/04/2015 16:39 pm, Derek Atkins wrote:
> Christoph Anton Mitterer <calestyo@scientia.net> writes:
>
>> On Wed, 2015-04-15 at 16:21 -0400, David Shaw wrote:
>>> Using a string is fine, but even with numbers, there is no rule that
>>> the number has to be a single byte.  After enough years and algorithms
>>> added, it could be "100000:ABCDEF0123..."
>> But numbers would make problems if we're using the binary representation
>> of the fingerprint (i.e. not the ASCII/UTF8 version of it).
>> How should one know where the algo type ends, 0x0 can't be used since it
>> may be part of the number.
>> So it can only be done if the algo type is defined to be a (null
>> terminated) string.
>
> It's easy -- all algorithms are currently defined to be <= 127.  If we
> need more than that we can use base-128 encoding.  I.e., the number is
> self-length-encoded in a way that you always know when the number ends.
>
> The benefit of using a number instead of a string is that in the vast
> majority (probably 99.999%) of use cases we'll be within the 127-value
> limitation so we can encode it in exactly one byte.  A string will
> always require at least two bytes, and that only gives you ~52 options.


I rather use numbers than strings because a number is typically far more 
controlled, which is important in a security context.  With strings, 
there's always room for manouvre.  Leaving that room in means people 
will abuse it.

In a sense, it's almost a signal - a number means it has to be exact & 
checked.  A string means it's up to the application to display and some 
higher layer to figure out and interpret.  All waste, all opportunity 
for trouble.



iang