<s>
In	O
cryptography	O
,	O
a	O
transposition	B-Algorithm
cipher	I-Algorithm
(	O
also	O
known	O
as	O
a	O
permutation	B-Algorithm
cipher	I-Algorithm
)	O
is	O
a	O
method	O
of	O
encryption	O
which	O
scrambles	O
the	O
positions	O
of	O
characters	O
(	O
transposition	B-Algorithm
)	O
without	O
changing	O
the	O
characters	O
themselves	O
.	O
</s>
<s>
Transposition	B-Algorithm
ciphers	I-Algorithm
reorder	O
units	O
of	O
plaintext	O
(	O
typically	O
characters	O
or	O
groups	O
of	O
characters	O
)	O
according	O
to	O
a	O
regular	O
system	O
to	O
produce	O
a	O
ciphertext	O
which	O
is	O
a	O
permutation	B-Algorithm
of	O
the	O
plaintext	O
.	O
</s>
<s>
Despite	O
the	O
difference	O
between	O
transposition	B-Algorithm
and	O
substitution	O
operations	O
,	O
they	O
are	O
often	O
combined	O
,	O
as	O
in	O
historical	O
ciphers	O
like	O
the	O
ADFGVX	B-Algorithm
cipher	I-Algorithm
or	O
complex	O
high-quality	O
encryption	O
methods	O
like	O
the	O
modern	O
Advanced	B-Algorithm
Encryption	I-Algorithm
Standard	I-Algorithm
(	O
AES	B-Algorithm
)	O
.	O
</s>
<s>
Plaintexts	O
can	O
be	O
rearranged	O
into	O
a	O
ciphertext	O
using	O
a	O
key	O
,	O
scrambling	O
the	O
order	O
of	O
characters	O
like	O
the	O
shuffled	O
pieces	O
of	O
a	O
jigsaw	B-Application
puzzle	I-Application
.	O
</s>
<s>
Transposition	B-Algorithm
ciphers	I-Algorithm
have	O
several	O
vulnerabilities	O
(	O
see	O
the	O
section	O
on	O
"	O
Detection	O
and	O
cryptanalysis	O
"	O
below	O
)	O
,	O
and	O
small	O
mistakes	O
in	O
the	O
encipherment	O
process	O
can	O
render	O
the	O
entire	O
ciphertext	O
meaningless	O
.	O
</s>
<s>
However	O
,	O
given	O
the	O
right	O
conditions	O
-	O
long	O
messages	O
(	O
e.g.	O
,	O
over	O
100	O
–	O
200	O
letters	O
)	O
,	O
unpredictable	O
contents	O
,	O
unique	O
keys	O
per	O
message	O
,	O
strong	O
transposition	B-Algorithm
methods	O
,	O
and	O
so	O
on	O
-	O
guessing	O
the	O
right	O
words	O
could	O
be	O
computationally	O
impossible	O
without	O
further	O
information	O
.	O
</s>
<s>
In	O
their	O
book	O
on	O
codebreaking	O
historical	O
ciphers	O
,	O
Elonka	O
Dunin	O
and	O
Klaus	O
Schmeh	O
describe	O
double	O
columnar	O
transposition	B-Algorithm
(	O
see	O
below	O
)	O
as	O
"	O
one	O
of	O
the	O
best	O
manual	O
ciphers	O
known	O
"	O
.	O
</s>
<s>
The	O
Rail	B-Algorithm
Fence	I-Algorithm
cipher	I-Algorithm
is	O
a	O
form	O
of	O
transposition	B-Algorithm
cipher	I-Algorithm
that	O
gets	O
its	O
name	O
from	O
the	O
way	O
in	O
which	O
it	O
is	O
encoded	O
.	O
</s>
<s>
In	O
the	O
rail	B-Algorithm
fence	I-Algorithm
cipher	I-Algorithm
,	O
the	O
plaintext	O
is	O
written	O
downwards	O
and	O
diagonally	O
on	O
successive	O
"	O
rails	O
"	O
of	O
an	O
imaginary	O
fence	O
,	O
then	O
moving	O
up	O
when	O
we	O
get	O
to	O
the	O
bottom	O
.	O
</s>
<s>
The	O
rail	B-Algorithm
fence	I-Algorithm
cipher	I-Algorithm
follows	O
a	O
pattern	O
similar	O
to	O
that	O
of	O
the	O
scytale	O
,	O
(	O
pronounced	O
"	O
SKIT-uhl-ee	O
"	O
)	O
a	O
mechanical	O
system	O
of	O
producing	O
a	O
transposition	B-Algorithm
cipher	I-Algorithm
used	O
by	O
the	O
ancient	O
Greeks	O
.	O
</s>
<s>
For	O
example	O
,	O
using	O
the	O
same	O
plaintext	O
that	O
we	O
used	O
for	O
rail	B-Algorithm
fence	I-Algorithm
:	O
</s>
<s>
Route	O
ciphers	O
have	O
many	O
more	O
keys	O
than	O
a	O
rail	B-Algorithm
fence	I-Algorithm
.	O
</s>
<s>
In	O
a	O
columnar	O
transposition	B-Algorithm
,	O
the	O
message	O
is	O
written	O
out	O
in	O
rows	O
of	O
a	O
fixed	O
length	O
,	O
and	O
then	O
read	O
out	O
again	O
column	O
by	O
column	O
,	O
and	O
the	O
columns	O
are	O
chosen	O
in	O
some	O
scrambled	O
order	O
.	O
</s>
<s>
Both	O
the	O
width	O
of	O
the	O
rows	O
and	O
the	O
permutation	B-Algorithm
of	O
the	O
columns	O
are	O
usually	O
defined	O
by	O
a	O
keyword	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
keyword	O
is	O
of	O
length	O
6	O
(	O
so	O
the	O
rows	O
are	O
of	O
length	O
6	O
)	O
,	O
and	O
the	O
permutation	B-Algorithm
is	O
defined	O
by	O
the	O
alphabetical	O
order	O
of	O
the	O
letters	O
in	O
the	O
keyword	O
.	O
</s>
<s>
In	O
a	O
regular	O
columnar	O
transposition	B-Algorithm
cipher	I-Algorithm
,	O
any	O
spare	O
spaces	O
are	O
filled	O
with	O
nulls	O
;	O
in	O
an	O
irregular	O
columnar	O
transposition	B-Algorithm
cipher	I-Algorithm
,	O
the	O
spaces	O
are	O
left	O
blank	O
.	O
</s>
<s>
In	O
a	O
regular	O
columnar	O
transposition	B-Algorithm
,	O
we	O
write	O
this	O
into	O
the	O
grid	O
as	O
follows	O
:	O
</s>
<s>
In	O
a	O
variation	O
,	O
the	O
message	O
is	O
blocked	O
into	O
segments	O
that	O
are	O
the	O
key	O
length	O
long	O
and	O
to	O
each	O
segment	O
the	O
same	O
permutation	B-Algorithm
(	O
given	O
by	O
the	O
key	O
)	O
is	O
applied	O
.	O
</s>
<s>
This	O
is	O
equivalent	O
to	O
a	O
columnar	O
transposition	B-Algorithm
where	O
the	O
read-out	O
is	O
by	O
rows	O
instead	O
of	O
columns	O
.	O
</s>
<s>
Columnar	O
transposition	B-Algorithm
continued	O
to	O
be	O
used	O
for	O
serious	O
purposes	O
as	O
a	O
component	O
of	O
more	O
complex	O
ciphers	O
at	O
least	O
into	O
the	O
1950s	O
.	O
</s>
<s>
A	O
single	O
columnar	O
transposition	B-Algorithm
could	O
be	O
attacked	O
by	O
guessing	O
possible	O
column	O
lengths	O
,	O
writing	O
the	O
message	O
out	O
in	O
its	O
columns	O
(	O
but	O
in	O
the	O
wrong	O
order	O
,	O
as	O
the	O
key	O
is	O
not	O
yet	O
known	O
)	O
,	O
and	O
then	O
looking	O
for	O
possible	O
anagrams	O
.	O
</s>
<s>
Thus	O
to	O
make	O
it	O
stronger	O
,	O
a	O
double	O
transposition	B-Algorithm
was	O
often	O
used	O
.	O
</s>
<s>
This	O
is	O
simply	O
a	O
columnar	O
transposition	B-Algorithm
applied	O
twice	O
.	O
</s>
<s>
The	O
same	O
key	O
can	O
be	O
used	O
for	O
both	O
transpositions	B-Algorithm
,	O
or	O
two	O
different	O
keys	O
can	O
be	O
used	O
.	O
</s>
<s>
In	O
the	O
following	O
example	O
,	O
we	O
use	O
the	O
keys	O
JANEAUSTEN	O
and	O
AEROPLANES	O
to	O
encrypt	O
the	O
following	O
plaintext	O
:	O
"	O
Transposition	B-Algorithm
ciphers	I-Algorithm
scramble	O
letters	O
like	O
puzzle	O
pieces	O
to	O
create	O
an	O
indecipherable	O
arrangement	O
.	O
</s>
<s>
"	O
The	O
colors	O
show	O
how	O
the	O
letters	O
are	O
scrambled	O
in	O
each	O
transposition	B-Algorithm
step	O
.	O
</s>
<s>
As	O
an	O
example	O
,	O
we	O
can	O
take	O
the	O
result	O
of	O
the	O
irregular	O
columnar	O
transposition	B-Algorithm
in	O
the	O
previous	O
section	O
,	O
and	O
perform	O
a	O
second	O
encryption	O
with	O
a	O
different	O
keyword	O
,	O
,	O
which	O
gives	O
the	O
permutation	B-Algorithm
"	O
564231	O
"	O
:	O
</s>
<s>
During	O
World	O
War	O
I	O
,	O
the	O
German	O
military	O
used	O
a	O
double	O
columnar	O
transposition	B-Algorithm
cipher	I-Algorithm
,	O
changing	O
the	O
keys	O
infrequently	O
.	O
</s>
<s>
During	O
World	O
War	O
II	O
,	O
the	O
double	O
transposition	B-Algorithm
cipher	I-Algorithm
was	O
used	O
by	O
Dutch	O
Resistance	O
groups	O
,	O
the	O
French	O
Maquis	O
and	O
the	O
British	O
Special	O
Operations	O
Executive	O
(	O
SOE	O
)	O
,	O
which	O
was	O
in	O
charge	O
of	O
managing	O
underground	O
activities	O
in	O
Europe	O
.	O
</s>
<s>
Until	O
the	O
invention	O
of	O
the	O
VIC	B-Algorithm
cipher	I-Algorithm
,	O
double	O
transposition	B-Algorithm
was	O
generally	O
regarded	O
as	O
the	O
most	O
complicated	O
cipher	O
that	O
an	O
agent	O
could	O
operate	O
reliably	O
under	O
difficult	O
field	O
conditions	O
.	O
</s>
<s>
The	O
double	O
transposition	B-Algorithm
cipher	I-Algorithm
can	O
be	O
treated	O
as	O
a	O
single	O
transposition	B-Algorithm
with	O
a	O
key	O
as	O
long	O
as	O
the	O
product	O
of	O
the	O
lengths	O
of	O
the	O
two	O
keys	O
.	O
</s>
<s>
In	O
late	O
2013	O
,	O
a	O
double	O
transposition	B-Algorithm
challenge	O
,	O
regarded	O
by	O
its	O
author	O
as	O
undecipherable	O
,	O
was	O
solved	O
by	O
George	O
Lasry	O
using	O
a	O
divide-and-conquer	O
approach	O
where	O
each	O
transposition	B-Algorithm
was	O
attacked	O
individually	O
.	O
</s>
<s>
A	O
variant	O
form	O
of	O
columnar	O
transposition	B-Algorithm
,	O
proposed	O
by	O
Émile	O
Victor	O
Théodore	O
Myszkowski	O
in	O
1902	O
,	O
requires	O
a	O
keyword	O
with	O
recurrent	O
letters	O
.	O
</s>
<s>
In	O
Myszkowski	O
transposition	B-Algorithm
,	O
recurrent	O
keyword	O
letters	O
are	O
numbered	O
identically	O
,	O
TOMATO	O
yielding	O
a	O
keystring	O
of	O
"	O
432143.	O
"	O
</s>
<s>
A	O
disrupted	O
transposition	B-Algorithm
cipher	I-Algorithm
further	O
complicates	O
the	O
transposition	B-Algorithm
pattern	O
with	O
irregular	O
filling	O
of	O
the	O
rows	O
of	O
the	O
matrix	O
,	O
i.e.	O
</s>
<s>
The	O
columns	O
are	O
then	O
taken	O
off	O
as	O
per	O
regular	O
columnar	O
transposition	B-Algorithm
:	O
TPRPN	O
,	O
KISAA	O
,	O
CHAIT	O
,	O
NBERT	O
,	O
EMATO	O
,	O
etc	O
.	O
</s>
<s>
The	O
following	O
example	O
would	O
be	O
a	O
matrix	O
set	O
up	O
for	O
columnar	O
transposition	B-Algorithm
with	O
the	O
columnar	O
key	O
"	O
CRYPTO	O
"	O
and	O
filled	O
with	O
crossed	O
out	O
fields	O
according	O
to	O
the	O
disruption	O
key	O
"	O
SECRET	O
"	O
(	O
marked	O
with	O
an	O
asterisk	O
)	O
,	O
whereafter	O
the	O
message	O
"	O
we	O
are	O
discovered	O
,	O
flee	O
at	O
once	O
"	O
is	O
placed	O
in	O
the	O
leftover	O
spaces	O
.	O
</s>
<s>
The	O
resulting	O
ciphertext	O
(	O
the	O
columns	O
read	O
according	O
to	O
the	O
transposition	B-Algorithm
key	O
)	O
is	O
"	O
WCEEO	O
ERET	O
RIVFC	O
EODN	O
SELE	O
ADA	O
"	O
.	O
</s>
<s>
Another	O
form	O
of	O
transposition	B-Algorithm
cipher	I-Algorithm
uses	O
grilles	O
,	O
or	O
physical	O
masks	O
with	O
cut-outs	O
.	O
</s>
<s>
This	O
can	O
produce	O
a	O
highly	O
irregular	O
transposition	B-Algorithm
over	O
the	O
period	O
specified	O
by	O
the	O
size	O
of	O
the	O
grille	O
,	O
but	O
requires	O
the	O
correspondents	O
to	O
keep	O
a	O
physical	O
key	O
secret	O
.	O
</s>
<s>
Since	O
transposition	B-Algorithm
does	O
not	O
affect	O
the	O
frequency	O
of	O
individual	O
symbols	O
,	O
simple	O
transposition	B-Algorithm
can	O
be	O
easily	O
detected	O
by	O
the	O
cryptanalyst	O
by	O
doing	O
a	O
frequency	O
count	O
.	O
</s>
<s>
If	O
the	O
ciphertext	O
exhibits	O
a	O
frequency	O
distribution	O
very	O
similar	O
to	O
plaintext	O
,	O
it	O
is	O
most	O
likely	O
a	O
transposition	B-Algorithm
.	O
</s>
<s>
In	O
general	O
,	O
transposition	B-Algorithm
methods	O
are	O
vulnerable	O
to	O
anagramming	O
—	O
sliding	O
pieces	O
of	O
ciphertext	O
around	O
,	O
then	O
looking	O
for	O
sections	O
that	O
look	O
like	O
anagrams	O
of	O
words	O
in	O
English	O
or	O
whatever	O
language	O
the	O
plaintext	O
was	O
written	O
in	O
,	O
and	O
solving	O
the	O
anagrams	O
.	O
</s>
<s>
Once	O
such	O
anagrams	O
have	O
been	O
found	O
,	O
they	O
reveal	O
information	O
about	O
the	O
transposition	B-Algorithm
pattern	O
,	O
and	O
can	O
consequently	O
be	O
extended	O
.	O
</s>
<s>
Simpler	O
transpositions	B-Algorithm
often	O
suffer	O
from	O
the	O
property	O
that	O
keys	O
very	O
close	O
to	O
the	O
correct	O
key	O
will	O
reveal	O
long	O
sections	O
of	O
legible	O
plaintext	O
interspersed	O
by	O
gibberish	O
.	O
</s>
<s>
Consequently	O
,	O
such	O
ciphers	O
may	O
be	O
vulnerable	O
to	O
optimum	O
seeking	O
algorithms	O
such	O
as	O
genetic	B-Algorithm
algorithms	I-Algorithm
and	O
hill-climbing	B-Algorithm
algorithms	I-Algorithm
.	O
</s>
<s>
There	O
are	O
several	O
specific	O
methods	O
for	O
attacking	O
messages	O
encoded	O
using	O
a	O
transposition	B-Algorithm
cipher	I-Algorithm
.	O
</s>
<s>
names	O
,	O
places	O
,	O
dates	O
,	O
numbers	O
,	O
phrases	O
)	O
to	O
assist	O
in	O
reverse-engineering	O
the	O
likely	O
order	O
of	O
columns	O
used	O
to	O
carry	O
out	O
the	O
transposition	B-Algorithm
and/or	O
the	O
likely	O
topic	O
of	O
the	O
plaintext	O
.	O
</s>
<s>
Depth	O
attack	O
:	O
If	O
two	O
or	O
more	O
messages	O
of	O
the	O
same	O
length	O
are	O
encoded	O
with	O
the	O
same	O
keys	O
,	O
the	O
messages	O
can	O
be	O
aligned	O
and	O
anagrammed	O
until	O
the	O
messages	O
show	O
meaningful	O
text	O
in	O
the	O
same	O
places	O
,	O
without	O
needing	O
to	O
know	O
the	O
transposition	B-Algorithm
steps	O
that	O
have	O
taken	O
place	O
.	O
</s>
<s>
combinations	O
in	O
a	O
language	O
can	O
be	O
used	O
to	O
inform	O
a	O
scoring	O
function	O
in	O
an	O
algorithm	O
that	O
gradually	O
reverses	O
possible	O
transpositions	B-Algorithm
based	O
on	O
which	O
changes	O
would	O
produce	O
the	O
most	O
likely	O
combinations	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
2-letter	O
pair	O
QU	O
is	O
more	O
common	O
than	O
QT	O
in	O
English	O
text	O
,	O
so	O
a	O
cryptanalyst	O
will	O
attempt	O
transpositions	B-Algorithm
that	O
place	O
QU	O
together	O
.	O
</s>
<s>
A	O
cipher	O
used	O
by	O
the	O
Zodiac	O
Killer	O
,	O
called	O
"	O
Z-340	O
"	O
,	O
organized	O
into	O
triangular	O
sections	O
with	O
substitution	O
of	O
63	O
different	O
symbols	O
for	O
the	O
letters	O
and	O
diagonal	O
"	O
knight	O
move	O
"	O
transposition	B-Algorithm
,	O
remained	O
unsolved	O
for	O
over	O
51	O
years	O
,	O
until	O
an	O
international	O
team	O
of	O
private	O
citizens	O
cracked	O
it	O
on	O
December	O
5	O
,	O
2020	O
,	O
using	O
specialized	O
software	O
.	O
</s>
<s>
Transposition	B-Algorithm
is	O
often	O
combined	O
with	O
other	O
techniques	O
such	O
as	O
evaluation	O
methods	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
simple	O
substitution	O
cipher	O
combined	O
with	O
a	O
columnar	O
transposition	B-Algorithm
avoids	O
the	O
weakness	O
of	O
both	O
.	O
</s>
<s>
Replacing	O
high	O
frequency	O
ciphertext	O
symbols	O
with	O
high	O
frequency	O
plaintext	O
letters	O
does	O
not	O
reveal	O
chunks	O
of	O
plaintext	O
because	O
of	O
the	O
transposition	B-Algorithm
.	O
</s>
<s>
Anagramming	O
the	O
transposition	B-Algorithm
does	O
not	O
work	O
because	O
of	O
the	O
substitution	O
.	O
</s>
<s>
Transposition	B-Algorithm
is	O
particularly	O
effective	O
when	O
employed	O
with	O
fractionation	O
–	O
that	O
is	O
,	O
a	O
preliminary	O
stage	O
that	O
divides	O
each	O
plaintext	O
symbol	O
into	O
two	O
or	O
more	O
ciphertext	O
symbols	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
plaintext	O
alphabet	O
could	O
be	O
written	O
out	O
in	O
a	O
grid	O
,	O
and	O
every	O
letter	O
in	O
the	O
message	O
replaced	O
by	O
its	O
co-ordinates	O
(	O
see	O
Polybius	O
square	O
and	O
Straddling	B-Algorithm
checkerboard	I-Algorithm
)	O
.	O
</s>
<s>
Examples	O
of	O
ciphers	O
that	O
combine	O
fractionation	O
and	O
transposition	B-Algorithm
include	O
the	O
bifid	B-Algorithm
cipher	I-Algorithm
,	O
the	O
trifid	B-Algorithm
cipher	I-Algorithm
,	O
the	O
ADFGVX	B-Algorithm
cipher	I-Algorithm
and	O
the	O
VIC	B-Algorithm
cipher	I-Algorithm
.	O
</s>
<s>
Many	O
modern	O
block	O
ciphers	O
use	O
more	O
complex	O
forms	O
of	O
transposition	B-Algorithm
related	O
to	O
this	O
simple	O
idea	O
.	O
</s>
