So I finally made my Decred address: DsRiCK1HE8NqwLMox9viomaNQBZS4LNDSrf Yeee... cause my name is Rick :3 Here is the stupid python code I wrote for it: Code: import subprocess import os import time FNULL = open(os.devnull, 'w') out = "out.txt" # The address, seed, private key output in out.txt store = "store.txt" # the text file that will store all the generated address details genex = "dcraddrgen.exe" # put the direct path link to the exe if its not in the same directory as the python code req = "Rick" # put your own name in place of 'Rick' (Make it less than 5 chars. should take lesser time mode = "-noseed" # Dave said this will keep your money safe. size = len(req) got = False cnt = 0 f2 = open(store, "a") start_time = time.time() while (got == False): subprocess.call([genex , mode, out], stdout=FNULL, stderr=subprocess.STDOUT) cnt += 1 f1 = open(out, "r") lines = f1.readlines() addr = lines[0][15:] res = addr[:size] got = (res.lower() == req.lower()) print (cnt, res, got) arrLine = '['; for line in lines: if (len(arrLine) > 1): arrLine += ', ' arrLine += "'" + line.splitlines()[0].split(': ')[1] + "'" arrLine += '],\n' f1.close() f2.write(arrLine) if(got == False): os.remove(out) f2.close() print("Total time taken -> %s seconds" % (time.time() - start_time)) I saved it as gen.py Then just run: Updated: *code cleaned up by @walkeralencar *added -noseed argument (for more details on that read the explanation by @davecgh https://forum.decred.org/threads/finally-made-my-decred-address.109/#post-1096 ) Code: #!/bin/bash TEXT=nat COUNTER=0 STAY=1 TMPFILE=vanity while [ $STAY -eq 1 ]; do rm $TMPFILE dcraddrgen -noseed $TMPFILE >/dev/null grep $TEXT $TMPFILE >/dev/null grep Addr $TMPFILE| awk '{print $2}' | xargs grep ^..$TEXT >/dev/null STAY=$? COUNTER=$[$COUNTER+1] echo -ne "\rSearching: $COUNTER" done Bash script to do the same by @Karman , modified by @nat Save it as and run. Warning!! This is just for fun. In reality try to use a unique address per transaction. So don't use a (-noseed) address for receiving the Air Drop, as you wont be able to send the coins till wallet that supports (-noseed) addresses is released.
Thanks for the support man! I am working on a web based address generator for Decred.. will update once its finished.
Good work. That's the problem with developers. They never know how much they are helping by posting small snippets of programming gems. Waiting for more gems on decred forums.
Thanks Rick, Changelog: * improved string operation, removing extra close/open file * added a counter * simplified store file as sigle line json array format; * simplified output, like: Code: (100160, 'DsWdztH2', False) (100161, 'DsXwoLPR', False) (100162, 'DsXK4yfq', False) source code: https://gist.github.com/walkeralencar/7c1eaa5acc7470d5abf5 PS.: yes! i have generated more then 100k dcrs until now, and dont get my choose one.
I would highly recommend using the -noseed argument if you want to generate a vanity address like this so it generates a completely separate key pair as opposed to an HD seed. I say this because without the flag the tool generates the first address for a well known path in a hierarchical deterministic chain based on a seed. Therefore generating a vanity address like this does based upon the HD generated address effectively reduces the number of unknown bits in the seed. That is obviously not ideal because when dealing with HD keychains, your seed is what is used to generate all addresses and their associated private keys that you will use. The net effect is doing this will make it ever so slightly easier to steal your funds.
Who wants also "customized" address and has Linux can try something like: for i in {1..1000}; do dcraddrgen -noseed address.${i}; grep 'Address' address.${i} |sed "s|Address: |${i}: |"; done This will generate 1000 addresses with names "address.1", "address.2" etc. You can change the number of addresses or anything else... And then you cat easily find your string by combination of find command and grep (and maybe some REGEXP) or you can check each address of your own.
I wrote another code, in PHP to save on database, since yesterday, i got 400k wallets, and dont found one with my name
hello, i have crated my first dcr address... but now i want try to use this vanity generator... how i can use this ?? sorry but i used help installed go and mingw32... now how i can generate my vanity address? thanks for all
Quick question. Does creating addresses based on the seed act much like a brain wallet, only with a more secure passphrase?
Yes. The seed is the base of a BIP44 style hierarchical deterministic keychain. Thus, with the seed you can fully recover all of your addresses (and more importantly, their private keys that you need to spend any funds sent to them). That is why it's imperative to keep the seed well secured.
Why does the seed pick actual words and not combine them with numbers as well? Could this potentially be brute forced or no?
The seed is just a really large cryptographically random number (2^256 bits by default). The words are simply a mapping of the value 8 bits at a time according to the PGP word list. In other words, brute forcing the seed words is the same as brute forcing a cryptographically secure random number of the same bit length mapped onto the word list. EDIT: To put that into perspective, for a 128-bit seed, if you assume there are 7 billion people on the planet, every one of them has 10 computers, every one of those computes could test 1 billion seeds per second, and you could brute force the key after an average of half the total possibilities, you'd still need 77x10^24 (77 septillion or 77 trillion trillion) years to crack it through brute force on average.
am I unclear in thinking that this could lead to selling a service for finding a vanity wallet address?