in reply to RSA encrypt but no decrypt. What is the problem?

"... but no result?" Please add command-output to the original post, showing the terminal session for both encrypt and decrypt.
  • Comment on Re: RSA encrypt but no decrypt. What is the problem?

Replies are listed 'Best First'.
Re^2: RSA encrypt but no decrypt. What is the problem?
by Forb (Novice) on May 06, 2021 at 18:29 UTC

    I want to clarify the question: these scripts do not output anything to the terminal session.

    You simply run the script for execution and if there are no errors in the code, then it is executed. The first script creates an encrypted file "puzzle.encrypt" and the second script creates a decrypted file "puzzle.encrypt.decrypt" from a file "puzzle.encrypt".

      Forb, "you tell us that there is a problem." Now show us – "what, exactly, is the problem?"

        In addition to the code, I can provide the contents of three files that the scripts work with.

        The source file "puzzle" to be read by the script "RSA_encrypt_test.pl":

        Hello!!!

        The "puzzle.encrypt" file that is generated by the "RSA_encrypt_test.pl" script:

        pG+┼V▄læ║┌▄28≈é)E@▀1u┐[/ⁿ▄n,╘k╗µç7╚╝└m«wI╠╬Ñ«▌C,▄ I

        The "puzzle.decrypt" file that is generated by the "RSA_decrypt_test.pl" script:

        3┴Γ`Æ$├Ç⌐»óñ¼\4kôT¢H"¿▀┐±ë┘═I<Θ è▐ì▄SlpçÆΘYÖHA╬{≥─╧⌠FvO%}╓<

        Thus, you can see that the decryption script is not working. Since it does not decrypt the ciphertext "Hello!!!" correctly

        What information may not yet be understood?