Basic guide to en- and decryption | Anleitung zur Ver- und Entschlüsselung:

To encrypt messages using OpenSSL with RSA, you'll need the public key which can be found on this Website. Here's a basic guide:

This can also be done online but is insecure. https://www.cryptool.org/en/cto/openssl/

  1. Generate a key pair: If you don't already have a key pair, you can generate one with OpenSSL.

  2. openssl genrsa -out private_key.pem 4096

  3. openssl rsa -pubout -in private_key.pem -out public_key.pem

  4. Keep the private key safe. Send me only your public key.

  5. Encrypt a message: Let's say your message is in a file named message.txt.

  6. openssl pkeyutl -encrypt -pubin -inkey public_key_of_myself.pem -in message_you_want_to_send_me.txt -out encrypted_message.dat

  7. My public key can be found here: Public key

  8. Decrypt the message: You, who has the private key of your keypair, can decrypt the message.

  9. openssl pkeyutl -decrypt -inkey private_key_of_yourself_compatible_with_the_public_key_you_send_me.pem -in encrypted_message_which_i_send_you.dat -out decrypted_message.txt