Skip to content

Blake 2#

BLAKE2 is a cryptographic hash function based on Dan Bernstein's ChaCha stream cipher.

Variant Block State Rounds Output
BLAKE2b 512 b 1024 b 12 variable
BLAKE2s 256 b 512 b 10 variable

TODO: adjust JS library for blake2b

Working Principle#

Blake-2b#

Initialization Vector:

IV0 = 0x6A09E667F3BCC908   //Frac(Sqrt(2))
IV1 = 0xBB67AE8584CAA73B   //Frac(Sqrt(3))
IV2 = 0x3C6EF372FE94F82B   //Frac(Sqrt(5))
IV3 = 0xA54FF53A5F1D36F1   //Frac(Sqrt(7))
IV4 = 0x510E527FADE682D1   //Frac(Sqrt(11))
IV5 = 0x9B05688C2B3E6C1F   //Frac(Sqrt(13))
IV6 = 0x1F83D9ABFB41BD6B   //Frac(Sqrt(17))
IV7 = 0x5BE0CD19137E2179   //Frac(Sqrt(19))

Test Vectors#

BLAKE2b-512("")
 = 786A02F742015903C6C6FD852552D272912F4740E15847618A86E217F71F5419
   D25E1031AFEE585313896444934EB04B903A685B1448B755D56F701AFE9BE2CE

References#