2
$\begingroup$

Do any parallelizable cryptographic hash algorithms that allow for quick—preferably constant-time—recalculation of a hash result upon updating a portion of the data input exist?

I know that BLAKE3 is called "parallelizable", but a Merkle tree doesn't seem like it's what I'm looking for when the time taken to recalculate the final result changes according the input's size. I figured something like an unkeyed XOR MAC would suffice until I read this answer.

$\endgroup$
3
  • 1
    $\begingroup$ Merkle trees are the obvious solution. They're updated in log(total_length) time. A logarithm is close enough to constant in practice. Why doesn't that solve your problem? $\endgroup$ Commented Jul 18, 2023 at 10:56
  • $\begingroup$ Here is an earlier question of mine. Unfortunately there seem to be main theoretical issues with combining input blocks using an algorithm with high performance. My main issue was that Merkle trees may have relatively large overhead. I guess you can tweak the data size that hashed in such a way that the time to hash, while keeping the tree itself relatively small as well. $\endgroup$
    – Maarten Bodewes
    Commented Jul 19, 2023 at 14:27
  • $\begingroup$ @Gilles'SO-stopbeingevil' It would require to store the hash tree if you only want to update part of the input message. Otherwise you'd have to recalculate the entire tree. $\endgroup$
    – Maarten Bodewes
    Commented Jul 19, 2023 at 14:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.