<p>Yes. The earliest use of <code>OP_SHA1</code> on mainnet is in output script of tx <a href="https://www.blockchain.com/btc/tx/5342c96b946ea2c5e497de5dbf7762021f94aba2c8222c17ed28492fdbb4a6d9" rel="nofollow noreferrer">5342c96b946ea2c5e497de5dbf7762021f94aba2c8222c17ed28492fdbb4a6d9</a>:</p>

<p><code>SIZE DUP 1 GREATERTHAN VERIFY NEGATE HASH256 HASH160 SHA256 SHA1 RIPEMD160 EQUAL</code></p>

CC BY-SA 4.0
2018-10-10T06:43:54.317Z
2018-10-10T06:43:54.317Z
Andreas Blaesus
<p>SHA1 was never commonly used in Bitcoin, but it there is at least one notable use of it, a P2SH script created by Peter Todd to allow anyone to pay to an address that could be spent by anyone <a href="https://bitcointalk.org/index.php?topic=293382.0" rel="noreferrer">proving they had found a SHA1 collision</a>.  This bounty was claimed using the <a href="https://security.googleblog.com/2017/02/announcing-first-sha1-collision.html" rel="noreferrer">published results</a> of several security researchers who generated such a collision.  Additional bounties remain open for other hash functions supported by Bitcoin: SHA256, RIPEMD160, SHA256d, and RIPEMD(SHA256()).</p>

<p>There may be other users of OP_SHA1.  Because of the way P2SH works (as well as segwit witness script hashes), we can't see what opcodes people have paid to until they've spent from those scripts, so we can't be sure whether or not any particular opcode is currently in use.</p>

<p>Outside of the Bitcoin Protocol, software commonly used in relationship to Bitcoin (such as Git and BitTorrent) continue to use SHA1.  Some projects (such as Bitcoin Core) have taken steps to protect their work with more secure hash functions in situations vulnerable to hash collisions.</p>

CC BY-SA 4.0
2018-05-14T12:08:19.350Z
Thanks, very interesting, I was not aware of the existance of these bounties!
cpsola
CC BY-SA 4.0
2018-05-14T11:11:43.793Z
2018-05-14T11:11:43.793Z
David A. Harding
<p>The Bitcoin scripting language has <a href="https://en.bitcoin.it/wiki/Script#Crypto" rel="noreferrer">OP_SHA1</a> as one of its opcodes. However, I'm not able to find any usage of this opcode (it is not used in any standard scripts nor in any other procedures such as block hashing). So my question is: is sha-1 used anywhere in Bitcoin? </p>

<script>
Is sha-1 used in Bitcoin?
cpsola
# Is sha-1 used in Bitcoin?

(Asked by: username_0 on 2018-05-14)

The Bitcoin scripting language has [OP\_SHA1](https://en.bitcoin.it/wiki/Script#Crypto) as one of its opcodes. However, I'm not able to find any usage of this opcode (it is not used in any standard scripts nor in any other procedures such as block hashing). So my question is: is sha-1 used anywhere in Bitcoin?

**Tags:** script


---

## 2 answers

### Answer by username_2 on 2018-05-14. Score: 17 | Accepted answer

SHA1 was never commonly used in Bitcoin, but it there is at least one notable use of it, a P2SH script created by Peter Todd to allow anyone to pay to an address that could be spent by anyone [proving they had found a SHA1 collision](https://bitcointalk.org/index.php?topic=293382.0). This bounty was claimed using the [published results](https://security.googleblog.com/2017/02/announcing-first-sha1-collision.html) of several security researchers who generated such a collision. Additional bounties remain open for other hash functions supported by Bitcoin: SHA256, RIPEMD160, SHA256d, and RIPEMD(SHA256()).

There may be other users of OP\_SHA1. Because of the way P2SH works (as well as segwit witness script hashes), we can't see what opcodes people have paid to until they've spent from those scripts, so we can't be sure whether or not any particular opcode is currently in use.

Outside of the Bitcoin Protocol, software commonly used in relationship to Bitcoin (such as Git and BitTorrent) continue to use SHA1. Some projects (such as Bitcoin Core) have taken steps to protect their work with more secure hash functions in situations vulnerable to hash collisions.

> **Comments:**
> **username_0**: Thanks, very interesting, I was not aware of the existance of these bounties!  

---

### Answer by username_1 on 2018-10-10. Score: 0

Yes. The earliest use of `OP_SHA1` on mainnet is in output script of tx [5342c96b946ea2c5e497de5dbf7762021f94aba2c8222c17ed28492fdbb4a6d9](https://www.blockchain.com/btc/tx/5342c96b946ea2c5e497de5dbf7762021f94aba2c8222c17ed28492fdbb4a6d9):

`SIZE DUP 1 GREATERTHAN VERIFY NEGATE HASH256 HASH160 SHA256 SHA1 RIPEMD160 EQUAL`


---

