Skip to content

Latest commit

 

History

History
65 lines (37 loc) · 2.08 KB

bip-0045.mediawiki

File metadata and controls

65 lines (37 loc) · 2.08 KB

  BIP: 45
  Title: Hash Locked Transaction
  Author: Noel Tiernan <[email protected]>
  Status: Draft
  Type: Standards Track
  Created: 2014-04-25

Table of Contents

Abstract

This BIP describes a new "standard" transaction type for the Bitcoin scripting system

Motivation

The purpose of hash locked transactions is to allow an output to be locked unless the spender knows the "password".

Hash(x) is included in the sigPubKey and in order to spend the output, x must be provided.

This BIP allows hash locking to be added to any of the standard transactions. This means that an output can be set to require the unlock value and a digital signature.

Specification

A new standard transaction type that is relayed and included in mined blocks is defined:

    OP_HASH160 [20-byte-password-hash] OP_EQUAL_VERIFY {Standard Script}

[20-byte-password-hash] is the hash of the password.

{Standard Script} is any of the standard scripts except P2SH.

Note: {Standard Script} is not serialized

To redeem the script, the spender must provide the password and any signatures required for the standard script.

The sigScript must be of the form:

    ...signatures... [password]

Rationale

This feature allows conditional unlock of outputs. Even if a user has the private key for an output, they still cannot spend the output.

This feature is required for implementing the atomic cross chain transfer method [1]. Spending a coin on the first chain requires x to be broadcast. This allows the 2nd participant to spend the matching coin on the 2nd chain.

When combined with a 3rd party oracle, it can be used to make payouts dependent on real world events. The oracle only provides x, if the event happens.

Backwards Compatibility

This BIP does not change the validation rules for the network, so there is no risk of network split.

Once a sufficient number of network nodes have updated, the new transactions should propagate to miners.

Reference Implementation

TBD

References

[1] https://bitcointalk.org/index.php?topic=193281.0

Copyright

This document is placed in the public domain.