3

How do online Bitcoin wallet sites work? How can they have thousands of addresses laying around, or do they create them on the fly? What sort of software is used to create all those Bitcoin addresses? The reason I ask, is that I'm toying with an idea for a website that would require per-user Bitcoin addresses for payment.

4
  • I'm no owner of such a a site, but I can imagine they are created when someone needs them, with some random parameters (IP, time, mouse tracking, input text, whatever). Creating them beforehand seems also an option, I cannot see a reason not to do it. What are your own pro and cons? (just curious)
    – Mathias711
    Commented Jul 7, 2014 at 9:29
  • For the site I'm planning, I'll need one wallet for each user, to which the user can pay for the service - I figure it can be made semi-anonymous while still easy to keep track of wheter or not the user has paid that way. What I'm wondering, is how such a site can create many wallets without risking creating an already existing wallet (ie. used by some running bitcoin-program or some e-wallet site)? Yes just by using random-number the chance for that is very low, but like with winning the lottery, the chance is there. Commented Jul 7, 2014 at 9:39
  • Dont be afraid that multiple addresses are generated (question). Even if the RNG is very bad server-side, they still can check if the generated address is already in use on their site. There is however no way to check if it's already been generated before - but not used.
    – Mathias711
    Commented Jul 7, 2014 at 9:44
  • There is never any way to guarantee that you will not create a private key (a "wallet" is just a collection of private keys) that someone else is not already using. But, if you are using good random number generators, the probability of doing so is extremely small. It is much smaller than any lottery. Anyone who is going to do this for production should go through the mathematical exercise of working out this probability for themselves, and you will see that it is not worth worrying about. Commented Jul 7, 2014 at 16:08

1 Answer 1

4

At Justcoin.com, we've used a few different methods over the years:

  • Generate addresses using bitcoind, now called bitcoin core, when we need them. To avoid key loss in the case of storage failure, we use a large key pool. The command is simply getnewaddress.
  • Hierarchical deterministic wallets are much better and we use these for an increasing number of things. When using these for hot wallets, we import new private keys into our hot wallet before its ever used. That way we can still spend its inputs from bitcoind.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.