Pages:
Author

Topic: How exchanges make wallet adresses? - page 3. (Read 801 times)

full member
Activity: 198
Merit: 130
Some random software engineer
March 26, 2018, 04:29:48 AM
#7
So then, how to pregenerate addresses like 100,000 numbers at once without click [Request payment] button in wallet program 100,000 times?

You can generate a lot of addresses using Vanitygen:

Code:
$ ./vanitygen -k 1|awk '/Address|Privkey/{if($1 == "Address:") {pub = $2} else {if($1 == "Privkey:") {print pub ":" $2}}}'
Difficulty: 1
16ZCL3fKK7hQuRsGK48CGWmqx5rDyv83bm:5J3HRp9RNztekPfKYFjzvzLSSnBN3iy4kPP4sbogWYzctnMdXqi
176zZHK28BgvFZw2Dmv3P7Xy3Vh9CbYnef:5HqDqkxiBKxXvCJnc6Bv9LcveKX9rnZjRfrsyj86jNFtQZ6MxSH
17fZ41JSmTZt9WHAtoAG9PwZVEqrwPmhQa:5K3hma9ePqxdgpVgQc8Nu7m46WLSKsvc1YcEWV1zyGmmYHz1bs2
1AEgJx5F9Y9eBbnmQQeBREbT5zcyvuNz3e:5JGfQHWvLZQCx1UKV8NY6U1K54JYPKVHpTJYUjWBLENgM4hDrEM
...
jr. member
Activity: 413
Merit: 5
March 26, 2018, 04:16:11 AM
#6
There are more than one approach to this possible.

The two most common would be:

1) Generate an address 'on demand'.
This requires your online service to have a connection to your daemon. This might (in some circumstances) be a possible attack vector.

2) Generate bulk addresses in advance (in an offline environment)
Then, each time someone wants to deposit, you can easily assign one of these addresses to your customer in your database.
This is considered the 'safer' option, since your private keys don't touch your online system at any time.

So then, how to pregenerate addresses like 100,000 numbers at once without click [Request payment] button in wallet program 100,000 times?
legendary
Activity: 1624
Merit: 2481
March 26, 2018, 04:11:58 AM
#5
There are more than one approach to this possible.

The two most common would be:

1) Generate an address 'on demand'.
This requires your online service to have a connection to your daemon. This might (in some circumstances) be a possible attack vector.

2) Generate bulk addresses in advance (in an offline environment)
Then, each time someone wants to deposit, you can easily assign one of these addresses to your customer in your database.
This is considered the 'safer' option, since your private keys don't touch your online system at any time.
newbie
Activity: 28
Merit: 0
March 26, 2018, 03:13:10 AM
#4
So at exchanges, so many coins. For each of them, they provide deposit addresses.

If you are engineer, need to implement that, how to do?

Maybe using that coin's daemon?

How is specific procedure of it?

Thanks.

All you need is to generate many adresses from a single seed. Store those addresses in some data structure or csv file.

Then each time user requests deposit address - pick one of the pregenerated addresses from stored pool and assign it to respectable user (i.e. remove it from the address pool and add some field in your users database,  put address there).

That's all.


Don't generate address every time user needs a new one. It will be unsafe since to actually generate address you need access to your private key. It is much more safe to do it just once and then use your addresses as a text file. There is no limit on how much addresses you can generate so you can pregenerate as much as you want for all your existing or new users. Once it is done - you can handle deposits/withdrawals separately.
full member
Activity: 198
Merit: 130
Some random software engineer
March 26, 2018, 02:59:14 AM
#3
So at exchanges, so many coins. For each of them, they provide deposit addresses.

If you are engineer, need to implement that, how to do?

Maybe using that coin's daemon?

How is specific procedure of it?

To be able to generate a wallet address, you need to understand how it works and its format.

As it was said, Bitcoin addresses are a specific format of an edcsa (using secp256k1 parameters) public key, formatted a certain way, as described on this page: Technical background of version 1 bitcoin addresses. You must also take a look at the wallet import format which will help you to import private keys in Bitcoin Core and other wallets. Note that more recent addresses - p2sh & bech32 - are a little different and you will need to do more research about it.

You can either have one daemon to generate/handle those keys, or just a simple script that'll do it on demand, as this is a very simple task to do which doesn't use much cpu. The main problem in the process is to correctly protect the private keys.
newbie
Activity: 66
Merit: 0
March 26, 2018, 02:12:23 AM
#2
So at exchanges, so many coins. For each of them, they provide deposit addresses.

If you are engineer, need to implement that, how to do?

Maybe using that coin's daemon?

How is specific procedure of it?

Thanks.

I believe most of the coins use bitcoins method of creating addresses. You can use any programming language for that.
First you generate a random 32-byte private key.
Then create a public key out of it using elliptical curve digital signature algorithm.
Out of public key you can create an address. It works as described in this image:

https://en.bitcoin.it/w/images/en/9/9b/PubKeyToAddr.png
jr. member
Activity: 413
Merit: 5
March 26, 2018, 01:59:48 AM
#1
So at exchanges, so many coins. For each of them, they provide deposit addresses.

If you are engineer, need to implement that, how to do?

Maybe using that coin's daemon?

How is specific procedure of it?

Thanks.
Pages:
Jump to: