in reply to Re^3: RSA encrypt but no decrypt. What is the problem?
in thread RSA encrypt but no decrypt. What is the problem?
Two questions:
1. Does your method mean that in Perl for RSA I must use the generate_key() function to generate keys? Can I do without this function in Perl and set the parameters n, e, d myself? For example, in the C-language, this is possible.
2. I tried adding one line to your code:
my $plaintext = $rsa2->public_decrypt($ciphertext);but unfortunately this script gives an error: "unknown padding type". Of course, the error can be avoided by adding one more line:
$rsa2->use_no_padding();But as a result, the decryption of the text will not be correct. Do you think why?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: RSA encrypt but no decrypt. What is the problem? (updated)
by haukex (Archbishop) on May 08, 2021 at 20:19 UTC |