I want a vanity address for ADA. A vanity address is one with your name in it, or a meaningful word, or some pattern. You can find them by “trawling” potential wallets and generating the first address, checking for pattern, repeat. People do this with BitCoin https://en.bitcoin.it/wiki/Vanitygen
I have written one using the rust bucket code found here: https://github.com/input-output-hk/rust-cardano
Below is the output from my program, as you can see it is searching for a bunch of patterns and finds one quite quickly.
However, my vanity requirement is much more precise and therefore would require the searching of many more wallets. The problem can be seen below - I have put microsecond timings next to the slowest function. The function which takes the entropy + password is very slow, it takes about half a second to create the private key (after that things are pretty quick)
Now I do understand that things can be improved with faster hardware, but if you look at the BitCoin link, they are talking about millions of keys a second. Clearly there is a fundamental difference, either in the BitCoin algorithm that maps entropy to private key is different, or I am doing something different (wrong).
I could generate a private key and account, then work through all (2^31?) addresses, but I believe you are not supposed to leave gaps, and typically HD wallets will stop at 20 unused addresses, so really I should only be checking the first address; similarly with accounts, I should only check account 0.
re: speed. On the positive side, BitCoin vanity addresses need a pattern and location; people want the pattern to appear after the initial ‘1’ that prefixes all BitCoin addresses. ADA addresses on the other hand start with a long string constant, that means the location in the string does not matter because your pattern cannot be at the start, therefore I am not looking for the pattern at any particular location, that means the search should be much faster.
I would like to know if the Cardano master private key derivation function is different to BitCoin, and if so why? Or am I doing this wrong? Can anyone think of a way to make it faster?
I really need a vanity address, since I found out about them yesterday, I feel my life is incomplete without one.
smith-mac-laptop$ ./a.out 12 "password" "aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm nnn ooo ppp qqq rrr sss ttt uuu" Searching for a 12 word mnemonic, password (password) having address m/44'/1815'/0'/0/0 containing: Patterns 0) aaa 1) bbb 2) ccc 3) ddd 4) eee 5) fff 6) ggg 7) hhh 8) iii 9) jjj 10) kkk 11) lll 12) mmm 13) nnn 14) ooo 15) ppp 16) qqq 17) rrr 18) sss 19) ttt 20) uuu Initial entropy: 226 113 224 173 17 114 172 105 105 222 197 180 152 80 190 200 Iteration 0: Replace position 12 with 85 Mnemonic: tiny monitor clip carry client cruise polar suffer region clever cook mushroom cardano_wallet_new took 433772 cardano_account_create took 857 cardano_account_generate_addresses took 2914 address generated: Ae2tdPwUPEZGsFtu5D3GgN2dwkWky1mNEUxEKXnJi7dZ7t3jFbfMrP7uCiQ Iteration 1: Replace position 1 with 83 Mnemonic: tip business clip carry client cruise polar suffer region clever cook move cardano_wallet_new took 419708 cardano_account_create took 662 cardano_account_generate_addresses took 2429 address generated: Ae2tdPwUPEZ2npHb2eTYVyMii2yY9Yn28oM51zFQU6obBvxDuQdnnfnMfj9 Iteration 2: Replace position 4 with 48 Mnemonic: tip business clip movie client cruise polar suffer region clever cook multiply cardano_wallet_new took 419796 cardano_account_create took 635 cardano_account_generate_addresses took 2625 address generated: Ae2tdPwUPEZDHeDhFZCxMTfFz9XJoQfbnPvCDDgxNypL9vXL9MyThcJNZPY Iteration 3: Replace position 7 with 9f Mnemonic: tip business clip movie client exile polar suffer region clever cook museum cardano_wallet_new took 425972 cardano_account_create took 626 cardano_account_generate_addresses took 2498 address generated: Ae2tdPwUPEZ71jMybBi7GWayX9ZB4AJUd16bJSiBmwRU5YV96BZZZRs9CbA Iteration 4: Replace position 2 with e2 Mnemonic: tip business prize movie client exile polar suffer region clever cook music cardano_wallet_new took 425088 cardano_account_create took 625 cardano_account_generate_addresses took 2623 address generated: Ae2tdPwUPEZL8WcEUtVDqrLjmufubMmQGPNh4jYApZHyoLPNaSmmmPkfNxJ Matching pattern is mmm Address is valid: YES WORDS: tip business prize movie client exile polar suffer region clever cook music smith-mac-laptop$ smith-mac-laptop$ #check it smith-mac-laptop$ ./cardano-cli wallet recover --mnemonics-length 12 TEST *enter your mnemonics* *Enter the wallet recovery password (if the password is wrong, you won't know).* recovery password: : *Set a wallet password. This is for local usage only, allows you to protect your cached private key and prevent from creating non desired transactions.* spending password: confirm spending password: wallet `TEST' successfully recovered. smith-mac-laptop$ ./cardano-cli wallet address TEST 0 0 *Enter the wallet password.* wallet password: : Ae2tdPwUPEZL8WcEUtVDqrLjmufubMmQGPNh4jYApZHyoLPNaSmmmPkfNxJ