Semantics of decrypt-fail="hide" and content-less SenderKeyDistributionMessage from rereg_recovery_request
#1207
Unanswered
pedroivobraga
asked this question in
WhatsApp protocol Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi — a protocol-semantics question, plus an observation about how these end up on the
events.Messagepath. Using whatsmeowe9a033b24933(2026-07-22).What I observed
In a group, a member's message arrived as a stanza carrying only a
SenderKeyDistributionMessage(no user content), with both<enc>blocks taggeddecrypt-fail="hide"and a<meta tag_reason="rereg_recovery_request">(this happened shortly after I paired a fresh companion device, so I assume it's member re-registration recovery). Redacted:This did not produce an
events.UndecryptableMessage— it decrypted successfully and was dispatched as a normalevents.MessagewhoseRawMessagecontains onlySenderKeyDistributionMessage(handled internally byprocessProtocolParts, but still present on the dispatched event). So a downstream consumer that keys off message content sees an empty message and can't tell it apart from a genuinely lost/undecryptable one.Questions
What does
decrypt-fail="hide"mean on the receive path? From the token dictionary andmessage.goit's parsed intoevents.UndecryptableMessage.DecryptFailMode, but only on the decrypt-error branch. Is the intended semantic that a client should silently hide the message on failure (i.e. not surface any "waiting for this message" UI), the way the official clients apparently do?Is emitting an
events.Messagefor a content-lessSenderKeyDistributionMessage(session-key redistribution, e.g. fromrereg_recovery_request) the expected behavior? Or is there a recommended way to recognize/ignore these on theevents.Messagepath so they aren't mistaken for real content?Is
DecryptFailMode(or therereg_recovery_request/member_tagrecovery context) ever exposed on the successfully-decryptedevents.Message, or only onevents.UndecryptableMessage?Context: I bridge messages to another system, and these content-less recovery re-sends were being surfaced as "message couldn't be read" placeholders. I've worked around it by dropping
events.Messages whose only field isSenderKeyDistributionMessage, but I'd like to confirm that's the right heuristic and understand thedecrypt-fail="hide"contract. Thanks!All reactions