Skip to content

fix: fallback to pk decryption when failed to decrypt with machine uid#486

Open
21pages wants to merge 1 commit intorustdesk:mainfrom
21pages:try-fix-password-decrypt
Open

fix: fallback to pk decryption when failed to decrypt with machine uid#486
21pages wants to merge 1 commit intorustdesk:mainfrom
21pages:try-fix-password-decrypt

Conversation

@21pages
Copy link
Contributor

@21pages 21pages commented Feb 3, 2026

  • Cache machine uid after successful retrieval
  • Retry when getting machine uid fails
  • Fallback to pk decryption when failed to decrypt with machine uid

pk decryption

I found that decrypting with my password failed, but decrypting with the PK worked. So it’s possible that the machine UID failed to be retrieved during a previous encryption, and the PK was used for encryption instead.

The PK is only attempted during the second decryption. In the first attempt, the machine UID is given priority for decryption. If the PK were also used in the first attempt, then the second attempt to retrieve the machine UID would most likely fail as well.

image image

Reproducing the machine UID read failure

On Windows, reading the machine UID may fail when the system is close to shutdown

@21pages 21pages force-pushed the try-fix-password-decrypt branch 2 times, most recently from a00c5a8 to 3650dea Compare February 4, 2026 07:56
  - Cache machine uid after successful retrieval
  - Retry when getting machine uid fails
  - Fallback to pk decryption when failed to decrypt with machine uid

Signed-off-by: 21pages <sunboeasy@gmail.com>
@21pages 21pages force-pushed the try-fix-password-decrypt branch from 3650dea to 7fc18b7 Compare February 4, 2026 09:41
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.

1 participant