Blake-256

What Is Blake-256?

Blake-256 is a hash algorithm that is utilized in Decred. It was developed by Jean-Philippe Aumasson, Luca Henzen, Willi Meier, and Raphael C.-W. Phan.

The primary objective of Blake-256 was to achieve performance comparable to MD5 on 32-bit processors and SHA-1 on 64-bit processors.

Blake-256 datapath
Blake-256 datapath | Source: Researchgate

Enhanced Security through Stream Cipher Variants

Based on ChaCha, a variant of the Salsa20 stream cipher, Blake-256 features a more significant internal state than Salsa20 (1600 bits vs. 256 bits).

The algorithm processes the message by dividing it into independently hashed blocks, with the last block being padded to reach the full block length.

Each block undergoes an internal compression function operating on a 512-bit internal state (32 rows and 16 columns).

The output of the compression function is XORed with the initial state and then transformed through a linear transformation.

The final state is split into two 512-bit halves, which are XORed together to produce the final hash.

Efficiency and Security in Blake-256 Hashing

The Blake hashing algorithm was one of the five NIST hash function competition finalists.

Blake-256 employs XOR operations with constant values to reduce hash values, enabling more efficient computation on specific architectures.

While this does not compromise security significantly, it enhances the processing speed of the algorithm.

The Blake hashing algorithm constructs two independent hash functions combined to generate a final hash value of 512 bits (64 bytes).

Blake is an iterative hash function that utilizes randomization to enhance security against collisions and preimage attacks while utilizing resources comparable to SHA-2 (though less than MD5).

Key features of Blake-256 include:

  • Security: Blake offers more security than SHA-2 due to its larger internal state (1024 bits versus SHA-2’s 512 bits).
  • Fast hashing: Blake-256 is recognized as one of the fastest cryptographic hash functions available. It outperforms Whirlpool, a leading cryptographic hash function, in terms of speed. The speed aspect is crucial for applications such as password protection.
  • Stream cipher: Blake-256 enables hashing of any data without waiting for all data to be read. This feature is beneficial for applications like file-hashing utilities.