$ echo "Hello World" > message.txtEncrypt the message using the Private Key
$ openssl pkeyutl -encrypt -inkey private.pem -in message.txt -out message.sym-encDecrypt the message using the Private Key
$ openssl pkeyutl -decrypt -inkey private.pem -in message.sym-encEncrypt the message using the Public Key.
$ openssl pkeyutl -encrypt -inkey public.pem -pubin -in message.txt -out message.asym-encDecrypt the message using the Private Key
$ openssl pkeyutl -decrypt -inkey private.pem -in message.asym-encSign the message using the Private Key.
$ openssl dgst -sha256 -sign private.pem -out message.sig message.txtVerify the message signature using the Public Key.
$ openssl dgst -verify public.pem -signature message.sig message.txt
Verified OKModify the message.
$ echo "!" >> message.txtVerify the message again using the Public Key.
$ openssl dgst -verify public.pem -signature message.sig message.txt
Verification FailureThis was the third part of the workshop.
You should now have learned how to use cryptographic keys for encryption, decryption, signing, and verification.
To continue with the workshop, please proceed to the next part: Certificates