Skip to content

Refresh the sender's public key when a signature fails key-validity checks #3370

Todo

Description

@DenBond7

After this PR, any rejection other than "Missing verification key" shows BAD_SIGNATURE. That's the right default, but there is a false-positive case: the stored copy of the sender's key has expired, while the sender has since extended it and published the update. The genuine message now shows "bad signature", and the user can't fix it, because the key lookup (fetchAndUpdateInfoAboutRecipients in MessageDetailsFragment / ThreadDetailsFragment) only runs for hasUnverifiedSignatures.

Proposal (needs agreement on the behaviour first): when the rejection is caused by key validity (expired, revoked), fetch the sender's current key and verify again, showing "verifying" in the meantime. A tampered body still stays red. If the refreshed key is still expired or revoked, keep BAD_SIGNATURE. The refreshed key must go through the usual rules for replacing a stored public key, never a silent swap. For a separate PR.

Originally posted by @DenBond7 in #3360 (comment)

Activity

  1. self-assigned this
    on Dec 2, 2026
  2. added this to the 1.6.7 milestone on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions