`BlindRSA.blindSign()` skips the RSAVP1 consistency check on the RSA-RAW path

Open Beginner friendly
#55 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
typescript

Research direction

Start in src/blindrsa.ts at BlindRSA.blindSign(), comparing the RSA-RAW return at lines 149-152 with the verification at lines 166-178. Review rsaRawBlingSign() in src/util.ts and the corresponding check in src/partially_blindrsa.ts; done means the RSA-RAW result receives the same RSAVP1 consistency validation before it is returned.

Written by the indexing model from the issue text.

Description

BlindRSA.blindSign() currently takes a different code path when supportsRSARAW is enabled, skipping the post-sign RSAVP1 consistency check present in the software signing path.

Source references

Issue

This means BlindRSA.blindSign() behaves inconsistently across implementations:

  • software path: signs, verifies m == RSAVP1(s), rejects on mismatch
  • RSA-RAW path: returns the signer output without that verification

If the RSA-RAW backend ever returns a faulty signature, this path will propagate it to the caller instead of failing with signing failure.

I am intentionally keeping the claim narrow here: this issue is the missing validation step in the RSA-RAW blind-signing path, not a claim of demonstrated real-world fault injection in a specific deployment. But the code-level inconsistency is real and security-relevant.

Suggested fix

Apply the same RSAVP1 consistency check to the RSA-RAW result before returning it, as is already done in the non-RSA-RAW BlindRSA path and in PartiallyBlindRSA.

Dominant language
JavaScript
Stars
34
Forks
7
Avg merge
4m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudflare/blindrsa-ts

All issues in cloudflare/blindrsa-ts

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.