BitShares Forum

Main => General Discussion => Topic started by: bytemaster on May 23, 2014, 08:51:32 pm

Title: Secure Payments to Users by Name
Post by: bytemaster on May 23, 2014, 08:51:32 pm
Given we have a name system in the blockchain that allows you to know the public key of user A.   We can use DH ECC to generate a unique receiving address for user A as so.

Create TempPrivateKey   TEMP.PRIVATE_KEY
TEMP.PRIVATE_KEY * USER.PUBLIC_KEY => SECRET  => ONE_TIME_PRIVATE_KEY => ONE_TIME_ADDRESS

Send a transaction that pays to ONE_TIME_ADDRESS and attaches TEMP.PUBLIC_KEY

Every client on the network will be able to perform the following operation:

USER.PRIVATE_KEY * TEMP.PUBLIC_KEY => SECRET => ONE_TIME_PRIVATE_KEY

If ONE_TIME_PRIVATE_KEY is the one that controls ONE_TIME_ADDRESS  then user will immediately spend the funds from ONE_TIME_ADDRESS to NEW_ADDRESS because the sender retains the ability to cancel the transaction. 


The plus side of this is:
  a) no need to exchange addresses
  b) ability to encode a message and 'from' data into the transaction
  c) the receiver is anonymous to everyone but the sender
  d) potential to cancel/retract a transfer if it is not accepted in a timely manner.
  e) simplifies accounting in the wallet
  f) generates higher fees and dividends

The downside to this:
  a) Uses more space in the blockchain
  b) Requires two transactions
  c) Results in higher fees


Discuss...

Single Transaction Variation

Given an extended public key + index  you can generate a child public key.    If I have the extended private key + index then I can generate the corresponding child private key. 

So we can use the same process as above.

TEMP_PRIVATE_KEY * EXTENDED_PUBLIC_KEY => SECRET
EXTENDED_PUBLIC_KEY.child( SECRET ) =>  RECEIVER_PUBLIC_KEY => RECEIVER_ADDRESS

You then broadcast a transaction that includes TEMP_PUBLIC_KEY + RECEIVER_ADDRESS
The receiver then does the following:

TEMP_PUBLIC_KEY * EXTENDED_PRIVATE_KEY => SECRET
EXTENDED_PRIVATE_KEY.child( SECRET ) => RECEIVER_PRIVATE_KEY => RECEIVER_PUBLIC_KEY => RECIEVER_ADDRESS

Only the receiver has the private key and only the sender & receiver know SECRET and thus the transactions are entirely unlink able.

This process would only expand the transaction size by 33 bytes and allow people to transact entirely by name with automatic unique addresses for every transaction. 

This is a variation on: http://www.coindesk.com/stealth-addresses-secret-bitcoin-privacy   that leverages the name system to solve the first part of the problem.
Title: Re: Secure Payments to Users by Name
Post by: toast on May 23, 2014, 08:58:55 pm
ECDSA is literally magic. There should be a "programming pearls" just for ECDSA algebra.
Title: Re: Secure Payments to Users by Name
Post by: xeroc on May 24, 2014, 01:00:29 am
As i get it this is basically the idea of bitcoins stealth addreses with usernames ... very cool
Title: Re: Secure Payments to Users by Name
Post by: xeroc on May 24, 2014, 01:52:29 am
The plus side of this is:
  a) no need to exchange addresses
  b) ability to encode a message and 'from' data into the transaction
  c) the receiver is anonymous to everyone but the sender
  d) potential to cancel/retract a transfer if it is not accepted in a timely manner.
  e) simplifies accounting in the wallet
this is so cool ..
Title: Re: Secure Payments to Users by Name
Post by: luckybit on May 24, 2014, 07:38:18 am
Given we have a name system in the blockchain that allows you to know the public key of user A.   We can use DH ECC to generate a unique receiving address for user A as so.

Create TempPrivateKey   TEMP.PRIVATE_KEY
TEMP.PRIVATE_KEY * USER.PUBLIC_KEY => SECRET  => ONE_TIME_PRIVATE_KEY => ONE_TIME_ADDRESS

Send a transaction that pays to ONE_TIME_ADDRESS and attaches TEMP.PUBLIC_KEY

Every client on the network will be able to perform the following operation:

USER.PRIVATE_KEY * TEMP.PUBLIC_KEY => SECRET => ONE_TIME_PRIVATE_KEY

If ONE_TIME_PRIVATE_KEY is the one that controls ONE_TIME_ADDRESS  then user will immediately spend the funds from ONE_TIME_ADDRESS to NEW_ADDRESS because the sender retains the ability to cancel the transaction. 


The plus side of this is:
  a) no need to exchange addresses
  b) ability to encode a message and 'from' data into the transaction
  c) the receiver is anonymous to everyone but the sender
  d) potential to cancel/retract a transfer if it is not accepted in a timely manner.
  e) simplifies accounting in the wallet
  f) generates higher fees and dividends

The downside to this:
  a) Uses more space in the blockchain
  b) Requires two transactions
  c) Results in higher fees


Discuss...

 +5%

If it is secure then it's excellent. If this feature exists make sure it has good marketing behind it so it's not a hidden feature like with some of Bitcoin's features.
Title: Re: Secure Payments to Users by Name
Post by: bytemaster on May 24, 2014, 07:40:59 pm
I was talking with Toast in the car on the way to Subway for lunch and came up with an entirely secure, single-transaction, mode of operation.  It is so incredibly simple I could not believe I didn't think of it from the beginning.

Every name can register a single extended public key that allows people to derive public keys from it.  Extended public keys are twice the size of normal public keys.   

Given an extended public key + index  you can generate a child public key.    If I have the extended private key + index then I can generate the corresponding child private key. 

So we can use the same process as above.

TEMP_PRIVATE_KEY * EXTENDED_PUBLIC_KEY => SECRET
EXTENDED_PUBLIC_KEY.child( SECRET ) =>  RECEIVER_PUBLIC_KEY => RECEIVER_ADDRESS

You then broadcast a transaction that includes TEMP_PUBLIC_KEY + RECEIVER_ADDRESS
The receiver then does the following:

TEMP_PUBLIC_KEY * EXTENDED_PRIVATE_KEY => SECRET
EXTENDED_PRIVATE_KEY.child( SECRET ) => RECEIVER_PRIVATE_KEY => RECEIVER_PUBLIC_KEY => RECIEVER_ADDRESS

Only the receiver has the private key and only the sender & receiver know SECRET and thus the transactions are entirely unlink able.

This process would only expand the transaction size by 33 bytes and allow people to transact entirely by name with automatic unique addresses for every transaction. 


Title: Re: Secure Payments to Users by Name
Post by: toast on May 24, 2014, 07:52:55 pm
Quote
Only the receiver has the private key and only the sender & receiver know SECRET and thus the transactions are entirely unlink able.

To be clear, the transaction in/out is still inked, just the addresses are not linked to names even though the user sees it as "send X to Name" (only sender and receiver have info to connect the address to the name).
Title: Re: Secure Payments to Users by Name
Post by: bytemaster on May 24, 2014, 08:16:48 pm
Quote
Only the receiver has the private key and only the sender & receiver know SECRET and thus the transactions are entirely unlink able.

To be clear, the transaction in/out is still inked, just the addresses are not linked to names even though the user sees it as "send X to Name" (only sender and receiver have info to connect the address to the name).

More than that if you send 3 payments to the same name no one can tell the payments are linked.  This means that if you have three unspent outputs in your wallet, you can send 3 separate transactions to that name and no one will be able to tell that the funds moved.
Title: Re: Secure Payments to Users by Name
Post by: clout on May 24, 2014, 08:22:25 pm
absolute genius
Title: Re: Secure Payments to Users by Name
Post by: xeroc on May 24, 2014, 09:13:36 pm
absolute genius
we nees to proberly market this feature in the next newsletter!!!!!!!
Title: Re: Secure Payments to Users by Name
Post by: liondani on May 25, 2014, 08:47:20 am
absolute genius
we nees to proberly market this feature in the next newsletter!!!!!!!

+ 5

Sent from my ALCATEL ONE TOUCH 997D using Tapatalk

Title: Re: Secure Payments to Users by Name
Post by: bytemaster on May 25, 2014, 01:27:30 pm
While laying in bed this morning I had a flash of insight on how to significantly reduce the size of the signatures that prove who a payment is from.

Given Public Information (in blockchain):
Quote
dan => DANS_EXT_PUBLIC_KEY
scott => SCOTTS_EXT_PUBLIC_KEY

Assuming scott wants to send dan a payment anonymously, yet wants dan to know it is from him.

Quote
scott:  Generate OneTimePrivateKey  & OneTimePublicKey Pair
scott:  OneTimePrivateKey * DANS_EXT_PUBLIC_KEY => SECRET
                                        DANS_EXT_PUBLIC_KEY.child( SECRET ) => RECEIVE_PUBLIC_KEY => RECEIVE_ADDRESS
scott:  RECEIVE_PUBLIC_KEY * SCOTTS_EXT_PRIVATE_KEY => CHECK_SECRET
                                                                                    => SHORT_HASH(CHECK_SECRET) == SHORT_SIGNATURE

scott-broadcast:   OneTimePublicKey + RECEIVE_ADDRESS + ENCRYPT( from scott + SHORT_SIGNATURE, SECRET )

Quote
dan:   OneTimePublicKey * DANS_EXT_PRIVATE_KEY => SECRET
                                      DANS_EXT_PRIVATE_KEY.child( SECRET ) =>
                                                                RECEIVE_PRIVATE_KEY =>
                                                                  RECEIVE_PUBLIC_KEY => RECEIVE_ADDRESS

dan:   DECRYPT( data, SECRET ) => "from scott" + SHORT_SIGNATURE )
dan:   SCOTT_EXT_PUBLIC_KEY * RECEIVE_PRIVATE_KEY => CHECK_SECRET => SHORT_HASH(CHECK_SECRET)

There are only two people in the world who can generate the CHECK_SECRET (dan and scott), because the signature isn't required to verify funds transfer and is only used to prevent 'spoof payments' the SHORT_HASH(CHECK_SECRET) could reduce the signature down to 8 bytes rather than using the 65 bytes required for a normal ECC compact signature. 

Total additional size to send an anonymous payment from a certified address:
33 OneTimePublicKey
4   from id
8   from check
20  [optional fixed size memo]

65 bytes, equal to a single normal signature.   The fixed size memo is there to provide a description.  It must be fixed size to prevent analysis by size.   The memo is 20 bytes so that the entire size of the encrypted data is 32 bytes which is a multiple of the AES block size.  So the encrypted info block is either 16, 32 or 48 bytes long. 

I could probably avoid AES encryption all together and simply XOR data with SHA512(SECRET) as a means of encrypting/decrypting.

I am looking for ideas on what to name this Scheme.... so far Toast has proposed

Send Anonymously To A Name => SATAN

I suggested:

Transfer Invisibly to A Name  => TITAN

Other names are welcome.
Title: Re: Secure Payments to Users by Name
Post by: liondani on May 25, 2014, 01:29:52 pm
While laying in bed this morning I had a flash of insight on how to significantly reduce the size of the signatures that prove who a payment is from.

Man, you must do that more frequently  ;)
Title: Re: Secure Payments to Users by Name
Post by: bytemaster on May 25, 2014, 01:38:27 pm
For added security on the users public keys (ie: to avoid any potential of information leak from using the same key for every single operation... the check signature could use   SCOTTS_EXT_PUBLIC_KEY.child(SECRET) rather than SCOTT_EXT_PUBLIC_KEY directly.     Not sure if this extra indirection has any meaningful security enhancements or not. 
Title: Re: Secure Payments to Users by Name
Post by: xeroc on May 25, 2014, 05:23:57 pm
I am so flashed of recent upgrates!!! +5%
Title: Re: Secure Payments to Users by Name
Post by: mf-tzo on May 25, 2014, 05:46:00 pm
These developments are amazing. I am not a tech guy and I don't understand much of what you guys are talking about most of the time but there are a lot of people from other communities that do understand steal your ideas, come up with a better marketing and boom!!

My point is to bytemaster. You should already know by now who are the tech guys in here that can support you and give you valuable advice for your ideas. I don't understand why you should communicate your ideas to everyone else? It is of course always good for the rest of us to see that you guys have great ideas (I mean seeing that now I want to invest more money that I do not have) but isn't that dangerous?

A suggestion could be for example, some sensitive information and ideas that you have are not posted for the viewing of everyone but only for members of this forums above a specific status?

Maybe all these are not so important and I am being paranoid so if that is the case just ignore me...


Title: Re: Secure Payments to Users by Name
Post by: jae208 on May 25, 2014, 05:54:43 pm
I think it is good that other members of other communities 'steal' our ideas and implement them. That way they can take the risk and we can learn if the idea actually works on them. What happens when they steal our ideas and implement them is that we are 'delegating' risk.  8)

I like SATAN MAUAHAHAHA  :D
Title: Re: Secure Payments to Users by Name
Post by: toast on May 25, 2014, 06:12:21 pm
Hey guys I think actually this already existed and it's called "stealth addresses"....
All we did is add name->key mapping on top =(

Title: Re: Secure Payments to Users by Name
Post by: toast on May 25, 2014, 06:12:37 pm
And Darkcoin actually does already do this
Title: Re: Secure Payments to Users by Name
Post by: solaaire on May 25, 2014, 07:17:59 pm
Hey guys I think actually this already existed and it's called "stealth addresses"....
All we did is add name->key mapping on top =(

haha nooooooo! a bit tragic for sure, but TITAN/SATAN still sound awesome even if another implementation of stealth addresses already exists... and personally im happy to hear that this innovation is in development for the bitshares ecosystem 
Title: Re: Secure Payments to Users by Name
Post by: bytemaster on May 25, 2014, 07:22:52 pm
Hey guys I think actually this already existed and it's called "stealth addresses"....
All we did is add name->key mapping on top =(

haha nooooooo! a bit tragic for sure, but TITAN/SATAN still sound awesome even if another implementation of stealth addresses already exists... and personally im happy to hear that this innovation is in development for the bitshares ecosystem

Stealth addresses is one thing... eliminating the use of 'addresses' is the real feature... ie: send to a name. 

Does Darkcoin have an internal name system?
Title: Re: Secure Payments to Users by Name
Post by: xeroc on May 25, 2014, 07:29:44 pm
No .. they dont :-)
Title: Re: Secure Payments to Users by Name
Post by: jae208 on May 25, 2014, 07:45:26 pm
PLUS Bitshares is a/will be a decentralized exchange ie: Bitcoin 2.0

As for Darkcoin... its just a coin  8)
Title: Re: Secure Payments to Users by Name
Post by: Bitcoinfan on May 25, 2014, 10:08:11 pm

[/quote]

Stealth addresses is one thing... eliminating the use of 'addresses' is the real feature... ie: send to a name. 

Does Darkcoin have an internal name system?
[/quote]

Has the Keyhotte id changed in the scheme of things?  It would be strange to have a ID for bitshares x and a ID for Keyhotte?
Title: Re: Secure Payments to Users by Name
Post by: bytemaster on May 25, 2014, 10:11:04 pm


Stealth addresses is one thing... eliminating the use of 'addresses' is the real feature... ie: send to a name. 

Does Darkcoin have an internal name system?
[/quote]

Has the Keyhotte id changed in the scheme of things?  It would be strange to have a ID for bitshares x and a ID for Keyhotte?
[/quote]

Yes... keyhotee will now use name@xts to address individuals, DACs are like companies, you can get 'email addresses' at every company. 
Title: Re: Secure Payments to Users by Name
Post by: cass on May 25, 2014, 10:27:19 pm

I suggested:

Transfer Invisibly to A Name  => TITAN

Other names are welcome.


That's a really great name, isn't it? I really like TITAN

Title: Re: Secure Payments to Users by Name
Post by: yellowecho on May 26, 2014, 02:34:42 am
 +5% this sounds so rad!   8)
Title: Re: Secure Payments to Users by Name
Post by: jae208 on May 26, 2014, 05:43:54 am
We should also have something called 'Darkshares'  8)
Maybe people are attracted to the Dark...
Title: Re: Secure Payments to Users by Name
Post by: cass on May 26, 2014, 06:53:08 am
We should also have something called 'Darkshares'  8)
Maybe people are attracted to the Dark...

yes people are attracted maybe .. but i'm not a friend of this kind of shady names

TITAN sounds epic :)

Title: Re: Secure Payments to Users by Name
Post by: liondani on May 26, 2014, 07:10:19 am
Titanshares

Sent from my ALCATEL ONE TOUCH 997D using Tapatalk

Title: Re: Secure Payments to Users by Name
Post by: JoeyD on May 26, 2014, 09:21:53 am
We should also have something called 'Darkshares'  8)
Maybe people are attracted to the Dark...

yes people are attracted maybe .. but i'm not a friend of this kind of shady names

TITAN sounds epic :)
I agree, I also like the implied connotation of attempting to challenge the gods instead of the hiding in the shadows one when using the dark-adjective. Dark and black are mostly used for things people know nothing about or are uncertain of, so to me it sounds more like a label of weakness or incompetence.
Title: Re: Secure Payments to Users by Name
Post by: xeroc on May 26, 2014, 01:27:58 pm
I wrote together a few lines of this thread:
http://pad.bitshares.org/p/Upcoming_Newsletter_articles

Please proof-read and add anything useful for possible readers of a newsletter.
Title: Re: Secure Payments to Users by Name
Post by: clout on May 27, 2014, 01:34:24 am
I think it should be Transfer Invisibly To Any Name
Title: Re: Secure Payments to Users by Name
Post by: xeroc on May 30, 2014, 09:50:37 am
x-post to btt: https://bitcointalk.org/index.php?topic=631287.msg7032706#msg7032706
Title: Re: Secure Payments to Users by Name
Post by: HackFisher on May 30, 2014, 04:28:41 pm
How will you do to implement the notification feature, if you are a developer of blockchain.info?
Is receiving notification possible without ext_private_key?
Title: Re: Secure Payments to Users by Name
Post by: bytemaster on May 30, 2014, 05:48:58 pm
How will you do to implement the notification feature, if you are a developer of blockchain.info?
Is receiving notification possible without ext_private_key?
No extended private keys. 

Notification feature is challenging unless you want to trust someone with read-only access to your funds.

You effectively encrypt with two keys, a read key and a spend key, both of which can be derived from your public key. 

The sending client would have to facilitate the observer.

Title: Re: Secure Payments to Users by Name
Post by: HackFisher on June 01, 2014, 02:16:18 am
Does user have to register a new name before other transfer some bts to him? What if that user do not have any balance to pay the name register fee?
Title: Re: Secure Payments to Users by Name
Post by: toast on June 01, 2014, 03:28:30 am
Does user have to register a new name before other transfer some bts to him? What if that user do not have any balance to pay the name register fee?

You can have an account that isn't registered. You share your public key and they create a sending account with that key.
Title: Re: Secure Payments to Users by Name
Post by: HackFisher on June 01, 2014, 03:36:07 am
Does user have to register a new name before other transfer some bts to him? What if that user do not have any balance to pay the name register fee?

You can have an account that isn't registered. You share your public key and they create a sending account with that key.

The "sending account" from sending client is not registered too, which might means TITAN wallet still have to manage local accounts.
I'm wondering whether or not we could simplify it by allowing sending/receiving bts with just key?
Title: Re: Secure Payments to Users by Name
Post by: HackFisher on June 01, 2014, 03:49:09 am
How will you do to implement the notification feature, if you are a developer of blockchain.info?
Is receiving notification possible without ext_private_key?
No extended private keys. 

Notification feature is challenging unless you want to trust someone with read-only access to your funds.

You effectively encrypt with two keys, a read key and a spend key, both of which can be derived from your public key. 

The sending client would have to facilitate the observer.

Sending client and receiving client are decoupled, which means that the sending client do not know whether or not the receive side need such read key(e.g. for notification), when generating the transfer transaction.

My understanding is that there are only two options, in the protocol or not. If it is not in the protocol, then it will be very difficult to support such feature in the network.

By the way, are the read key or spend key the fields user provided in the name account for the sending client to use? So you mean the receiver will tell the sender whether or not facilitate the read observer according to account settings?
Title: Re: Secure Payments to Users by Name
Post by: BTSdac on October 15, 2015, 07:45:57 am
While laying in bed this morning I had a flash of insight on how to significantly reduce the size of the signatures that prove who a payment is from.

Given Public Information (in blockchain):
Quote
dan => DANS_EXT_PUBLIC_KEY
scott => SCOTTS_EXT_PUBLIC_KEY

Assuming scott wants to send dan a payment anonymously, yet wants dan to know it is from him.

Quote
scott:  Generate OneTimePrivateKey  & OneTimePublicKey Pair
scott:  OneTimePrivateKey * DANS_EXT_PUBLIC_KEY => SECRET
                                        DANS_EXT_PUBLIC_KEY.child( SECRET ) => RECEIVE_PUBLIC_KEY => RECEIVE_ADDRESS
scott:  RECEIVE_PUBLIC_KEY * SCOTTS_EXT_PRIVATE_KEY => CHECK_SECRET
                                                                                    => SHORT_HASH(CHECK_SECRET) == SHORT_SIGNATURE

scott-broadcast:   OneTimePublicKey + RECEIVE_ADDRESS + ENCRYPT( from scott + SHORT_SIGNATURE, SECRET )

Quote
dan:   OneTimePublicKey * DANS_EXT_PRIVATE_KEY => SECRET
                                      DANS_EXT_PRIVATE_KEY.child( SECRET ) =>
                                                                RECEIVE_PRIVATE_KEY =>
                                                                  RECEIVE_PUBLIC_KEY => RECEIVE_ADDRESS

dan:   DECRYPT( data, SECRET ) => "from scott" + SHORT_SIGNATURE )
dan:   SCOTT_EXT_PUBLIC_KEY * RECEIVE_PRIVATE_KEY => CHECK_SECRET => SHORT_HASH(CHECK_SECRET)
HI  BM , I know you are busy recently , if you have spare , can you explain why use EXT_PRIVATE_KEY.child( SECRET ) rather than  EXT_PRIVATE_KEY(SECRET)  , 
generate many child key is the reason of  low inefficiency?