March 2018
Beginner to intermediate
656 pages
20h 9m
English
Taking the private key generated in the previous example, the command to encrypt a text file message.txt can be constructed as shown here:
$ echo datatoencrypt > message.txt $ openssl rsautl -encrypt -inkey publickey.pem -pubin -in message.txt \ -out message.rsa
This will produce a file named message.rsa, which is in a binary format. If you open message.rsa in the nano editor or any other text editor of your choice, it will show some garbage as shown in the following screenshot:
