<s>
In	O
cryptography	O
,	O
XTEA	B-Algorithm
(	O
eXtended	O
TEA	B-Algorithm
)	O
is	O
a	O
block	O
cipher	B-Application
designed	O
to	O
correct	O
weaknesses	O
in	O
TEA	B-Algorithm
.	O
</s>
<s>
The	O
cipher	B-Application
's	O
designers	O
were	O
David	O
Wheeler	O
and	O
Roger	O
Needham	O
of	O
the	O
Cambridge	O
Computer	O
Laboratory	O
,	O
and	O
the	O
algorithm	O
was	O
presented	O
in	O
an	O
unpublished	O
technical	O
report	O
in	O
1997	O
(	O
Needham	O
and	O
Wheeler	O
,	O
1997	O
)	O
.	O
</s>
<s>
Like	O
TEA	B-Algorithm
,	O
XTEA	B-Algorithm
is	O
a	O
64-bit	B-Device
block	O
Feistel	B-Algorithm
cipher	I-Algorithm
with	O
a	O
128-bit	O
key	O
and	O
a	O
suggested	O
64	O
rounds	O
.	O
</s>
<s>
Several	O
differences	O
from	O
TEA	B-Algorithm
are	O
apparent	O
,	O
including	O
a	O
somewhat	O
more	O
complex	O
key-schedule	B-Algorithm
and	O
a	O
rearrangement	O
of	O
the	O
shifts	O
,	O
XORs	B-Application
,	O
and	O
additions	O
.	O
</s>
<s>
This	O
standard	O
C	B-Language
source	O
code	O
,	O
adapted	O
from	O
the	O
reference	O
code	O
released	O
into	O
the	O
public	O
domain	O
by	O
David	O
Wheeler	O
and	O
Roger	O
Needham	O
,	O
encrypts	O
and	O
decrypts	O
using	O
XTEA	B-Algorithm
:	O
</s>
<s>
The	O
reference	O
source	O
code	O
used	O
the	O
unsigned	O
long	O
type	O
rather	O
than	O
the	O
64-bit	B-Device
clean	O
uint32_t	O
.	O
</s>
<s>
The	O
reference	O
source	O
code	O
omitted	O
redundant	O
parentheses	O
,	O
using	O
C	B-Language
precedence	O
to	O
write	O
the	O
round	O
function	O
as	O
e.g.	O
</s>
<s>
The	O
recommended	O
value	O
for	O
the	O
"	O
num_rounds	O
"	O
parameter	O
is	O
32	O
,	O
not	O
64	O
,	O
as	O
each	O
iteration	O
of	O
the	O
loop	O
does	O
two	O
Feistel-cipher	O
rounds	O
.	O
</s>
<s>
presented	O
a	O
related-key	O
differential	O
attack	O
on	O
27	O
out	O
of	O
64	O
rounds	O
of	O
XTEA	B-Algorithm
,	O
requiring	O
220.5	O
chosen	O
plaintexts	O
and	O
a	O
time	O
complexity	O
of	O
2115.15	O
.	O
</s>
<s>
In	O
2009	O
,	O
Lu	O
presented	O
a	O
related-key	O
rectangle	O
attack	O
on	O
36	O
rounds	O
of	O
XTEA	B-Algorithm
,	O
breaking	O
more	O
rounds	O
than	O
any	O
previously	O
published	O
cryptanalytic	O
results	O
for	O
XTEA	B-Algorithm
.	O
</s>
<s>
Presented	O
along	O
with	O
XTEA	B-Algorithm
was	O
a	O
variable-width	O
block	O
cipher	B-Application
termed	O
Block	B-Algorithm
TEA	I-Algorithm
,	O
which	O
uses	O
the	O
XTEA	B-Algorithm
round	O
function	O
,	O
but	O
Block	B-Algorithm
TEA	I-Algorithm
applies	O
it	O
cyclically	O
across	O
an	O
entire	O
message	O
for	O
several	O
iterations	O
.	O
</s>
<s>
Because	O
it	O
operates	O
on	O
the	O
entire	O
message	O
,	O
Block	B-Algorithm
TEA	I-Algorithm
has	O
the	O
property	O
that	O
it	O
does	O
not	O
need	O
a	O
mode	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
.	O
</s>
<s>
An	O
attack	O
on	O
the	O
full	O
Block	B-Algorithm
TEA	I-Algorithm
was	O
described	O
in	O
,	O
which	O
also	O
details	O
a	O
weakness	O
in	O
Block	B-Algorithm
TEA	I-Algorithm
's	O
successor	O
,	O
XXTEA	B-Algorithm
.	O
</s>
