Editing
Final Report/Thesis 2015
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Task 3: Rubaiyat of Omar Khayyam as a One-Time Pad=== ====Aim==== The aim of Task 3 was to use ''Rubaiyat of Omar Khayyam'' as a ''one-time pad'' to attempt to decode the Somerton Man code to find any meaningful messages after decrypting. This task involved the investigation that the letters had been substituted for others using a ''one-time pad'' technique. This group was to use the Somerton Man code to act as the cipher text, the numerical value of letter positions within words, with respect to the first letter of each word to act as the ''key'', and the decoded messages to act as the ''plaintext'' of the code. The first letter of each word in the ''one-time pad'' had numerical value 0, the second letter had numerical value 1, and so on. The difference in aim between our group and the 2013 honours group is that the ''key'' used to decode the message is based on letter position within each word rather than using numbers assigned to each letter in the alphabet to perform alphabetic shits, as implemented in the 'Decoding Toolkit - One Time Pad' software <ref>L. Griffith and P. Varsos. (2013). Semester B Final Report 2013 β Cipher Cracking [online]. Available: https://www.eleceng.adelaide.edu.au/personal/dabbott/wiki/index.php/Semester_B_Final_Report_2013_-_Cipher_cracking</ref>. ====Method==== Before commencing Task 3, we had to choose a computer programming language to implement the code. My first attempt was to use Java, because this language was used by all previous groups to implement for their work. I tried to reuse the base code from previous groups and extend it to satisfy our Task 3 requirements, however, the aim of 2013 was significantly different to ours, so there were not too many similar points in the code. On the other hand, I am not good at Java language because I never learned it before. My second attempt was to use the C and C++ language to implement the code. I completed some functions for the code, but there was a problem in loading text files. Because we used the ''Rubaiyat of Omar Khayyam'' as a ''one-time pad'', we were trying to translate the ''Rubaiyat'' into a text file so that we were able to run the code and search for words in the ''Rubaiyat''. C++ is an old programming language and the process of loading data was too complex. I decided to give up this method. My final attempt was to use MATLAB, it is a relatively new programming language, and loading text files is relatively simple. In addition, I have studied MATLAB in previous university courses and find it easier to use. Finally, I chose MATLAB as the programming language to implement language for Task 3. The direct substitution of the letters in the pad was to be used. For instance, if we chose a line: MRGOABABD, from the Somerton Man code as the encoded message, the first letter of the code is to be used, which is an M. The program was then to search the ''Rubaiyat'' from beginning to end, until it finds the first word that begins with M. This was then to be decoded to the second letter in the same word. This process was then to be repeated for the second letter in the code, being R. It was to find the first word in the ''Rubaiyat'' that starts with R, and decodes it to the second letter in that word. This method was then to be repeated until there were too few words long enough to decode all of the letters in the code. After this point, one final decode was to be attempted, where rather than using letter position, the last letter of each word was to be used. The output of the software was to be possible words or phrases made up of letter substitutions in place of the letters in the Somerton Man code. =====Design===== [[File: Design_for_task3.png |thumb|1000px|centre|'''Fig. 26:''' Design Flowchart for Task 3]] The Figure 26 shown above demonstrates my design and thinking process for Task 3. We needed 2 inputs for the code: One was the Somerton Man code which is the encoded message, other was the letter position as the ''key'' (the range of the letter position is above 0 and starts with integer 1 based on the MATLAB system). The function was to output a letter from the Somerton Man code and a number n from the letter position. Then, a function called matching was then to receive the letter output from the Somerton Man code. It was to search the ''Rubaiyat'' from beginning to end to match the first word with the same initial letter. At the same time, a function called finding was to receive the number output by letter position. Afterwards, the function matching was to send the matched word from ''Rubaiyat'' to the function 'finding'. This function was then to choose the correct letter in the matched word based on the letter position n. For example, if n equaled to 2, the 'finding' function would choose the second letter of the matched word. Finally, the function would output the chosen letter to a function called 'recordMessage', and this function would record all the letters from 'finding' in order. The program would have now completed decoding for one letter of Somerton Man code, and would then repeat for the rest of the letters in the code. After decoding all letters, the program would output the original message. =====One-Time Pad Example===== Figure 27 contains an excerpt form the ''Rubaiyat of Omar Khayyam'' and the word AWAKE is the first word in the ''Rubaiyat''. Assuming we have the encoded message AFM and we want to use the second letter position to decode it. The program will search the ''Rubaiyat'' from beginning to end, until it finds the first word that begins with A. From Figure 27, the word should be AWAKE. This will then be decoded to the second letter in the same word which is W. The program will repeat step 2 for the rest of the letters in the code. The second word and third word should be FOR and MORNING based on the ''Rubaiyat of Omar Khayyam''. The output should be WOO. Figure 28 shows the output from MATLAB, the function called multi, which shows all possible decoded messages according to letter position n. For example, if n equals 2, the output will display the first original encoded message AFM and the second decoded message WOO as well. {|style="margin: 0 auto;" | [[File: Example_of_task3_1.png |thumb|1000px|centre|'''Fig. 27:''' Example of Task 3 (Rubaiyat Excerpt)]] | [[File: Example_of_task3_2.png |thumb|1000px|centre|'''Fig. 28:''' Example of Task 3 (MATLAB Output)]] |} =====Verification===== A simple verification method was used to test the MATLAB code to be functioning correctly. One group member encoded the original message GUN using the proposed ''key'' with the third letter position, and ''Rubaiyat of Omar Khayyam'' as the ''one-time pad''. Based on Figure 29, which is an excerpt from the formatted version of the ''Rubaiyat of Omar Khayyam'', the encoded words used were NIGHT, FLUNG and HUNTER. Taking the first letter of each word produces the letters NFH as the encoded message. The other group member then took the letters NFH as the code and ran the MATLAB script to test all letter positions until discovering that by using the third letter position as the ''key'', the original message 'GUN' was displayed as the output as expected. This can be see in Figure 30. {|style="margin: 0 auto;" | [[File: Task_3_Verification.png |thumb|300px|left|'''Fig. 29:''' Task 3 Verification (Rubaiyat Excerpt)]] | [[File: Task_3_Verification_Result.png |thumb|300px|right|'''Fig. 30:''' Task 3 Verification (Result)]] |} ====Results==== {|style="margin: 0 auto;" | [[File: Task_3_result_21.png |thumb|300px|centre|'''Fig. 31:''' Task 3 Results using Second Letter Position (Unformatted)]] | [[File: Task_3_result_22.png |thumb|300px|centre|'''Fig. 32:''' Task 3 Results using Second Letter Position (Formatted)]] |} {|style="margin: 0 auto;" | [[File: Task_3_result_31.png |thumb|300px|centre|'''Fig. 33:''' Task 3 Results using Third Letter Position (Unformatted)]] | [[File: Task_3_result_32.png |thumb|300px|centre|'''Fig. 34:''' Task 3 Results using Third Letter Position (Formatted)]] |} {|style="margin: 0 auto;" | [[File: Task_3_result_l1.png |thumb|300px|centre|'''Fig. 35:''' Task 3 Results using Last Letter Position (Unformatted)]] | [[File: Task_3_result_l2.png |thumb|300px|centre|'''Fig. 36:''' Task 3 Results using Last Letter Position (Formatted)]] |} ====Evaluation and Justification==== As can be seen in the Figures in the Results section, despite correctly implementing the newly proposed ''key'' method to use the ''Rubaiyat of Omar Khayyam'' as a ''one-time pad'' through the use of software, no useful results were able to be generated by using all variants of the code and all letter positions as ''keys''. The main conclusion to be drawn from this was that the ''Rubaiyat of Omar Khayyam'' was not used as a ''one-time pad'' to generate the Somerton Man code with the proposed method of using letter position within words as the ''key''.
Summary:
Please note that all contributions to Derek may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Derek:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information