I'm a layman trying to deepen my understanding of crypto and private messaging by building a (proof-of-concept) centralized, end-to-end encrypted messaging "platform".
Messages are sent by devices to the "server" (running on my Pi inside my home network) where they are stored and from whence they can be retrieved by the recipients via an api call. The server knows just the bare minimum to distribute the messages correctly while the message text is encrypted and the whole message is signed properly.
I am now faced with the following challenge: I want to rename a property of the message format used by the client applications (think JSON: message.body → message.content). The problem now is, that (1) all the previous messages are stored on the server in the old format and (2) an "old" client may try to message a "new" client which forces me to somehow resolve this mismatch between the communicated messages' formats.
If the private keys were available to the server, this would be a trivial problem: simply transform the message to the recipient's expected message format. But since I'm trying to be truly private and the private keys are only know to their respective owners this isn't an option. The messages cannot be modified by the server.
I feel that at the heart of this problem there lies a more fundamental challenge which I'm sure people much more capable that I have come up with solutions and for which there exist standardized approaches. Thus here's my question: In general, how do e2ee messaging solutions (e.g. signal, matrix) handle changes to the structure of encrypted data? What approaches do exist except cutting off old versions and throwing away any message history?
I beg your pardon if this question sounds vague or is too broad. I'm just a noob trying to get the big picture.
Thanks a lot.