Posted by omar shibli
Aug 14, 2017/06:05 UTC
The pay-to-contract protocol uses the homomorphic property of elliptic curve encryption system, but there is no standard specification on how to conduct such transactions in cyberspace. To address this issue, a basic trade finance application has been developed that relies on the original idea described in the Homomorphic Payment Addresses and the Pay-to-Contract Protocol paper. The method has been generalized and made BIP43 compliant. The authors hope to share their method and receive feedback from the community in order to establish a standard. The BIP32 path is defined with several levels including the contract_id, which is an arbitrary number within the valid range of indices. The contract base is then defined as the following prefix: m / purpose' / coin_type' / contract_id'. The contract commitment address is computed by hashing the document using a cryptographic hash function of your choice and mapping it to a partial derivation path. The hash is then partitioned into parts, each part length should be 16 and converted to an integer in decimal format. Each integer is then converted to a string and joined with a slash '/'. The child public key is computed by chaining the derivation path with the contract base and the address is computed.An example of the process is provided using a master private extended key, coin type of 0 and contract id of 7777777. The contract content is 'foo', and the contract sha256 signature is included. The contract commitment pub key path is defined as m/999'/0'/7777777'/11302/46187/26879/50831/63899/17724/7472/16692/4930/11632/25731/49056/63882/24200/25190/59310. The full BIP draft can be found on GitHub.
TLDR
We’ll email you summaries of the latest discussions from authoritative bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.
We'd love to hear your feedback on this project?
Give Feedback