Software Personalize Your Address With Vanitygen

Discussion in 'Technical Development' started by Aniara, Jan 18, 2016.

  1. 2017/12/15 - Decred v1.1.2 released! → Release Notes  → Downloads
  1. Aniara

    Aniara Jr. Member

    Jan 9, 2016
    47
    33
    Female
    Etiennien
    I just made an address with vanitygen, I don't know if Decred will allow normal QT importprivkey, but if it does, this is a way of making your own. :) (Let me know if it doesn't)

    Address: DECREDnqjZE8deYtsYfRZF1cRJvdfrGqGc
    Privkey:

    C:\VanityGen>vanitygen64.exe -v -X 30 DECRED

    On 64 bit windows. You can use the OpenCL version with any modern AMD Radeon card too for faster results (5xxx,6xxx,7xxx, 270,280,290x etc).
     
    highlonesome likes this.
  2. shoshin

    shoshin Member

    Dec 28, 2015
    86
    94
    Male
    I don't think that vanitygen will generate a valid Decred address... A valid Decred address will start with "Ds". If you want to generate some I would send a ping to @davecgh he seems to have a working vanity generator for Decred. For now don't try to use that address for anything important.
     
    ClokworkGremlin and Aniara like this.
  3. Aniara

    Aniara Jr. Member

    Jan 9, 2016
    47
    33
    Female
    Etiennien
    So the prefix for Decred is Ds, hm I didn't think of that. Thanks for telling me! It was worth a shot.
     
  4. shoshin

    shoshin Member

    Dec 28, 2015
    86
    94
    Male
    Yes but simply adding that prefix will not make a valid address...
     
  5. ClokworkGremlin

    ClokworkGremlin Sr. Member

    Jan 10, 2016
    535
    381
    Male
    Whatever I want.
    Worst case: it's taken as valid but does not correspond to the expected private key. Always test your key generation.
     
  6. Aniara

    Aniara Jr. Member

    Jan 9, 2016
    47
    33
    Female
    Etiennien
    #6 Aniara, Jan 18, 2016
    Last edited: Jan 18, 2016
    I could try Ds as a vanity prefix. That should work, I think. Or could it... o_O

    Edit: Ds isn't possible with -X 30, but with -X 31 I managed to get DsAni and DsAniara is going to take 3-6 hours on my GPU rig.
     
  7. davecgh

    davecgh Hero Member
    Developer Organizer

    Dec 31, 2015
    642
    788
    Male
    United States
    No, it won't work with just a Ds prefix. Decred addresses use blake256 for the checksum algorithm versus sha256 used in Bitcoin. Even if you find an address that starts with Ds with vanitygen, it would fail to validate in any Decred context.
     
    tacotime, 418Sec and ClokworkGremlin like this.
  8. Karman

    Karman New Member

    Dec 28, 2015
    18
    5
    Male
    Sr. System Administrator
    Spain
  9. Aniara

    Aniara Jr. Member

    Jan 9, 2016
    47
    33
    Female
    Etiennien
    That sounds a little too much random and time consuming, considering the number of outcomes the result has.

    I guess we can close this thread until further notice or discoveries of a generator that uses Blake256 the way the Decred address does.
     
  10. ClokworkGremlin

    ClokworkGremlin Sr. Member

    Jan 10, 2016
    535
    381
    Male
    Whatever I want.
    It's all Vanitygen does for Bitcoin addresses: generates random addresses until it finds one that matches the given criteria. A lot like how mining works too, actually.(this is why, for example, case-insensitive addresses are faster to generate.)

    Vanitygen just has the luxury of running the address generation algorithm without the overhead of starting and stopping an executable file, and has a version which is able to run the algorithm in massive parallel on the GPU, which is likely to happen sooner or later for Decred as well. Actually, this thread would be a decent place to pitch and plan such a project.
     
    Aniara likes this.
  11. Aniara

    Aniara Jr. Member

    Jan 9, 2016
    47
    33
    Female
    Etiennien
    I guess you only need to find the pattern you want in the randomness.

    It could be a fork of vanitygen, of which oclvanitygen is best since it runs on AMD's GPUs (OpenCL) and is many times faster. I have not seen a CUDA version as of yet.

    I guess the new generator could be called "VanDecredGenerator" (trying to imitate Van Den Graaf generator name a little here)

    PS. Don't mind me half of the time, I'm just ranting and throwing ideas out there... and here. :oops:
     
  12. ClokworkGremlin

    ClokworkGremlin Sr. Member

    Jan 10, 2016
    535
    381
    Male
    Whatever I want.
    Basically, yes.
    If vanitygen is written correctly, it should be as simple as replacing the code that generates the hashes with code for Decred hashes. You might be able to alter the generated OCL source files directly. All of my OCL work has been very primitive experimental.

    Also, OCL and CUDA are more or less the same thing, just CUDA is nVidia-only and OCL is platform-independent. I think CUDA runs slightly faster on nVidia cards than OCL does, but there's typically no reason to make a CUDA version of something if you already have an OCL implementation.
     
  13. Aniara

    Aniara Jr. Member

    Jan 9, 2016
    47
    33
    Female
    Etiennien
    Yes the CUDA cores and the way you run the 32-bit integer right rotate operation, goes faster with CUDA than OpenCL on Geforce cards. (GTX 500, 600, 700s) Since this operation can be implemented as a single hardware instruction on AMD GPUs (BIT_ALIGN_INT), but requires three separate hardware instructions to be emulated on Nvidia GPUs (2 shifts + 1 add). This alone used to give AMD another 1.7x performance advantage (~1900 instructions instead of ~3250 to execute the SHA-256 compression function). The GTX 900-series cards are faster than the previous generations, I guess. With the new Maxwell arch core. Funny enough you get a whooping 256 CUDA cores on a X1 SoC today, which is not half bad for 5-15 Watt of computing power. ;)

    A CUDA version would be nice, alongside the OpenCL one. Perhaps to run on Tegra K1, X1, (X2 yet to come), etc.
     
    ClokworkGremlin likes this.
  14. ClokworkGremlin

    ClokworkGremlin Sr. Member

    Jan 10, 2016
    535
    381
    Male
    Whatever I want.
    Well you just tripled my knowledge of how the two brands implement OGL vs. CUDA.
     
  15. Aniara

    Aniara Jr. Member

    Jan 9, 2016
    47
    33
    Female
    Etiennien
    I'm glad I could help, but this is mostly older algos and cards. But the newer Maxwell cards made up some of it by consuming a lot less power. I don't mind things are slow, just as log as it doesn't require that much in electricity. Some of the old stuff costed too much to run, Electric Bill got to be too phat at the end of the month. Keep the speed but make the cost of running the support to the blockchain low. Just as the spartan-6s and others did for Bitcoin in 2011-12 when I first looked at this. didn't return much profit, but didn't cost anything to run. These days the cost to run a miner is more than to heat your house with a modern heat/inverter pump if you like in the snowy north. :mad:
     
  16. davecgh

    davecgh Hero Member
    Developer Organizer

    Dec 31, 2015
    642
    788
    Male
    United States
    #16 davecgh, Jan 19, 2016
    Last edited: Jan 19, 2016
    For reference, since this thread is talking about the technical process of creating the addresses, some pseudocode for the mainnet secp256k1 pay-to-pubkey-hash address format is:

    Code:
    pubKeyHash = ripemd160(blake256(serializedCompressedPubkey))
    prefixedInput = (0x07 || 0x3f || pubKeyHash)
    checksum = blake256(blake256(prefixedInput))[:4]
    address = base58(prefixedInput || checksum)
    NOTE: The || above means append.

    That said, I feel it must be pointed out that vanity addresses should NOT be used in general. It's certainly fun to have one, but address reuse is really bad in general for many reasons. For the most part, an address tied to your name should be thought of like posting a bank account number. Anyone can see your balance and all transactions coming into and out of that address and follow the trail from there.

    Anyone reading this who doesn't understand what the implications are, I strongly recommend you educate yourself thoroughly on the topic before generating one simply because it looks neat so you can make a properly informed decision.

    EDIT: Clarified the meaning of || in the pseudocode.
     
    418Sec likes this.
  17. Aniara

    Aniara Jr. Member

    Jan 9, 2016
    47
    33
    Female
    Etiennien
    It is used for special occasions, like a shop, charity. Or if you just want to give out one that is easy to remember. That is all. You have 10 others anyway, for every coin/wallet you own. I had or have a Securecoin address that starts with sek and ends with sek, sek being the currency of Sweden and sekurity, makes it fun and so easy to remember. ;)

    Just my 1¢... (it used to be 2¢, but since the recession, we've had to make cutbacks)
     
  18. ClokworkGremlin

    ClokworkGremlin Sr. Member

    Jan 10, 2016
    535
    381
    Male
    Whatever I want.
    That's the part of the story where I say "Can I heat my house with a Bitcoin mining rig?"
    I assume the || means "append" in this context?
    OK, I have a reasonable idea of the risks because you explained them to me personally in the IRC channel*, but could you post a few good links on the mechanics and philosophy of why address re-use is a bad idea?

    *Summary: Risks associated with address re-use include the following
    • Accumulates Dust transactions, which tend to clog the blockchain when they're later cashed out
    • exposes more attack vectors for people trying to reverse-engineer your private key(kind of like Sony's failoverflow with their digital signatures on the PS3)
    • In some cases, can make filing your taxes harder, as it makes keeping track of where your money came from more difficult.
     
  19. Aniara

    Aniara Jr. Member

    Jan 9, 2016
    47
    33
    Female
    Etiennien
    It's funny you should ask that, I know that RMS in Seattle somewhere, used to heat part of his house with scrypt miners and sha-256 miners. I wonder how he kept the noise down. :confused:
     
    ClokworkGremlin likes this.
  20. davecgh

    davecgh Hero Member
    Developer Organizer

    Dec 31, 2015
    642
    788
    Male
    United States
    Correct. I'll edit the post to clarify that since || also frequently denotes boolean OR. Thanks for pointing out the ambiguity! I'm sure that would be easily misinterpreted for folks not as familiar with address-related nomenclature.

    Here is a pretty good entry from the bitcoin wiki which discusses it. The same applies to Decred addresses. Also, the answer from Mark S on this stack exchange question is spot on.
     
    ClokworkGremlin likes this.

Share This Page