User avatar
NeunMalSechs
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 12
Joined: Mon Jan 02, 2017 6:37 pm
Location: Darmstadt
Contact: Website Facebook

private key for online shop?

Sun Feb 19, 2017 7:42 pm

If an online shop wants to use bitcoin as a payment method and wants to derive new public addresses, the public key has to be available on the shop server (thats what I understood)
My questions:

- Is there an alternative way?
- Are there establihed methods of string / securling the public key (link would be appreciated)
- Can new public addresses also be derived from an new public address?
- Is there somewhere a comprehensive list, that shows, which wallets actually give me access to my public key (I know at least one, that doesn't openly)

Please excuse, if my wording is not precise or wrong, I am stll new to this.
I am willing to read deeper into it, so to some questions a simple links might be a sufficient answer. What I fould so far is either to shallow for a good uderstanding or to much focused on very detailed aspects.

Thanks for help & understanding.
Mit sonnigen Grüßen
Carsten
--

(privat)
Lies mehr unter: http://neunmalsechs.blogsport.eu/
Blockchain Artikel: http://neunmalsechs.blogsport.eu/tag/blockchain/

Rmcdermott927
Bronze Bitcoiner
Bronze Bitcoiner
Posts: 590
Joined: Tue Sep 20, 2016 7:32 pm

Re: private key for online shop?

Mon Feb 20, 2017 3:07 pm

Your best bet is to use an HD system for key generation. Multiple addresses can be derived from a single xpub key.

The blockchain.info API and several others use this system currently.
Image

User avatar
NeunMalSechs
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 12
Joined: Mon Jan 02, 2017 6:37 pm
Location: Darmstadt
Contact: Website Facebook

Re: private key for online shop?

Tue Feb 21, 2017 12:07 am

I assume "HD system for key generation" refers to whats described here:

https://eprint.iacr.org/2014/998.pdf

but I (as a non-technical newsbe) don't really understand how I can do this in my small online shop (woo commerce based on wordpress)-

Regards
Carsten
Last edited by NeunMalSechs on Tue Feb 21, 2017 12:42 am, edited 1 time in total.
Mit sonnigen Grüßen
Carsten
--

(privat)
Lies mehr unter: http://neunmalsechs.blogsport.eu/
Blockchain Artikel: http://neunmalsechs.blogsport.eu/tag/blockchain/

User avatar
GreenBits-old
Banned
Banned
Posts: 81
Joined: Sat Jan 28, 2017 1:22 am

Donate BTC of your choice to 12jenhYCr6faZCwv1QC6HKinL6mRVSrDVC

Re: private key for online shop?

Tue Feb 21, 2017 12:20 am

Why try some services like coinpayments it help you setting up bitcoin payments in your small business.

I hope its help that on you. :D
Image

User avatar
NeunMalSechs
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 12
Joined: Mon Jan 02, 2017 6:37 pm
Location: Darmstadt
Contact: Website Facebook

Re: private key for online shop?

Tue Feb 21, 2017 12:35 am

With a 0.50% serivce fee? With no control over the exchange rate they are using?

Plus: I want to learn, not depend on profit oriented commercial enterprizes.
Mit sonnigen Grüßen
Carsten
--

(privat)
Lies mehr unter: http://neunmalsechs.blogsport.eu/
Blockchain Artikel: http://neunmalsechs.blogsport.eu/tag/blockchain/

User avatar
GreenBits-old
Banned
Banned
Posts: 81
Joined: Sat Jan 28, 2017 1:22 am

Donate BTC of your choice to 12jenhYCr6faZCwv1QC6HKinL6mRVSrDVC

Re: private key for online shop?

Tue Feb 21, 2017 12:49 am

With a 0.50% serivce fee? With no control over the exchange rate they are using?

Plus: I want to learn, not depend on profit oriented commercial enterprizes.
Ah okay,What about blockchain wallet they have an api that you can use on your business.Just see their documentation.
Or just hired someone that can make your payments gateway on your business.
Image

User avatar
NeunMalSechs
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 12
Joined: Mon Jan 02, 2017 6:37 pm
Location: Darmstadt
Contact: Website Facebook

Re: private key for online shop?

Tue Feb 21, 2017 1:27 am

Or just hired someone that can make your payments gateway on your business.
Thats why I am asking. I am writing a requirements document right now. And this aspect is not entirely clear for me. What should I require?
Mit sonnigen Grüßen
Carsten
--

(privat)
Lies mehr unter: http://neunmalsechs.blogsport.eu/
Blockchain Artikel: http://neunmalsechs.blogsport.eu/tag/blockchain/

User avatar
Decoded
Global Moderator
Global Moderator
Posts: 417
Joined: Sat Oct 15, 2016 11:28 am

Donate BTC of your choice to 1fdFgrw59gczh96esrpJST6MVHyQm4VJK

Re: private key for online shop?

Fri Feb 24, 2017 12:29 am

Use a Hierarchical Deterministic private key. This will allow you to use one master public key (or xPub key), and derive an infinite number of public keys. The private key should never be generated on an online computer, especially if you're using it to handle large amounts of money.
theres a snake in my boot

mocacinno
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 62
Joined: Fri Jan 27, 2017 8:17 am

Donate BTC of your choice to 1MocACiWLM8bYn8pCrYjy6uHq4U3CkxLaa

Contact: Website

Re: private key for online shop?

Fri Feb 24, 2017 10:18 am

writing your own payment gateway is pretty difficult... I'd defenately suggest you to move any development to the testnet, and let experienced coders review any line you've written before switching to the main net.

As for your options to write a payment gateway, there are several:
  • install bitcoind (the latest versions are HD), use the json-rpc API to generate new addresses, detect payments, validate,... pro: you have the full feature set; con: AFAIK, it's not possible to have a watch-only wallet, so you're always at risk for getting robbed
  • install electrum, run it as a deamon, set up json-rpc (http://docs.electrum.org/en/latest/merchant.html). pro: you can setup the wallet using an xpub instead of generating a new HD wallet, that way you have a watch-only wallet, so the xprv isn't on the same online server
  • using a web wallet with an API, like xapo, blockchain.infon,... con: when using a web wallet, you're not the (only) one in controll of your private key, so you're not the (only) one in controll of your funds
  • pre-generate a bunch of addresses for a HD wallet, put the into a db (maybe sign them???), assign each new client his own payment address***
*** i've written a small python script to do this in the past, this script generates the first 1000 addresses for an electrum wallet with a given xpub (which can easily be exported from within electrum):

Code: Select all

from bitcoin import * childkey1 = bip32_ckd('xpub_my_electrum_xpub', 0) for counter in range(1000): childkey2 = bip32_ckd(childkey1, counter) key = bip32_extract_key(childkey2) address = pubtoaddr(key) print address
Trezor: the original hardware wallet, for sale => here
Ledger Nano S: keep your bitcoins safe! check it out => here
Check out my personal bitcoin tools website, filled with usefull, anonymous bitcoin tools => here

Return to “Technical Support”

Who is online

Users browsing this forum: Amazon [Bot] and 1 guest