<p>The meaning of the two pipes is explained in <a href="https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki#specification" rel="noreferrer">BIP340</a>:</p>
<blockquote>
<p>|| refers to byte array concatenation.</p>
</blockquote>
<p>The tags for the various tree elements are repeated to amount to 64 bytes. The doubling <a href="https://bitcoin.stackexchange.com/a/108087/5406">allows the first step of the outer SHA256 hash to be pre-computed</a> as sha256 processes the input in 64 byte-chunks.</p>

CC BY-SA 4.0
2023-03-14T01:25:50.577Z
2023-03-14T01:31:15.103Z
2023-03-14T01:31:15.103Z
Murch
<p><code>SHA256(SHA256(tag) || SHA256(tag) || x)</code></p>
<p>What is the <code>||</code> notation? Is this the conjunction of the different elements? Bitwise OR? or modulus?</p>

<hash><taproot><bip>
What is this || notation in BIP 341?
Will Jackson
# What is this || notation in BIP 341?

(Asked by: username_0 on 2023-03-14)

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

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

**Tags:** hash, taproot, bip


---

## 1 answers

### Answer by username_1 on 2023-03-14. Score: 5

The meaning of the two pipes is explained in [BIP340](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki#specification):

> || 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](https://bitcoin.stackexchange.com/a/108087/5406) as sha256 processes the input in 64 byte-chunks.


---

