CyberChef icon indicating copy to clipboard operation
CyberChef copied to clipboard

Rsa Encrypt RAW get wrong result

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.

but when i want to pull a request, i cannot pass the unit test.

UndeadFu avatar Jun 10 '25 08:06 UndeadFu

I think the unit test should encrypt with data but not string . The input word should be encode by "Input character encoding", but not utf-8. If the unit test want to use 'utf-8', it should encode it's demo input by itself.

UndeadFu avatar Jun 10 '25 08:06 UndeadFu

Can you update the unit tests and add cases for various character encodings?

irebased avatar Jul 29 '25 06:07 irebased

I am working on preserving the actual input bytes for RSA Encrypt, including RAW mode and non-ASCII/binary data, with regression coverage through a From Hex recipe.

sylvesterkaczmarek avatar Sep 11 '26 14:09 sylvesterkaczmarek