( simple Encryption) Some information on the Internet may be encrypted with a
simple algorithm known as "rot13," which rotates each character by 13
positions in the alphabet. Thus, 'a' corresponds to 'n', and 'x' corresponds
to 'k'. rot13 is an example of symmetric key encryption. With symmetric key
encryption, both the encrypter and decrypter use the
same key.
a. Write a program that encrypts a message using rot13.
b. Write a program that decrypts the scrambled message using 13 as the key.
c. After writing the programs of part (a) and part (b), briefly answer the
following question: If you did not know the key for part (b), how difficult do
you think it would be to break the code? What if you had access to substantial
computing power (e.g., supercomputers)? In Exercise 18.26 we ask you to write
a program to accomplish this.