Skip to content

Message kit contents #2743

@fjarri

Description

@fjarri

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.

  1. Should we allow unsigned message kits (encrypt_and_sign() called without a signer)? 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.

  2. 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.

  3. 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?

  4. The signature presence flag (if it's still required) needs to be made portable - see [WIP] Remove dynamic constants from cryptography products #2556

  5. 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 retrieve is called via BobInterface - Enrico is 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 call retrieve programmatically and pass it an Enrico created 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.

  6. Should the encrypt_for interface return the message kit and the signature? Is the signature ever used by itself? It's already embedded into the message kit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CryptographySignatures, Ciphers, Hashing Algorithims, Encryption

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions