Skip to content

Fix RSA decryption of binary data - #2678

Open
zhangli091011 wants to merge 1 commit into
gchq:masterfrom
zhangli091011:fix/issue-2436-rsa-binary-io
Open

Fix RSA decryption of binary data#2678
zhangli091011 wants to merge 1 commit into
gchq:masterfrom
zhangli091011:fix/issue-2436-rsa-binary-io

Conversation

@zhangli091011

Copy link
Copy Markdown

Description
Treat RSA ciphertext and plaintext as raw bytes instead of UTF-8 strings. This prevents binary ciphertext from being corrupted before decryption and allows non-UTF-8 plaintext, such as decrypted symmetric keys, to flow into operations like To Hex.

Existing Issue
Closes #2436.

Screenshots
Not applicable; this is an operation data handling fix.

AI disclosure
OpenCode (gpt-5.6-sol) was used to investigate the issue, implement the fix, and add the regression test. I reviewed the diff and ran the full non-UI test suite.

Test Coverage
Added an RSA-OAEP/SHA-256 regression vector covering From Hex -> RSA Decrypt -> To Hex.

  • npm test: 262 Node API tests passed; 2242 operation tests passed
  • npx eslint src/core/operations/RSADecrypt.mjs tests/operations/tests/RSA.mjs

@zhangli091011

Copy link
Copy Markdown
Author

The CLA is complete, but the required main check has not been produced because the fork Pull Requests workflow is awaiting maintainer approval: https://github.com/gchq/CyberChef/actions/runs/29688294131. Could a maintainer please approve the run when convenient?

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.

RSA Decrypt: "URIError: malformed URI sequence" when piping From Hex → RSA Decrypt (OAEP)

1 participant