Prompt
Our analysts have obtained encrypted messages. See if you can crack them.
Walk-Through
This challenge will give you experience decoding a transposition cipher. The messages are encrypted using the rail fence cipher.
To start this challenge, you can observe that there are some uppercase letters mixed with lowercase letters. There are also letters mixed with numbers. We can tell that somewhere there must be a flag. Notice that ‘S’,’K’ and ‘Y’ are in both ciphertexts and they are both capitalized, so the text used here must be scrambled around in a pattern.
Looking back at the prompt for this challenge, and even the title of the challenge, there are some clues about what to do next. Rail fence ciphers use keys to transpose text. This means that this cipher uses a key, or a number, to determine how to move the letters. Rail fence ciphers are also known as zig-zag ciphers. The key used here indicates how many “rails” to place the text on. See the encoding example below where the key is 4.
Plaintext: THIS IS A SECRET Ciphertext: TATHSSEIIERSC
T | A | T | ||||||||||
H | S | S | E | |||||||||
I | I | E | R | |||||||||
S | C |
To solve by hand, you can use some simple math operations and use the zig-zag format as shown above.
Example: Ciphertext: SSDETULCENORF key = 4
Start by subtracting 1 from the key, and multiply this number by 2. The product is the number of spaces apart the letters on the top and bottom rows are from each other. Use this number to place the letters of the ciphertext sequentially in the top row.
Number of spaces the letters are apart in the top row:
N = 2(key-1) N = 2(4-1) N = 6 spaces
To determine how many letters are placed in the top row, divide the total number of characters in the ciphertext by the key. This value indicates how many characters belong in the top row of the transposition.
Number of letters in the top row:
Total number of letters: 13 Key: 4 13/4 = 3 letters
Shown below, using the results of the calculations, the letters in the top row are placed 6 spaces apart and there are three letters in the top row.
0 1 2 3 4 5 6
S | S | D | ||||||||||
Once you have the top row set, you need to fill in the ciphertext sequentially across the row that follows, and so on, until you form the zig-zag message.
S | S | D | ||||||||||
E | T | U | L | |||||||||
S | S | D | ||||||||||
E | T | U | L | |||||||||
C | E | N | O | |||||||||
S | S | D | ||||||||||
E | T | U | L | |||||||||
C | E | N | O | |||||||||
R | F |
Online tools like CyberChef can also be used, however, be careful adding or removing spacing when entering the ciphertext into online tools. These tools often include the spacing in the decoding/encoding process, thus, adding or removing spaces will displace lettering in the output and you may not be able to decode the message.
Useful tools for decoding/encoding:
Questions
Cair eruSA-0org sgaeudrpesr K-II98.ue cn seYQ3
This question uses the rail fence cipher with the standard 3 rails and can be decoded using an online tool such as dCode or CyberChef.
F daS-eefn n KZ3eheadty.YI8lta oiwy-Q0. r aI2
This question uses the rail fence cipher with a non-standard 5 rails and can be decoded using an online tool such as dCode or CyberChef.
©️ 2025 Cyber Skyline. All Rights Reserved. Unauthorized reproduction or distribution of this copyrighted work is illegal.