Number Theory and Cryptography

[meteor_slideshow slideshow=”adssa” metadata=”height: 126, width: 630″]

PayPal Acceptance Mark


Order Details
MATH2068/2988 in 2014: Computer question for Assignment 1
Start a magma session, and as your first magma command type
(thus ensuring that magma saves a record of your session in a file called “asst1.txt”). Then answer the questions below, and after ending your magma session, hand in the file asst1.txt by clicking the “handin” icon on your desktop, entering the keyword
Alternatively, you may use the Computer Tutorial Log File Upload Page to submit your file.
You may, if you wish, edit your file before submitting it. For example, you could use crimson editor to remove superfluous incorrect lines. However, you must make sure that the file you submit contains the deciphered message and all the magma commands you used to find it, as well as magma’s responses to those commands.
As an operative for the Australian Government Department of Internal Safety and Security you have been told to monitor the activities of an unlicensed theatrical company suspected of planning an unauthorized performance of a play based on a book by a famous writer. You have reason to believe that they encipher messages using a two-step process: the plaintext is first enciphered using a block transposition cipher (and they never use blocks of length greater than 20) and then the resulting ciphertext is enciphered again using a Vigenère cipher of period no more than 18. You discover such a doubly enciphered message in a file called a1ciphertext.txt on the MATH2068/2988 web page (reinforcing your suspicions that the University of Sydney has links with illegal organizations).
You are somewhat worried that frequency analysis will not work very well on such a short message, but you decide to try anyway.
Use the javascript Vigenère Cipher Cracker to find the key used for the Vigenère step, and use Magma to undo this second part of the enciphering process. (Use the Magma function String to convert the resulting text to a string object.)
Take this string and apply the methods of Computer Tutorial 4 to find the key for the block transposition cipher used in the first part of the enciphering process, and hence recover the original plaintext.
(Your Magma consultant has thoughtfully created a file called a1ciphertext-magma.txt which will allow you to easily load the original cipher text into Magma.)
[meteor_slideshow slideshow=”best” metadata=”height: 126, width: 630″]

PayPal Acceptance Mark