Scytale Cipher

Encode and decode messages with the Scytale cipher.

Result

HMMPEETPLIREPAAD

How it is calculated

The scytale cipher mimics a message written on a strip wound around a rod. The text is written in rows of c characters (the number of columns, 2 or more), then read down column by column. Row count is rows = ⌈length / c⌉. When the length is not a multiple of c, the first length mod c columns are one character taller, and decoding rebuilds those column lengths to restore the text. Encode and decode with the same column count. Every character is moved, including spaces and punctuation, so it counts toward the length. It works on bytes, so accented or non-Latin letters should be avoided. It is a transposition cipher and offers no real security.

Worked example

Encode HELPMEIAMTRAPPED (16 characters) with 4 columns. It makes 4 rows: HELP / MEIA / MTRA / PPED. Reading down the columns gives column 1 HMMP, column 2 EETP, column 3 LIRE, column 4 PAAD. Joined together the result is HMMPEETPLIREPAAD. Decoding that text with 4 columns returns the original message.

Try this example →

Common mistakes

  • Decoding with a different number of columns than was used to encode; the output is scrambled text.
  • Choosing 1 column, or more columns than letters; with fewer than 2 columns the tool gives no result and with too many the text barely changes.
  • Removing the spaces on one side but not the other, which changes the length and the column heights.
  • Leaving the mode on encode when pasting ciphertext, so the text is scrambled a second time.
  • Using accented letters like ş or ü, which are multi-byte and may break apart.

About this calculator

This tool encrypts and decrypts text with the Scytale cipher, one of the oldest known transposition ciphers, said to have been used by Spartan military commanders as early as the 5th century BCE. A strip of parchment is wrapped around a wooden rod of a fixed diameter and the message is written across the wraps; unwound, the letters appear scrambled, and rewinding around a same-diameter rod (the "key") reveals the message again — the digital version uses a chosen number of columns in place of the rod's circumference.

History and cryptography students use it as a hands-on introduction to columnar transposition, the family of ciphers that rearranges letter positions rather than substituting letters. Enter your message and the number of columns (rod diameter) to encrypt or decrypt.

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators