Skip to content

fix: reject non-ed25519 signing keys#5

Closed
endscene665 wants to merge 1 commit into
permission-protocol:mainfrom
endscene665:fix/reject-non-ed25519-keys
Closed

fix: reject non-ed25519 signing keys#5
endscene665 wants to merge 1 commit into
permission-protocol:mainfrom
endscene665:fix/reject-non-ed25519-keys

Conversation

@endscene665
Copy link
Copy Markdown

Summary

  • reject public keys whose parsed Node KeyObject type is not ed25519
  • add a regression test proving an RSA-signed receipt with signatureAlg: "ed25519" was accepted before the fix

Why

verifyReceipt() checks the receipt algorithm label, but resolvePublicKey() previously accepted any SPKI public key. Node's verify(null, ...) verifies RSA, ECDSA, and Ed448 signatures too, so the verifier could report success for receipts that were not signed with Ed25519.

Validation

  • npm test -- --run
  • npm run build
  • git diff --check

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