<s>
BLAKE	O
is	O
a	O
cryptographic	B-Algorithm
hash	I-Algorithm
function	I-Algorithm
based	O
on	O
Daniel	O
J	O
.	O
Bernstein	O
's	O
ChaCha	O
stream	B-Algorithm
cipher	I-Algorithm
,	O
but	O
a	O
permuted	O
copy	O
of	O
the	O
input	O
block	O
,	O
XORed	O
with	O
round	O
constants	O
,	O
is	O
added	O
before	O
each	O
ChaCha	O
round	O
.	O
</s>
<s>
Like	O
SHA-2	B-Algorithm
,	O
there	O
are	O
two	O
variants	O
differing	O
in	O
the	O
word	O
size	O
.	O
</s>
<s>
BLAKE	O
repeatedly	O
combines	O
an	O
8-word	O
hash	B-Algorithm
value	O
with	O
16	O
message	O
words	O
,	O
truncating	O
the	O
ChaCha	O
result	O
to	O
obtain	O
the	O
next	O
hash	B-Algorithm
value	O
.	O
</s>
<s>
The	O
BLAKE2	B-Algorithm
hash	B-Algorithm
function	I-Algorithm
,	O
based	O
on	O
BLAKE	O
,	O
was	O
announced	O
in	O
2012	O
.	O
</s>
<s>
The	O
BLAKE3	O
hash	B-Algorithm
function	I-Algorithm
,	O
based	O
on	O
BLAKE2	B-Algorithm
,	O
was	O
announced	O
in	O
2020	O
.	O
</s>
<s>
BLAKE	O
was	O
submitted	O
to	O
the	O
NIST	B-Algorithm
hash	I-Algorithm
function	I-Algorithm
competition	I-Algorithm
by	O
Jean-Philippe	O
Aumasson	O
,	O
Luca	O
Henzen	O
,	O
Willi	O
Meier	O
,	O
and	O
Raphael	O
C.-W	O
.	O
Phan	O
.	O
</s>
<s>
BLAKE	O
made	O
it	O
to	O
the	O
final	O
round	O
consisting	O
of	O
five	O
candidates	O
but	O
lost	O
to	O
Keccak	B-Algorithm
in	O
2012	O
,	O
which	O
was	O
selected	O
for	O
the	O
SHA-3	B-Algorithm
algorithm	O
.	O
</s>
<s>
Like	O
SHA-2	B-Algorithm
,	O
BLAKE	O
comes	O
in	O
two	O
variants	O
:	O
one	O
that	O
uses	O
32-bit	O
words	O
,	O
used	O
for	O
computing	O
hashes	B-Algorithm
up	O
to	O
256	O
bits	O
long	O
,	O
and	O
one	O
that	O
uses	O
64-bit	O
words	O
,	O
used	O
for	O
computing	O
hashes	B-Algorithm
up	O
to	O
512	O
bits	O
long	O
.	O
</s>
<s>
The	O
core	O
operation	O
,	O
equivalent	O
to	O
ChaCha	O
's	O
quarter	O
round	O
,	O
operates	O
on	O
a	O
4-word	O
column	O
or	O
diagonal	O
a	O
b	O
c	B-Language
d	O
,	O
which	O
is	O
combined	O
with	O
2	O
words	O
of	O
message	O
m[]	O
and	O
two	O
constant	O
words	O
n[]	O
.	O
</s>
<s>
"	O
BLAKE	O
reuses	O
the	O
permutation	O
of	O
the	O
ChaCha	O
stream	B-Algorithm
cipher	I-Algorithm
with	O
rotations	O
done	O
in	O
the	O
opposite	O
directions	O
.	O
</s>
<s>
Throughout	O
the	O
NIST	B-Algorithm
hash	I-Algorithm
function	I-Algorithm
competition	I-Algorithm
,	O
entrants	O
are	O
permitted	O
to	O
"	O
tweak	O
"	O
their	O
algorithms	O
to	O
address	O
issues	O
that	O
are	O
discovered	O
.	O
</s>
<s>
Hash	B-Algorithm
values	O
of	O
an	O
empty	O
string	O
:	O
</s>
<s>
BLAKE2	B-Algorithm
is	O
a	O
cryptographic	B-Algorithm
hash	I-Algorithm
function	I-Algorithm
based	O
on	O
BLAKE	O
,	O
created	O
by	O
Jean-Philippe	O
Aumasson	O
,	O
Samuel	O
Neves	O
,	O
Zooko	O
Wilcox-O	O
'	O
Hearn	O
,	O
and	O
Christian	O
Winnerlein	O
.	O
</s>
<s>
The	O
design	O
goal	O
was	O
to	O
replace	O
the	O
widely	O
used	O
,	O
but	O
broken	O
,	O
MD5	B-Algorithm
and	O
SHA-1	B-Algorithm
algorithms	O
in	O
applications	O
requiring	O
high	O
performance	O
in	O
software	O
.	O
</s>
<s>
BLAKE2	B-Algorithm
was	O
announced	O
on	O
December	O
21	O
,	O
2012	O
.	O
</s>
<s>
A	O
reference	O
implementation	O
is	O
available	O
under	O
CC0	O
,	O
the	O
OpenSSL	B-Language
License	O
,	O
and	O
the	O
Apache	B-Application
License	I-Application
2.0	O
.	O
</s>
<s>
BLAKE2b	O
is	O
faster	O
than	O
MD5	B-Algorithm
,	O
SHA-1	B-Algorithm
,	O
SHA-2	B-Algorithm
,	O
and	O
SHA-3	B-Algorithm
,	O
on	O
64-bit	O
x86-64	O
and	O
ARM	O
architectures	O
.	O
</s>
<s>
BLAKE2	B-Algorithm
provides	O
better	O
security	O
than	O
SHA-2	B-Algorithm
and	O
similar	O
to	O
that	O
of	O
SHA-3	B-Algorithm
:	O
immunity	O
to	O
length	O
extension	O
,	O
indifferentiability	O
from	O
a	O
random	O
oracle	O
,	O
etc	O
.	O
</s>
<s>
BLAKE2	B-Algorithm
removes	O
addition	O
of	O
constants	O
to	O
message	O
words	O
from	O
BLAKE	O
round	O
function	O
,	O
changes	O
two	O
rotation	O
constants	O
,	O
simplifies	O
padding	O
,	O
adds	O
parameter	O
block	O
that	O
is	O
XOR'ed	O
with	O
initialization	O
vectors	O
,	O
and	O
reduces	O
the	O
number	O
of	O
rounds	O
from	O
16	O
to	O
12	O
for	O
BLAKE2b	O
(	O
successor	O
of	O
BLAKE-512	O
)	O
,	O
and	O
from	O
14	O
to	O
10	O
for	O
BLAKE2s	B-Algorithm
(	O
successor	O
of	O
BLAKE-256	O
)	O
.	O
</s>
<s>
BLAKE2	B-Algorithm
supports	O
keying	O
,	O
salting	O
,	O
personalization	O
,	O
and	O
hash	B-Algorithm
tree	O
modes	O
,	O
and	O
can	O
output	O
digests	O
from	O
1	O
up	O
to	O
64	O
bytes	O
for	O
BLAKE2b	O
,	O
or	O
up	O
to	O
32	O
bytes	O
for	O
BLAKE2s	B-Algorithm
.	O
</s>
<s>
There	O
are	O
also	O
parallel	O
versions	O
designed	O
for	O
increased	O
performance	O
on	O
multi-core	B-Architecture
processors	I-Architecture
;	O
BLAKE2bp	O
(	O
4-way	O
parallel	O
)	O
and	O
BLAKE2sp	O
(	O
8-way	O
parallel	O
)	O
.	O
</s>
<s>
Whereas	O
BLAKE2	B-Algorithm
is	O
limited	O
to	O
64-byte	O
digests	O
,	O
BLAKE2X	O
allows	O
for	O
digests	O
of	O
up	O
to	O
256	O
GiB	O
.	O
</s>
<s>
BLAKE2X	O
is	O
itself	O
not	O
an	O
instance	O
of	O
a	O
hash	B-Algorithm
function	I-Algorithm
,	O
and	O
must	O
be	O
based	O
on	O
an	O
actual	O
BLAKE2	B-Algorithm
instance	O
.	O
</s>
<s>
BLAKE2b	O
and	O
BLAKE2s	B-Algorithm
are	O
specified	O
in	O
RFC	O
7693	O
.	O
</s>
<s>
Optional	O
features	O
using	O
the	O
parameter	O
block	O
(	O
salting	O
,	O
personalized	O
hashes	B-Algorithm
,	O
tree	O
hashing	O
,	O
et	O
cetera	O
)	O
,	O
are	O
not	O
specified	O
,	O
and	O
thus	O
neither	O
is	O
support	O
for	O
BLAKE2bp	O
,	O
BLAKE2sp	O
,	O
or	O
BLAKE2X	O
.	O
</s>
<s>
BLAKE2b	O
uses	O
an	O
initialization	O
vector	O
that	O
is	O
the	O
same	O
as	O
the	O
IV	O
used	O
by	O
SHA-512	B-Algorithm
.	O
</s>
<s>
Pseudocode	B-Language
for	O
the	O
BLAKE2b	O
algorithm	O
.	O
</s>
<s>
The	O
Mix	O
function	O
is	O
called	O
by	O
the	O
Compress	O
function	O
,	O
and	O
mixes	O
two	O
8-byte	O
words	O
from	O
the	O
message	O
into	O
the	O
hash	B-Algorithm
state	O
.	O
</s>
<s>
Hash	B-Algorithm
values	O
of	O
an	O
empty	O
string	O
:	O
</s>
<s>
Noise	O
(	O
cryptographic	O
protocol	O
)	O
,	O
which	O
is	O
used	O
in	O
WhatsApp	B-Application
includes	O
BLAKE2	B-Algorithm
as	O
an	O
option	O
.	O
</s>
<s>
Polkadot	B-Protocol
,	O
a	O
multi-chain	O
blockchain	O
uses	O
BLAKE2b	O
as	O
its	O
hashing	O
algorithm	O
.	O
</s>
<s>
Linux	B-Operating_System
kernel	I-Operating_System
,	O
version	O
5.17	O
replaced	O
SHA-1	B-Algorithm
with	O
BLAKE2s	B-Algorithm
for	O
hashing	O
the	O
entropy	O
pool	O
in	O
the	O
random	O
number	O
generator	O
.	O
</s>
<s>
In	O
addition	O
to	O
the	O
reference	O
implementation	O
,	O
the	O
following	O
cryptography	O
libraries	O
provide	O
implementations	O
of	O
BLAKE2	B-Algorithm
:	O
</s>
<s>
BLAKE3	O
is	O
a	O
cryptographic	B-Algorithm
hash	I-Algorithm
function	I-Algorithm
based	O
on	O
Bao	O
and	O
BLAKE2	B-Algorithm
,	O
created	O
by	O
Jack	O
O'Connor	O
,	O
Jean-Philippe	O
Aumasson	O
,	O
Samuel	O
Neves	O
,	O
and	O
Zooko	O
Wilcox-O	O
'	O
Hearn	O
.	O
</s>
<s>
BLAKE3	O
is	O
a	O
single	O
algorithm	O
with	O
many	O
desirable	O
features	O
(	O
parallelism	O
,	O
XOF	O
,	O
KDF	O
,	O
PRF	O
and	O
MAC	O
)	O
,	O
in	O
contrast	O
to	O
BLAKE	O
and	O
BLAKE2	B-Algorithm
,	O
which	O
are	O
algorithm	O
families	O
with	O
multiple	O
variants	O
.	O
</s>
<s>
The	O
official	O
Rust	B-Application
and	O
C	B-Language
implementations	O
are	O
dual-licensed	B-License
as	O
public	O
domain	O
(	O
CC0	O
)	O
and	O
the	O
Apache	B-Application
License	I-Application
.	O
</s>
<s>
It	O
is	O
consistently	O
a	O
few	O
times	O
faster	O
than	O
BLAKE2	B-Algorithm
.	O
</s>
<s>
The	O
BLAKE3	O
compression	O
function	O
is	O
closely	O
based	O
on	O
that	O
of	O
BLAKE2s	B-Algorithm
,	O
with	O
the	O
biggest	O
difference	O
being	O
that	O
the	O
number	O
of	O
rounds	O
is	O
reduced	O
from	O
10	O
to	O
7	O
,	O
a	O
change	O
based	O
on	O
the	O
assumption	O
that	O
current	O
cryptography	O
is	O
too	O
conservative	O
.	O
</s>
<s>
In	O
addition	O
to	O
providing	O
parallelism	O
,	O
the	O
Merkle	B-Algorithm
tree	I-Algorithm
format	O
also	O
allows	O
for	O
verified	O
streaming	O
(	O
on-the-fly	O
verifying	O
)	O
and	O
incremental	O
updates	O
.	O
</s>
