On the Subject of the Caesar Shuffle CM
If the Submit Button is white, follow the instructions under Encrypt Instructions. Otherwise follow the instructions under Decrypt Instructions.
Encrypt Instructions
- Reverse both keywords on screens 1 and 2.
- Let X equal to the alphabetic position (A1Z26) of the Nth letter of the keyword on screen 1, modulo the encrypted word’s length minus 1, plus 1.
- Subtract the encrypted word’s length by X to get a new X value.
- Place a pivot after the Xth letter in the encrypted word.
- Swap the 2 strings to the left and right of the pivot.
- Shift the now-right substring backwards in the alphabet by the alphabetic position (A1Z26) of the current letter of the second key. Remove the pivot.
- Do this for each letter of the 2 keywords to get a decrypted word.
Decrypt Instructions
- Place a pivot after the Xth letter in the encrypted word. X is equal to the alphabetic position of the Nth letter of the keyword on screen 1 (A1Z26), modulo the encrypted word’s length minus 1, plus 1.
- Swap the 2 strings to the left and right of the pivot.
- Shift the now-left substring forwards in the alphabet by the alphabetic position (A1Z26) of the Nth letter of the keyword on screen 2. Remove the pivot.
- Do this for each letter of the 2 keywords to get a decrypted word.