Bitcoin Forum
May 08, 2024, 04:32:41 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Pay to website certificate / public key  (Read 953 times)
drazvan (OP)
Full Member
***
Offline Offline

Activity: 191
Merit: 100



View Profile WWW
November 13, 2013, 11:21:51 PM
 #1

Hello everyone,

I was thinking about how a client could send a payment on a website and make sure that only the owner of that website can redeem it. The Payment Protocol (if implemented) is one option, but here's a crazy idea:

1. Payer generates a new Bitcoin private key and assembles a transaction that pays the amount he wants to pay to the corresponding public key.
2. Payer fetches the SSL certificate of the website, verifies its validity, then takes the private key it has generated and encrypts it with the public key of the website.
3. This encrypted private key is then attached to the transaction (using unspendable outputs or other similar techniques - if the site uses RSA-2048, it will not fit into the 80 bytes that Bitcoin will allow for additional data per transaction)

At a later time, the website owner uses his website's private key to decrypt the message containing the private key of the transaction, then sweeps the funds to his wallet. He still needs to wait for the transaction to confirm (since the sender might try to cheat and spend it again given that he also has the private key). But I think this would be an interesting way to pay to someone's X.509 certificate (that is "I agree to pay X BTC to whoever this certificate describes"), even in the absence of a destination Bitcoin address.

Ideas?

1715142761
Hero Member
*
Offline Offline

Posts: 1715142761

View Profile Personal Message (Offline)

Ignore
1715142761
Reply with quote  #2

1715142761
Report to moderator
1715142761
Hero Member
*
Offline Offline

Posts: 1715142761

View Profile Personal Message (Offline)

Ignore
1715142761
Reply with quote  #2

1715142761
Report to moderator
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715142761
Hero Member
*
Offline Offline

Posts: 1715142761

View Profile Personal Message (Offline)

Ignore
1715142761
Reply with quote  #2

1715142761
Report to moderator
1715142761
Hero Member
*
Offline Offline

Posts: 1715142761

View Profile Personal Message (Offline)

Ignore
1715142761
Reply with quote  #2

1715142761
Report to moderator
1715142761
Hero Member
*
Offline Offline

Posts: 1715142761

View Profile Personal Message (Offline)

Ignore
1715142761
Reply with quote  #2

1715142761
Report to moderator
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
November 14, 2013, 06:17:08 AM
 #2

If you trust SSL, why don't you trust SSL to protect the payment request message?

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
drazvan (OP)
Full Member
***
Offline Offline

Activity: 191
Merit: 100



View Profile WWW
November 14, 2013, 10:13:26 AM
 #3

I haven't said I do not trust SSL or the payment protocol, I just described a way to pay someone when you only have their certificate (this could be a business or a person). They wouldn't have to create a Bitcoin address or do anything else, you could send them BTC and make sure that only the holder of the private key that corresponds to that certificate can redeem it.

Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1129


View Profile
November 14, 2013, 12:58:21 PM
 #4

Most bitcoin software doesn't support sweeping of private keys (because it involves building large and expensive database indexes).
drazvan (OP)
Full Member
***
Offline Offline

Activity: 191
Merit: 100



View Profile WWW
November 14, 2013, 01:19:12 PM
 #5

What do you mean Mike? According to https://en.bitcoin.it/wiki/Private_key, sweeping means:

Quote
When a private key is swept, a transaction is broadcast that sends the entire balance held by the private key to another address in the wallet or securely controlled by the service in question.

Why would this require rebuilding indexes? Is that because the wallet would need to get a list of all the unspent outputs that are associated to that private key?
Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1129


View Profile
November 14, 2013, 04:32:27 PM
 #6

Yes. Regular bitcoin-qt or SPV wallets don't have such an index.
etotheipi
Legendary
*
expert
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
November 14, 2013, 05:31:42 PM
Last edit: November 14, 2013, 06:01:05 PM by etotheipi
 #7

I have made a proposal for this before.  I was under the impression that the Payment Protocol could be extended for this.  Better yet, BIP 32 is technically already capable of executing this process.  At the moment, I'll be working with individual merchants to implement this, though I'd love to have it be more widely accepted.


Functionality:

-- Merchant has root public key that is truly public (but the chaincode is not).  
-- Whenever a merchant gives you an address, they give you the root key and the multiplier/tweak along with the address
-- The client verifies the public key provided matches the known value for the merchant
-- The client software will multiply the root public key by the tweak and confirm they get the same payment  pubkey/address
-- Client software provably knows that the address belongs to the merchant's wallet
-- There's no way for the client to see any other addresses in the merchant's wallet without the chaincode that goes with the root public key

Similarly, you can have:

-- Customer creates a new BIP 32 wallet
-- Customer opens an account on the merchant website
-- Customer makes a deposit, of which the first input address is X
-- Customer software will supply the service with the root key and multiplier that produces X
-- Merchant will store the root public key(s) in the customer account/metadata
-- On a withdrawal, the customer software will send the address, along with the multiplier
-- The merchant software can verify that the address belongs to the same wallet as X
-- If the wallet is different (or do not supply that info), then the merchant will use extra authentication techniques.


How does it work?  All BIP 32 chains have a root public key and chaincode.  To get a particular address, you do mangle the key and chaincode with the address index to get a multiplier.  Knowing the multiplier does not allow you to backtrack the chain code.  But it does allow you to prove that the address is related to a given root public key.

In this way, merchants with persistent business relationships, or customers accessing well-known websites will pre-verify the merchant public key, and then can prove that all payment addresses belong to that actual wallet (which could be an offline wallet of the merchant, doesn't really matter).  Similarly, if the customer uses the same set of wallets persistently, the merchant at least knows that there's a recognized wallet being provided for withdrawal/payment.  Of course, they don't know if that wallet is compromised, but it still adds an extra layer of security.

The root public keys could easily be distributed via SSL/CA mechanisms.  It would then be a very simple addition to the payment protocol -- only requiring a couple extra fields to be transmitted with the addresses.  On the other hand, you can also exchange and verify root public keys manually and sidestep all the SSL/CA stuff.

This is extremely powerful, and I hope to see some adoption of this technique, though I suspect Armory will be the first, and will have to demosntrate its power before other really believe/understand it.

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!