<s>
In	O
cryptography	O
,	O
a	O
sponge	B-Algorithm
function	I-Algorithm
or	O
sponge	B-Algorithm
construction	I-Algorithm
is	O
any	O
of	O
a	O
class	O
of	O
algorithms	O
with	O
finite	O
internal	B-Application
state	I-Application
that	O
take	O
an	O
input	O
bit	O
stream	O
of	O
any	O
length	O
and	O
produce	O
an	O
output	O
bit	O
stream	O
of	O
any	O
desired	O
length	O
.	O
</s>
<s>
Sponge	B-Algorithm
functions	I-Algorithm
have	O
both	O
theoretical	O
and	O
practical	O
uses	O
.	O
</s>
<s>
They	O
can	O
be	O
used	O
to	O
model	O
or	O
implement	O
many	O
cryptographic	O
primitives	O
,	O
including	O
cryptographic	B-Algorithm
hashes	I-Algorithm
,	O
message	B-Algorithm
authentication	I-Algorithm
codes	I-Algorithm
,	O
mask	O
generation	O
functions	O
,	O
stream	B-Algorithm
ciphers	I-Algorithm
,	O
pseudo-random	B-Algorithm
number	I-Algorithm
generators	I-Algorithm
,	O
and	O
authenticated	B-Algorithm
encryption	I-Algorithm
.	O
</s>
<s>
A	O
sponge	B-Algorithm
function	I-Algorithm
is	O
built	O
from	O
three	O
components	O
:	O
</s>
<s>
f	O
produces	O
a	O
pseudorandom	B-Error_Name
permutation	B-Algorithm
of	O
the	O
states	O
from	O
S	O
.	O
</s>
<s>
The	O
sponge	B-Algorithm
function	I-Algorithm
"	O
absorbs	O
"	O
(	O
in	O
the	O
sponge	O
metaphor	O
)	O
all	O
blocks	O
of	O
a	O
padded	O
input	O
string	O
as	O
follows	O
:	O
</s>
<s>
The	O
sponge	B-Algorithm
function	I-Algorithm
output	O
is	O
now	O
ready	O
to	O
be	O
produced	O
(	O
"	O
squeezed	O
out	O
"	O
)	O
as	O
follows	O
:	O
</s>
<s>
The	O
extent	O
to	O
which	O
C	O
is	O
altered	O
by	O
the	O
input	O
depends	O
entirely	O
on	O
the	O
transformation	O
function	O
f	O
.	O
In	O
hash	B-Algorithm
applications	O
,	O
resistance	O
to	O
collision	B-Algorithm
or	O
preimage	O
attacks	O
depends	O
on	O
C	O
,	O
and	O
its	O
size	O
(	O
the	O
"	O
capacity	O
"	O
c	O
)	O
is	O
typically	O
twice	O
the	O
desired	O
resistance	O
level	O
.	O
</s>
<s>
It	O
can	O
be	O
the	O
basis	O
of	O
a	O
single	O
pass	O
authenticated	B-Algorithm
encryption	I-Algorithm
system	O
.	O
</s>
<s>
Sponge	B-Algorithm
functions	I-Algorithm
have	O
both	O
theoretical	O
and	O
practical	O
uses	O
.	O
</s>
<s>
In	O
theoretical	O
cryptanalysis	O
,	O
a	O
random	O
sponge	B-Algorithm
function	I-Algorithm
is	O
a	O
sponge	B-Algorithm
construction	I-Algorithm
where	O
f	O
is	O
a	O
random	O
permutation	B-Algorithm
or	O
transformation	O
,	O
as	O
appropriate	O
.	O
</s>
<s>
Random	O
sponge	B-Algorithm
functions	I-Algorithm
capture	O
more	O
of	O
the	O
practical	O
limitations	O
of	O
cryptographic	O
primitives	O
than	O
does	O
the	O
widely	O
used	O
random	B-Application
oracle	I-Application
model	I-Application
,	O
in	O
particular	O
the	O
finite	O
internal	B-Application
state	I-Application
.	O
</s>
<s>
The	O
sponge	B-Algorithm
construction	I-Algorithm
can	O
also	O
be	O
used	O
to	O
build	O
practical	O
cryptographic	O
primitives	O
.	O
</s>
<s>
For	O
example	O
,	O
Keccak	B-Algorithm
cryptographic	B-Algorithm
sponge	I-Algorithm
with	O
a	O
1600-bit	O
state	O
has	O
been	O
selected	O
by	O
NIST	O
as	O
the	O
winner	O
in	O
the	O
SHA-3	B-Algorithm
competition	I-Algorithm
.	O
</s>
<s>
The	O
strength	O
of	O
Keccak	B-Algorithm
derives	O
from	O
the	O
intricate	O
,	O
multi-round	O
permutation	B-Algorithm
f	O
that	O
its	O
authors	O
developed	O
.	O
</s>
<s>
The	O
RC4-redesign	O
called	O
Spritz	O
refers	O
to	O
the	O
sponge-construct	O
to	O
define	O
the	O
algorithm	O
.	O
</s>
<s>
For	O
other	O
examples	O
,	O
a	O
sponge	B-Algorithm
function	I-Algorithm
can	O
be	O
used	O
to	O
build	O
authenticated	B-Algorithm
encryption	I-Algorithm
with	O
associated	O
data	O
(	O
AEAD	O
)	O
,	O
as	O
well	O
as	O
a	O
password	O
hashing	O
schemes	O
.	O
</s>
