Subject: [openpgp] Crypto on Rails

From: Phillip Hallam-Baker <[email-masked]>
Date: Thu, 16 Jul 2015 11:59:37 -0400

I haven't actually used Ruby on Rails to build anything. But I have
frequently adopted the Rails approach of eliminating all the unnecessary
interface code between system X and system Y by insisting that the
structures are represented in as close to the same form on both systems,
forbidding pointless variations that only create unnecessary corner cases.

Over the past few weeks I have been trying the same approach in crypto and
the results are pretty interesting. Insisting that every name of a static
object be the digest fingerprint of the object referenced has allowed me to
remove about ten thousand lines of code.

In JOSE for example, we have a 'kid' property for the Key Identifier. This
can be anything the programmer likes:

* Fingerprint of a certificate
* Fingerprint of a Key
* PGP fingerprint
* Random friendly name

Conventions can vary at the sender and receiver. What this means is that
the identifiers in different apps have subtly different semantics. In some
instances an identifier is unique to a key, in others it is unique to an
account. Sometimes a name is authentically bound to something, other times
it isn't.

In short, there is variation without value but introducing considerable
scope for confusion, error and misinterpretation.

If we can introduce a fingerprint format that can be used on any type of
input data without semantic substitution attacks, we can make interfacing
OpenPGP to other types of cryptosystem a lot easier and simplify the
implementation and deployment of all types of crypto system.