Reserved IP Address°C
04-22-2025
BSV
$28.86
Vol 21.82m
-1.01%
BTC
$88226
Vol 35947.08m
0.77%
BCH
$337.6
Vol 172.06m
-0.3%
LTC
$78.56
Vol 344.47m
-0.98%
DOGE
$0.16
Vol 920.38m
-0.17%
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

Apple’s encryption backdoor: A wake-up call for innovation
Apple disabling its e2e encryption highlights a vulnerability—centralized systems are susceptible to pressures that may compel them to compromise privacy.
April 18, 2025
How AI reshapes programming, building applications
Integrating AI probabilistic thinking with blockchain technology transforms coding practices and sparks a major cultural shift.
April 3, 2025
Advertisement
Advertisement
Advertisement