-
Notifications
You must be signed in to change notification settings - Fork 61
Handle unknown pubkey algorithms safely (set RNP_LOAD_SAVE_PERMISSIVE
by default?)
#2204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Presumably a rigorous stateful OpenPGP implementation would want to do
But the RNP_LOAD_SAVE_PERMISSIVE semantics are a strange combination |
RNP library is designed with backward compatibility in mind, and from this point of view changing the default behaviour is wrong. That's actually why this flag was added at some point. So if implementation which use RNP library want to fail on unknown keys then it should not set this flag, and set otherwise. We do not dictate desired behaviour, and give a way to adobt any policy. So if SOP implementers do not want to set this flag it's not a problem of RNP, but their intended behaviour. |
This discussion reminds me of the discussion we had around #1820 , where backward compatibility was cited as the reason for not changing the default, even though the default was actually blocking ecosystem evolution (because of the behavior when an unknown signature was attached). I'm grateful that you ended up resolving that bug by changing the default in #1896 ! I am not claiming that the exact right answer here is to set the The default should be compatible, interoperable behavior. whether that means ignoring and dropping the stuff it doesn't understand; or ignoring and saving the stuff it doesn't understand, i don't have much of a preference (though i think most rnp users might appreciate having the extra stuff stored as long as it has been cryptographically confirmed, so that they can use it after an rnp upgrade). But rejecting the stuff that rnp does understand means that no one else can introduce new OpenPGP material without worrying that it will break things for users of librnp. |
Related Thunderbird discussion: |
The
rnp-sop
implementation used for the Interop Test Suite fails to ignore a subkey with an unknown algorithm. There is a request to makernp-sop
setRNP_LOAD_SAVE_PERMISSIVE
by default, but it's not clear that it will be adopted, as it might not reflect the default behavior of a naive user oflibrnp
. This makes it look like RNP is currently a blocker toward the ecosystem being able to adopt and distribute new pubkey algorithms, even if they are adopted in a backward-compatible way (i.e., widely-adopted algorithms are available in the same certificate as newer algorithms).I see at least three ways to address this:
RNP_LOAD_SAVE_PERMISSIVE
isn't set, librnp could simply strip unknown public keys from a certificate, rather than rejecting the entire certificate. This would permit encryption to such a backwards-compatible certificate, even though the unknown subkey was discarded.RNP_LOAD_SAVE_PERMISSIVE
by default, so that the unknown pubkey remains available in the storage for in case some future version of RNP could parse and use it.The text was updated successfully, but these errors were encountered: