<s>
In	O
cryptography	O
,	O
Khufu	B-Algorithm
and	I-Algorithm
Khafre	I-Algorithm
are	O
two	O
block	O
ciphers	O
designed	O
by	O
Ralph	O
Merkle	O
in	O
1989	O
while	O
working	O
at	O
Xerox	O
's	O
Palo	O
Alto	O
Research	O
Center	O
.	O
</s>
<s>
Along	O
with	O
Snefru	B-Algorithm
,	O
a	O
cryptographic	B-Algorithm
hash	I-Algorithm
function	I-Algorithm
,	O
the	O
ciphers	O
were	O
named	O
after	O
the	O
Egyptian	O
Pharaohs	B-Application
Khufu	B-Algorithm
,	O
Khafre	B-Algorithm
and	O
Sneferu	O
.	O
</s>
<s>
Under	O
a	O
voluntary	O
scheme	O
,	O
Xerox	O
submitted	O
Khufu	B-Algorithm
and	I-Algorithm
Khafre	I-Algorithm
to	O
the	O
US	O
National	O
Security	O
Agency	O
(	O
NSA	O
)	O
prior	O
to	O
publication	O
.	O
</s>
<s>
However	O
,	O
a	O
reviewer	O
of	O
the	O
paper	O
passed	O
a	O
copy	O
to	O
John	O
Gilmore	O
,	O
who	O
made	O
it	O
available	O
via	O
the	O
sci.crypt	B-General_Concept
newsgroup	B-Application
.	O
</s>
<s>
Khufu	B-Algorithm
and	I-Algorithm
Khafre	I-Algorithm
were	O
patented	O
by	O
Xerox	O
;	O
the	O
patent	O
was	O
issued	O
on	O
March	O
26	O
,	O
1991	O
.	O
</s>
<s>
Khufu	B-Algorithm
is	O
a	O
64-bit	O
block	O
cipher	O
which	O
,	O
unusually	O
,	O
uses	O
keys	O
of	O
size	O
512	O
bits	O
;	O
block	O
ciphers	O
typically	O
have	O
much	O
smaller	O
keys	O
,	O
rarely	O
exceeding	O
256	O
bits	O
.	O
</s>
<s>
Most	O
of	O
the	O
key	O
material	O
is	O
used	O
to	O
construct	O
the	O
cipher	O
's	O
S-boxes	B-Algorithm
.	O
</s>
<s>
Because	O
the	O
key-setup	O
time	O
is	O
quite	O
time	O
consuming	O
,	O
Khufu	B-Algorithm
is	O
not	O
well	O
suited	O
to	O
situations	O
in	O
which	O
many	O
small	O
messages	O
are	O
handled	O
.	O
</s>
<s>
Khufu	B-Algorithm
is	O
a	O
Feistel	B-Algorithm
cipher	I-Algorithm
with	O
16	O
rounds	O
by	O
default	O
(	O
other	O
multiples	O
of	O
eight	O
between	O
8	O
and	O
64	O
are	O
allowed	O
)	O
.	O
</s>
<s>
Each	O
set	O
of	O
eight	O
rounds	O
is	O
termed	O
an	O
octet	O
;	O
a	O
different	O
S-box	B-Algorithm
is	O
used	O
in	O
each	O
octet	O
.	O
</s>
<s>
In	O
a	O
round	O
,	O
the	O
least	O
significant	O
byte	O
of	O
half	O
of	O
the	O
block	O
is	O
passed	O
into	O
the	O
8×	O
32-bit	O
S-box	B-Algorithm
.	O
</s>
<s>
The	O
S-box	B-Algorithm
output	O
is	O
then	O
combined	O
(	O
using	O
XOR	B-Application
)	O
with	O
the	O
other	O
32-bit	O
half	O
.	O
</s>
<s>
At	O
the	O
start	O
and	O
end	O
of	O
the	O
algorithm	O
,	O
extra	O
key	O
material	O
is	O
XORed	O
with	O
the	O
block	O
(	O
key	B-Algorithm
whitening	I-Algorithm
)	O
.	O
</s>
<s>
Other	O
than	O
this	O
,	O
all	O
the	O
key	O
is	O
contained	O
in	O
the	O
S-boxes	B-Algorithm
.	O
</s>
<s>
There	O
is	O
a	O
differential	O
attack	O
on	O
16	O
rounds	O
of	O
Khufu	B-Algorithm
which	O
can	O
recover	O
the	O
secret	O
key	O
.	O
</s>
<s>
Khufu	B-Algorithm
is	O
also	O
susceptible	O
to	O
an	O
impossible	O
differential	O
attack	O
,	O
which	O
can	O
break	O
up	O
to	O
18	O
rounds	O
of	O
the	O
cipher	O
(	O
Biham	O
et	O
al.	O
,	O
1999	O
)	O
.	O
</s>
<s>
Schneier	O
and	O
Kelsey	O
(	O
1996	O
)	O
categorise	O
Khafre	B-Algorithm
and	O
Khufu	B-Algorithm
as	O
"	O
even	O
incomplete	O
heterogeneous	O
target-heavy	O
Unbalanced	B-Algorithm
Feistel	I-Algorithm
Networks	I-Algorithm
"	O
.	O
</s>
<s>
Khafre	B-Algorithm
is	O
similar	O
to	O
Khufu	B-Algorithm
,	O
but	O
uses	O
a	O
standard	O
set	O
of	O
S-boxes	B-Algorithm
,	O
and	O
does	O
not	O
compute	O
them	O
from	O
the	O
key	O
.	O
</s>
<s>
An	O
advantage	O
is	O
that	O
Khafre	B-Algorithm
can	O
encrypt	O
a	O
small	O
amount	O
of	O
data	O
very	O
rapidly	O
it	O
has	O
good	O
key	O
agility	O
.	O
</s>
<s>
However	O
,	O
Khafre	B-Algorithm
probably	O
requires	O
a	O
greater	O
number	O
of	O
rounds	O
to	O
achieve	O
a	O
similar	O
level	O
of	O
security	O
as	O
Khufu	B-Algorithm
,	O
making	O
it	O
slower	O
at	O
bulk	O
encryption	O
.	O
</s>
<s>
Khafre	B-Algorithm
uses	O
a	O
key	O
whose	O
size	O
is	O
a	O
multiple	O
of	O
64	O
bits	O
.	O
</s>
<s>
Because	O
the	O
S-boxes	B-Algorithm
are	O
not	O
key-dependent	O
,	O
Khafre	B-Algorithm
XORs	B-Application
subkeys	O
every	O
eight	O
rounds	O
.	O
</s>
<s>
Differential	O
cryptanalysis	O
is	O
effective	O
against	O
Khafre	B-Algorithm
:	O
16	O
rounds	O
can	O
be	O
broken	O
using	O
either	O
1500	O
chosen	O
plaintexts	O
or	O
238	O
known	O
plaintexts	O
.	O
</s>
