Skip to content

[Fix] sign/verify generic SHA algorithms with RSA keys#101

Merged
ljharb merged 1 commit into
browserify:mainfrom
puneetdixit200:fix/84-generic-sha-rsa
May 24, 2026
Merged

[Fix] sign/verify generic SHA algorithms with RSA keys#101
ljharb merged 1 commit into
browserify:mainfrom
puneetdixit200:fix/84-generic-sha-rsa

Conversation

@puneetdixit200
Copy link
Copy Markdown
Contributor

Summary

  • allow generic SHA algorithms to sign and verify RSA keys by using the same PKCS#1 DigestInfo tags as the RSA-named aliases
  • add Node parity coverage for sha224, sha256, sha384, and sha512 with RSA keys

Fixes #84

Verification

  • npm_config_cache=/tmp/browserify-sign-84-npm-cache npx tape test/index.js (red before fix: wrong private key type; green after fix: 629/629)
  • npm_config_cache=/tmp/browserify-sign-84-npm-cache npm run lint (exit 0; existing warnings only)
  • npm_config_cache=/tmp/browserify-sign-84-npm-cache npm run tests-only (629/629, 100% coverage)
  • git diff --check
  • npm_config_cache=/tmp/browserify-sign-84-npm-cache npm test (exit 0; audit reports existing low elliptic advisory with no fix available)

@ljharb
Copy link
Copy Markdown
Member

ljharb commented May 23, 2026

Thanks - just to clarify, are you Puneet Dixit or Deepak Kudi? Your commit has an author with a different name that's not linked to a github account.

@ljharb ljharb force-pushed the fix/84-generic-sha-rsa branch from 4b6e1e0 to b8c2f78 Compare May 23, 2026 07:19
@ljharb ljharb changed the title Fix generic SHA signing with RSA keys [Fix] sign/verify generic SHA algorithms with RSA keys May 23, 2026
Copy link
Copy Markdown
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

LGTM once the commit authorship is cleared up

@puneetdixit200 puneetdixit200 force-pushed the fix/84-generic-sha-rsa branch from b8c2f78 to d2a3f56 Compare May 23, 2026 09:31
@ljharb
Copy link
Copy Markdown
Member

ljharb commented May 23, 2026

@puneetdixit200 that's fine, but can you explain the discrepancy?

@puneetdixit200
Copy link
Copy Markdown
Contributor Author

The mismatch came from an old local git identity on my machine. I amended the commit so the current author and committer are both Puneet Dixit <236133619+puneetdixit200@users.noreply.github.com>, and GitHub links the commit to this account now.

@ljharb ljharb merged commit d2a3f56 into browserify:main May 24, 2026
647 of 653 checks passed
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.

Node incompatibility for "sha256" algorithm

2 participants