Skip to content

fix(omemo): standardize PreKey management to prevent decryption failures#2137

Merged
jubalh merged 1 commit intomasterfrom
omemo-prekey
Mar 30, 2026
Merged

fix(omemo): standardize PreKey management to prevent decryption failures#2137
jubalh merged 1 commit intomasterfrom
omemo-prekey

Conversation

@jubalh
Copy link
Copy Markdown
Member

@jubalh jubalh commented Mar 27, 2026

Standardize how PreKeys are handled during OMEMO message reception to align with XEP-0384 best practices.

Previously Profanity replaced a consumed PreKey by generating a new one with the same ID. This behavior could lead to decryption failures if multiple senders attempted to use the same PreKey ID before the client could successfully update its bundle on the server.

Remove consumed PreKeys from the local store.
New PreKeys are generated in batches (100) when the local supply runs low (< 10).
Republish OMEMO bundle after replenishment.

Standardize how PreKeys are handled during OMEMO message reception to
align with XEP-0384 best practices.

Previously Profanity replaced a consumed PreKey by generating a new
one with the same ID. This behavior could lead to decryption failures if
multiple senders attempted to use the same PreKey ID before the client
could successfully update its bundle on the server.

Remove consumed PreKeys from the local store.
New PreKeys are generated in batches (100) when the local supply runs
low (< 10).
Republish OMEMO bundle after replenishment.

Signed-off-by: Michael Vetter <jubalh@iodoru.org>
@jubalh jubalh added this to the 0.18.0 milestone Mar 27, 2026
@jubalh jubalh self-assigned this Mar 27, 2026
@jubalh jubalh merged commit 3997f34 into master Mar 30, 2026
9 checks passed
@jubalh jubalh deleted the omemo-prekey branch March 30, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant