Fix RSA decryption of binary data - #2678
zhangli091011 wants to merge 1 commit into
Conversation
|
The CLA is complete, but the required |
sylvesterkaczmarek
left a comment
There was a problem hiding this comment.
This looks correct and appropriately scoped. Moving RSA Decrypt to byteArray input/output removes the implicit UTF-8 decode that corrupted arbitrary binary plaintext, while the forge raw encode/decode preserves the exact encrypted/decrypted bytes. The added OAEP-SHA256 regression case exercises genuinely non-text binary output, and the existing round-trip coverage should protect the normal text path. Looks good to me.
|
Friendly bump: the branch is mergeable and the only missing requirement is the fork workflow approval for the required \main\ check. Could a maintainer approve the run and review when convenient? |
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.