Repository navigation
Conversation
The prekey response carries a <device-identity> (serialized ADVSignedDeviceIdentity) for companion devices, beside the identity key. fetchPreKeys now keeps it, and DangerousInternals gains FetchPreKeysWithIdentityNoError, which returns it with each bundle so a caller can verify a companion against its account before encrypting. Existing fetch calls are unchanged.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
A prekey message from a companion device carries <device-identity> beside its <enc>. Pass it to the remote Signal store in RemoteReceive.DeviceIdentity so it can verify the sender against its account before decrypting.
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
A retry receipt's <keys> carry the requester's <device-identity> beside its identity key. The remote path parsed the bundle but dropped it, so a remote Signal store that verifies companions refused every companion retry that brought fresh keys. Carry it in RemoteResend.DeviceIdentity.
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Summary
Prekey responses include a
<device-identity>element (serializedADVSignedDeviceIdentity) for companion devices. It sits beside the identity key, as WhatsApp Web's own parser reads it (Cellar bundlewhatsapp-1054794655,WASmaxInPreKeysDeviceSuccessMixin.js:20andWASmaxInPreKeysDeviceIdentityMixin.js:3-6). HyperMeow dropped it.fetchPreKeysnow keeps the bytes. It reads them beside the identity key, or inside a<keys>wrapper.DangerousInternals().FetchPreKeysWithIdentityNoErrorreturns each bundle with its device identity (FetchedPreKey). A headless (shadow) client fetches through its relay, which returns bundles only, soDeviceIdentityis nil there.FetchPreKeysNoErrorand the other existing calls are unchanged.pkmsg's<device-identity>, the child of<message>beside its<enc>, in the newRemoteReceive.DeviceIdentity. Other payload kinds leave it nil.<device-identity>from the receipt's<keys>in the newRemoteResend.DeviceIdentity, next toBundle. It's nil without keys. WhatsApp Web passes the retry bundle's device identity into session setup the same way (Cellarwhatsapp-1054794655,WAWebProcessRetryKeyBundle.js:150-171).Polymorfa's runner needs both directions to relay a companion's device identity to an external Signal service. That service verifies the device against the account's pinned identity before encrypting to it or decrypting its prekey messages.
Verification
go test -count=1 .passes, including two new tests.TestPreKeyDeviceIdentitycovers the identity beside the key, inside<keys>, absent and empty.TestRemoteReceiveForwardsPreKeyDeviceIdentitychecks that apkmsgforwards it and amsgdoes not.TestRemoteRetryReceiptForwardsItsKeysDeviceIdentitychecks a retry receipt built in the layoutretry.gosends. It fails without the fix.go vet ./...is clean.Checklist
Summary by CodeRabbit