1. Type in, or copy and paste, the code from Listing 3-3 in the Nielson book.

  2. Run the code several times. Make sure you understand what is happening. Modify the key and/or the message and run the program again. What changes do you notice?

  3. Look at Listing 3-2 to discover how to print the hex code for the ciphertext. Print the ciphertext in hex.

  4. How long is the ciphertext in hex? How many blocks does that translate into?

  5. Research slicing in Python. Print the first and last blocks (in hex) of the ciphertext.

  6. Print all blocks of the ciphertext.

  7. Exercise 3.6 from the Nielson book. (Modify your program to encrypt and decrypt several meetup messages, as in the example on page 66. Be sure to include some from Bob to Alice as well as Alice to Bob.)

  8. Print out the corresponding blocks from each message, as on pages 66-67. Where do you notice similarities, and why? Do they have the same number of blocks? Why or why not?

  9. Determine the type of object that the ciphertext is. Use the type function in Python.

  10. In Python, bytes objects are immutable, which means they cannot change. List and bytearray objects are mutable. Explore converting one of your ciphertexts to these objects and changing some portion of the ciphertext. What happens? Do you get the same plaintext once you decrypt?