<p>OP_EVAL is a new opcode (operation code) for the Bitcoin block chain scripting language, proposed in <a href="https://bitcointalk.org/index.php?topic=46538.0">this thread</a>.</p>

<p>What this opcode does is take a binary representation of a script from the data supplied for authorizing use of an output, and add the corresponding script to what is being evaluated.</p>

<p>The goal of this is to create Bitcoin addresses which, to use, require an arbitrary verification scheme, without people sending to that address needing to know what the script is.</p>

<p>The "killer app" for this is for people who don't want to lose all their bitcoins if their computer is compromised. They will use addresses where coins can only be spent if signatures from two different keys stored on separate devices are provided. Again, this is transparent to others sending to this person, they only need to know the address and not the details of his desired script.</p>

CC BY-SA 3.0
2011-10-17T23:32:43.647Z
So to clarify, that scene where Xenia and Ourumov turn a key at the same time to activate the Golden Eye - that is kind of like an OP_EVAL? It's just an additional layer of security?
Alex Waters
CC BY-SA 3.0
2011-10-17T23:33:19.917Z
and, could more than two keys be required?
Alex Waters
CC BY-SA 3.0
2011-10-18T06:04:22.840Z
Yes, this is the kind of application that OP_EVAL enables. But to clarify, even without OP_EVAL, the manufacturer can be instructed to build the Golden Eye so that both Xenia and Ourumov need to turn a key to activate it. With OP_EVAL, the manufacturer can be kept in the dark about what the needed procedure will be - he is only given a hashed version of the procedure.
Meni Rosenfeld
CC BY-SA 3.0
2011-10-18T06:04:35.930Z
And yes, you could use it for a variety of scripts, such as the requiring 3 or more keys. The exact possibilities depend on the capabilities of the rest of the scripting language, but I think you could make it "2 out of 3 keys required", or make the coins spendable only after a given time, etc.
Meni Rosenfeld
CC BY-SA 3.0
2011-10-17T18:35:26.720Z
2011-10-17T18:35:26.720Z
Meni Rosenfeld
<p>I have been hearing a lot lately about "OP_EVAL", what is it? </p>

<p>Gavin has mentioned it here: <a href="http://sourceforge.net/mailarchive/forum.php?thread_name=201110130938.35014.luke%40dashjr.org&amp;forum_name=bitcoin-development" rel="nofollow">http://sourceforge.net/mailarchive/forum.php?thread_name=201110130938.35014.luke%40dashjr.org&amp;forum_name=bitcoin-development</a></p>

<p>AFAIK it's what the military does after an operation...</p>

CC BY-SA 4.0
2023-02-21T19:27:27.820Z
This was allocated a BIP number (BIP 12) and can now be found here https://github.com/bitcoin/bips/blob/master/bip-0012.mediawiki
Michael Folkson
CC BY-SA 3.0
2011-10-19T23:55:09.363Z
**Update:** Gavin has created an [article](https://github.com/gavinandresen/bitcoin-git/wiki/BIP-OP_EVAL) for OP_EVAL on the Github Wiki for the Bitcoin Project which explains it in exhaustive detail.
David Perry
<script><opcodes>
What is op_eval?
Alex Waters
# What is op_eval?

(Asked by: username_0 on 2011-10-17)

I have been hearing a lot lately about "OP\_EVAL", what is it?

Gavin has mentioned it here: <http://sourceforge.net/mailarchive/forum.php?thread_name=201110130938.35014.luke%40dashjr.org&forum_name=bitcoin-development>

AFAIK it's what the military does after an operation...

**Tags:** script, opcodes

> **Comments:**
> **username_2**: **Update:** Gavin has created an [article](https://github.com/gavinandresen/bitcoin-git/wiki/BIP-OP_EVAL) for OP_EVAL on the Github Wiki for the Bitcoin Project which explains it in exhaustive detail.  
> **username_1**: This was allocated a BIP number (BIP 12) and can now be found here https://github.com/bitcoin/bips/blob/master/bip-0012.mediawiki  

---

## 1 answers

### Answer by username_3 on 2011-10-17. Score: 8 | Accepted answer

OP\_EVAL is a new opcode (operation code) for the Bitcoin block chain scripting language, proposed in [this thread](https://bitcointalk.org/index.php?topic=46538.0).

What this opcode does is take a binary representation of a script from the data supplied for authorizing use of an output, and add the corresponding script to what is being evaluated.

The goal of this is to create Bitcoin addresses which, to use, require an arbitrary verification scheme, without people sending to that address needing to know what the script is.

The "killer app" for this is for people who don't want to lose all their bitcoins if their computer is compromised. They will use addresses where coins can only be spent if signatures from two different keys stored on separate devices are provided. Again, this is transparent to others sending to this person, they only need to know the address and not the details of his desired script.

> **Comments:**
> **username_0**: So to clarify, that scene where Xenia and Ourumov turn a key at the same time to activate the Golden Eye - that is kind of like an OP_EVAL? It's just an additional layer of security?  
> **username_0**: and, could more than two keys be required?  
> **username_3**: Yes, this is the kind of application that OP_EVAL enables. But to clarify, even without OP_EVAL, the manufacturer can be instructed to build the Golden Eye so that both Xenia and Ourumov need to turn a key to activate it. With OP_EVAL, the manufacturer can be kept in the dark about what the needed procedure will be - he is only given a hashed version of the procedure.  
> **username_3**: And yes, you could use it for a variety of scripts, such as the requiring 3 or more keys. The exact possibilities depend on the capabilities of the rest of the scripting language, but I think you could make it "2 out of 3 keys required", or make the coins spendable only after a given time, etc.  

---

