-
Notifications
You must be signed in to change notification settings - Fork 277
Description
There are some issues with MessageKits that should be resolved before 6.0 since they change its serialization format, and it's a protocol object. The issues below are not orthogonal, and answering one of them may resolve or invalidate others.
-
Should we allow unsigned message kits (
encrypt_and_sign()called without asigner)? Currently this capability is only used once in test, and message kits created this way cannot be deserialized (since the splitter assumes that there is a verifying key saved). So it is unlikely that anyone is currently using this functionality. -
Should we give a choice of signing plaintext/ciphertext to the user? In what situations would they choose one over the other? Should we do it at all, or let the user handle signing of their own data? Also note that currently if we choose to sign the ciphertext, the resulting signature is not serialized, so the deserialized object is in an invalid state.
-
Assuming that we do not allow unsigned messages, does it still make sense to attach the signature presence flag to the plaintext and encrypting it?
-
The signature presence flag (if it's still required) needs to be made portable - see [WIP] Remove dynamic constants from cryptography products #2556
-
What is the proper way of handling the sender's verifying key? It is useful if one gets it from a separate channel, but if it is attached to the message, and we just check the message signature against the message key, we won't notice if the whole message kit got replaced midway.
Currently in the code this happens if
retrieveis called viaBobInterface-Enricois created there from the message kit's verifying key, so the whole sender check is useless. The only way to actually check it is to callretrieveprogrammatically and pass it anEnricocreated using a data from a separate source. But: creating a whole character just to compare two public keys seems like an overkill, and it won't work if we want to decrypt messages from several Enricos. -
Should the
encrypt_forinterface return the message kit and the signature? Is the signature ever used by itself? It's already embedded into the message kit.