Using the input and output of the below encryption method, can you determine the algorithm (what is the process/rule for converting input to output)? Note that each input/output pair is separate and not dependent on the others.

Inputs:
#1. HELLO WORLD
#2. THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
#3. BLAST OF POWER FOLLOWING A FLASH OF LIGHT

Outputs:
#1. JTDFR IYWLF
#2. YKY TWRCJ MRPRB LRV HTBPG QNUO QHQ SFVI LEF
#3. NSFHP TS IIWRY KEHJYPUBK G LHKAH UH DOADO

You can get the answer by...

When looking at the keyboard, shift right a number of characters equal to the position of the letter you are typing, wrapping around the keboard for only alpha keys. (i.e. H shifts right 1 to J, E shifts right 2 to T, L shift right 3 to D, then shifts right 4 to F, etc.)

The first thing that I notice when I look at the cypher text is that the word "the" gives us a palindrome both times.

This makes me suspect that positioning matters. The fact that "H" gives us "H" both times in appears in the 27th position might also support this. If we search the alphabet for a relationship that gives us such a result, we might come up empty handed. However, if we look down at our English/America keyboard, we can find the letters "T" and "H" separated by one character, just as they are in the word "THE". In input 2, the first "T" is the first character, so traveling to the right 1 key gives us "Y". Traveling to the right from "E" by three keys (because "E" is in the third position) also gives us "Y". If we look at the next word, we can see that spaces don't matter. Following this pattern, we can get the rest of the cypher text. If we reach the end of a line of letter characters on our keyboard, we simply loop back to the first letter key on the left on that row of keys. We can also test this by reversing the cypher, as well.

Alternatively:

If you don't know what a keyboard is, it is almost still possible to solve this cryptogram as long as you realize that each character has only 7-10 characters that it can become when encrypted. To test this, we can map out all of the known characters based on their positions (rows can be position, the columns can be the plain text, and each cell will contain the known cypher text for that character/position combination). In doing so, some patterns quickly become apparent. We may not have to map all of it, but we know we should definitely complete the second input, because we need the brown fox to tell us at least one position/cypher text combination for each letter of the alphabet. There will still be some small holes, in the end, because the cypher text does not contain the characters "X" or "Z".

• I actually started by using the second method I described here.
– JTL
Oct 20 '15 at 16:03
• Nice work. APrough beat you by just a minute, but +1 for your thorough explanation! Oct 20 '15 at 16:24