Re: [openpgp] Fingerprints

Derek Atkins <derek@ihtfp.com> Thu, 16 April 2015 15:39 UTC

Return-Path: <derek@ihtfp.com>
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 182DA1A8AD6 for <openpgp@ietfa.amsl.com>; Thu, 16 Apr 2015 08:39:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.289
X-Spam-Level:
X-Spam-Status: No, score=-1.289 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_MISMATCH_ORG=0.611] 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 oVYa3544y69z for <openpgp@ietfa.amsl.com>; Thu, 16 Apr 2015 08:39:41 -0700 (PDT)
Received: from mail2.ihtfp.org (MAIL2.IHTFP.ORG [204.107.200.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 483DF1A8AA7 for <openpgp@ietf.org>; Thu, 16 Apr 2015 08:39:41 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mail2.ihtfp.org (Postfix) with ESMTP id 365ADE2035; Thu, 16 Apr 2015 11:39:40 -0400 (EDT)
Received: from mail2.ihtfp.org ([127.0.0.1]) by localhost (mail2.ihtfp.org [127.0.0.1]) (amavisd-maia, port 10024) with ESMTP id 09484-07; Thu, 16 Apr 2015 11:39:38 -0400 (EDT)
Received: from securerf.ihtfp.org (unknown [IPv6:fe80::ea2a:eaff:fe7d:235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mocana.ihtfp.org", Issuer "IHTFP Consulting Certification Authority" (verified OK)) by mail2.ihtfp.org (Postfix) with ESMTPS id BC03BE2034; Thu, 16 Apr 2015 11:39:38 -0400 (EDT)
Received: (from warlord@localhost) by securerf.ihtfp.org (8.14.8/8.14.8/Submit) id t3GFdb96018492; Thu, 16 Apr 2015 11:39:37 -0400
From: Derek Atkins <derek@ihtfp.com>
To: Christoph Anton Mitterer <calestyo@scientia.net>
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>
Date: Thu, 16 Apr 2015 11:39:37 -0400
In-Reply-To: <1429131461.1702.52.camel@scientia.net> (Christoph Anton Mitterer's message of "Wed, 15 Apr 2015 22:57:41 +0200")
Message-ID: <sjmegnkccau.fsf@securerf.ihtfp.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Virus-Scanned: Maia Mailguard 1.0.2a
Archived-At: <http://mailarchive.ietf.org/arch/msg/openpgp/98IfrNmza1b82pJJFpWVWu1HfcA>
Cc: "openpgp@ietf.org" <openpgp@ietf.org>
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: Thu, 16 Apr 2015 15:39:42 -0000

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.

> Cheers,
> Chris.

-derek
-- 
       Derek Atkins                 617-623-3745
       derek@ihtfp.com             www.ihtfp.com
       Computer and Internet Security Consultant