Re: [Mathmesh] UDF Design notes

Michael Richardson <> Wed, 14 August 2019 23:45 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 1E36E120901 for <>; Wed, 14 Aug 2019 16:45:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id i37uz7bXDCQm for <>; Wed, 14 Aug 2019 16:45:15 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 26E5D1208E6 for <>; Wed, 14 Aug 2019 16:45:14 -0700 (PDT)
Received: from ( [IPv6:2607:f0b0:f:2::247]) by (Postfix) with ESMTP id E57073818C for <>; Wed, 14 Aug 2019 19:44:24 -0400 (EDT)
Received: from localhost (localhost [IPv6:::1]) by (Postfix) with ESMTP id 05FEFA8A for <>; Wed, 14 Aug 2019 19:45:13 -0400 (EDT)
From: Michael Richardson <>
In-Reply-To: <>
References: <>
X-Mailer: MH-E 8.6; nmh 1.7+dev; GNU Emacs 24.5.1
X-Face: $\n1pF)h^`}$H>Hk{L"x@)JS7<%Az}5RyS@k9X%29-lHB$Ti.V>2bi.~ehC0; <'$9xN5Ub# z!G,p`nR&p7Fz@^UXIn156S8.~^@MJ*mMsD7=QFeq%AL4m<nPbLgmtKK-5dC@#:k
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature"
Date: Wed, 14 Aug 2019 19:45:13 -0400
Message-ID: <30023.1565826313@localhost>
Archived-At: <>
Subject: Re: [Mathmesh] UDF Design notes
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 14 Aug 2019 23:45:17 -0000

Phillip Hallam-Baker <>; wrote:
    > The original starting point was the need for a 'better PGP fingerprint'. In
    > particular, I wanted a digest representation that was:

    > * Reasonably compact in both printed and voiced form.
    > * Supported use of SHA2
    > * Could be expressed at varying precision as the application needs demanded
    > * Could be upgraded to make use of new algorithms if absolutely necessary
    > * Could be input via a keyboard
    > * Could be compared for equality
    > * Could be used to create a fingerprint of any type of data (not just keys)
    > * Support use in QR codes, DNS labels, etc.

I think that this was a rather ambitious set of requirements :-)

    > The choice of Base32 comes from the observation that fingerprints are
    > frequently read out aloud and having to distinguish case makes the process
    > tedious and error prone. So it cant be Base64 but Base32 gives us five bits
    > per char instead of four.

I agree with your use.
I wonder if we can train people not to need to mention the case as they
compare.  I should look again if you specify upper-case only.

    > The Type Identifiers for SHA-2 and SHA-3 are chosen so as to cause the
    > first letter of a SHA-2 digest to always be an M (for Merkle-Damgard and to
    > remind us of the Rivest/MD5 legacy) and tthe first letter of a SHA-3 digest
    > will always be a K for Keccak.

This was very cute.

    > Erm no, what people have done there is provide a new attack vector because
    > most people will only remember the first ten digits of an address at most
    > and this mnemonic is encouraging people to assume from memory. Anyone who
    > wants to impersonate the above, just needs to search for a public key whose
    > first eight digits match and they will probably trick enough people to be
    > interesting.

    > So I decided to encourage people not to do this and then thought, what if
    > they could have a shorter fingerprint that was just as strong.

Interesting observation.

    > The two use cases that I am most tempted to add are representations for
    > public and private key literals.

    > PRO: One spec fits all.
    > CON: Even 25519 keys are long do we read them out over the phone? Perhaps
    > we should consider Base64?

No, but being able to scan QR codes with public keys is important.
DPP needs/uses this already.

    > The first is to add a Type indicator PKIX (112 = P)  which would be
    > followed by a PKIX KeyInfo block. This would be encoded in Base32. This
    > would look something like this for an Ed25519 key:

On the subject of Subject Key Identifier, which you have created a MIME type,
RFC7469, section 2.4 also gets close to this.


    > The second would be to do the above in Base64 but use a type indicator that
    > gives an initial letter in Base64:

I don't think that reading base64 over the phone will ever be a thing.
Validating (visually) that a QR scan worked right will be a thing.
I prefer to keep it all in base32.

Michael Richardson <>;, Sandelman Software Works
 -= IPv6 IoT consulting =-