ProtonMail / gosop

Stateless CLI for GopenPGP
MIT License
32 stars 10 forks source link

gosop v2 profile names need more specificity #20

Closed dkg closed 1 year ago

dkg commented 1 year ago

Thanks for all the work on gosop recently!

I note from the interop test suite gosop v2 implements three different profiles for both encrypt and generate-key. Two of the profile names are not compliant with the sop specification because they do not identify specific individual drafts. The extended version information for this instance of gosop is:

gosop 2.0.0-alpha
GopenPGP 3.0.0-alpha
ProtonMail/go-crypto/v2 1d709537a8e4
x/crypto v0.9.0
Compiled using go1.19.8

It says:


Profiles for the encrypt subcommand:

Profiles for the generate-key subcommand


In particular, draft-koch-openpgp and draft-ietf-openpgp-crypto-refresh are not full names of drafts. Neither includes the specific draft version number, and draft-koch-openpgp itself is ambiguous. For example, draft-ietf-openpgp-crypto-refresh-08 would produce different data from sop encrypt than would draft-ietf-openpgp-crypto-refresh-09 due to the inclusion of a size field in PKESKv6 between those versions. Even worse, draft-koch-openpgp doesn't refer to any single specification, let alone version number, as there are three distinct I-D's with that prefix.

Please use specific draft versions if you're targeting a draft. If you think there are no functional difference between subsequent versions of the same draft, please use the higher draft version number that the implementation aims to be compliant with.

lubux commented 1 year ago

Thanks for pointing this out, v2 is still work in progress. I will address the issue with the profile names in the next iteration.

lubux commented 1 year ago

Fixed with commit 8617aeb9 on the gosop-gopenpgp-v3 branch

Outputs now:

./gosop list-profiles encrypt
rfc4880: CFB (SEIPDv1)
draft-koch-eddsa-for-openpgp-00: AEAD (SEIPDv2) enabled
draft-ietf-openpgp-crypto-refresh-10: AEAD (SEIPDv2) enabled

./gosop list-profiles generate-key   
rfc4880: generates 3072-bit rsa keys
draft-koch-eddsa-for-openpgp-00: generates EdDSA/ECDH v4 keys with Curve25519
draft-ietf-openpgp-crypto-refresh-10: generates Ed25519/X25519 v6 keys with Curve25519