![]() What happens if you try and view the contents of the. rw-rw-r- 1 sysadm sysadm 80 Jul 30 11:42 my-secrets-myname.txt rw-rw-r- 1 sysadm sysadm 112 Jul 30 11:43 my-secrets-myname.enc rw-rw-r- 1 sysadm sysadm 155 Jul 30 12:08 my-secrets-myname.asc You can use the same as before, or a different one - just don't forget it!Ĭheck the file sizes once again: $ ls -l my-secrets-myname.* You will, once again, be asked to enter a passphrase. Notice how we introduce the '-a' parameter, and we now create an encrypted file ending in. We can ask OpenSSL to "base64" encode the encrypted file: this will convert the binary file into a slightly larger file, using only ASCII characters which are email-friendly (or even ready to paste in a chat window!) We use the '-a' parameter of the openssl command:Įxample: openssl aes-256-cbc -e -a -in my-secrets-myname.txt -out my-secrets-myname.asc What if you wanted to send this file in an email to one of your friends, or a family member for safekeeping ? Notice that you cannot read the contents - it is a pure binary stream. ![]() If you want to, you can write whatever you want it in, or use the example below, replacing "myname" with your name (no spaces - for example JohnDoe). 2.1.1 Encrypting files with OpenSSLįirst, let's find file we want to encrypt. In this lab, we will use the OpenSSL command to encrypt files using the AES 256 encryption algorithm, using a symmetric key. OpenSSL, which is present by default in the base system on Ubuntu (and most other Linux distributions, if not all), is a powerful toolkit that includes many useful tools to generate checksums, manage certificates, and perform encryption/decryption. "RTR-GW>" or "mysql>") imply that you are executing commands on remote equipment, or within another program.Ģ Exercises 2.1 Using OpenSSL and symmetric encryption to encrypt files Commands with more specific command lines (e.g.Commands preceded with "#" imply that you should be working as root.Commands preceded with "$" imply that you should execute the command as a general user - not as root.2.1 Using OpenSSL and symmetric encryption to encrypt files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |