# Is there a general way to crack this graph cipher? [closed]

Every coded message has a numerical key, it can be a number any digits long. Each decoded letter of the message is placed on separate points of a 10 by 10 coordinate graph. Each letter is represented by a 6 digit number. The first two digits show which letter of the alphabet the letter is. 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 10 20 30 40 50 60 70 80 90 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 The third and fourth digits represent the Y axis point. The fifth and sixth digits represent the X axis point.

To encrypt a letter, one takes the representing numbers and multiplies the 6 digit number by the key. If the key was 605, and one wants to place the letter 'H' on point Y: 5 X: 3, the equation is 805,030 * 605. This equals 487043150.

To decrypt the letter H, one divides 487043150 by 605. This would equal 805,030. Then the solver fills in the blanks. 80 shows that the letter is H. 50 shows that the letter goes on Y point 5. 30 shows that the letter goes on X point 3. The solver would then decode letters systematically until they spell out words on the graph.

• Analyzing selfmade ciphers is considered off-topic on this forum. But anyway, this is a simple monoalphabetic substitution cipher, where you encode each symbol as a long number: 'H' is always represented by the same number. Your key is easy to calculate, as it is the greatest common divisor of all your numbers, therefore does nothing. – tylo Oct 6 '16 at 12:24

Continuing from your example: if i am encrypting the message HELLO using the key 605, while following along the graph (or what is essentially a matrix) with the intention to spell out my message, i only actually need the calculations for the first two letters to find the key:
Taking these numbers one can trivially find gcd(487043150, 305549200)—gcd being the greatest common divisor—e.g. by using a tool like WolframAlpha, which finds the gcd to be 6050 (6050 rather than 605 due to both of the numbers multiplied with the key ending in a zero, thus for this purpose having an unnecessary extra power of magnitude. Removing these zeros would give 605 directly).