<s>
In	O
cryptography	O
,	O
the	O
Tiny	B-Algorithm
Encryption	I-Algorithm
Algorithm	I-Algorithm
(	O
TEA	O
)	O
is	O
a	O
block	O
cipher	O
notable	O
for	O
its	O
simplicity	O
of	O
description	O
and	O
implementation	O
,	O
typically	O
a	O
few	O
lines	O
of	O
code	O
.	O
</s>
<s>
TEA	O
operates	O
on	O
two	O
32-bit	O
unsigned	B-Algorithm
integers	I-Algorithm
(	O
could	O
be	O
derived	O
from	O
a	O
64-bit	O
data	O
block	O
)	O
and	O
uses	O
a	O
128-bit	O
key	O
.	O
</s>
<s>
It	O
has	O
a	O
Feistel	B-Algorithm
structure	I-Algorithm
with	O
a	O
suggested	O
64	O
rounds	O
,	O
typically	O
implemented	O
in	O
pairs	O
termed	O
cycles	O
.	O
</s>
<s>
It	O
has	O
an	O
extremely	O
simple	O
key	B-Algorithm
schedule	I-Algorithm
,	O
mixing	O
all	O
of	O
the	O
key	O
material	O
in	O
exactly	O
the	O
same	O
way	O
for	O
each	O
cycle	O
.	O
</s>
<s>
As	O
a	O
result	O
,	O
TEA	O
is	O
especially	O
bad	O
as	O
a	O
cryptographic	B-Algorithm
hash	I-Algorithm
function	I-Algorithm
.	O
</s>
<s>
This	O
weakness	O
led	O
to	O
a	O
method	O
for	O
hacking	O
Microsoft	O
's	O
Xbox	B-Application
game	O
console	O
,	O
where	O
the	O
cipher	O
was	O
used	O
as	O
a	O
hash	B-Algorithm
function	I-Algorithm
.	O
</s>
<s>
Because	O
of	O
these	O
weaknesses	O
,	O
the	O
XTEA	B-Algorithm
cipher	O
was	O
designed	O
.	O
</s>
<s>
Block	B-Algorithm
TEA	I-Algorithm
(	O
which	O
was	O
specified	O
along	O
with	O
XTEA	B-Algorithm
)	O
operates	O
on	O
arbitrary-size	O
blocks	O
in	O
place	O
of	O
the	O
64-bit	O
blocks	O
of	O
the	O
original	O
.	O
</s>
<s>
A	O
third	O
version	O
(	O
XXTEA	B-Algorithm
)	O
,	O
published	O
in	O
1998	O
,	O
described	O
further	O
improvements	O
for	O
enhancing	O
the	O
security	O
of	O
the	O
Block	B-Algorithm
TEA	I-Algorithm
algorithm	O
.	O
</s>
<s>
Following	O
is	O
an	O
adaptation	O
of	O
the	O
reference	O
encryption	O
and	O
decryption	O
routines	O
in	O
C	B-Language
,	O
released	O
into	O
the	O
public	O
domain	O
by	O
David	O
Wheeler	O
and	O
Roger	O
Needham	O
:	O
</s>
