Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Follow the steps in order:
- 1. Download and build GPG according to your operating system from
- http://gnupg.org/Download the binary package directly if you do not
- know how to compile the source code.
- 2. Download and install OpenSSL. Most Linux distributions come with
- pre-compiled OpenSSL packages. For Windows systems you may download
- binaries “Win32 OpenSSL v1.0.1e Light” from the following webpage
- http://slproweb.com/products/Win32OpenSSL.html
- If you have problems running OpenSSL, you may want to install
- version of Visual C++ 2008 `Redistributablesfor your operating
- system from the same webpage.
- 3. Familiarize yourself with GnuPG. You can use manpages, or online
- documentation at
- http://gnupg.org/documentation/howtos.en.html.
- RSA Key Generation
- 4. Use GPG to generate an RSA key pair (public and private keys).
- Choose option for RSA 2048 bit sign key. Provide your full name, and
- psu email address when asked.
- 5. Export your public key in ASCII format into file public.key.
- 6. Go to Angel lab2 directory to download the PGP public key of
- CMPSC443 (it is called cmpsc443public.key) and import it into your
- local key database (again you will use gpg command line). Use gpg –
- list-keysto verify that key was imported correctly.
- OpenSSL, AES generation and symmetric encryption
- 7. Use openssl enccommand line symmetric cipher routine to generate a
- 256bit AES key in CBC mode. You should use SHA1 as a message digest
- function for generating the key. Save generated secret key, IV, and
- salt into file named aes.key. (Use –P opting to print out the key,
- salt and IV used then immediately exit, don’t do any encryption at
- this step.)
- http://www.openssl.org/docs/apps/enc.html#
- 8. Create a text file lab2.txtthat contains your full name and
- operating system you are using for this lab. *You are to print all
- commands used for keys generation, encryption, and digital
- signatures in the file at step 14.*
- 9. Use openssl encto encrypt lab2.txt with generated AES key. Use –
- kfile option to specify generated key aes.key. Encrypted file must
- be saved in base64-encoded format in file lab2_encr.txt.
- GPG, asymmetric encryption, and digital signatures
- 10. Use gpg to encrypt aes.key file generated in step 7 with public key
- of cmpsc443public.key and store the result in ASCII format in
- aes.key.asc file.
- 11. Use gpg and your own private RSA key to digitally sign aes.key.asc.
- Digital signature must be appendedto cipher and stored in
- key_signed.txt
- 12. Use gpg and your own private RSA key to digitally sign
- lab2_encr.txt. Digital signature must be appendedto cipher and
- stored in lab2_signed.txt
- 13. Verify both created signatures.
- 14. Repeat steps 8 through 13. For step 5:In lab2.txt add all commands
- that you used to generate AES and RSA keys, encrypt both files, and
- sign both files. Make sure to provide comments for each command used!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement