Subject: [saag] presentation format for hash of public key

From: Michael Richardson <[email-masked]>
Date: Mon, 24 Oct 2016 16:53:51 -0400

Are there any common ways to present/format a hash of public key?
Assuming it's 20 bytes of SHA1 or SHA2 of the binary encoding of
the public key, are there any specifications that say how to show
this to the user?

We have GPG format, of a set of 5 groups of 4 used in the fingerprint.
Are there other ways?

This is mostly for diagnostic reasons.

--
Michael Richardson <[email-masked]>, Sandelman Software Works
 -= IPv6 IoT consulting =-

---

From: "Salz, Rich" <[email-masked]>
Date: Mon, 24 Oct 2016 20:56:02 +0000

For what it's worth, OpenSSL does octet pairs separated by colon.
; openssl x509  -fingerprint -in apps/server.pem
SHA1 Fingerprint=E8:4A:8E:20:76:4E:EF:0E:ED:BE:54:9F:91:8C:A4:F6:A2:B3:D1:04
-----BEGIN CERTIFICATE-----
MIID5zCCAs+gAwIBAgIJALnu1NlVpZ6zMA0GCSqGSIb3DQEBBQUAMHAxCzAJBgNV
...
JBv+z1iQRueoh9Qeee+ZbRifPouCB8FDx+AltvHTANdAq0t/K3o+pplMVA==
-----END CERTIFICATE-----

---

From: Paul Lambert <[email-masked]>
Date: Mon, 24 Oct 2016 22:09:31 +0000

In other forums I¹ve been using a hash of the public key
and the associated cipher suite identifier (csi):

    uaid = h( csi , public_key )

The hash used depends on the cipher suite identifier.

The display representation is optimized for readability
and recommends a base27 encoding. For example:

    Q4RM-K4FZ-T432-RZ4Q-ZA88-YQ94

The base27 encode/decode string is:
    b27string = 'ABCDEFGHJKMNPQRTWXYZ2346789'

This string is selected to remove visually the
ambiguous characters:
    0O 1Iil 5S UV

The separator characters (Œ-Œ) are optional, but recommended.

The encoding allows input in lower or upper case, but the
displayed representation should always be upper case for readability.

Paul

PS - example/reference code for base27 in:
    https://github.com/nymble/cryptopy/blob/master/cipher/encoding.py

-----Original Message-----
From: saag <[email-masked]> on behalf of "Salz, Rich"
<[email-masked]>
Date: Monday, October 24, 2016 at 1:56 PM
To: Michael Richardson <[email-masked]>, saag <[email-masked]>
Subject: Re: [saag] presentation format for hash of public key

>SHA1 
>Fingerprint=E8:4A:8E:20:76:4E:EF:0E:ED:BE:54:9F:91:8C:A4:F6:A2:B3:D1:04
>_______________________________________________
>saag mailing list
>[email-masked]
>https://www.ietf.org/mailman/listinfo/saag

---

From: Michael Richardson <[email-masked]>
Date: Tue, 25 Oct 2016 13:46:51 -0400

I'm getting that perhaps we have no specification here.
Would one be useful?

    > The hash used depends on the cipher suite identifier.

Can you give me examples of this case?
Who defines "csi" here?

I'd ideally like something that works across uses (IPsec, S/MIME, TLS, etc.)
not because I think reusing keys is a great thing, but because sometimes
users put the wrong cert into the wrong place...

---

From: Adrian Hope-Bailie <[email-masked]>
Date: Tue, 25 Oct 2016 22:56:43 +0200

The crypto-conditions specification defines a format for what is
effectively a public key fingerprint. It's what we call the  the
"condition".

It has 4 parts. A type (which determines how the fingerprint is generated)
a bitmask of features that would be required to validate the "fulfillment"
(signature) and a max fulfillment size (which indicates the max size of the
signature to allow a system to check (based just on the condition) if it
will be capable of validating the fulfillment later.

Latest draft is at:
https://datatracker.ietf.org/doc/draft-thomas-crypto-conditions/

I'm presenting the ID in Seoul if anyone is interested and will be pushing
a revised ID in the next few days to hopefully make it much easier to grok
the goals and usage.

This might not be what you're looking for exactly but I guess that depends
on the NEED for the public key fingerprint

---

From: Mohit Sethi <[email-masked]>
Date: Thu, 27 Oct 2016 12:53:20 +0300

Hi Michael

Perhaps RFC 6920 "Naming things with hashes" : 
https://tools.ietf.org/html/rfc6920 is of interest to you.

Thanks
/--Mohit