4

SHA256(SHA256(tag) || SHA256(tag) || x)

What is the || notation? Is this the conjunction of the different elements? Bitwise OR? or modulus?

1 Answer 1

5

The meaning of the two pipes is explained in BIP340:

|| refers to byte array concatenation.

The tags for the various tree elements are repeated to amount to 64 bytes. The doubling allows the first step of the outer SHA256 hash to be pre-computed as sha256 processes the input in 64 byte-chunks.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.