<s>
Pearson	B-Error_Name
hashing	I-Error_Name
is	O
a	O
hash	B-Error_Name
function	I-Error_Name
designed	O
for	O
fast	O
execution	O
on	O
processors	O
with	O
8-bit	O
registers	O
.	O
</s>
<s>
Its	O
implementation	O
requires	O
only	O
a	O
few	O
instructions	O
,	O
plus	O
a	O
256-byte	O
lookup	B-Data_Structure
table	I-Data_Structure
containing	O
a	O
permutation	B-Algorithm
of	O
the	O
values	O
0	O
through	O
255	O
.	O
</s>
<s>
This	O
hash	B-Error_Name
function	I-Error_Name
is	O
a	O
CBC-MAC	B-Algorithm
that	O
uses	O
an	O
8-bit	O
substitution	O
cipher	B-Application
implemented	O
via	O
the	O
substitution	B-Algorithm
table	I-Algorithm
.	O
</s>
<s>
An	O
8-bit	O
cipher	B-Application
has	O
negligible	O
cryptographic	O
security	O
,	O
so	O
the	O
Pearson	O
hash	B-Error_Name
function	I-Error_Name
is	O
not	O
cryptographically	O
strong	O
,	O
but	O
it	O
is	O
useful	O
for	O
implementing	O
hash	B-Algorithm
tables	I-Algorithm
or	O
as	O
a	O
data	B-Algorithm
integrity	I-Algorithm
check	I-Algorithm
code	I-Algorithm
,	O
for	O
which	O
purposes	O
it	O
offers	O
these	O
benefits	O
:	O
</s>
<s>
Given	O
a	O
small	O
,	O
privileged	O
set	O
of	O
inputs	O
(	O
e.g.	O
,	O
reserved	O
words	O
for	O
a	O
compiler	B-Language
)	O
,	O
the	O
permutation	B-Algorithm
table	O
can	O
be	O
adjusted	O
so	O
that	O
those	O
inputs	O
yield	O
distinct	O
hash	B-Error_Name
values	I-Error_Name
,	O
producing	O
what	O
is	O
called	O
a	O
perfect	B-Algorithm
hash	I-Algorithm
function	I-Algorithm
.	O
</s>
<s>
One	O
of	O
its	O
drawbacks	O
when	O
compared	O
with	O
other	O
hashing	B-Error_Name
algorithms	I-Error_Name
designed	O
for	O
8-bit	O
processors	O
is	O
the	O
suggested	O
256	O
byte	O
lookup	B-Data_Structure
table	I-Data_Structure
,	O
which	O
can	O
be	O
prohibitively	O
large	O
for	O
a	O
small	O
microcontroller	B-Architecture
with	O
a	O
program	O
memory	O
size	O
on	O
the	O
order	O
of	O
hundreds	O
of	O
bytes	O
.	O
</s>
<s>
A	O
workaround	O
to	O
this	O
is	O
to	O
use	O
a	O
simple	O
permutation	B-Algorithm
function	O
instead	O
of	O
a	O
table	O
stored	O
in	O
program	O
memory	O
.	O
</s>
<s>
However	O
,	O
using	O
a	O
too	O
simple	O
function	O
,	O
such	O
as	O
T[i]	O
=	O
255-i	O
,	O
partly	O
defeats	O
the	O
usability	O
as	O
a	O
hash	B-Error_Name
function	I-Error_Name
as	O
anagrams	O
will	O
result	O
in	O
the	O
same	O
hash	B-Error_Name
value	I-Error_Name
;	O
using	O
a	O
too	O
complex	O
function	O
,	O
on	O
the	O
other	O
hand	O
,	O
will	O
affect	O
speed	O
negatively	O
.	O
</s>
<s>
Such	O
functions	O
naturally	O
have	O
to	O
be	O
bijective	B-Algorithm
,	O
like	O
their	O
table	O
variants	O
.	O
</s>
<s>
The	O
algorithm	O
can	O
be	O
described	O
by	O
the	O
following	O
pseudocode	B-Language
,	O
which	O
computes	O
the	O
hash	B-Error_Name
of	O
messageC	O
using	O
the	O
permutation	B-Algorithm
tableT	O
:	O
</s>
<s>
The	O
hash	B-Error_Name
variable	O
(	O
)	O
may	O
be	O
initialized	O
differently	O
,	O
e.g.	O
</s>
<s>
to	O
the	O
length	O
of	O
the	O
data	O
(	O
)	O
modulo	O
256	O
;	O
this	O
particular	O
choice	O
is	O
used	O
in	O
the	O
Python	B-Language
implementation	O
example	O
below	O
.	O
</s>
<s>
This	O
may	O
easily	O
be	O
generated	O
by	O
using	O
python	B-Language
's	O
builtin	O
function	O
and	O
using	O
to	O
permutate	O
it	O
:	O
</s>
