<s>
In	O
cryptography	O
,	O
Twofish	B-Algorithm
is	O
a	O
symmetric	B-Algorithm
key	I-Algorithm
block	O
cipher	O
with	O
a	O
block	O
size	O
of	O
128	O
bits	O
and	O
key	O
sizes	O
up	O
to	O
256	O
bits	O
.	O
</s>
<s>
It	O
was	O
one	O
of	O
the	O
five	O
finalists	O
of	O
the	O
Advanced	B-Algorithm
Encryption	I-Algorithm
Standard	I-Algorithm
contest	O
,	O
but	O
it	O
was	O
not	O
selected	O
for	O
standardization	O
.	O
</s>
<s>
Twofish	B-Algorithm
is	O
related	O
to	O
the	O
earlier	O
block	O
cipher	O
Blowfish	B-Algorithm
.	O
</s>
<s>
Twofish	B-Algorithm
's	O
distinctive	O
features	O
are	O
the	O
use	O
of	O
pre-computed	O
key-dependent	O
S-boxes	B-Algorithm
,	O
and	O
a	O
relatively	O
complex	O
key	B-Algorithm
schedule	I-Algorithm
.	O
</s>
<s>
One	O
half	O
of	O
an	O
n-bit	O
key	O
is	O
used	O
as	O
the	O
actual	O
encryption	O
key	O
and	O
the	O
other	O
half	O
of	O
the	O
n-bit	O
key	O
is	O
used	O
to	O
modify	O
the	O
encryption	O
algorithm	O
(	O
key-dependent	O
S-boxes	B-Algorithm
)	O
.	O
</s>
<s>
Twofish	B-Algorithm
borrows	O
some	O
elements	O
from	O
other	O
designs	O
;	O
for	O
example	O
,	O
the	O
pseudo-Hadamard	B-Algorithm
transform	I-Algorithm
(	O
PHT	O
)	O
from	O
the	O
SAFER	B-Algorithm
family	O
of	O
ciphers	O
.	O
</s>
<s>
Twofish	B-Algorithm
has	O
a	O
Feistel	B-Algorithm
structure	I-Algorithm
like	O
DES	B-Algorithm
.	O
</s>
<s>
Twofish	B-Algorithm
also	O
employs	O
a	O
Maximum	B-General_Concept
Distance	I-General_Concept
Separable	I-General_Concept
matrix	O
.	O
</s>
<s>
When	O
it	O
was	O
introduced	O
in	O
1998	O
,	O
Twofish	B-Algorithm
was	O
slightly	O
slower	O
than	O
Rijndael	B-Algorithm
(	O
the	O
chosen	O
algorithm	O
for	O
Advanced	B-Algorithm
Encryption	I-Algorithm
Standard	I-Algorithm
)	O
for	O
128-bit	O
keys	O
,	O
but	O
somewhat	O
faster	O
for	O
256-bit	O
keys	O
.	O
</s>
<s>
Since	O
2008	O
,	O
virtually	O
all	O
AMD	O
and	O
Intel	O
processors	O
have	O
included	O
hardware	O
acceleration	O
of	O
the	O
Rijndael	B-Algorithm
algorithm	I-Algorithm
via	O
the	O
AES	B-Algorithm
instruction	I-Algorithm
set	I-Algorithm
;	O
Rijndael	B-Algorithm
implementations	O
that	O
use	O
the	O
instruction	O
set	O
are	O
now	O
orders	O
of	O
magnitude	O
faster	O
than	O
(	O
software	O
)	O
Twofish	B-Algorithm
implementations	O
.	O
</s>
<s>
Twofish	B-Algorithm
was	O
designed	O
by	O
Bruce	O
Schneier	O
,	O
John	O
Kelsey	O
,	O
Doug	O
Whiting	O
,	O
David	O
Wagner	O
,	O
Chris	O
Hall	O
,	O
and	O
Niels	O
Ferguson	O
:	O
the	O
"	O
extended	O
Twofish	B-Algorithm
team	O
"	O
met	O
to	O
perform	O
further	O
cryptanalysis	O
of	O
Twofish	B-Algorithm
.	O
</s>
<s>
Other	O
AES	B-Algorithm
contest	O
entrants	O
included	O
Stefan	O
Lucks	O
,	O
Tadayoshi	O
Kohno	O
,	O
and	O
Mike	O
Stay	O
.	O
</s>
<s>
The	O
Twofish	B-Algorithm
cipher	O
has	O
not	O
been	O
patented	O
,	O
and	O
the	O
reference	O
implementation	O
has	O
been	O
placed	O
in	O
the	O
public	O
domain	O
.	O
</s>
<s>
As	O
a	O
result	O
,	O
the	O
Twofish	B-Algorithm
algorithm	O
is	O
free	O
for	O
anyone	O
to	O
use	O
without	O
any	O
restrictions	O
whatsoever	O
.	O
</s>
<s>
However	O
,	O
Twofish	B-Algorithm
has	O
seen	O
less	O
widespread	O
usage	O
than	O
Blowfish	B-Algorithm
,	O
which	O
has	O
been	O
available	O
longer	O
.	O
</s>
<s>
While	O
being	O
designed	O
performance	O
was	O
always	O
an	O
important	O
factor	O
in	O
Twofish	B-Algorithm
.	O
</s>
<s>
Twofish	B-Algorithm
was	O
designed	O
to	O
allow	O
for	O
several	O
layers	O
of	O
performance	O
trade	O
offs	O
,	O
depending	O
on	O
the	O
importance	O
of	O
encryption	O
speed	O
,	O
memory	O
usage	O
,	O
hardware	O
gate	O
count	O
,	O
key	O
setup	O
and	O
other	O
parameters	O
.	O
</s>
<s>
There	O
are	O
multiple	O
space	O
–	O
time	O
tradeoffs	O
that	O
can	O
be	O
made	O
,	O
in	O
software	O
as	O
well	O
as	O
in	O
hardware	O
for	O
Twofish	B-Algorithm
.	O
</s>
<s>
An	O
example	O
of	O
such	O
a	O
tradeoff	O
would	O
be	O
the	O
precomputation	O
of	O
round	O
subkeys	O
or	O
s-boxes	B-Algorithm
,	O
which	O
can	O
lead	O
to	O
speed	O
increases	O
of	O
a	O
factor	O
of	O
two	O
or	O
more	O
.	O
</s>
<s>
These	O
come	O
,	O
however	O
,	O
at	O
the	O
cost	O
of	O
more	O
RAM	B-Architecture
needed	O
to	O
store	O
them	O
.	O
</s>
<s>
The	O
estimates	O
in	O
the	O
table	O
below	O
are	O
all	O
based	O
on	O
existing	O
0.35μm	O
CMOS	B-Device
technology	O
.	O
</s>
<s>
,	O
the	O
best	O
published	O
cryptanalysis	O
of	O
the	O
Twofish	B-Algorithm
block	O
cipher	O
is	O
a	O
truncated	B-General_Concept
differential	I-General_Concept
cryptanalysis	I-General_Concept
of	O
the	O
full	O
16-round	O
version	O
.	O
</s>
<s>
The	O
paper	O
claims	O
that	O
the	O
probability	O
of	O
truncated	B-General_Concept
differentials	I-General_Concept
is	O
2−	O
57.3	O
per	O
block	O
and	O
that	O
it	O
will	O
take	O
roughly	O
251	O
chosen	O
plaintexts	O
(	O
32petabytes	O
worth	O
of	O
data	O
)	O
to	O
find	O
a	O
good	O
pair	O
of	O
truncated	B-General_Concept
differentials	I-General_Concept
.	O
</s>
<s>
Bruce	O
Schneier	O
responded	O
in	O
a	O
2005	O
blog	O
entry	O
that	O
this	O
paper	O
did	O
not	O
present	O
a	O
full	O
cryptanalytic	O
attack	O
,	O
but	O
only	O
some	O
hypothesized	O
differential	O
characteristics	O
:	O
"	O
But	O
even	O
from	O
a	O
theoretical	O
perspective	O
,	O
Twofish	B-Algorithm
is	O
n't	O
even	O
remotely	O
broken	O
.	O
</s>
