2.9 Computer Problems – Introduction to Cryptography with Coding Theory, 3rd Edition

2.9 Computer Problems

  1. The following ciphertext was encrypted by a shift cipher:

                 ycvejqwvhqtdtwvwu
    

    Decrypt. (The ciphertext is stored in the downloadable computer files (bit.ly/2JbcS6p) under the name ycve.)

  2. The following ciphertext was the output of a shift cipher:

                 lcllewljazlnnzmvyiylhrmhza
    

    By performing a frequency count, guess the key used in the cipher. Use the computer to test your hypothesis. What is the decrypted plaintext? (The ciphertext is stored in the downloadable computer files (bit.ly/2JbcS6p) under the name lcll.)

  3. The following was encrypted by an affine cipher: jidfbidzzteztxjsichfoihuszzsfsaichbipahsibdhu hzsichjujgfabbczggjsvzubehhgjsv. Decrypt it. (This quote (NYTimes, 12/7/2014) is by Mark Wahlberg from when he was observing college classes in order to play a professor in “The Gambler." The ciphertext is stored in the downloadable computer files (bit.ly/2JbcS6p) under the name jidf.) (Hint: The command “frequency” could be useful. The plaintext has 9 e’s, 3 d’s, and 3 w’s.)

  4. The following ciphertext was encrypted by an affine cipher:

                 edsgickxhuklzveqzvkxwkzukcvuh

    The first two letters of the plaintext are if. Decrypt. (The ciphertext is stored in the downloadable computer files (bit.ly/2JbcS6p) under the name edsg.)

  5. The following ciphertext was encrypted by an affine cipher using the function 3x+b for some b:

                 tcabtiqmfheqqmrmvmtmaq

    Decrypt. (The ciphertext is stored in the downloadable computer files (bit.ly/2JbcS6p) under the name tcab.)

  6. Experiment with the affine cipher ymx+n (mod26) for values of m>26. In particular, determine whether or not these encryptions are the same as ones obtained with m<26.

  7. In this problem you are to get your hands dirty doing some programming. Write some code that creates a new alphabet {A, C, G, T}. For example, this alphabet could correspond to the four nucleotides adenine, cytosine, guanine, and thymine, which are the basic building blocks of DNA and RNA codes. Associate the letters A, C, G, T with the numbers 0, 1, 2, 3, respectively.

    1. Using the shift cipher with a shift of 1, encrypt the following sequence of nucleotides, which is taken from the beginning of the thirteenth human chromosome:

      GAATTCGCGGCCGCAATTAACCCTCACTAAAGGGATCT

      CTAGAACT.

    2. Write a program that performs affine ciphers on the nucleotide alphabet. What restrictions are there on the affine cipher?

  8. The following was encrypted using by the Vigenère method using a key of length at most 6. Decrypt it and decide what is unusual about the plaintext. How did this affect the results?

    hdsfgvmkoowafweetcmfthskucaqbilgjofmaqlgspvatvxqbiryscpcfr
    mvswrvnqlszdmgaoqsakmlupsqforvtwvdfcjzvgsoaoqsacjkbrsevbel
    vbksarlscdcaarmnvrysywxqgvellcyluwwveoafgclazowafojdlhssfi
    ksepsoywxafowlbfcsocylngqsyzxgjbmlvgrggokgfgmhlmejabsjvgml
    nrvqzcrggcrghgeupcyfgtydycjkhqluhgxgzovqswpdvbwsffsenbxapa
    sgazmyuhgsfhmftayjxmwznrsofrsoaopgauaaarmftqsmahvqecev
    

    (The ciphertext is stored under the name hdsf in the downloadable computer files (bit.ly/2JbcS6p). The plaintext is from Gadsby by Ernest Vincent Wright.)

  9. The following was encrypted by the Vigenère method. Find the plaintext.

    ocwyikoooniwugpmxwktzdwgtssayjzwyemdlbnqaaavsuwdvbrflauplo
    oubfgqhgcscmgzlatoedcsdeidpbhtmuovpiekifpimfnoamvlpqfxejsm
    xmpgkccaykwfzpyuavtelwhrhmwkbbvgtguvtefjlodfefkvpxsgrsorvg
    tajbsauhzrzalkwuowhgedefnswmrciwcpaaavogpdnfpktdbalsisurln
    psjyeatcuceesohhdarkhwotikbroqrdfmzghgucebvgwcdqxgpbgqwlpb
    daylooqdmuhbdqgmyweuik
    

    (The ciphertext is stored under the name ocwy in the downloadable computer files (bit.ly/2JbcS6p). The plaintext is from The Adventure of the Dancing Men by Sir Arthur Conan Doyle.)

  10. The following was encrypted by the Vigenère method. Decrypt it. (The ciphertext is stored under the name xkju in the downloadable computer files (bit.ly/2JbcS6p).)

    xkjurowmllpxwznpimbvbqjcnowxpcchhvvfvsllfvxhazityxohulxqoj
    axelxzxmyjaqfstsrulhhucdskbxknjqidallpqslluhiaqfpbpcidsvci
    hwhwewthbtxrljnrsncihuvffuxvoukjljswmaqfvjwjsdyljogjxdboxa
    jultucpzmpliwmlubzxvoodybafdskxgqfadshxnxehsaruojaqfpfkndh
    saafvulluwtaqfrupwjrszxgpfutjqiynrxnyntwmhcukjfbirzsmehhsj
    shyonddzzntzmplilrwnmwmlvuryonthuhabwnvw