BLAKE2
为密码学hash函数,其运算速度比MD5
、SHA-1
、SHA-2
和SHA-3
都快,而安全性与最新的SHA-3
标准算法相当。
BLAKE2
对应的标准为RFC7693——The BLAKE2 Cryptographic Hash and Message Authentication Code (MAC)
BLAKE2
有两个分支:
BLAKE2b
又可称为BLAKE2
,针对64为操作系统(含支持NEON的ARM处理器)做了算法优化。BLAKE2b
生成的摘要长度在1到64字节之间;BLAKE2s
为针对8~32位操作系统进行了优化,生成的摘要长度在1到32字节之间。
对于多核CPU和支持SIMD的CPU,BLAKE2
提供了两种并行运算实现,分别是支持4-way parallel的BLAKE2bp
和支持8-way parallel的BLAKE2sp
。
BLAKE2 offers these algorithms tuned to your specific requirements, such as keyed hashing (that is, MAC or PRF), hashing with a salt, updatable or incremental tree-hashing, or any combination thereof
各hash函数的性能对比如下:
参考资料: [1] http://blake2.net/ [2] https://tools.ietf.org/html/rfc7693