GNUnet Messenger API: December 2024
Hello,
last month I’ve started to mention that I began to implement forward secrecy into the Messenger service of GNUnet. The fallback for key exchange in an epoch of messages is already working. Senders of messages will generate a new key just in time and announce it. Other members of that chat epoch will appeal the new key if missing and potentially gain access if allowed.
As a way to improve key exchange further I’ve utilized a key derivation function to generate new epoch keys from ones of the previous epoch if and only if all members of the previous epoch are members of the new epoch (for example in case a new member has joined the chat). Otherwise a full exchange of a new and independent key is required to avoid access leakage to previous members that already left the chat.
The last remaining step to improve efficiency further requires the setup of groups (or subgroups) inside an epoch. Those groups will either be formed by two members of an epoch or two groups of the same depth in an epoch. The depth is either zero if the group is formed by two members or equal to the depth of any of its subgroups plus one. That way a tree structure is built from the bottom (leaves) to the top (root). However the root is actually the epoch itself.
Each group will have its own symmetric key that all members of a group will have access to. Members of a group are either the two epoch members which formed the group or all members from both of its subgroups. The reason for all of this additional abstraction is that such a tree structure allows to reduce future key exchange messages quite a bit.
If any member leaves the chat now, it is only necessary to exchange a newly generated key with log(N) of the formed groups in this tree structure instead of N. These log(N) groups are the ones from the previous epoch which did not contain the specific contact that left the chat as member. Other groups get dissolved and the tree structure will require new groups to be formed for completion.
There are currently still issues with the implementation. It’s definitely not trivial to manage the whole group formation process when all clients participate in a decentralized way. But I’m confident to solve remaining issues.
Kind regards,
Jacki