giantdragon (OP)
Legendary
Offline
Activity: 1582
Merit: 1002
|
|
July 18, 2011, 08:33:33 PM |
|
I need to generate many Bitcoin addresses that I will give to customers on my website. I tried to use JSON-RPC from PHP with command "getnewaddress" in loop, but speed is not satisfactory (about 1 second for each address). Just few simultaneous requests and my server probably will be down. Another idea is to pre-generate addresses, store them in database and extract when need. Is it possible to speed up address generation process?
|
|
|
|
error
|
|
July 18, 2011, 08:36:02 PM |
|
Sure, you can get new addresses in advance and use them later.
|
3KzNGwzRZ6SimWuFAgh4TnXzHpruHMZmV8
|
|
|
bitlotto
|
|
July 19, 2011, 01:46:25 AM |
|
You COULD use openssl to make the keys. You would then have to import them, but at least when you import them you can do them one at a time. I don't know if it would be any faster though.
|
*Next Draw Feb 1* BitLotto: monthly raffle (0.25 BTC per ticket) Completely transparent and impossible to manipulate who wins. TOR TOR2WEB Donations to: 1JQdiQsjhV2uJ4Y8HFtdqteJsZhv835a8J are appreciated.
|
|
|
Alex Beckenham
|
|
July 19, 2011, 02:28:57 AM |
|
Is it possible to speed up address generation process?
I'd like to know too... let's say for whatever reason you needed 100000 addresses in your wallet... what would be the quickest way to generate them?
|
|
|
|
bitlotto
|
|
July 19, 2011, 03:05:03 AM |
|
Run: ./vanitygen -o addresslist.txt -k 1
For a few hours. You'll have addresses to last a lifetime! Even a few minutes and you'll have a ton of addresses.
vanitygen makes addresses pretty quick if your only requirement is it starts with a 1. (Which they all do)
|
*Next Draw Feb 1* BitLotto: monthly raffle (0.25 BTC per ticket) Completely transparent and impossible to manipulate who wins. TOR TOR2WEB Donations to: 1JQdiQsjhV2uJ4Y8HFtdqteJsZhv835a8J are appreciated.
|
|
|
Alex Beckenham
|
|
July 19, 2011, 03:34:01 AM |
|
Run: ./vanitygen -o addresslist.txt -k 1
For a few hours. You'll have addresses to last a lifetime! Even a few minutes and you'll have a ton of addresses.
vanitygen makes addresses pretty quick if your only requirement is it starts with a 1. (Which they all do)
So, the above command places the addresses into addresslist.txt, but where do the private keys end up? Does it generate a wallet.dat at the same time? No point having a list of addresses if you don't own them
|
|
|
|
bitlotto
|
|
July 19, 2011, 03:40:00 AM |
|
Example output in file: Pattern: 1 Address: 12nZ51BtWfb7GEi8JbrrgnVS2kyGQYqpsp Privkey: 5JaGyzFRLLAkGGzx5tmGo1LP4VLADtiwjVnMpCZQYPnE4kwCM2J Pattern: 1 Address: 18HL4zJP8K5ffbzAj3fNerc52VAofsgy3d Privkey: 5KiqGaCcCq715q4xkFBuvaRUWsn4PDPH4QY6E6yrGrbJLnNbjxZ Pattern: 1 Address: 1GMpun3eb1YPqQntUztF1GbEuDEsZGK6uk Privkey: 5KC5G6zmsn2uuVD1MCP6HdPdS1Nk3Hms9XuAD7twesC23BKyr8R Pattern: 1 Address: 19fH7CTchby2MRTsVLV4N3Vs5tRnHRoDLW Privkey: 5KT7utqYoSbbWAUpCQgctdTo3QZXiCMXmBcS18qHA25UeUuoSfd Pattern: 1 Address: 19sK6oJYyiWZH5yazghfeihRSc5RRzYqCu Privkey: 5J18fJ8SeEifdSsetjSm991pU5bAiJsNfXUTtKXHHUsSXbxKXnt
You could make a script to input it all into a database. Then import the keys whenever they are needed as apposed to making one giant wallet.
|
*Next Draw Feb 1* BitLotto: monthly raffle (0.25 BTC per ticket) Completely transparent and impossible to manipulate who wins. TOR TOR2WEB Donations to: 1JQdiQsjhV2uJ4Y8HFtdqteJsZhv835a8J are appreciated.
|
|
|
casascius
Mike Caldwell
VIP
Legendary
Offline
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
|
|
July 19, 2011, 03:43:27 AM |
|
Isn't there an issue with vanitygen using a poor source of entropy, e.g. the time and date and process number? If so, taking the 1st address that it provides makes for an easy theft due to a predictable address.
|
Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable. I never believe them. If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins. I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion. Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice. Don't keep coins online. Use paper or hardware wallets instead.
|
|
|
bitlotto
|
|
July 19, 2011, 03:48:42 AM |
|
Isn't there an issue with vanitygen using a poor source of entropy, e.g. the time and date and process number? If so, taking the 1st address that it provides makes for an easy theft due to a predictable address.
I don't recall all the details but I think that was before it was discovered the entropy was coming from urandom. So it wouldn't really be an issue... as far as I know. I'm not really an expert on that though.
|
*Next Draw Feb 1* BitLotto: monthly raffle (0.25 BTC per ticket) Completely transparent and impossible to manipulate who wins. TOR TOR2WEB Donations to: 1JQdiQsjhV2uJ4Y8HFtdqteJsZhv835a8J are appreciated.
|
|
|
samr7
Full Member
Offline
Activity: 140
Merit: 430
Firstbits: 1samr7
|
|
July 19, 2011, 05:12:29 AM Last edit: July 19, 2011, 05:40:00 AM by samr7 |
|
Isn't there an issue with vanitygen using a poor source of entropy, e.g. the time and date and process number? If so, taking the 1st address that it provides makes for an easy theft due to a predictable address.
This myth comes from questionable sources (crypto-noobs?) and has absolutely no credibility. Vanitygen uses the same random number generator as bitcoin itself -- the OpenSSL RNG. It is true that OpenSSL uses the time and process number, but most of its entropy comes from /dev/urandom.
|
|
|
|
casascius
Mike Caldwell
VIP
Legendary
Offline
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
|
|
July 19, 2011, 06:09:47 AM |
|
This myth comes from questionable sources (crypto-noobs?) and has absolutely no credibility.
There's no need to be a jerk. The author of vanitygen suggested this himself. I didn't tear apart his source code so I don't know one way or another. If this issue has been resolved then so be it. It's better to be prudent than to be stolen from.
|
Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable. I never believe them. If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins. I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion. Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice. Don't keep coins online. Use paper or hardware wallets instead.
|
|
|
samr7
Full Member
Offline
Activity: 140
Merit: 430
Firstbits: 1samr7
|
|
July 19, 2011, 07:20:39 AM Last edit: July 19, 2011, 08:11:26 AM by samr7 |
|
There's no need to be a jerk. The author of vanitygen suggested this himself. I didn't tear apart his source code so I don't know one way or another. If this issue has been resolved then so be it. It's better to be prudent than to be stolen from.
You're absolutely right. I'm sorry. But, for real, what's the bottom line, is the problem real or not?
|
|
|
|
BkkCoins
|
|
July 22, 2011, 06:53:00 AM |
|
It would be quite easy to write a small script that uses vanitygen and pywallet to create and import private keys (and addresses) into wallets. I'm not sure if you can start with an empty wallet (blank template) for this or if you'd have to create a new wallet for each address (assuming you don't want many in one wallet). It seems like creating new wallets would be more time consuming. Unless pywallet can create a wallet file as well - I haven't checked that.
Another thing with vanitygen is you could make all your customer addresses start with a common prefix so they are easily identifiable. eg. 1dog...
|
|
|
|
giantdragon (OP)
Legendary
Offline
Activity: 1582
Merit: 1002
|
|
July 22, 2011, 10:31:44 AM |
|
Generated with default client, took just few hours.
|
|
|
|
|