Scytale Cipher
Encode and decode messages with the Scytale cipher.
Result
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.
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.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)