CyberChef icon indicating copy to clipboard operation
CyberChef copied to clipboard

[bug fix] encrypt raw data without utf-8 encoding

Open UndeadFu opened this issue 1 year ago • 3 comments

when I use rsa encrypt with "RAW", the result is wrong when the input contains no-ascii data. I don't know if it's nesessary to "encodeUtf8(input)", but the bug fixed when i remove it.

UndeadFu avatar Jun 10 '25 08:06 UndeadFu

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: C85297
:x: x


x seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Jun 10 '25 08:06 CLAassistant

It seems to fail the unit tests. Might be worth double checking what the 'expected behaviour' actually is. It may be better to add your implementation as an option, rather than altering the standard implementation?

ThomasNotTom avatar Jun 12 '25 15:06 ThomasNotTom

It seems to fail the unit tests. Might be worth double checking what the 'expected behaviour' actually is. It may be better to add your implementation as an option, rather than altering the standard implementation?

Thank you.I think the failure is caused by some wrong of the unit tests. The input of rsa should be seem as 'raw bytes' but not 'utf-8'. The encoding should be choose by user. Like the rightBottom in this img. image

UndeadFu avatar Jun 19 '25 11:06 UndeadFu

Closing as we have no CLA for "x" (and indeed we'd want better authorship record than that).

Happy to reopen if/once this is resolved.

GCHQDeveloper581 avatar Mar 21 '26 17:03 GCHQDeveloper581