<p><code>OP_MUL</code> and <code>OP_DIV</code> were removed by Satoshi Nakamoto in commit <a href="https://github.com/bitcoin/bitcoin/commit/4bd188c4383d6e614e18f79dc337fbabe8464c82" rel="noreferrer"><code>4bd188c4383d6e614e18f79dc337fbabe8464c82</code></a>. As with most changes in early days of the development, little rationale was explicitly given by Satoshi Nakamoto for this change.</p>
<p>In light of the recent shortcomings with the Script interpreter (the <a href="https://bitcoin.stackexchange.com/q/38037/101498"><code>1 RETURN</code> bug</a> was fixed <a href="https://github.com/bitcoin/bitcoin/commit/6ff5f718b6a67797b2b3bab8905d607ad216ee21" rel="noreferrer">only 10 commits (and 15 days) before</a> this change for instance and there is <a href="https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_Exposures" rel="noreferrer">more</a>), it is often assumed Satoshi Nakamoto disabled some of the opcodes out of precaution. <code>OP_MUL</code> and <code>OP_DIV</code> were some of them.</p>
<p>I'm not aware of any exploitable bugs using <code>OP_MUL</code> and <code>OP_DIV</code> at the time, but the implementation of <code>OP_LSHIFT</code> (disabled in the same batch) for instance <a href="https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_Exposures#CVE-2010-5137" rel="noreferrer">could be remotely exploited to crash a node</a>.</p>

CC BY-SA 4.0
2023-09-26T16:47:15.667Z
2023-09-26T17:19:27.830Z
2023-09-26T17:19:27.830Z
Antoine Poinsot
<p>What is the reason why <code>OP_MUL</code> and <code>OP_DIV</code> operators were removed from Bitcoin? Is this because someone could maliciously create a script that multiplies large numbers and thus blows the stack, or is there another reason (some network attack has already happened using these operators so they were thrown out)?</p>

<script><attack><history><opcodes>
Why are OP_MUL and OP_DIV disabled in Bitcoin?
dassd
# Why are OP_MUL and OP_DIV disabled in Bitcoin?

(Asked by: username_0 on 2023-09-25)

What is the reason why `OP_MUL` and `OP_DIV` operators were removed from Bitcoin? Is this because someone could maliciously create a script that multiplies large numbers and thus blows the stack, or is there another reason (some network attack has already happened using these operators so they were thrown out)?

**Tags:** script, attack, history, opcodes


---

## 1 answers

### Answer by username_1 on 2023-09-26. Score: 8 | Accepted answer

`OP_MUL` and `OP_DIV` were removed by Satoshi Nakamoto in commit [`4bd188c4383d6e614e18f79dc337fbabe8464c82`](https://github.com/bitcoin/bitcoin/commit/4bd188c4383d6e614e18f79dc337fbabe8464c82). As with most changes in early days of the development, little rationale was explicitly given by Satoshi Nakamoto for this change.

In light of the recent shortcomings with the Script interpreter (the [`1 RETURN` bug](https://bitcoin.stackexchange.com/q/38037/101498) was fixed [only 10 commits (and 15 days) before](https://github.com/bitcoin/bitcoin/commit/6ff5f718b6a67797b2b3bab8905d607ad216ee21) this change for instance and there is [more](https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_Exposures)), it is often assumed Satoshi Nakamoto disabled some of the opcodes out of precaution. `OP_MUL` and `OP_DIV` were some of them.

I'm not aware of any exploitable bugs using `OP_MUL` and `OP_DIV` at the time, but the implementation of `OP_LSHIFT` (disabled in the same batch) for instance [could be remotely exploited to crash a node](https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_Exposures#CVE-2010-5137).


---

