跳到主要内容
uencoder

Parallel 和 Tree Hashing Reference

Reference 为 parallelizable hash constructions including BLAKE3, KangarooTwelve, 和 ParallelHash.

Parallelization Strategies

Tree hashing splits input into chunks, hashes each independently, then combines results in a tree structure. This enables multi-core parallelism and incremental updates. BLAKE3 uses a binary Merkle tree of chunk hashes with a compression function. KangarooTwelve extends Keccak with a tree of sponge calls for parallelism. NIST ParallelHash (SP 800-185) provides a standardized parallel SHA-3 variant.

tree hashing
Independent chunks combined
multi-core
BLAKE3
Binary tree of chunks
linear speedup
KangarooTwelve
Keccak-based tree
XOF

Performance and Tradeoffs

Parallel hashes achieve near-linear speedup with core count for large inputs. For small inputs, the tree overhead makes them slower than sequential hashes. Incremental hashing allows updating a portion of input without rehashing everything. The tree structure also enables proof-of-inclusion for individual chunks. Memory bandwidth often becomes the bottleneck beyond a certain core count.

large input
Near-linear speedup
multi-core
small input
Tree overhead, slower
use sequential
incremental
Update without full rehash
edit large files

相关工具

参考链接