BSV
$81.01
Vol 106.72m
6.39%
BTC
$98524
Vol 103286.38m
3.01%
BCH
$573.63
Vol 1487.53m
0.19%
LTC
$130.75
Vol 2162.31m
0.57%
DOGE
$0.42
Vol 10261.87m
3.57%
Getting your Trinity Audio player ready...

This post was first published on Medium.

nChain
Vanity Address

Previously, we have shown a novel and private way to purchase Bitcoin vanity addresses, using Zero-Knowledge Key-Statement Proof. In practice, it has one drawback: after the buyer verifies the proof in step 7, he can abort the exchange protocol and the seller wastes resources to find an answer but does not get paid.

To overcome this drawback, we conduct the exchange entirely on chain using a smart contract. It only pays out if a private key is provided such as the derived/combined public key/address meets the vanity pattern. Full code is shown below.

 

To compute point addition (Line 16) and multiplication (Line 13) efficiently, we leverage the same technique as before. After we have the combined public key, we validate its corresponding address meets the predefined vanity pattern at Line 19.

Extension

We have only showed how to verify the derived address has certain prefix. But it is straightforward to extend it to have the address or the public key meet any arbitrary requirement.

Watch: CoinGeek New York presentation, Smart Contracts & Computation on Bitcoin

Recommended for you

Microsoft to ship world’s most advanced quantum computer in 2025
Atom Computing and Microsoft achieved the world’s largest logical entangled state to date with 24 logical qubits, built with 80...
December 4, 2024
AMD powers El Capitan; Google tackles quantum errors
El Capitan can crunch 2.79 quadrillion calculations per second, more than the computing power of a million iPhones, but makers...
December 2, 2024
Advertisement
Advertisement
Advertisement