Skip to content

Make signature verification non-fatal for Drive operations#8

Open
cnighswonger wants to merge 1 commit intorclone:masterfrom
cnighswonger:fix/lenient-signature-verification
Open

Make signature verification non-fatal for Drive operations#8
cnighswonger wants to merge 1 commit intorclone:masterfrom
cnighswonger:fix/lenient-signature-verification

Conversation

@cnighswonger
Copy link
Copy Markdown

Summary

  • After enabling 2FA on a Proton account, address keys are rotated. Existing Drive data (folders, files, shares) was signed with the old keys, causing VerifyDetached and Decrypt-with-verification calls to fail with "No matching signature"
  • This patch makes signature verification best-effort across all Drive-related operations — if verification fails, it falls back to decryption without signature checking
  • Encryption is not weakened — data is still decrypted with the correct node/share keys. Only the metadata integrity check (that data was signed by a specific address key) is relaxed

Affected functions

Function Change
Link.GetName Fall back to Decrypt without verification keyring
Link.GetKeyRing VerifyDetached result ignored
Link.GetHashKey Fall back to Decrypt without verification
Link.GetSessionKey VerifyDetached result ignored
Share.GetKeyRing VerifyDetached result ignored
RevisionMetadata.GetDecXAttrString Fall back to Decrypt without verification
Revision.GetDecXAttrString Fall back to Decrypt without verification

Motivation

This fixes a class of hard failures that affect real users:

  1. Enabling 2FA rotates address keys → all existing signatures become invalid
  2. Email alias changes (@proton.me vs @protonmail.com) can cause signature email mismatches

These are legitimate account operations that should not make existing Drive data inaccessible. The Proton web client handles this gracefully; rclone should too.

Companion PR: rclone/Proton-API-Bridge#6

Fixes rclone/rclone#8003, rclone/rclone#7344

Test plan

  • Verified fix resolves the issue on a live Proton Drive account after enabling 2FA
  • Listing folders, listing files, file metadata decryption, and file download all succeed
  • Combined with the Proton-API-Bridge keyring fallback fix, the full rclone protondrive backend works end-to-end

🤖 Generated with Claude Code

After enabling 2FA on a Proton account, address keys are rotated.
Existing Drive data (folders, files, shares) was signed with the
old keys, so VerifyDetached and Decrypt-with-verification calls
fail with "Signature Verification Error: No matching signature".

The data itself is still decryptable — only the signature binding
to a specific address key is broken. This patch makes signature
verification best-effort across all Drive-related operations:

- Link.GetName: fall back to Decrypt without verification keyring
- Link.GetKeyRing: VerifyDetached result is ignored
- Link.GetHashKey: fall back to Decrypt without verification
- Link.GetSessionKey: VerifyDetached result is ignored
- Share.GetKeyRing: VerifyDetached result is ignored
- RevisionMetadata.GetDecXAttrString: fall back to Decrypt without
  verification
- Revision.GetDecXAttrString: same fallback

This does not weaken encryption — data is still decrypted with
the correct node/share keys. It only relaxes the check that the
data was signed by a specific address key, which is a metadata
integrity check that breaks on legitimate key rotation events.

Fixes rclone/rclone#8003
Fixes rclone/rclone#7344

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ProtonDrive] Signature Verification Error: No matching signature

1 participant