Tool to find a key corresponding to a permutation/transposition during an encryption from transposition numbers.
Transposition Key - dCode
Tag(s) : Transposition Cipher, Word Search
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
A transposition key, also called a permutation, is an encryption method that involves rearranging characters in text using a specific key. This key determines how the characters of the original text will be rearranged to produce ciphertext.
To generate a permutation from a word/keyword:
— Choose a word, if possible that does not have a duplicate letter (an isogram/heterogram).
Example: Generate the transposition key for the word INDEX
— Associate each letter with its position p.
Example: I:1,N:2,D:3,E:4,X:5
— Rearrange the letters in alphabetical order (while keeping the association p created previously).
Example: D:3,E:4,I:1,N:2,X:5
— Read the list of positions p, it is the permutation key
Example: The key is 3,4,1,2,5
There is no fast algorithm to recover the original word from a permutation. Indeed, the same transposition key may have been generated by several different words.
The bruteforce method (attempting all the words in the dictionary) is the only possible attack. dCode has pre-calculated the permutations of the dictionary words and compares these with the requested permutation in order to display which are the possible words.
Example: 1,6,4,2,5,3 is the key generated by the words CRYPTO, CRUISE or ALPINE
A reverse transposition key is a key used to decrypt ciphertext that has been transformed using a transposition key. This inverse key is generated by reversing the order of the positions specified by the original permutation key. By applying this reverse key to the ciphertext, the characters are returned to their original order, revealing the plain text.
To calculate the inverse permutation from the transposition key:
— Associate each number with its position p
— Sort the list of numbers in ascending order (keeping the association p)
— Read the list of positions, it is the reverse transposition key
Example: Calculate the inverse transposition to (1,6,4,2,5,3) whose positions are '(1:1),(6:2),(4:3),(2:4), (5:5),(3:6)' then sorted by ascending order: '(1:1),(2:4),(3:6),(4:3),(5:5),( 6:2)' or the inverse permutation: (1,4,6,3,5,2)
To calculate the inverse permutation from a word:
— Calculate the transposition corresponding to the word and apply the steps above.
dCode retains ownership of the "Transposition Key" source code. Any algorithm for the "Transposition Key" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Transposition Key" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Transposition Key" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Transposition Key" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Transposition Key on dCode.fr [online website], retrieved on 2025-04-16,