ProtonMail / go-crypto

Fork of go/x/crypto, providing an up-to-date OpenPGP implementation
https://pkg.go.dev/github.com/ProtonMail/go-crypto
BSD 3-Clause "New" or "Revised" License
328 stars 99 forks source link

CRUD helper functions for subpacket types 23 and 24 #206

Open andrewgdotcom opened 4 months ago

andrewgdotcom commented 4 months ago

From the comment thread on the (similar) PR #200 :

Subpacket types 23, 24 and 31 are also conspicuously missing. It would be nice to also have these, particularly for future keyserver work but also because it should be safe in general to parse e.g. a sig with a critical "keyserver preferences" subpacket (if someone was crazy enough to do that). I'd be happy to help out with that. A library should be able to CRUD such "user intent" subpackets. Beyond that I think it's entirely an application issue.

For reference, these subpacket types are:

No processing of these values is required at the library level, however the application layer should have the ability to CRUD these subpackets, and the library layer should pass them through gracefully.

Note that it is an open question whether type 31 is useful (see https://gitlab.com/dkg/openpgp-revocation/-/issues/13), so I suggest only implementing types 23 and 24 at this time.