Skip to content

Rely on OpenPGP.js to forbid using weak algos e.g. RSA1024 etc.#4971

Merged
sosnovsky merged 8 commits intomasterfrom
issue-4905-employ-openpgpv5-reject
Mar 30, 2025
Merged

Rely on OpenPGP.js to forbid using weak algos e.g. RSA1024 etc.#4971
sosnovsky merged 8 commits intomasterfrom
issue-4905-employ-openpgpv5-reject

Conversation

@rrrooommmaaa
Copy link
Copy Markdown
Contributor

@rrrooommmaaa rrrooommmaaa commented Feb 25, 2023

This PR removes own protection as OpenPGP.js config.minRSABits implicitly has the default value of 2047.

close #4905
close #5631


Tests (delete all except exactly one):

  • Unit tests are already in place:
    [KeyUtil.diagnose] decrypts and tests secure PK and insecure SK
    [unit][OpenPGPKey.parse] sets usableForEncryption and usableForSigning to false for RSA key less than 2048
    [unit][OpenPGPKey.parse] sets usableForEncryption to false and usableForSigning to true for 2048/RSA PK and 1024/RSA SK
    [unit][OpenPGPKey.decrypt] sets usableForEncryption to false and usableForSigning to true for 2048/RSA PK and 1024/RSA SK

To be filled by reviewers

I have reviewed that this PR... (tick whichever items you personally focused on during this review):

  • addresses the issue it closes (if any)
  • code is readable and understandable
  • is accompanied with tests, or tests are not needed
  • is free of vulnerabilities
  • is documented clearly and usefully, or doesn't need documentation

Comment thread extension/js/common/core/crypto/pgp/openpgp-key.ts Fixed
Copy link
Copy Markdown
Collaborator

@sosnovsky sosnovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good 👍

@sosnovsky sosnovsky merged commit 4890fe7 into master Mar 30, 2025
12 checks passed
@sosnovsky sosnovsky deleted the issue-4905-employ-openpgpv5-reject branch March 30, 2025 18:51
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.

Missing RSA key bits reformatting when importing an RSA 2047 private key Use OpenPGP.js v6 native ways to reject algorithms

3 participants