Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Breaking Codes: Decoding Messages Encoded with Modulus and Matrix Multiplication, Study Guides, Projects, Research of Mathematics

Instructions for students in a math 410 project on cryptography. The goal is to decode messages that have been encoded using modulus and matrix multiplication. The messages are simplified, with no repetition of characters in the modulus scheme and no punctuation. Students are encouraged to use logic and the knowledge of the first eight characters of the original message (which is 'did you') to decode the messages. Examples and instructions for decoding messages with known encoding matrices and permuted alphabets.

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 08/31/2009

koofers-user-4fu
koofers-user-4fu 🇺🇸

10 documents

1 / 3

Toggle sidebar

Related documents


Partial preview of the text

Download Breaking Codes: Decoding Messages Encoded with Modulus and Matrix Multiplication and more Study Guides, Projects, Research Mathematics in PDF only on Docsity! Math 410 Project: Breaking Codes Problem Description: Please refer to the write up for Math 410 Project: Cryptography for background infor- mation. The purpose of this project is to discover how hard it is to crack even simple codes by brute force methods. The codes you are breaking in this project are greatly simplied, as they are all expressed in standard alphabet characters, the modulus we are using always corresponds to the number of characters, and no characters are ever repeated in the modulus scheme. The messages in this problem are not grammatically correct, have no punctuation in most cases, are all lower case letters, and are chosen to give you a good chance at decoding. Each message, when decoded, starts with the phrase 'did you ' and they all contain well dened words (in English). I would suggest you, at rst, no try a purely computational process for decoding, but rather try to use some logic to determine what letters are likely, and, of course, use the fact that you know the rst 8 characters. An acceptable answer for this project is not simply the decoded message. You MUST hand in any material you used to determine the message (such as other codes or hand work). Please write up your method clearly and concisely, and if you determined much of it by hand using simple logic, please write a small explanation of your thinking process. Example: A message is encoded in modulus 27 using the standard alphabet, but with no punctuation characters (there is no '.' ). The alphabet used is out of order slightly. The rst ve characters are out of order, the rest are all in order. The message is turned from text into numbers using this dierent alphabet order, then encoded by multiplying by a matrix B =  −3 −3 −40 1 1 4 3 4 , converted to base 27(again, because no period), then turned into text using the reverse of the dierent alphabet order. The resulting encoded message is: xjfklqrveifxdpzwnqusmdbgkafeo wrrnngqbnzpvsbccpa You must decode the message using the fact that the rst part of the original message is did you . There is a le on the website, called CryptoBreakExample.m which walks you through two simple methods to accomplish this. One idea is that we loop through each combination of what the rst ve characters could be, and print out the result if the text did you happens to match. There are much better ways to do this, and feel free to attempt them if you would like. Problem 1 (10 pts): A message is encoded in modulus 28 with characters dened similarly to the previous assignment ('a'=0, 'b'=1, ..., ' '=26, and '.'=27). The message is encoded by reshaping the matrix into three rows (using extra padding with spaces if necessary), multiplying by a 3×3 encoding matrix, and taking the modulus in base 28. The resulting encoded message is: i k.ghcbxmqcigwr pxhzssfwqdbddvqjctndvfaic hhnzgydtlbvyvrrvmmvhzbsyr epssio.mztpctha Decoding this is generally straightforward, but the problem is that someone forgot to pass you the B matrix (the encoding matrix). We do know three facts though: 1. The B matrix has determinant or ±1. 2. The B matrix consists of only the numbers −1, 0 or 1. 3. The rst part of the message is did you . Find the original message. Problem 2 (10 pts): A message is encoded in modulus 27 using the standard alphabet, but with no punctuation characters (there is no '.' ). The alphabet used is out of order slightly. Each set of three characters is in some unknown order. For example, the rst three characters corresponding to 0, 1, and 2 may be b, c, and a instead of the normal order of a, b and c. To be more specic, the following is not the correct encoding scheme, but a possible one: 1 a b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 0 4 3 5 8 7 6 11 10 9 12 13 14 16 17 15 18 20 19 21 23 22 24 25 26 The original message in encoded by a permutation similar to the example above, then is reshaped into a matrix with three rows (using extra padding with spaces if necessary). It is then multiplied by the following encoding matrix B =  −3 −3 −40 1 1 4 3 4  and the result is calculated in base 27. While the permuted alphabet encoding scheme used is not straightforward, you've caught a few breaks: 1. You managed to intercept the code before it was translated back into text, so you have an encoded matrix of numbers in base 27 given by 25 10 7 24 10 1 4 7 18 1 14 0 13 22 8 13 5 19 16 1912 11 4 17 0 1 14 17 26 4 12 23 18 12 18 3 9 3 4 3 7 16 12 17 25 25 16 10 5 25 12 5 1 15 10 7 23 26 14 8  (so, this is the matrix after changing the original message by the permutation, forming into a matrix, multi- plying by B and modding everything by 27). 2. You also know, once again, that the rst part of the original message is did you . 3. You know that the 12th − 14th characters are unchanged (so 'm', 'n' and 'o' correspond to 12, 13 and 14). 4. You also know the last three characters are unchanged (so 'y', 'z', and ' ' correspond to 24, 25 and 26). Determine the original message. Problem 3 (extra credit): A message is encoded in modulus 28 using the standard alphabet. The alphabet is scrambled in a completely random order (the new alphabet is a random perturbation of the usual alphabet). For example, a,b and c may correspond to any number between 0 and 27 (with obviously, no numbers being repeated). After the message is changed by the random perturbation of the standard alphabet it is then is reshaped into a matrix with three rows (using extra padding with spaces if necessary). Next it is multiplied by the following encoding matrix B =  −3 −3 −40 1 1 4 3 4  and the result is calculated in base 28. The resulting message, using the perturbed alphabet, is mmsfextmcrxvc cmv kxbsmerbv jbfptlsdsxhycjbdemb.o ubdeszhxhnpwcxzbzmuzslzhrgwt Once again, you've caught a couple of breaks (not that it is gonna help much!): 1. In the original permutation of the alphabet, the t character corresponds to the number 8 in mod 28 (so the entry in the 8th location of the permutation vector, starting from 0, is 19, since 19 would correspond to t in the non-perturbed alphabet). 2. In the original permutation of the alphabet, the d character corresponds to the number 13 in mod 28 (so the entry in the 13th location of the permutation vector, starting from 0, is 3 since 3 would correspond to d in the non-perturbed alphabet). 3. You also know, once again, that the rst part of the original message is did you . 2
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved