Subject: [saag] Encrypted URI

From: Phillip Hallam-Baker <[email-masked]>
Date: Tue, 17 Oct 2017 09:16:12 -0400

I would like to have an easy way to make a document available to a
party who can scan a QRCode and to nobody else.

I proposed a mechanism to do this a few years back but have not got
round to implementation until now. I was wondering if anyone had seen
similar or had comments.

Let M be the document to be disclosed.

The document is encrypted using AES under key k, the IV prepended and
the result stored at

http://example.com/.well-known/phb/<hash>

Where hash = Base64url (SHA-2-512(k))

The encoded URL is

phb://example.com/<version>/<keydata>

Where version = 1 and keydata = base64url (k)

We can of course use key stretching to allow a key shorter than the
algorithm length to be used. So one could use a 128 bit initial key
and stretch it to allow AES-256 with its extra rounds to be used.

The application of the idea is to allow a printed document such as an
invoice or a tax return to contain a link to a machine readable copy.