# Homework 08: Debugging and Profiling + Security and Cryptography

# Homework Update

Run `git pull`

to grab the latest homework.

# Exercises

**Entropy**(3 points). Put each answer in a new line of a file`entropy`

.- Suppose a password is chosen as a concatenation of four lower-case dictionary words, where each word is selected uniformly at random from a dictionary of size 100,000. An example of such a password is
`correcthorsebatterystaple`

. How many bits of entropy does this have? (Round to the nearest integer.) - Consider an alternative scheme where a password is chosen as a sequence of 8 random alphanumeric characters (including 10 numbers, and lower-case and upper-case letters). An example is
`rg8Ql34g`

. How many bits of entropy does this have? (Round to the nearest integer.) - Which is the stronger password? (Please write 1 or 2.)

- Suppose a password is chosen as a concatenation of four lower-case dictionary words, where each word is selected uniformly at random from a dictionary of size 100,000. An example of such a password is
**Symmetric cryptography.**Decrypt`sym.enc`

using AES encryption with`openssl aes-256-cbc -d -in {input filename} -out {output filename} -md sha256`

. The password we used to encrypt the file is`1234`

. Save the output file in`sym`

.**Asymmetric cryptography.**In this homework, you will find two files,`public.pgp`

and`private.pgp`

, corresponding to a set of public and private keys. (This set of keys was generated with the password`1234`

.) You will also find a file`asym.asc`

, which is a file encrypted with GPG. Your job is to decode this message into a file`asym`

.