omar shibli via bitcoin-dev
2017-08-14 06:05:35 UTC
A lot of us familiar with the pay to contract protocol, and how it uses
cleverly the homomorphic property of elliptic curve encryption system to
Unfortunately, there is no standard specification on how to conduct such
transactions in the cyberspace.
We have developed a basic trade finance application that relies on the
original idea described in the Homomorphic Payment Addresses and the
Pay-to-Contract Protocol paper, yet we have generalized it and made it
We would like to share our method, and get your feedback about it,
hopefully this effort will result into a standard for the benefit of the
We define the following levels in BIP32 path.
m / purpose' / coin_type' / contract_id' / *
contract_id is is an arbitrary number within the valid range of indices.
Then we define, contract base as following prefix:
m / purpose' / coin_type' / contract_id'
contract commitment address is computed as follows:
hash document using cryptographic hash function of your choice (e.g. blake2)
map hash to partial derivation path
Convert hash to binary array.
Partition the array into parts, each part length should be 16.
Convert each part to integer in decimal format.
Convert each integer to string.
Join all strings with slash `/`.
compute child public key by chaining the derivation path from step 2 with
master private extended key:
coin type: 0
contract id: 7777777
contract base computation :
contract base public extended key:
Contract sha256 signature:
Contract partial derivation path:
Contract commitment pub key path:
Contract commitment pub key:
Contract commitment address:
You can find the full BIP draft in the following link: