Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: gmaxwell on August 22, 2013, 02:32:31 AM



Title: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on August 22, 2013, 02:32:31 AM
Bitcoin is often promoted as a tool for privacy but the only privacy that exists in Bitcoin comes from pseudonymous addresses which are fragile and easily compromised through reuse, "taint" analysis, tracking payments, IP address monitoring nodes, web-spidering, and many other mechanisms. Once broken this privacy is difficult and sometimes costly to recover.

Traditional banking provides a fair amount of privacy by default. Your inlaws don't see that you're buying birth control that deprives them of grand children, your employer doesn't learn about the non-profits you support with money from your paycheck, and thieves don't see your latest purchases or how wealthy you are to help them target and scam you. Poor privacy in Bitcoin can be a major practical disadvantage for both individuals and businesses.

Even when a user ends address reuse by switching to BIP 32 address chains (http://bitcoinism.blogspot.com/2013/07/reclaiming-financial-privacy-with-hd.html), they still have privacy loss from their old coins and the joining of past payments when they make larger transactions.

Privacy errors can also create externalized costs: You might have good practices but when you trade with people who don't (say ones using "green addresses") you and everyone you trade with loses some privacy.  A loss of privacy also presents a grave systemic risk for Bitcoin:  If degraded privacy allows people to assemble centralized lists of good and bad coins you may find Bitcoin's fungibility destroyed when your honestly accepted coin is later not honored by others, and its decentralization along with it when people feel forced to enforce popular blacklists on their own coin.

As I write this people with unknown motivations are raining down tiny little payments on old addresses, presumably in an effort to get wallets to consume them and create evidence of common address ownership.

I think this must be improved, urgently.

This message describes a transaction style Bitcoin users can use to dramatically improve their privacy which I've been calling CoinJoin. It involves no changes to the Bitcoin protocol and has already seen some very limited use spanning back a couple of years now but it seems to not be widely understood.

I first publicly described this transaction style in a whimsically-named thread— "I taint rich! (https://bitcointalk.org/index.php?topic=139581.0)"— where I focused on a specific side effect of these transactions, with an expectation that people would see the rest of the implications on their own.

Explicit beats implicit, and even people who understand the idea have had some questions which could use answering. Thus this post.

The idea is very simple, first some quick background:

A Bitcoin transaction consumes one or more inputs and creates one or more outputs with specified values.

Each input is an output from a past transaction. For each input there is a distinct signature (scriptsig) which is created in accordance with the rules specified in the past-output that it is consuming (scriptpubkey).

The Bitcoin system is charged with making sure the signatures are correct, that the inputs exist and are spendable, and that the sum of the output values is less than or equal to the sum of the input values (any excess becomes fees paid to miners for including the transaction).

It is normal for a transaction to spend many inputs in order to get enough value to pay its intended payment, often also creating an additional 'change' output to receive the unspent (and non-fee) excess.

There is no requirement that the scriptpubkeys of the inputs used be the same; i.e., no requirement that they be payments to the same address. And, in fact, when Bitcoin is correctly used with one address per payment, none of them will be the same.

When considering the history of Bitcoin ownership one could look at transactions which spend from multiple distinct scriptpubkeys as co-joining their ownership and make an assumption: How else could the transaction spend from multiple addresses unless a common party controlled those addresses?

In the illustration 'transaction 2' spends coins which were assigned to 1A1 and 1C3. So 1A1 and 1C3 are necessarily the same party?

This assumption is incorrect. Usage in a single transaction does not prove common control (though it's currently pretty suggestive), and this is what makes CoinJoin possible:

The signatures, one per input, inside a transaction are completely independent of each other.  This means that it's possible for Bitcoin users to agree on a set of inputs to spend, and a set of outputs to pay to, and then to individually and separately sign a transaction and later merge their signatures. The transaction is not valid and won't be accepted by the network until all signatures are provided, and no one will sign a transaction which is not to their liking.

To use this to increase privacy, the N users would agree on a uniform output size and provide inputs amounting to at least that size. The transaction would have N outputs of that size and potentially N more change outputs if some of the users provided input in excess of the target.  All would sign the transaction, and then the transaction could be transmitted. No risk of theft at any point.

In the illustration 'transaction 2' has inputs from 1A1 and 1C3. Say we beliece 1A1 is an address used for Alice and 1C3 is an address used for Charlie. Which of Alice and Charlie owns which of the 1D and 1E outputs?

The idea can also be used more casually. When you want to make a payment, find someone else who also wants to make a payment and make a joint payment together. Doing so doesn't increase privacy much, but it actually makes your transaction smaller and thus easier on the network (and lower in fees); the extra privacy is a perk.

Such a transaction is externally indistinguishable from a transaction created through conventional use. Because of this, if these transactions become widespread they improve the privacy even of people who do not use them, because no longer will input co-joining be strong evidence of common control.

There are many variations of this idea possible, and all can coexist because the idea requires no changes to the Bitcoin system. Let a thousand flowers bloom: we can have diversity in ways of accomplishing this and learn the best.

FAQ:

Don't you need tor or something to prevent everyone from learning everyone's IP?

Any transaction privacy system that hopes to hide user's addresses should start with some kind of anonymity network. This is no different. Fortunately networks like Tor, I2P, Bitmessage, and Freenet all already exist and could all be used for this. (Freenet would result in rather slow transactions, however)

However, gumming up "taint analysis" and reducing transaction sizes doesn't even require that the users be private from each other. So even without things like tor this would be no worse than regular transactions.

Don't the users learn which inputs match up to which outputs?

In the simplest possible implementation where users meet up on IRC over tor or the like, yes they do. The next simplest implementation is where the users send their input and output information to some meeting point server, and the server creates the transaction and asks people to sign it. The server learns the mapping, but no one else does, and the server still can't steal the coins.

More complicated implementations are possible where even the server doesn't learn the mapping.

E.g. Using chaum blind signatures: The users connect and provide inputs (and change addresses) and a cryptographically-blinded version of the address they want their private coins to go to; the server signs the tokens and returns them. The users anonymously reconnect, unblind their output addresses, and return them to the server. The server can see that all the outputs were signed by it and so all the outputs had to come from valid participants. Later people reconnect and sign.

Similar things can be accomplished with various zero-knowledge proof systems.

Does the totally private version need to have a server at all? What if it gets shut down?

No. The same privacy can be achieved in a decentralized manner where all users act as blind-signing servers. This ends up needing n^2 signatures, and distributed systems are generally a lot harder to create.  I don't know if there is, or ever would be, a reason to bother with a fully distributed version with full privacy, but it's certainly possible.

What about DOS attacks? Can't someone refuse to sign even if the transaction is valid?

Yes, this can be DOS attacked in two different ways: someone can refuse to sign a valid joint transaction, or someone can spend their input out from under the joint transaction before it completes.

However, if all the signatures don't come in within some time limit, or a conflicting transaction is created, you can simply leave the bad parties and try again. With an automated process any retries would be invisible to the user. So the only real risk is a persistent DOS attacker.

In the non-decentralized (or decentralized but non-private to participants) case, gaining some immunity to DOS attackers is easy: if someone fails to sign for an input, you blacklist that input from further rounds. They are then naturally rate-limited by their ability to create more confirmed Bitcoin transactions.

Gaining DOS immunity in a decentralized system is considerably harder, because it's hard to tell which user actually broke the rules. One solution is to have users perform their activity under a zero-knowledge proof system, so you could be confident which user is the cheater and then agree to ignore them.

In all cases you could supplement anti-DOS mechanisms with proof of work, a fidelity bond, or other scarce resource usage. But I suspect that it's better to adapt to actual attacks as they arise, as we don't have to commit to a single security mechanism in advance and for all users. I also believe that bad input exclusion provides enough protection to get started.

Isn't the anonymity set size limited by how many parties you can get in a single transaction?

Not quite. The anonymity set size of a single transaction is limited by the number of parties in it, obviously. And transaction size limits as well as failure (retry) risk mean that really huge joint transactions would not be wise. But because these transactions are cheap, there is no limit to the number of transactions you can cascade.

In particular, if you have can build transactions with m participants per transaction you can create a sequence of m*3 transactions which form a three-stage switching network (http://en.wikipedia.org/wiki/Clos_network) that permits any of m^2 final outputs to have come from any of m^2 original inputs (e.g. using three stages of 32 transactions with 32 inputs each 1024 users can be joined with a total of 96 transactions).  This allows the anonymity set to be any size, limited only by participation.

In practice I expect most users only want to prevent nosy friends (and thieves) from prying into their financial lives, and to recover some of the privacy they lost due to bad practices like address reuse. These users will likely be happy with only a single pass; other people will just operate opportunistically, while others may work to achieve many passes and big anonymity sets. All can coexist.

How does this compare to zerocoin (http://zerocoin.org/)?

As a crypto and computer science geek I'm super excited by Zerocoin: the technology behind it is fascinating and important. But as a Bitcoin user and developer the promotion of it as the solution to improved privacy disappoints me.

Zerocoin has a number of serious limitations:
  • It uses cutting-edge cryptography which may turn out to be insecure, and which is understood by relatively few people (compared to ECDSA, for example).
  • It produces large (20kbyte) signatures that would bloat the blockchain (or create risk if stuffed in external storage).
  • It requires a trusted party to initiate its accumulator. If that party cheats, they can steal coin. (Perhaps fixable with more cutting-edge crypto.)
  • Validation is very slow (can process about 2tx per second on a fast CPU), which is a major barrier to deployment in Bitcoin as each full node must validate every transaction.
  • The large transactions and slow validation also means costly transactions, which will reduce the anonymity set size and potentially make ZC usage unavailable to random members of the public who are merely casually concerned about their privacy.
  • Uses an accumulator which grows forever and has no pruning. In practice this means we'd need to switch accumulators periodically to reduce the working set size, reducing the anonymity set size. And potentially creating big UTXO bloat problems if the horizon on an accumulator isn't set in advance.

Some of these things may improve significantly with better math and software engineering over time.

But above all: Zerocoin requires a soft-forking change to the Bitcoin protocol, which all full nodes must adopt, which would commit Bitcoin to a particular version of the Zerocoin protocol. This cannot happen fast—probably not within years, especially considering that there is so much potential for further refinement to the algorithm to lower costs. It would be politically contentious, as some developers and Bitcoin businesses are very concerned about being overly associated with "anonymity". Network-wide rule changes are something of a suicide pact: we shouldn't, and don't, take them lightly.

CoinJoin transactions work today, and they've worked since the first day of Bitcoin. They are indistinguishable from normal transactions and thus cannot be blocked or inhibited except to the extent that any other Bitcoin transaction could be blocked.

(As an aside: ZC could potentially be used externally to Bitcoin in a decentralized CoinJoin as a method of mutually blinding the users in a DOS attack resistant way. This would allow ZC to mature under live fire without taking its costs or committing to a specific protocol network-wide.)

The primary argument I can make for ZC over CoinJoin, beyond it stoking my crypto-geek desires, is that it may potentially offer a larger anonymity set.  But with the performance and scaling limits of ZC, and the possibility to construct sorting network transactions with CJ, or just the ability to use hundreds of CJ transactions with the storage and processing required for one ZC transactions, I don't know which would actually produce bigger anonymity sets in practice. E.g. To join 1024 users, just the ZC redemptions would involve 20k * 1024 bytes of  data compared to less than 3% of that for a complete three-stage cascade of 32 32-way joint transactions. Though the ZC anonymity set could more easily cross larger spans of time.

The anonymity sets of CoinJoin transactions could easily be big enough for common users to regain some of their casual privacy and that's what I think is most interesting.

How does this compare to CoinWitness (https://bitcointalk.org/index.php?topic=277389.0)?

CoinWitness is even rocket-sciency than Zerocoin, it also shares many of the weaknesses as a privacy-improver: Novel crypto, computational cost, and the huge point of requiring a soft fork and not being available today. It may have some scaling advantages if it is used as more than just a privacy tool. But it really is overkill for this problem, and won't be available anytime real soon.

Sounds great! Where is it?

Theres the rub: There exist no ready made, easy-to-use software for doing this.  You can make the transactions by hand using bitcoin-qt and the raw transactions API, as we did in that "taint rich" thread, but to make this into a practical reality we need easy-to-use automated tools.

Luke has written up some sketches a protocol (https://gist.github.com/luke-jr/5409899) which would enable establishing joint transactions over the regular Bitcoin network.

The Bitcoin-qt RPC system provides everything someone needs to write a side-car applet (including the ability to lock txouts to prevent them from being spent out from from under it) that participants in such a system. But the fact that so many users use centralized webwallets today which can spy on them will ultimately limit the userbase for these tools.

Personally, most of my coding brain capacity is spent on other things which are even more important to me. And what I could spare on Bitcoin is spent on more core and security things— if I work on anything wallet related anytime soon it will likely be improving the privacy behavior of coin selection... But moreover:

Anyone who builds this is going to be accused of enabling criminal activity, it doesn't matter if any actual criminals use this or not: Criminal activity sells headlines. Being a Bitcoin core developer already fills my quota for accusations of this kind, especially my quota for risk that I'm not even paid for. :)

In reality, real criminals don't need CoinJoin if they have even the slightest clue: They can afford to buy privacy in a way that regular users cannot, it's just a cost of their (often lucrative) business.

Joe-criminal can go out and buy 120% PPS mining to get brand new coins, or run his money through a series of semi-sham high cashflow gambling businesses for a 50% cut, they can afford the cost of seeking out and interfacing with these seedy services... Joe and Jane doe? Their names are up in neon on blockchain.info. It might not seem great to them, but if there a high cost of fixing it they simply won't, because the cost of fixing it is very concrete and the cost or privacy loss is speculative and distant. They might just need to give up bitcoin and switch to something almost totally private: cash... Regular users need efficient and inexpensive privacy if it is to help them at all.

I know that making such a tool doesn't fit into the get-rich-quick mold of many Bitcoin businesses, but the importance is self-apparent and the simplest versions of this don't require very deep technical wizardry. I think the "political" risk of improving people's privacy is a real one that you should carefully consider, but around these parts I see people sticking their names on some rather outrageously risky stuff. I'd hoped the "taint rich" thread would be enough to inspire some community action, but perhaps this will be.

So, instead, I ask you: Where is it?


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: gmaxwell on August 22, 2013, 02:35:24 AM
In order to further incentivize work in this space there is now a multisignature escrow bounty fund:

   3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk (bitcoin:3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk)
                    (yes, Bitcoin addresses can also start with a 3)

This is a two-of-three multisignature escrow with myself, Theymos, and Pieter Wuille as signers. To release any coin sent to this address at least two of these people must sign the transaction.

The bounty fund will pay out as funds are available according to the signers best judgment for completed work proposed in this thread that furthers the goal of making improved transaction privacy a practical reality for Bitcoin users.

Please feel free to contribute to the above address to support work on this infrastructure.

Multisig address construction details:
Code:
Key from Theymos:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Here is a public key of mine, usable for the CoinJoin bounty fund:
02d5f2b9c68b22006161dfe58a78b37dc2b577e8bb4e4522940830264eb3b3a38b
-----BEGIN PGP SIGNATURE-----

iF4EAREIAAYFAlISs5MACgkQxlVWk9q1kednkgD/WvE3F1hSoKHIr+y7q3O6xbGp
FM+P/lVbi/nZugrlNKABALMhYih2Ov80OS1PLMX9UpONn2eE2Xu+ZkxZ2SkQFfCU
=lFI0
-----END PGP SIGNATURE-----

Key from Gmaxwell:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Here is a public key of mine, usable for the CoinJoin bounty fund:
027b48575c15712867a8a1e6c9f52f510946130bbdf3b1e2feb344b8b68232ffb1
-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAlIbCV4ACgkQrIWTYrBBO/ooAgCdG9twTEFH5q+5Pip9qDOGsoww
a7YAoLfVP4CBaxk5mnpMXVHpQXqgVwxL
=k1JR
-----END PGP SIGNATURE-----

Key from Pieter:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
 
Here is a public key of mine, usable for the CoinJoin bounty fund:
0292782efcb08d621c360d055f407c8e75ffbbd06f6b7009c1432ca9eaa6732592
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
 
iQGcBAEBCAAGBQJSpLf6AAoJEI9lMlXIeZLgtRkL/3ufWgLyhTKM9T30JqA0a/Xh
5KUMD0csuxTMYraVOy9x7tRVZh+fETt4Y3clhErZj8g6VraC5ku+4pyHxtFztWor
N6QadkAvwuCAqmBxbAmb7hTq41eXjptzwqyUWh/z6YecBKeRIxIi/8LGqX/+gODd
GlKj66Ex27wgp9gJp/1Ot+hrTmmasxXAEjXYJTKr4LjJeajH/HJJQeCI6jTy4fdm
TsplX7rUgzhdZQ60malyn1MCmtdXRviWyWuAvKgpIaEMaZsFCSMfvNzUtKHiMv3n
HPxe9OAv1V2rdwU9oa7gxHLSvF7BER1XpWcA0UKTeD1w2/vzPZj3exDDHT8A35Ro
nhK6cJPYTdnzXLavpFqRD85R1G9W3rl4IzqfflXwWB2rRByyLROvrMfVG8iLMYP0
JcaB+8kttzqTa0vBiaosCvSbFZAfw2seyXxxF5anH4Q0ueMJKglLp6rE/51s1bQa
Hz6rsSAAdvx/OSCitKp1+JMzSKA/SwNMRUy4VqKQ4g==
=70Dh
-----END PGP SIGNATURE-----

2-of-3 Address construction:
$ bitcoind createmultisig 2 '["02d5f2b9c68b22006161dfe58a78b37dc2b577e8bb4e4522940830264eb3b3a38b","027b48575c15712867a8a1e6c9f52f510946130bbdf3b1e2feb344b8b68232ffb1","0292782efcb08d621c360d055f407c8e75ffbbd06f6b7009c1432ca9eaa6732592"]'
{
    "address" : "3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk",
    "redeemScript" : "522102d5f2b9c68b22006161dfe58a78b37dc2b577e8bb4e4522940830264eb3b3a38b21027b48575c15712867a8a1e6c9f52f510946130bbdf3b1e2feb344b8b68232ffb1210292782efcb08d621c360d055f407c8e75ffbbd06f6b7009c1432ca9eaa673259253ae"
}


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: TheButterZone on August 22, 2013, 02:51:02 AM
Yum


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Johnathan on August 22, 2013, 02:54:22 AM
(As an aside: ZC could potentially be used externally to Bitcoin in a decentralized CoinJoin as a method of mutually blinding the users in a DOS attack resistant way. This would allow ZC to mature under live fire without taking its costs or committing to a specific protocol network-wide.)

This is an extremely interesting idea.  Could you elaborate on how the Zerocoin transaction stages map to the stages of CoinJoin transaction creation?


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: gmaxwell on August 22, 2013, 03:14:49 AM
This is an extremely interesting idea.  Could you elaborate on how the Zerocoin transaction stages map to the stages of CoinJoin transaction creation?
For non-decenteralized coincoin, you simply pass around a transaction and sign it. It's a single sequence and an atomic transaction, you'd make two loops through the users, one to discover the inputs and outputs, and another to sign them. There really aren't stages to it.

Making a decenteralized CoinJoin secure, private, and resistant to DOS attack (people refusing to sign in order to make it fail) is trickier... for the privacy and dos attack resistance you can use ZC:

Presume the participants for a transaction are sharing some multicast medium and can all communicate.  They need to accomplish the task of offering up inputs (txid:vout) for inclusion in the transaction and then, in an unlinkable way, providing outputs to receive their coins.

Each participant connects and names bitcoin input(s), an address for change (if needed), and the result of performing a ZC mint transaction to add to the ZC accumulator. They sign all this with the keys for the corresponding inputs proving its theirs to spend.

Then all the parties connect again anonymously and provide ZC redeem transactions which specify where the resulting bitcoins should go.

On their original connections all parties can now see the redeem transactions and are convinced that they were provided by the correct parties, and that they themselves will be paid. So they all sign the transaction.

If a party fails to sign, everyone else is convinced that its because they are jamming the process (intentionally or maliciously) and then can all ban (ignore in the future) whatever costly identity they used to enter the mix, or — if there is no other mechanism— that particular txin which they used.

This isn't the only way to do this in a decentralized manner, the way to do it with blind signatures is fairly similar:

Each participant connects, names Bitcoin input(s), an address for change (if needed), a key for blind signing, and a blinded hash of the address they want paid. They sign all this with the keys for the corresponding inputs proving its theirs to spend.

Each participant then blind signs the blinded hashes of all participants (including themselves).

Each participant then reconnects anonymously and discloses their unblinded values and all the signatures. Because all the participants can see all the signatures, they know all are authentic. They sign, and if they refuse to sign everyone is convinced that the refusing signer is attempting to jam and bans them.

The most obvious difference between the two techniques is that the blind signing requires N^2 signatures, and potentially three communication phases (submit, blindsign, redeem) instead of two (mint, redeem) if you wanted this process to span more than a single event.

As I said above, I generally think the non-decenteralized versions of these transactions will be implemented and commonly used first, simply because they're so much less work to do.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: jnagyjr on August 22, 2013, 05:25:34 AM
In order to further incentivize work in this space I'd like to create a multisignature escrow bounty fund.

Theymos has agreed to be a cosigner with me and I'm currently looking for a third party. (Unfortunately, many of the people I'd normally ask would like to be potential bounty recipients, and I'd rather reduce the possible conflict of interest)

The bounty fund would pay out of this fund as funds are available according to the signers best judgment for completed work proposed in this thread that furthers the goal of making improved transaction privacy a practical reality for Bitcoin users.

I'll update this post when I have it ready.

I'd like to help out with this if possible. I have little BTC to put into such a bounty fund, nor am I a programmer. Let me know what I can do to help.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: domob on August 22, 2013, 07:47:43 AM
Take a look also here: https://bitcointalk.org/index.php?topic=200952.0  I think this is a similar concept, which is currently being worked on already (and I think even a test-net some-what-working version already exists).


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: ShadowOfHarbringer on August 22, 2013, 07:52:01 AM
@gmaxwell

I'm saluting to the unquestionalble genius of you and (almost ?) everybody else in this community.

Do you have any plans to start working on this feature soon ?
EDIT:
OK i read your post completely and appears that you are not.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Mike Hearn on August 22, 2013, 11:42:30 AM
This is a really nice writeup, thanks Gregory. Such ideas have been kicked around informally for a while:

https://bitcointalk.org/index.php?topic=175156.msg1829259#msg1829259

see the part about p2p mixing protocols ... but it's good to have a name and a formal writeup.

The examples of how ordinary, everyday privacy leaks can cause people problems are great. I think I've named the "people learning each others salaries" one before, but birth control is an interesting one.

I think adding a rendezvous mechanism to the P2P network makes sense. It's already a broadcast network after all. So perhaps the right design is not to try and do absolutely everything over the existing P2P network but rather allow people to announce rendezvous points (Tor hidden services?) over the broadcast channel and then allow nodes to set announcement filters like they set Bloom filters today. If you are an SPV/leaf node on the network you wouldn't hear announcements until you request them. Other nodes would relay them all.

The difficult part is that you need a lot of traffic to make this work. Current tx volumes don't even reach one per second. So to accumulate enough users for a mix, you'd need to wait a while. It's fine for some kinds of payments that aren't time sensitive, but it's not going to work today for restaurant bills.

If I were doing it, I'd want to do the bulk of the implementation in bitcoinj of course, just because that's what most users are going to end up using (given current trajectories). It also has the advantage that using a managed language like Java eliminates entire classes of security holes, always a concern when writing financial software.

The advanced crypto part isn't necessarily that advanced and doesn't require ZK proof systems. Such protocols were already designed:

http://blog.ezyang.com/2012/07/secure-multiparty-bitcoin-anonymization/

It just requires secure multi-party sorts, which is a more well studied subset of general MPC.



Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: bg002h on August 22, 2013, 01:17:54 PM
I'm too dumb to contribute to the code...but not so dumb as to not contribute to the bounty.  Thank you for the detailed explanation of this important issue.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: blueadept on August 22, 2013, 01:28:53 PM
Meni Rosenfeld has also proposed using commutative encryption to mask participants from each other in such a scheme: https://bitcointalk.org/index.php?topic=54266.0


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Peter Todd on August 22, 2013, 03:05:08 PM
FWIW I'll try implementing a "coin dust" collector this weekend that just does makes SIGHASH_NONE|ANYONECANPAY signatures for the dust in your wallet and sends them to a central collection point.

Regarding mixing in general if you can split up the mix protocol into separate stages of "I want these txouts", "I'll sign for those txouts", make broadcasting those requests use up a limited resource, and finally have a P2P flood fill network where finding the originator of a message is hard you can easily make a system that is both anonymous and DoS resistant. If we add a messaging layer to Bitcoin where messages are paid for somehow, perhaps by fees paid, this can be easily developed into a automatic 'coinjoin' system for every transaction made. In addition if you can add expiry times to 'txout requests' when peers connect you can give them the outstanding requests, which means allows nodes that just connected to their peers to quickly make a transaction even if they weren't online while the request was made.

What's really nice about this implementation is that while on the one hand it's a mixer, on the other hand it's also just a DoS-resistant way of making transactions smaller by getting multiple parties together to make them. It doesn't require any dedicated "rendezvous" points that may find their actions legally frowned upon, nor does it require a separate system (like Tor) be installed to talk to those points. The general purpose messaging layer could be useful for other things too - it'd be easy to use it for alerts for instance.

Rough technical sketch:

1) Create the messaging layer

1.1) Define NODE_MSG to signal that a node will relay messages. Define "message" inventory type and add to ppszTypeName. Optional: define "realms" of messages split up by a UUID or something.

1.2) Write code to maintain an inventory of such messages. Basically this will look kinda like the mempool, and there will be some time period for which old messages are expired, as well as a limit on total messages stored.

1.3) Relay those messages to peers/respond to getdata requests. If "realms" are supported, a bloom filter to select which realms a peer is interested in is useful.

2) Make DoS-attacks expensive

2.1) For every mempool tx, record the scriptPubKeys spent, and take the fees of the tx and proportion them to those scriptPubKeys.

2.2) Add a way to for messages to be signed by scriptPubKeys, and reduce the "balance" of fees recorded for each message. (amount sacrificed per msg should be configurable) Note that it may be necessary to only allow for fees to be used from transactions that have been actually mined - not sure how much that opens up attacks.

2.3) Other methods, PoW, fidelity bonds etc. possible too.

3) Add mix protocol

2.1) Define "I want these txouts" and "I'll sign for these txouts" messages.

2.2) Add logic for the announce/sign sequence, along with options for the user to decide how fast they want the tx to be generated. Typically after a few seconds I'd expect the program to give up and just sign the txouts it already has, thus creating a non-mixed tx. Note how if you need more than one txout in a given transaction this can still be a privacy improvement, because you can arrange so that the txin/txout set is still indistinguishable from a two-party tx.

2.3) Add better logic to make sure the fee-paying tx's used don't break anonymity - you wouldn't want to use the same scriptPubKey for txout announce and signature announce. Also clever crypto can help here too - but that can be added later. Remember that timing is a potential anonymity breaker too, so randomize it, and also randomly sometimes wait for the other party to broadcast signatures, or sometimes broadcast signatures yourself.

2.4) Long-term: add more SIGHASH options to make it easier to specify what txin's and txouts a signature applies too on a set basis, rather than the current inflexible options available.

4) Add prioritization so that blocks always get priority over message data and are transferred around the network fastest. Note how having non-blockchain data actually helps the overall resistance to traffic analysis for the whole system by providing a constant stream of data for which latency is less important to hide the data for which latency is more important.

Another fun one: with realms you can port completely different applications, like IRC chat, to run over this basis concept. Only nodes that are interested in a particular application, or are willing to lend bandwidth to allow users of that application more anonymity, need to relay messages for a given realm, which keeps the whole system scalable. Needs some work to actually find peers for a given realm, but that's just a matter of extending the address gossip functionality.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: TierNolan on August 22, 2013, 03:44:37 PM
FWIW I'll try implementing a "coin dust" collector this weekend that just does makes SIGHASH_NONE|ANYONECANPAY signatures for the dust in your wallet and sends them to a central collection point.

That basically sends the dust to anyone who wants it?  How does that help?

Quote
3) Add mix protocol

2.1) Define "I want these txouts" and "I'll sign for these txouts" messages.

Since everyone has to pay for the service, if it fails, everyone loses.  However, the DOS attacker loses faster?

The "currency" for paying for message relay is effectively coin-age?

The transaction would be flooded in stages, everyone gets version 1 then version 2 then version 3 and so on.

Eventually someone signs and that ends the mixing. 

Signing the transaction early also acts as a DOS attack.

There would also be a requirement that "cleaned" coins have standard sizes.  You pay for something and you get 2 change payments, a cleaned standard value coin and the remainder.

This creates an incentive for merchants to set prices as one of the standard coin sizes.  One coin moving through the system doesn't link multiple transactions together at least.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Peter Todd on August 22, 2013, 05:59:15 PM
FWIW I'll try implementing a "coin dust" collector this weekend that just does makes SIGHASH_NONE|ANYONECANPAY signatures for the dust in your wallet and sends them to a central collection point.

That basically sends the dust to anyone who wants it?  How does that help?

People appear to have been sending very large numbers of addresses dust as a way to break anonymity. Granted, they also may have been doing it as a way to get signatures from scriptPubKeys due to the 'R' re-use issue, but the script would use bitcoind to spend the dust which is known to not be vulnerable.

Also there's lots of pretty much unspendable dust out there from Satoshidice and others, and again such a script can help.

Quote
3) Add mix protocol

2.1) Define "I want these txouts" and "I'll sign for these txouts" messages.

Since everyone has to pay for the service, if it fails, everyone loses.  However, the DOS attacker loses faster?

The "currency" for paying for message relay is effectively coin-age?

No, it's fees paid by previous transactions.

Now that does raise the question of where do those fees come from if you haven't made a transaction in awhile? One decent option is in fact to spend coin-age by signing to a txout that you don't actually intend to spend, however that's open to DoS attack by entities that simply have a lot of Bitcoins. Fidelity bonds are another option.

As an aside, the actual process of spending credit should include a field for the current balance of credit prior to that spend, and the hash of the previous time this credit was used to make double-spending credit not possible. This is particularly important with the coin-age or fidelity bond version, because there it's quite possible for nodes to securely give their peers the current status of the credit balance based on smallest balance left.

The transaction would be flooded in stages, everyone gets version 1 then version 2 then version 3 and so on.

Eventually someone signs and that ends the mixing. 

Signing the transaction early also acts as a DOS attack.

I'm actually thinking that mixes should have a small number of participants, usually two or three. Remember that we want the process of creating a tx to be as fast as possible, and multiple rounds of mixes wind up with just as much anonymity as fewer rounds with more participants in each round.

The economics of the DoS attack are such that the attacker wastes only a small integer multiple less fees than the target(s), and the targets are already spending the fees anyway. IE the defenders already have the resource, fee paying transactions, that the attacker has to buy specifically to launch the attack.

There would also be a requirement that "cleaned" coins have standard sizes.  You pay for something and you get 2 change payments, a cleaned standard value coin and the remainder.

Standard sizes do not have to be a requirement actually. Suppose Alice has 2BTC and wants to send 1.5BTC to Bob: she can announce that she wants a 1.5BTC txout with Bob's scriptPubKey, and a 0.5BTC txout to a change address and broadcast that. Now suppose Charlie has 0.75BTC and simply wants to mix some of it, but doesn't really care how much. He can note that Alice has a 0.5BTC txout, and broadcast a request to make a transaction with her txouts, as well as a 0.5BTC txout to one of his addresses, and a 0.25BTC txout to a change address of his.

When the final transaction gets mined there are two 0.5BTC txouts - but who's are they?

Even in the general case where you have an Alice and a Bob who both want to send money it's often hard to figure out whose inputs and outputs are whose. Do the txouts belong to the same person, and they were just paying multiple people? Which of the multiple txins was actually owned by who?

It's easy to make the task of following the transaction graph very difficult without trying provided a lot of people are combining their transactions.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: TierNolan on August 22, 2013, 06:56:45 PM
Also there's lots of pretty much unspendable dust out there from Satoshidice and others, and again such a script can help.

True.  People might be willing to throw it away.

Quote
I'm actually thinking that mixes should have a small number of participants, usually two or three. Remember that we want the process of creating a tx to be as fast as possible, and multiple rounds of mixes wind up with just as much anonymity as fewer rounds with more participants in each round.

True, and as you say, it isn't about perfection, it just increases the effort.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: phelix on August 22, 2013, 08:40:52 PM
Finally... atomic coin laundry. Nice.  ;D


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: jnagyjr on August 22, 2013, 08:57:11 PM
If the goal is a simple way to regain anonymity, why are there counter-proposals to make regaining it more complex? Just curious.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: marcus_of_augustus on August 23, 2013, 02:49:13 AM
I can probably contribute commits to this, debugging, testing, cross-platform building, etc.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: gmaxwell on August 23, 2013, 03:19:15 AM
If the goal is a simple way to regain anonymity, why are there counter-proposals to make regaining it more complex? Just curious.
I'm not sure what you're referring to, but in general I think a lot of people have not thought the fungibility implications through, and are also confusing privacy and anonymity because they are intimately related, especially where pseudoynmity is used to achieve privacy. Anonymity is fundamentally hard, and consider anonymity improvements a side effect of good privacy. If you want to go around telling someone which transactions are yours, you still can. And, an interesting point of that is that it's not at all incompatible with what is proposed here. Even if you're happy telling a particular set of people all about your transactions, that doesn't imply you also want the whole world to know.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: jnagyjr on August 23, 2013, 03:45:54 AM
If the goal is a simple way to regain anonymity, why are there counter-proposals to make regaining it more complex? Just curious.
I'm not sure what you're referring to, but in general I think a lot of people have not thought the fungibility implications through, and are also confusing privacy and anonymity because they are intimately related, especially where pseudoynmity is used to achieve privacy. Anonymity is fundamentally hard, and consider anonymity improvements a side effect of good privacy. If you want to go around telling someone which transactions are yours, you still can. And, an interesting point of that is that it's not at all incompatible with what is proposed here. Even if you're happy telling a particular set of people all about your transactions, that doesn't imply you also want the whole world to know.


I'll accept that, but the counter-proposals/additions to your initial proposal do nothing to keep the complexity for the user down. As an end user who is looking for ease of use and decent privacy, some of the other schemes here, unless done transparently, are just too much to keep up with.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Luckybit on August 23, 2013, 05:00:41 AM
This seems overly complicated. Is there any reason why Bitcoin isn't private enough as it is?

You presented a hypothetical situation which has not occurred yet.  It's not perfectly private but compared to credit cards and banks its very private. It's almost as private as cash.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Peter Todd on August 23, 2013, 06:03:30 AM
I'll accept that, but the counter-proposals/additions to your initial proposal do nothing to keep the complexity for the user down. As an end user who is looking for ease of use and decent privacy, some of the other schemes here, unless done transparently, are just too much to keep up with.

My proposal can be 100% automated - the user doesn't even need to know it's happening behind the scenes.

It's also not really any different in spirit from what gmaxwell suggested in the first place - I've only fleshed out details with a particular way to do it.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: gmaxwell on August 23, 2013, 06:41:58 AM
This seems overly complicated. Is there any reason why Bitcoin isn't private enough as it is?
You presented a hypothetical situation which has not occurred yet.  It's not perfectly private but compared to credit cards and banks its very private. It's almost as private as cash.
I edited that post down from a longer (4000 word?) version which included some specific examples that I had some personal involvement in: The (third?) ozcoin thief, who was identified by sending funds to a wallet service that reused addresses (and ultimately had those funds clawed back), and a person who had an insecure brain wallet found by a whitehat, ultimately tracked down and contacted due to a mining pool which reused addresses.

There are many other examples of privacy in Bitcoin being weak— one only needs to spend a few minutes browsing through bc.i's public block explorer interface (http://blockchain.info/) to see real names attached to transactions (found by spidering webforums) and frequently accurate IP addresses (associated by connecting to many nodes), and from there you can find additional related addresses with the taint analysis button. Or look at the academic research (http://arxiv.org/abs/1107.4524) "Bitcoin is not inherently anonymous. It may be possible to conduct transactions is such a way so as to obscure your identity, but, in many cases, users and their transactions can be identified." (papers on Bitcoin are of, ahem, highly variable quality— but the point remains, Bitcoin's privacy as it is today is not very good).

The privacy gap between Bitcoin and cash for most users is enormous, enough so that we have an explicit warning on Bitcoin.org (http://bitcoin.org/en/you-need-to-know):
Quote from: bitcoin.org
"Some effort is required in order to protect your privacy with Bitcoin. All Bitcoin transactions are stored publicly and permanently on the network, which means anyone can see the balance and transactions of any Bitcoin address. However, the identity of the owner cannot be associated with their Bitcoin address until personal information is revealed by the owner during an exchange. This is why it is recommended for Bitcoin owners to use many different Bitcoin addresses; in fact, you should create a new one each time you receive money. This is especially important for public uses such as websites. You might also want to consider hiding your computer's IP address with a tool like Tor so that it cannot be logged."

Ignorance of these limitations makes the situation worse because without being acutely aware of the risk you will transact in ways that leaks more information about you and the parties you trade with.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: phelix on August 23, 2013, 09:23:39 AM
We need a concept for a practical implementation of this in the main client. Then bounties and popcorn.



Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: TierNolan on August 23, 2013, 10:12:45 AM
I'm actually thinking that mixes should have a small number of participants, usually two or three. Remember that we want the process of creating a tx to be as fast as possible, and multiple rounds of mixes wind up with just as much anonymity as fewer rounds with more participants in each round.

If it was locked to 2 participants, then you could use something like

flip a coin

If heads, send a broadcast with "I'll pay for <my outputs>".
If tails, wait for a broadcast and then broadcast to 50% of peers "I'll pay into mix(<other's outputs> <my outputs>)"

(Tails needs a timeout)

wait until you receive tx with all outputs broadcast from 1/3 of peers [ * ]

Wait 5 to 15 seconds at random from that point to broadcast tx with signed inputs that pay to the full set of outputs [ ** ]

One or other of the 2 participants can broadcast the full transaction to the network.

The fee would have to be agreed in advance.  Each participant would pay half the fee.

I still think standard coin sizes would help with the mixing.  However, the trick where you create a coin to mix with a person's change address is a good idea.

You could actually mix with both pieces.

I send 0.1BTC and 0.01BTC change.  The other person might buy something for 0.9 BTC with change of 0.1, 0.01 and <remainder>.  They get their change mostly mixed and would still be paying a tx fee.

[ * ]
If you send the broadcast, then this is 1/3 of the nodes you didn't send it to.  This could be restricted to outbound nodes.
This syncs both participants to have the same start time.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Nordstern on August 25, 2013, 09:50:28 AM
Paying for anonymity isn't a good idea! It let look the coin like some commercial instrument (what we all dont want!). Maybe it is a good idea to pay with some stake or similar concept?


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: AnonyMint on August 25, 2013, 03:36:03 PM
Check my logic. I don't see the point.

As I understand the problem-to-solve is that if someone reveals your identity for any transaction then any other spends from the same public key are associated with your identity and any spends (inputs) from other public keys to the same transactions as the identified public key are with high-likelihood associated with your identity.

The CoinJoin solution is dual pronged in that if a greater percentage of blockchain transactions are inputs from multiple parties, then the high-likelihood case is reduced in likelihood for all users of the blockchain that don't use CoinJoin. The second prong is the mixing of parties for a transaction using CoinJoin protects the identity of the public keys for the parties spending using CoinJoin.

Note the first prong is an improvement even when someone reveals your identity for all the input public keys of a transaction, because you may use one of those public keys later with other uncompromised public keys in other transactions that were not revealed.

However, CoinJoin is unnecessary if no one ever knows your identity.

If you must provide your identity, then why are you using Bitcoin and not your credit card, cash, money order, paypal, etc?

I suppose there are rare cases where you want to give your identity to someone trusted but not the identity of the merchant to your bank. But that hardly seems like a compelling use case to justify such convoluted systems as proposed for CoinJoin. Credit card numbers can be stolen but in the relatively rare event, most of the time your issuer will remove any unauthorized charges. If identity theft is your concern, then again why are you providing your identity.

And against the NSA and the government, plausible deniability is not a defense (http://blog.jim.com/economics/bitcoin-as-a-speculative-bet.html/comment-page-1#comment-342152) (btw jim is James A Donald, first person ever publicly recorded as interacting with Satoshi). So if they know your IP then they can compel you to unmix all the mixing stages.

Thus, I view zerocoin and CoinJoin as a lower priority than a high-latency Chaum mix-net (or dc-net), which we don't have available today (https://bitcointalk.org/index.php?topic=227287.msg2958176#msg2958176).

If you are littering your identity all over the web, then nothing is going to help you.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: jdillon on August 26, 2013, 04:41:07 AM
Edit: donating more

I may be jumping the gun a bit, but please accept this 10.11BTC donation to the fund:


-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.11 (GNU/Linux)

hQIOAwAAAAAAAAAAEAgAhYb+uVMQsS/LBxtWH3PKcfQkpBhbygfrRLtaZn4DSPGP
F12rmQQ8QRJOiRyKgrXrwXWoLZ4cFA9q2VabhyiYLWo/NO+pdP+h/XnHteTmjvTI
rRwZjMtXntGZO2Awh+BpsKlUyfnDpCuPbkZGT82/iubUWhTrbQAPseEISVArP9Jd
SvPVnw2cHQnvBu9aU6+qzf7rmYox2dMYPHkAtRLtAYO5WU087dhGWoNW0S7E6pNG
P8NkYYg18YJA7wHZ9raBf6QzhhEJY4ppuIIe6P60CzxsU+acswPA3yFKjzPXaMQv
ZeglXsOC/jWX36s/f7Q03ICPg2wEguJiMrKPDew9fwf/eX+or4F1QLJWX7e2bPbS
hMsI+H/EjV9iuNoRmYmWQq+Q+aP6RZC6SwESXEgp0lqr3poLO0za7mYuxiiZg2IQ
1255u2yVz0ikdGv1VKr2tyEZLitARID3YVetEWdTIm/rlHsKV7stF6zh+fnVIHjx
jkmaKa4G8dGGOhDt2xLsgfB6oJ9iuDJHSDL9nXU3aanTPc7E8NFhUHrxBW+CWu6E
wo7xlnfjYrSYFTjrhVqm0ywbWmpyTdhb54w7AroOjeTU7axgcbNV4b59v0H8HSx2
EGlDnSf4wKWPX28c9r/aXevd5Jt2GQtwI48noqKNC4ryPVgZF65FpaRy7Z0E9s21
CIUBDAMAAAAAAAAAAAEH/0QxCBCEp8x+QwA1WwvyD4/f4OW8LAjKO2idR9NNJFx0
yLK0ohtX5nGryZujvAwvZmG1Haanj9QFQ26Xxpe4NINGee3EZ/kBMIxDWQ7vqXmx
yvU+g6W8lhwWO4Fs9mX5yrt/KnYL2AS5e4A3ZKXiJzLvd+fQ26NuuO9UTeHvB4fv
DaivRxV+Jytfym875cob+q4BvjklqjW4QSKMLMZbHXUgYlqmEWbVdIqOMoa/11nA
c9vYWzMBv4+dzX1QNILtAjH57zac2axowKDanZ0zCmp0WyZu3ZzDRP3/SIIilCKr
TrKxTeRzgJssOacxahH9qSFxYlWbtZ61mZJmU8Ny7HaFAQwDAAAAAAAAAAABB/9D
krpjhcyVrDTq/6b8QiCxznCiv8GvMLQEs4amVStGXYY8YnwuTqcOpzrMno0/FQp/
atkMc8mR1LoeWd182YRvnRRDqBM3Iz8OsEPOM2Pnjgi/ZTrKkncWMOiZALjH2vLT
JKCJa62ou08cDL6Y+sX9SHQOpxG3kG1/QcKaaqwpbQLLm6lz4TxF1+c/Mjd9Zukq
3qq9h2v7gwbc6KJXsq3ZbXp5prNgAhtoJPRIv+kcxnfEwO0hpGnyoJ1xb16YsqMN
L6JmmHKJhi60B6t4S8TWvth7piVfce1d6izDpXQJ2gmkNS/mah3rw/jpeCdHgeQd
PnqaSkj5Nmqa98rbYQyo0ukBYW9cHSZONbFqT994oSU/7C+8GVFPXet+gxbja9nB
kaWwi1PL7ngSSrYbchzrREmLxNY3RALVwcjWyPrc7Dax+G+vfVw+dANzxQtt0a22
J6hFVBAp70XvNM9YCg1CkAIqnyd+Y8bYmgAcAkNOovg2KZh0wWmziAEP/FizNbZm
xpWd4TXzTKNae3usoJxjBGUS6DAk26fZFkvczqEDJBW3GCPHYcupIa9k9FECnIaF
Wp/YodreY3bzFWidJpFZtpvt4qLz/PovxhZoR/9nqBjwsCJSEXtx7VcuPjKKWCRx
7miDE/xzKS8QIKV8/BZjcNf0S6H/BwxnGyzLTVSpukPvqy8B/RxUO+nf4RFSNpNT
jp+0tlILpncwzTDL2h6FF/jtj+nl4cTT23ZazbkuYAlxnwMxU+GU6jtQZLHAoYdo
n9TjMNDZZCRN5spMWu1UWnKqQ1Gc43q0vUJ+s5KWj2T3lOoYoSsNYrAQmPoilsLH
3Lh0Lg4sPVoG1DwwKXOVrkJF34utSlCFl63h/PMFXmjRgcueb0Ta6POU4njGg8VY
sEKc0bux7+lK0bMgoQA3O/quxHsK0Q3uQVWmNtTjqU2uf/sE3mz5twTGU8bDOWYu
88PuGBANtQHkNR1Cz1yHnPug5tI8NXYsC3PNKnu9DmI9y4TBK6qFSfJm8cZVbfLS
AcD7vvQgizaMTNi8FW4/NfKi0tNLE8foZgV1m6pXgYr4pzfWhWdcJUZ7ClV41Vzl
RDayvveBOWy/w68eUc8/5nWmH6+phmwtpjFWuht/OIGY1Oo91LoO0h+CgMKf5kur
zCBa72DTZfVpaDzwaRcr8tcP60u77PYrL8NMw6LP9q7760bbij+DJ274tWlmJnsM
9q/ZhVXm7bW5m1gXIGO7Hl4Dce9S3ImxxzCogcwP0VaZP4IZPNCmmK8xkmIiAKDV
Rr8mKh00KtaP0tby06IOuRr5bo2XbMo0knEwsdVHyM/yocAfPMbfPlJlao5ZI/XA
xV5db7pETa08sjKoYGHyjvJnclQ9P0yFy8jK/b8LoFAej/bVGQwdckIsBIEUg28F
C1tOskPkd7B4fiL4tGqfEkI7msvGYgH366kI63osglOcaYTj4BzvufkqSO4LwgLK
yzZlmyVfx+PaJzoL1F+IGUAmD9E4Fz5dporFHGW2elAtIh8MEywyZyPWvr1kJ5Q8
iEe3CHLM0X834PwLQ7snKzuoCulRvQnuiwfqVqASTwwjR05XpzhcalWAkhSPgRG/
rj1GXIngmSEO/hiFSOE=
=AaHO
-----END PGP MESSAGE-----

What I most like about this concept is its simple engineering pragmatism. You know, ZeroCoin solves exactly one problem really well, but it solves it so well because they pushed the envelope so far in one particular direction. From an academic point of view it makes for great papers and clever theory, but the history of cryptography is littered with empty and disused ivory towers, and in any case often those towers lack railings.

I have to wonder how many of the people pushing ZeroCoin so hard even recognize that it needs a mix net or a standard way of getting your transactions to those you are paying to be useful?

AnonyMint: You come so close to being pragmatic in how you recognize the need for mixers for communication. But then you miss so badly, like it or not, normal users will make mistakes that reveal their identity, and CoinJoin can help make those mistakes less devastating. In any case it is usually not the boogeyman of three-letter-agencies who the users of CoinJoin would be trying to protect themselves from, but individuals and businesses who simply want to use Bitcoin with the same level of financial privacy they enjoy in with the convention banking system.

Look at the above. I am happy to have the world know I am giving 5BTC to this effort, and I am happy for Gregory Maxwell to know that it is me where the money is coming from. But why should I give the whole world insight into my finances? With CoinJoin I won't have to use something as convoluted as encrypting an access key, and the proposals above share a common thread of being such that all the actual complexity can be hidden away in software with a sufficiently sophisticated implementation.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: AnonyMint on August 26, 2013, 05:46:34 AM
AnonyMint: You come so close to being pragmatic in how you recognize the need for mixers for communication. But then you miss so badly, like it or not, normal users will make mistakes that reveal their identity, and CoinJoin can help make those mistakes less devastating. In any case it is usually not the boogeyman of three-letter-agencies who the users of CoinJoin would be trying to protect themselves from, but individuals and businesses who simply want to use Bitcoin with the same level of financial privacy they enjoy in with the convention banking system.

That is if there is no cost to having multiplexed transactions, unlimited number of public keys, and the delays and limited time windows of CoinJoin or the blockchain + hash check bloat of Zerocoin. I am also thinking of a Visa-scalable block chain. Your naive users will never be using Bitcoin any way, because the blockchain can't scale. By making CoinJoin popular, you will have further cemented Bitcoin's inability to modify the block chain design in this respect (although there may be a way to scale the block chain with multiplexed transactions and unlimited public keys, I am still studying this).

If there is no cost, I am not against it. I am arguing it is lower priority, not that it isn't worth considering if it fits into the big picture goals.

If we aren't concerned about the bogeyman who can see everyone's IP address or deposit viruses on our machine, then employing a high-latency Chaum mix-net with a standalone machine (e.g. Rasberry PI running L4 Linux) isn't that crucial. Then the only way users reveal their identity is by:

1. Explicitly giving it to the recipient.

2. Using the same browser for both entering their spending public key and browsing the internet, e.g. Google's cookies.

3. Use Windows 8

Did I miss any?

If we are concerned about more sophisticated harvesting of identity (which I am, because of Anonymity or Regulation (https://bitcointalk.org/index.php?topic=160612.msg2930989#msg2930989) and more), then with a high-latency Chaum mix-net built in for all incoming transactions, the above two pitfalls still apply.

And even with CoinJoin or Zerocoin, the above three pitfalls still apply.

I still don't see how CoinJoin or Zerocoin practically gain the naive user anything. Either the user stops giving up their identity by not doing the above three items, or they don't.

I understand the concept that IF users only give up their identity by mistake infrequently, thus delinking the block chain can in theory recover from such user error. However, I think users do what they do habitually.

P.S. CoinWitness is interesting because it can move the multiplexing of transactions off the blockchain, so then people employing decentralized mixing don't burden the block chain design. However, if a future design limits public keys, still need to support in the blockchain some way to retire and regenerate public keys for those coming out the other side of the offline mixer. (EDIT: note that last sentence might not be true, if the output can pay to existing key which is not yourself.)

Look at the above. I am happy to have the world know I am giving 5BTC to this effort, and I am happy for Gregory Maxwell to know that it is me where the money is coming from. But why should I give the whole world insight into my finances? With CoinJoin I won't have to use something as convoluted as encrypting an access key, and the proposals above share a common thread of being such that all the actual complexity can be hidden away in software with a sufficiently sophisticated implementation.

So why not have a separate individual BTC pool of capital for those purposes where you explicitly want to be public? Else send him a paypal to his email address. (Personally I wouldn't be announcing publicly my ownership of Bitcoin, because I think the governments are going to demand capital gains taxes in arrears, when they declare it isn't money rather a good like gold).

You are conflating use cases of BTC, just because you want it to be more convenient in one way, yet you potentially make it less capable in another way (for someone who is considering any possible blockchain design for the future) by choosing that convenience over other considerations.

We have to be sophisticated in our analysis of tradeoffs.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: gmaxwell on August 26, 2013, 07:34:44 PM
The bounty address is now up and already has 12.19262795 BTC assigned to it.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: gmaxwell on August 26, 2013, 07:39:23 PM
Another potentially useful idea I had in this space is CoinJoin software for doing matching charitable contributions.

E.g. you announce "I'll pay ~1 BTC to the EFF if 10 other people do too" and form a joint transaction with a single output. This may be fun, socially beneficial, and improve user privacy because even 1 TX output transactions couldn't be assumed to reveal common ownership of the input keys. Likewise, common donation outputs could be used to receive jagged change ediges in other kinds of join transactions which would otherwise be data revealing.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: TierNolan on August 26, 2013, 08:04:15 PM
you announce "I'll pay ~1 BTC to the EFF if 10 other people do too" and form a joint transaction with a single output.

It has the nice feature as a leading application that it would be harder to shut down as it is charitable.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Natanael on August 26, 2013, 08:10:21 PM
I have one suggestion that among others uses Secure Multiparty Computation (SMPC). https://en.wikipedia.org/wiki/Secure_multi-party_computation

Step one: Peer finding is done using a DHT network. This can be done inside I2P or Tor if you want to for increased anonymity. You might want to do reputation tracking where nodes uses public-key based pseudonyms (if you reuse a pseudonym, you must make sure to not spend inputs that can be tied to you personally more than just once (or rather not more often than the average, some identifiable inputs might by chance be involved with the same 3rd party multiple times) with that pseudonym since it otherwise can be directly correlated with your pseudonym).

To make verification of inputs simple and quick, each client keeps an updated Merkle tree hash of all currently valid spendable outputs in the blockchain (basically those that not have been spent yet) in this form: [Address]-[Transaction ID]-[Amount of BTC].

The SMPC uses cryptography to emulate a trusted 3rd party computer, running code all participants have agreed on. Unless a majority of the participants collude (Sybil attacks are a potential issue, be careful about who you run this with), no participant can get any other information out of it than they are *supposed* to get out of it.

Now, everybody puts in their transactions and their private keys for them. The SMPC checks if all participants really have the correct private keys for the (valid) previous outputs they claim as inputs through checking what addresses they correspond to, what transaction ID was claimed and how many bitcoins are claimed, and checks this data against the Merkle hash tree.

It then checks that the outputs aren't larger than the inputs. A transaction is then generated with all the user provided inputs and outputs, and signs it with all the private keys.

The signed transaction is given as an output to all the participants, and any one of them can publish it (or all of them at once).

Nobody can know which transactions came from whom, other than that they know their own. Out comes a signed Bitcoin transaction that includes them all in one. Either everything gets signed properly or it exits with an error. The protocol doesn't allow the generated transaction to be created in any other way than the correct way. All user specified outputs will be included, all user specified inputs will be included, no user can specify larger outputs than inputs (unless everybody agrees), etc...

The only major risk here is that of a Sybil attack (a large number of colluding nodes), and the major risk in here is private-key disclosure, the second is identifying which pseudonym spent what input. I hope that we can get around that somehow. One possible way is to not have the private keys provided to the SMPC, but to use simply prove you have the private key through signing a challenge of some sort, where the challenge can be a random number that is a checksum of all random numbers provided as inputs by the participants, so you only need one signature per participant. The SMPC would then only output an unsigned transaction, where all participants needs to sign it. The question then is how they all share their signatures with the other participants, ideally they should be able to hide that it came from them. Chaumian blinding could maybe be used in this step.

If you decide to not use blinding (to just pass on your signature), and not use any permanent pseudonym of any kind, then you'll have a risk of DoS attempts through both doublespend attempts (making the generated transaction invalid) and through canceled SMPC runs at the last step (thus wasting CPU power).

My intent is to make the system as automatable and fast as possible while maintaining full security.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: phelix on August 26, 2013, 08:14:03 PM
The bounty address is now up and already has 12.19262795 BTC assigned to it.
What about putting it somewhere on the OP top and adding a tldr?

CoinJoin - Improving Bitcoin Privacy using Shared Transactions

Will spin it on http://blockchained.com



Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: gmaxwell on August 26, 2013, 08:18:07 PM
I don't see any reason to hand your private key over to the SMPC, the point of this thread is that our transaction design is already such that users can separately sign a transaction. You could use SMPC to build the transaction to sign, and then everyone signs.  This would be less brittle, e.g. sybils don't get your private key they can only jam the process or get a user unfairly banned. OH you say that at the end.

I don't follow why you think you need signature privacy at the end? You could use a homorphic mix, or just use SMPC to do the combine (e.g. two phases)... but the signatures only show ownership of an input, and the input side is normally not considered as private.

I'm not aware of any general production scale implementations of SMPC, it would be very exciting for a lot of things— are you aware of any system that could be realistically tasked with signing bitcoin transactions with commodity hardware separated by consumer internet connections?


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Natanael on August 26, 2013, 08:28:39 PM
I don't see any reason to hand your private key over to the SMPC, the point of this thread is that our transaction design is already such that users can separately sign a transaction. You could use SMPC to build the transaction to sign, and then everyone signs.  This would be less brittle, e.g. sybils don't get your private key they can only jam the process or get a user unfairly banned. OH you say that at the end.

I don't follow why you think you need signature privacy at the end? You could use a homorphic mix, or just use SMPC to do the combine (e.g. two phases)... but the signatures only show ownership of an input, and the input side is normally not considered as private.

I'm not aware of any general production scale implementations of SMPC, it would be very exciting for a lot of things— are you aware of any system that could be realistically tasked with signing bitcoin transactions with commodity hardware separated by consumer internet connections?

gmaxwell: Yes, in the last part of that comment, that's what I suggested.

If a pseudonym is reused often, then correlation could be used to link all inputs with the pseudonym that provided them. This could the be further used to see if outputs from mixed transactions that the pseudonym in question has been part in often has some outputs in common, thus deanonymizing users who use this frequently for the same outputs (assuming the recipient has repeating or non-individual payment/donation addresses, which is common).

I've read that SMPC has been used IRL successfully for auctions for farms selling their goods. Can't remember the source. SMPC should be possible to run on most hardware. There's multiple implementations of it, some in Java and some in C.

How would a homomorphic mix work?

Two-round SMPC could certainly work, where the inputs simply are the individual signatures plus the previously unsigned transaction, creating a properly signed transaction.

Edit: SMPC implementations:
FairplayMP: http://www.cs.huji.ac.il/project/Fairplay/
Sepia: http://www.sepia.ee.ethz.ch/
Viff: http://viff.dk/
SIMAP (nothing available for download?): http://ny.alexandra.dk/uk/labs/Security-lab/Pages/Secure-Multiparty-Computation.aspx


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: gmaxwell on August 26, 2013, 08:37:27 PM
If a pseudonym is reused often, then correlation could be used to link all inputs with the pseudonym that provided them. This could the be further used to see if outputs from mixed transactions that the pseudonym in question has been part in often has some outputs in common, thus deanonymizing users who use this frequently for the same outputs (assuming the recipient has repeating or non-individual payment/donation addresses, which is common).
Ah okay, yes the anti-dos pseudonym tracking is why I had suggested the method of using the input coin itself as the identity.

Quote
I've read that SMPC has been used IRL successfully for auctions for farms selling their goods. Can't remember the source. SMPC should be possible to run on most hardware. There's multiple implementations of it, some in Java and some in C.
A specialized for doing a meet in the middle auction (e.g. a few comparison operations and an arithmetic average) is a whole other of magnitude less complex than running a complete transaction processing program in it. Going and figuring out where the state of the art is in that space has been on my todo list.

Quote
How would a homomorphic mix work?
Every participants has a key for a homomorphic encryption scheme (which can be decrypted or encrypted in arbitrary order). Each party encrypts their signature with everyones key, the signatures are grouped up and passed around, with each peer permuting their order and applying a re-encryption operation. At the end they all decrypt in sequence and you get a mixed output. The downside is that people can silently jam the mix by replacing or corrupting data during reencryption. To prevent this you need to do cut and choose (e.g. mix 10000 times, commit to all of them, one gets picked as the real mix output and you reveal the rest) and that takes a lot of bandwidth.

As an aside— I hope the cryptowizardy for the decenteralized versions of this aren't scaring people off. Part of the merit of CoinJoin as an idea is that there are braindead simple ways of using these ideas that don't require cryptomagic and are only somewhat compromised compared to what you can do with maximal magic.  I personally find the magic very exciting, but I find actual systems that people can use even _more_ exciting.  I hope people will work at this space from both ends.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Natanael on August 26, 2013, 08:51:54 PM
Quote
using the input coin itself as the identity

I don't see how that would help countering DoS, you won't likely be reusing inputs so there can't be reputation tracking.

Quote
A specialized for doing a meet in the middle auction (e.g. a few comparison operations and an arithmetic average) is a whole other of magnitude less complex than running a complete transaction processing program in it. Going and figuring out where the state of the art is in that space has been on my todo list.

It was a bit more than that IIRC. It was highest bid wins, with winner paying the price set by the second highest bid, and it was NOT just two or three participants, it was a LARGE auction. A very large amount of offered goods and bids.

Besides for risk of sybil+correlation attacks (which can be partially countered through reputation tracking), I like my SMPC scheme.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: gmaxwell on August 26, 2013, 08:59:37 PM
Quote
using the input coin itself as the identity
I don't see how that would help countering DoS, you won't likely be reusing inputs so there can't be reputation tracking.
You don't reuse your inputs if the transaction completes successfully. Basically having an available (potentially aged) input of sufficient size that has not been used to jam the mix is a scarce resource that would limit attackers. The network already rate-limits people's ability to create new outputs as part of its own dos protection. This isn't the greatest anti-DoS possible, though you could add PoW to it too if you wanted, but in the lightweight schemes the harm of jamming the mix is very low, so the protection doesn't have to be especially great.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Natanael on August 26, 2013, 09:10:34 PM
Ok, so coin age would be your DoS countermeasure?

Note that attackers don't actually have to spend that input if they disrupt the protocol. They can use the same one over and over, even many times simultaneously.

PoW could be an option where participants can set a minimum PoW accepted and a maximum PoW they're themselves willing to perform. So for example if 10 people all have 2^15 work within their range of acceptable PoW (one has 2^15 as their lowest, another as their highest, they'll all generate a common input for PoW and start working on it. Then they start this scheme with the SMPC. That would indeed make the attack costly for somebody trying to break the scheme for as many as possible (DoS) and would make Sybil very costly.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: gmaxwell on August 26, 2013, 09:16:33 PM
Note that attackers don't actually have to spend that input if they disrupt the protocol. They can use the same one over and over, even many times simultaneously.
You're missing my point.  If you detect them disrupting the protocol the participants blacklist that input and never participate with it again (ideally the protocol would be such that they got proof of the disruption that they could show to others). But since success consumes the input you don't have a problem with long term identity linking. Yes, simultaneous is a possible but even in the worst case a given input could only be used to jam each group of users once. If recovering from a jamming is just a few packet round trip times and signature operations to redo the mix, this isn't so bad.

In any case, I've probably given you enough of my thoughts on this. Go out and code. Practice trumps theory.  As I said in my initial post, I suspect that it might be better to just start out with very weak dos protection and then adapt to the actual threats rather than trying to predict all possible threats in advance. Unlike a global consensus system there is no great harm in evolving this technology.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Natanael on August 26, 2013, 09:28:18 PM
It isn't certain that you'd be able to tell WHICH input that the attacker used, at least not with my scheme where you hide who's using what input. Revealing who's using what input might not be optimal if a user want to use inputs already tied to himself AND some inputs that aren't already, and doesn't want the unlinked ones to become linked to him.

Also, it's hard to convince other that the attacker maliciously broke the scheme where none of the participants has any long-term pseudonym, thus it's hard to blacklist that one input. Also, a single input can STILL be used many times simultaneously, even if not many times in a row.

I don't have enough experience with programming, and absolutely not of crypto implementations, to be able to make a proper proof-of-concept of this, sorry. I'm hoping that somebody else *who does* will find this interesting enough to implement.

So far I'm thinking that my two-round version SMPC scheme with initial PoW before starting SMPC would be pretty decent, where you'd remember which pseudonyms that mixing has worked with in the past. Participants that don't supply PoW is ignored, and to stop a sybil attack where many nodes don't do PoW to try to make you calculate PoW for nothing you'd connect to multiple dozens of random nodes at once.
Edit: If the SMPC was given bad inputs, it would also reveal who it was that gave it the bad inputs (if it were to finish, but giving bad inputs + interupting the SMPC is just wasteful from an attacker's point of view).

And by the way, I'm one of those who wants the system to be as solid as possible in advance. Nobody deploys bad encryption algorithms and try to patch the algorithm as flaws is found. Not that I think that the other suggestions is bad, but I don't want people to get screwed over because somebody forgot to consider a simple attack that a little bit more analysis would have revealed and maybe shown how to stop.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: gmaxwell on August 26, 2013, 09:54:04 PM
And by the way, I'm one of those who wants the system to be as solid as possible in advance. Nobody deploys bad encryption algorithms and try to patch the algorithm as flaws is found. Not that I think that the other suggestions is bad, but I don't want people to get screwed over because somebody forgot to consider a simple attack that a little bit more analysis would have revealed and maybe shown how to stop.
Dos attacks on systems which don't require flag day updates are categorically different from cryptographic breaks. I fear the approach you are advocating would result in us getting nothing at all. (but, I certainly would welcome it if someone wanted to actually work on it!)


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Natanael on August 26, 2013, 10:31:53 PM
The risk of DoS in many of these cases could make the entire scheme unusable for as long as it's decentralized, as you can't really effectively ban the attacker. If the attacker can run 20x as many fake nodes as there are real nodes and abuse the scheme to only spend a trivial amount of computing power and bandwidth, while making the real users waste lots of it, then the system is trivially rendered unusable. Just throw a botnet at it and it's dead.

That's why I'm thinking hard on DoS prevention.

Edit: Also, regarding change addresses: You should split up your change in several parts. If everybody does that and thus generally also refers to multiple inputs for the transaction as a result, then correlation based on the BTC sums is much harder.

Edit: https://bitcointalk.org/index.php?topic=12751.msg315793#msg3157931 - So somebody else had the same basic idea over 2 years ago. Although my version (who originally was almost identical to his) now accounts for various types of possible attacks.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: genjix on August 27, 2013, 08:04:57 AM
Hi,

I am claiming the bounty.

More info: https://bitcointalk.org/index.php?topic=282086

Source code: https://github.com/calafou/coinjoin


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: ShadowOfHarbringer on August 27, 2013, 08:14:20 AM
Hi,

I am claiming the bounty.

More info: https://bitcointalk.org/index.php?topic=282086

Source code: https://github.com/calafou/coinjoin
Wow, that was unexpectedly fast.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: maaku on August 27, 2013, 08:24:14 AM
As far as I can tell, genjix's implementation is neither decentralized nor private, correct? The hard parts are still left to be done.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: TierNolan on August 27, 2013, 08:33:53 AM
As far as I can tell, genjix's implementation is neither decentralized nor private, correct? The hard parts are still left to be done.

Right, the key is to make it a thing normal users do.  Central services can be shutdown.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Peter Todd on August 27, 2013, 11:29:51 AM
As far as I can tell, genjix's implementation is neither decentralized nor private, correct? The hard parts are still left to be done.

Also genjix should keep in mind this isn't a "one-time" bounty:

Quote
The bounty fund will pay out as funds are available according to the signers best judgment for completed work proposed in this thread that furthers the goal of making improved transaction privacy a practical reality for Bitcoin users.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: jtimon on August 27, 2013, 12:37:08 PM
A simple scheme to enhance privacy without modifying the protocol.
I like it a lot.

By the way, there's a lot of confusion around zerocoin: http://themisescircle.org/blog/2013/08/22/the-problem-with-altcoins/
Is it a bitcoin upgrade? I doubt the overhead deserves it.
Is it a merged mined altchain with a coin fungible with btc? No way.
Will it become an altcoin? Probably.
Sorry, I don't want to move the thread to another direction, just wanted to note how less problematic this solution is.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: genjix on August 27, 2013, 11:06:16 PM
Server:
  • Powerless: has no real power. It's just a meeting point for participants to exchange data.
  • Uninformed: has no special information except that which is public (and goes on the blockchain). There's no mapping between inputs and outputs because clients add their data in successive stages.
  • Controls nothing: holds no funds. Funds and private keys are stored client side. Signing is done client side.
  • Tor service. You can take down hidden services, but Silk Road and all the other services are still running around since 2+ years. Code is opensource so you can setup your own services. Users just paste the URL into the software. It's not really centralised. An analogy: BitcoinSpinner uses the BitcoinSpinner server, but in Electrum you choose your server and can setup your own.
  • Extensible. Adding the p2p mechanism for exchanging data can easily be done. Replace the ServerInterface class methods in client.py with your own: https://github.com/calafou/coinjoin/blob/master/client.py Then the URL in the software becomes a shared secret. We designed the software with this in mind.

More technical info: http://sx.dyne.org/anontx

We've delivered usable software, simple for grandma (money goes in, money goes out), requires no blockchain or bitcoind, easy to install and trustless. We followed gmaxwell's instructions as our guidepoint and went further. And we delivered the product fast.

http://i.imgur.com/y6CuFLA.png

As far as I can tell, genjix's implementation is neither decentralized nor private, correct? The hard parts are still left to be done.

Right, the key is to make it a thing normal users do.  Central services can be shutdown.

You have the code. Setup your own server. It's all opensource.

FAQ:

Don't the users learn which inputs match up to which outputs?

In the simplest possible implementation where users meet up on IRC over tor or the like, yes they do. The next simplest implementation is where the users send their inputs and outputs to some meeting point server, and the server creates the transaction and asks people to sign it. The server learns the mapping, but no one else does, and the server still can't steal the coins.


note: Our implementation of the server is in stages and does not know the mapping so it's better even.

This is an extremely interesting idea.  Could you elaborate on how the Zerocoin transaction stages map to the stages of CoinJoin transaction creation?
For non-decenteralized coincoin, you simply pass around a transaction and sign it. It's a single sequence and an atomic transaction, you'd make two loops through the users, one to discover the inputs and outputs, and another to sign them. There really aren't stages to it.

...

As I said above, I generally think the non-decenteralized versions of these transactions will be implemented and commonly used first, simply because they're so much less work to do.


note: we do a 4 step process where the outputs and inputs are loaded separately, so the server doesn't know the mapping between them


I think adding a rendezvous mechanism to the P2P network makes sense. It's already a broadcast network after all. So perhaps the right design is not to try and do absolutely everything over the existing P2P network but rather allow people to announce rendezvous points (Tor hidden services?) over the broadcast channel and then allow nodes to set announcement filters like they set Bloom filters today. If you are an SPV/leaf node on the network you wouldn't hear announcements until you request them. Other nodes would relay them all.



Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Natanael on August 28, 2013, 12:04:47 AM
Why have servers at all? With I2P it would also be really easy to use DHT to set things up. Instead of a unique URL you could have a unique random string of any kind. Or even fully random peer selection.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: domob on August 28, 2013, 06:47:41 AM
Take a look also here: https://bitcointalk.org/index.php?topic=200952.0  I think this is a similar concept, which is currently being worked on already (and I think even a test-net some-what-working version already exists).

This seemingly got lost.  Can anyone explain what the difference of the proposed scheme here is to what seems to be already implemented?


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: gmaxwell on August 28, 2013, 10:50:15 AM
Uh. Does someone have a bug to report for a tool from this thread? (http://blockchain.info/tx/4ed20e0768124bc67dc684d57941be1482ccdaa45dadb64be12afba8c8554537)  (If you want you can report to me in pgp email anonymously.)


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Hawkix on August 28, 2013, 01:11:42 PM
Hmm. Novel idea to mix coins into mining pool fee. Untraceable. ;)

Seriously, there is a chance ASICMINER will help the poor soul(s).


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: marcus_of_augustus on August 28, 2013, 01:15:36 PM
Hi,

I am claiming the bounty.

More info: https://bitcointalk.org/index.php?topic=282086

Source code: https://github.com/calafou/coinjoin

Good start ... even the most massive of constructions begin with a single stake in the ground.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: CIYAM on August 28, 2013, 01:16:30 PM
lol ... 200btc fees!

Shit - I thought I had the record for paying the most fees ever (due to creating a raw tx when way too tired).

I hope they can get that back (in my case I got most of it back).


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: phelix on August 28, 2013, 08:32:29 PM
Take a look also here: https://bitcointalk.org/index.php?topic=200952.0  I think this is a similar concept, which is currently being worked on already (and I think even a test-net some-what-working version already exists).

This seemingly got lost.  Can anyone explain what the difference of the proposed scheme here is to what seems to be already implemented?
Interesting...  would like to hear an opinion, too. (PMed Tom)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Tom Scholl on August 28, 2013, 08:48:10 PM
Thanks for the heads-up of this thread.

I spent a month working on a peer-to-peer Bitcoin privacy solution back in May, it's called BitPrivacy (https://bitcointalk.org/index.php?topic=200952.0).

It's aim is a fully decentralized solution providing strong privacy, and as such it is more ambitious and complicated than genjix's CoinJoin.

A decentralized solution spreads the legal risk over everyone running nodes - I'd rather be a developer of privacy software than someone running a privacy service. I spent a couple of days reading the laws of my country (UK), and they are surprisingly broad.

Technically the plan is to have a peer-to-peer network over Tor. Privacy is achieved by everyone writing their inputs to the network; when all are supplied they make a new Tor connection & write their outputs.  

BitPrivacy version 0.2 featured:
- Bitcoinj-based
- Arbitrary N-party transaction schemes
- Blind signatures via the Bouncy Castle library
- All communication over a DHT, via the mature TomP2P library
- Aggressive trading strategy - it tries to transact with everyone simultaneously

Some things I didn't get round to:
- Peer discovery & running a well-known node - you have to enter an IP to connect to
- Adding a command-line switch for ProdNet (an easy code change)
- Tor

You can download the jar file right now, and join some testnet coins between N wallets. There is a thorough description of the protocol at DETAILS.md (https://github.com/dustyneuron/bitprivacy/blob/master/DETAILS.md), and the threat model and defenses are in THREATS.md (https://github.com/dustyneuron/bitprivacy/blob/master/THREATS.md). The code quality is rough, but it does have some test cases. Forks, code-plundering, etc all welcome!

I actually put in a grant request to the Foundation for this. I don't think I'll ever get it, at least it gave me an incentive to document everything.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: jdillon on August 29, 2013, 03:00:36 AM
I'd like the administrators of this bounty to make clear some conditions for a large portion of the reward to be given:

  • Testing - It has been rumored that the recent 200BTC fee transaction was the result of a failed CoinJoin transaction. Regardless of whether or not that is true, unittests and good coding practices should be taken into account.
  • # of users - Take into account the # of potential users. Solutions applicable for a larger % of the total Bitcoin userbase are much more important than solutions not so widely applicable. Solutions that can be used 'by default' are far more valuable than ones that can-not.
  • Licensing - Part of being widely applicable is the license of the software. I am in RMS's camp here, and while normally it makes sense to use restrictive open-source licenses in a tit-for-tat scenario, like him I too believe that sometimes getting the idea as widely used as possible is the right approach. Note that RMS has specifically said this in relation to Bitcoin's MIT license. Implementations should use licenses no more restrictive than LGPL.
As the largest individual contributor to date I hope my words are taken seriously.

Yes, I am writing this in response to Amir's proof-of-concept, which is nice to see happen quickly for people to play with, but to see it reported in Bitcoin Magazine already as "and today, two Bitcoin developers in Spain have come up with a solution." very much bothers me given how far it is from a complete solution.

For one thing, the code has rather frightening constructs such as:

call("sx rawscript [ %s ] [ %s ] | sx set-input txfile.tx %s > signed-tx" % (signature, pubkey, input_index))

I would not in the least bit be surprised if there is either a shell exploit already present, or there will be one in the future. In addition there is no license for the code, and it depends on sx/libbitcoin with are AGPL licensed.

tl;dr: I would be happy to see Amir and co receive a token BTC for their efforts, but they have to put a lot more work in for what they have done to be worth more than that.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Peter Todd on August 29, 2013, 03:11:48 AM
jdillon: I think all your points are reasonable ones.

I'd advise people doing work on this stuff to write robust mechanisms first, and only then follow up with GUI's and other gloss. The experts who should be playing with these tools initially don't need GUI's to do so.

I'd also advise people to release implementations that only work on testnet until enough time has passed to have some hope that the bugs have been shaken out - it's easy to lose money fast with wallet related code and we can't afford to get people burned initially.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: TheButterZone on August 29, 2013, 04:33:21 AM
Oh come on, who does a live test anywhere near keys with 200 BTC on them? That's staggering confidence.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: genjix on August 29, 2013, 04:56:37 AM
Hi ppl, this is Pablo, co-implementor of CoinJoin proof of concept with Amir (sorry don't have an account here so writing through Amir's account):

New "release" of CoinJoin, features:

 * Server now has a public "lobby" to serve as meeting point (front page announcing "open" coinjoins)
 * Creator of coinjoin can choose amount, so its no longer just 0.01, now you can join arbitrary amounts
 * The client can now resume the session in different runs, so you can actually run it in several times to finish the coinjoin and wait for other ppl joining (you had to keep it open before).


You can check the video at (shows using the tool and lobby):

 * http://www.youtube.com/watch?v=rr6DeziHdFs

Test server still at:

 * http://7vxb75tbnszhy2go.onion

We keep working on the implementation and more features so donations welcome at: 1H1LP8UhGR5wK9WppBMwewCddwdebYqwwT
(ideas are the ones from his thread including: serverless setup, casual use for joining tx and fees...).

Code at: https://github.com/calafou/coinjoin, free and open source ;-)

Cheers!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Peter Todd on August 29, 2013, 05:00:23 AM
Code at: https://github.com/calafou/coinjoin, free and open source ;-)

You need to add a statement as to what license the code is released under; without one the code is not open source as all creative works are copyrighted by default.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: genjix on August 29, 2013, 05:28:50 AM
You need to add a statement as to what license the code is released under; without one the code is not open source as all creative works are copyrighted by default.

You're right, added COPYRIGHT notice, made it AGPL for now, since this is proof of concept we will think about a more permissive license but we're comfortable with AGPL to encourage a more open ecosystem.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: genjix on August 29, 2013, 06:07:21 AM

For one thing, the code has rather frightening constructs such as:

call("sx rawscript [ %s ] [ %s ] | sx set-input txfile.tx %s > signed-tx" % (signature, pubkey, input_index))

I would not in the least bit be surprised if there is either a shell exploit already present, or there will be one in the future. In addition there is no license for the code, and it depends on sx/libbitcoin with are AGPL licensed.


About calling external functionality through the shell, we're very aware this is a very dangerous practice, and are working towards more direct access to the libbitcoin functionality for all languages (https://gitorious.org/libbitcoin-bindings or new electrum like protocols implemented for all languages and easy to use) so these dangers won't exist. Just for the proof of concept this is the way that works now for us to keep testing and developing. We welcome all security auditing and will refactor the code to make security more explicit.

Please keep analizing the code and providing feedback, its really appreciated!.

Cheers!




Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Mike Hearn on August 29, 2013, 09:58:37 AM
(edit: deleted/rewrote some stuff about the agpl)

Ideally the implementation would be linkable into regular end user wallets so anyone can run a server, that's the more Bitcoinish way to doit, but the AGPL license prevents that as no existing wallet is licensed that way (and I doubt it will be changing).

This is I think one of the problems with the bounty model. You have very loose requirements and a "we'll make it up as we go along" payout model, you're going to get disappointment and problems, it's just inevitable. Nobody specified the license so now we have one that practically guarantees that server operators and end users are different people, for no good technical reason (ignoring the choice of language and tools which make it hard to ship on things like phones).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Tom Scholl on August 29, 2013, 02:07:20 PM
I hereby claim part of this bounty for my work on bitprivacy (https://bitcointalk.org/index.php?topic=279249.msg3029760#msg3029760).

It is MIT licensed, and furthers the goal of making improved transaction privacy a practical reality for Bitcoin users. It might help if you clarify whether funds can be paid for work done before the setting up of this bounty. I'm assuming solutions don't need to be called coinjoin, if this isn't the case you should say.

It's great to see so many people contribute to this bounty.

If you want to help bitprivacy directly, you could try it out and post in the thread.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: CIYAM on August 29, 2013, 02:22:42 PM
I created CIYAM Open (https://ciyam.org/open) to solve this silly bounty problem.

Instead of people racing to hack out the *first* solution (typically badly written) you instead ask for people to bid (going to be renamed *dib* soon) as to when they will come up with a quality solution - if their bid/dib is accepted then they are not competing against anyone apart from themselves (to complete the task by the deadline they provided themselves).

The first 10 projects to be listed on CIYAM Open can be fee free for life so if you are serious in getting a project done *properly* I would be happy to help out.

CIYAM Open also allows people to donate at either the Project, Project Area or specific Project Task level.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: grau on August 29, 2013, 02:48:26 PM
Uh. Does someone have a bug to report for a tool from this thread? (http://blockchain.info/tx/4ed20e0768124bc67dc684d57941be1482ccdaa45dadb64be12afba8c8554537)  (If you want you can report to me in pgp email anonymously.)
More likely someone had the wrong assumption on the value of a referred output.

These errors would be avoided by implementing SIGHASH_WITHINPUTVALUE https://bitcointalk.org/index.php?topic=181734.0

How many people need to burn themselves until we add this? Remembers me the history of introducing wallet encryption.




Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Lauda on August 29, 2013, 03:02:45 PM
Very interesting. I'm going to keep an eye out.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Peter Todd on August 29, 2013, 03:15:03 PM
(edit: deleted/rewrote some stuff about the agpl)

Ideally the implementation would be linkable into regular end user wallets so anyone can run a server, that's the more Bitcoinish way to doit, but the AGPL license prevents that as no existing wallet is licensed that way (and I doubt it will be changing).

Wallets aren't the only thing that matters: businesses will want to use this tech as well to keep their own finances private. The AGPL is IMO right out for that application - even the LGPL is problematic.

This is I think one of the problems with the bounty model. You have very loose requirements and a "we'll make it up as we go along" payout model, you're going to get disappointment and problems, it's just inevitable. Nobody specified the license so now we have one that practically guarantees that server operators and end users are different people, for no good technical reason (ignoring the choice of language and tools which make it hard to ship on things like phones).

Quote
The bounty fund will pay out as funds are available according to the signers best judgment for completed work proposed in this thread that furthers the goal of making improved transaction privacy a practical reality for Bitcoin users.

Emphasis mine.

Sounds like the intent was for people to make a proposal, do work, and potentially collect a reward. That means there aren't any requirements until a proposal is made. As for donators, they should recognize that they are putting their faith in gmaxwell, theymos and sipa's best judgement. (something I myself am quite confident in)

Now if it was going to be undefined, I'd suggest they say that in 9 months or something funds to to whomever has made the most actual impact to getting CoinJoin technology actually used in this space. As jdillon suggested proposals that integrate into existing wallet software are most important there.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Mike Hearn on August 29, 2013, 03:40:13 PM
So far bitprivacy looks very interesting. I haven't reviewed the code at all, but the readme makes it sound like the kind of thing that's integratable directly into MultiBit or other wallets.

Support for Tor/fidelity bonds etc is all well and good but even a DoSable v1 would be a good upgrade for users today.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on August 29, 2013, 04:43:44 PM
Quote
The bounty fund will pay out as funds are available according to the signers best judgment for completed work proposed in this thread that furthers the goal of making improved transaction privacy a practical reality for Bitcoin users.

Emphasis mine.

Sounds like the intent was for people to make a proposal, do work, and potentially collect a reward. That means there aren't any requirements until a proposal is made.

I actually read that completely differently - that the bounty specifically requires support for the cryptographic anonymizing protocols that were proposed and discussed in the first few posts of this thread. Nevertheless, some clarity from he judges would be appreciated.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on August 29, 2013, 07:47:32 PM
I intended it as "make a proposal, do work, receive some baconreward". Obviously, if people want to appear with fully formed solutions they should get rewards too.  My main criteria is that work done be actually usable by someone for something, we're awash with ideas around here (myself included): so show me the code.  I am very much in support of the spirit here of just getting some stuff published and getting people trying it... this means both simple tools that don't implement a more complete vision, and more powerful ones too. The whole idea is to flow some funds from people who want to see this exist to people who are working on making it exist and everyone leaving happy, and so I think exposing a lot of really exacting procedural requirements isn't a grand idea.  (Also, it's likely the case that I didn't foresee all the things that needed to be done in my post. Please: solve problems I didn't know existed too.)

(And yes, I need to pay out some bounties to the work done by people so far ... I'm afraid that it's probably going to wait until this weekend before I can try out the tools and talk to the other signers! (and feedback from donors and other people who've tried the stuff out!))


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: marcus_of_augustus on August 29, 2013, 10:36:20 PM
I intended it as "make a proposal, do work, receive some baconreward". Obviously, if people want to appear with fully formed solutions they should get rewards too.  My main criteria is that work done be actually usable by someone for something, we're awash with ideas around here (myself included): so show me the code.  I am very much in support of the spirit here of just getting some stuff published and getting people trying it... this means both simple tools that don't implement a more complete vision, and more powerful ones too. The whole idea is to flow some funds from people who want to see this exist to people who are working on making it exist and everyone leaving happy, and so I think exposing a lot of really exacting procedural requirements isn't a grand idea.  (Also, it's likely the case that I didn't foresee all the things that needed to be done in my post. Please: solve problems I didn't know existed too.)

(And yes, I need to pay out some bounties to the work done by people so far ... I'm afraid that it's probably going to wait until this weekend before I can try out the tools and talk to the other signers! (and feedback from donors and other people who've tried the stuff out!))

This just the right sentiment to get us moving forward .... without wanting to pee in the OS punchbowl (forewarned is forearmed), it is also probably worth keeping in mind that there is likely a rather large pot of funding waiting in the wings with an eye towards commercialisation of the CoinJoin tech (or similar), whether it be through proprietary s/ware packaging or fees for a pay-per-tx models or whatever.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on August 30, 2013, 01:50:03 AM
A couple minutes ago Phantomcircuit directed me to this writeup (http://blog.ezyang.com/2012/07/secure-multiparty-bitcoin-anonymization/), which I'd not see before. It's a great proposal and does better from a privacy perspective of my earlier suggestions of ZC + TOR or Cham+Tor.  And it's not especially new either! here we see the problem with just pumping out theory and not implementations: The activity in this thread is already more practically useful than that year old blog post.

In any case, they propose using multi-party computation to SORT a list of pubkeys provided by the participants.  This accomplishes two things:  Blinds the participants to whos keys is whos but makes sure that everyone knows that the pubkeys all came from the participants.  Using chaum accomplishes only the latter but would depend on using tor (or the like) to prevent participants from learning the mapping.  This is somewhat non-ideal if we want to be super paranoid about such things since tor is very vulnerable to timing analysis.

I'd looked into using MPC for this before but I was overthinking it and expecting the MPC to do too much and it didn't seem practical. It did not occur to me that we only needed a _sort_ to hide the correspondence.

So to make this real you need a multi-party computation system that can implement a sort:   Here you go: http://viff.dk/   to use it build it then run

./apps/generate-config-files.py 127.0.0.1:10001 127.0.0.1:10002 127.0.0.1:10003
then
./apps/sort.py  --no-ssl player-1.ini
./apps/sort.py  --no-ssl player-2.ini
./apps/sort.py  --no-ssl player-3.ini

(It appears to be a bit python bitrotted and doesn't actually work for me ATM)

The sort.py script is setup for three players providing inputs, and they pick random values to sort (with an array of size 8).. all of this can easily be adjusted.

The protocol requires log2^2(N) communications between all the participants. You'd have every player provide a pubkey, at the end they all get a sorted list and learn nothing about who sent what.

Downsides:

* Thats a boatload of communication for a lot of participants, especially since you'd still run this over tor to hide the inputting parties IPs. This means that you probably have to have all parties online and communicating in realtime... if people are only logging on once per day, an 8 party operation would take 10 days I think. (log2^2(N))

* The MPC implementation in viff only has security against passive attackers e.g. they might snoop but they follow the protocol.  VIFF has some code for a different kind of MPC which is secure against active attackers but I've never been able to get it to work before (in particular, it doesn't seem to have a comparison operator... which.. uh. sort really needs).

* Also, this is all expensive enough that it's probably not helpful for preventing DOS even if the activity model does let you detect which party is misbehaving.

Upside: no depending on TOR for hiding the mapping between parties, and stronger fundamental security than tor, to keep players identity secret from each other.

(Also downside— will take work to go implement this in an actual system :))


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: AnonyMint on August 30, 2013, 09:52:01 AM
That is if there is no cost to having multiplexed transactions, unlimited number of public keys, and the delays and limited time windows of CoinJoin or the blockchain + hash check bloat of Zerocoin. I am also thinking of a Visa-scalable block chain. Your naive users will never be using Bitcoin any way, because the blockchain can't scale. By making CoinJoin popular, you will have further cemented Bitcoin's inability to modify the block chain design in this respect (although there may be a way to scale the block chain with multiplexed transactions and unlimited public keys, I am still studying this).

If there is no cost, I am not against it. I am arguing it is lower priority, not that it isn't worth considering if it fits into the big picture goals.

...
...
...

Look at the above. I am happy to have the world know I am giving 5BTC to this effort, and I am happy for Gregory Maxwell to know that it is me where the money is coming from. But why should I give the whole world insight into my finances? With CoinJoin I won't have to use something as convoluted as encrypting an access key, and the proposals above share a common thread of being such that all the actual complexity can be hidden away in software with a sufficiently sophisticated implementation.

So why not have a separate individual BTC pool of capital for those purposes where you explicitly want to be public? Else send him a paypal to his email address. (Personally I wouldn't be announcing publicly my ownership of Bitcoin, because I think the governments are going to demand capital gains taxes in arrears, when they declare it isn't money rather a good like gold).

My upthread solution basically was to use high-latency mix-net (which doesn't exist!) and always be anonymous, else use the centralized banking system.

One problem with my proposed solution is the fungibility of taint (https://bitcointalk.org/index.php?topic=175156.msg1832954#msg1832954). I had not read the linked thread prior to writing the above, thus didn't realize the gravity of the numerous mentions of "taint" in the OP.

I suppose there are rare cases where you want to give your identity to someone trusted but not the identity of the merchant to your bank. But that hardly seems like a compelling use case to justify such convoluted systems as proposed for CoinJoin.

Another problem with my proposed solution is although it does protect our privacy, but it doesn't protect our anonymity in an important use case, which I had mentioned as quoted above. Note some prior discussion (https://bitcointalk.org/index.php?topic=175156.msg2384771#msg2384771) that privacy and anonymity are related but not the same. The case is we want to be anonymous to the banks, i.e. we don't want all our payment history to be known to anyone (perhaps for legal, criminal, and free speech liability reasons), yet we have no choice but to reveal our identity to the merchant in order to use the service. An example is participating in a videochat forum (without a physical disguise) on some topic which is considered amoral, illegal, or threatening in some jurisdictions but not in others. For example paid sex videochat is illegal in some countries but not in others, but I am sure there are many other legitimate examples which are less offensive to readers here.

Without coin laundries, the only way to solve the above is to rely on the merchant to keep your public key secret. The merchant could even set up a server which receives the payment proof via BitMessage (and returns an access code which can be used on the merchant's website), so that the public key storage server's location can't be known by anyone other than the merchant. However the problem is that relying on the merchant is inherently insecure.

Also even if the payer doesn't care about his anonymity and privacy, the merchant might, so taint issue is also to a lesser degree about knowing who to pressure to reveal information about the merchant, i.e. the merchant might protect the identity of his customers well but the customers might not automatically protect their own identities well.

I am now looking at adam3us (Adam Back)'s ring signature suggestion (https://bitcointalk.org/index.php?topic=175156.msg2361587#msg2361587). What are the tradeoffs of a ring signature approach?

I will re-read this thread and the other one to see if I find the answer. If there is anything to add to what has been already written in the two threads, please do. Especially to make the discussion more readily comprehensible for someone who is mathematical but not well studied in cryptography terminology ("oracles", etc.).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Mike Hearn on August 30, 2013, 10:05:53 AM
A couple minutes ago Phantomcircuit directed me to this writeup (http://blog.ezyang.com/2012/07/secure-multiparty-bitcoin-anonymization/), which I'd not see before.

That's unfortunate - I pointed this out in my reply to your first post up thread:

https://bitcointalk.org/index.php?topic=279249.msg2985704#msg2985704

Quote
The advanced crypto part isn't necessarily that advanced and doesn't require ZK proof systems. Such protocols were already designed:

http://blog.ezyang.com/2012/07/secure-multiparty-bitcoin-anonymization/

It just requires secure multi-party sorts, which is a more well studied subset of general MPC.

Perhaps I should have put the last part of my post first.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on August 30, 2013, 10:33:04 AM
Quote
Don't you need tor or something to prevent everyone from learning everyone's IP?

Any transaction privacy system that hopes to hide user's addresses should start with some kind of anonymity network. This is no different. Fortunately networks like Tor, I2P, Bitmessage, and Freenet all already exist and could all be used for this. (Freenet would result in rather slow transactions, however)

As far as I know, Tor and I2P are low-latency mix-nets. Only a HIGH-latency (with random delays and orderings of relay) mix-net is robust against timing traffic analysis. I2P mentions possible high-latency support coming in version 3, but is that realistically coming very soon?

So really they don't necessarily insure anonymity against a formidable adversary such as intelligence agencies.

Also Tor limits hops to 3, and the security of mix-nets is related to the probability that at least one hop isn't compromised. Also all peers don't relay in Tor, thus Tor's servers are subsidized and some think they are already a tool of the intelligence agencies. Good performance, low-latency anonymity apparently isn't economic.

I have not studied BitMessage and Freenet. Do they offer the complete solution?

Is BitMessage using onion or garlic routing along with high-latency relaying?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Peter Todd on August 30, 2013, 10:49:20 AM
2-party-mix proposal, as discussed on IRC:

First of all it has to be recognized that in a truly decentralized environment that are almost no protections against sybil attackers; the best you can do is make a sybil attack expensive. Because of this a n-party-mix with fancy cryptography is equivalent to an iterated 2-party mix. (even in an n-party-mix n-1 of the parties might be a sybil attacker) This is not true for the non-decentralized case, such as a mix where access is controlled by possession of a bitcointalk account, or a good OTR reputation.

Secondly in a 2 party mix the other party automatically knows what txins and txouts you are contributing to the mix by process of elimination. There's nothing you can do about that. However you can ensure that only that party knows, provided your counter-party doesn't reveal the info.

Thirdly the anti-dos limited resource should be denominated in Bitcoins, not proof of work or some other similar scheme; you want a large-scale attacker to have costs as similar as possible to a small-scale attacker and PoW functions are very susceptible to large improvements due to optimization. For Bitcoin's that optimization has already happened.

So, building on my previous thoughts earlier in this thread, I'm proposing the following basic mix protocol, here between Alice and Bob:

  • 1) Announce: Alice states that she wishes to create a transaction.
  • 2) Reply: Bob replies with the txins and txout he wishes to add to the transaction.
  • 3) Sign: Alice signs her txins and sends the signatures to Bob.
  • 4) Broadcast: Bob signs his txins, and broadcasts the transaction.

Step 1 happens in the clear; steps 2 and 3 can be encrypted to the pubkeys of the respective receivers.

For anti-DoS the act of broadcasting these messages can be made expensive by requiring the senders to include a nLockTime'd transaction spending a txin to a scriptPubKey the sender controls. Usually this txin would be used in the mix, although technically it doesn't have to be. The key idea here is that by broadcasting such a tx the sender is guaranteed to spend some tx fees somehow, either in the nLockTime'd tx, or in a different tx with the same txin. The actual amount of fees required per KB of data broadcast can be adjusted automatically by supply and demand.

Note how since tx fees are what is being used you automatically have sybil resistance: an attacker trying to be the counter-party to a large % of total traffic will need to either spend, or have access to the privkeys of, a large % of all the transactions being done on Bitcoin itself. While any individual transaction may get unlucky and fall victim to an eavesdropper, overall there is a significant privacy benefit.

As for the broadcast medium, like I suggested above, putting this data on the Bitcoin P2P network itself makes the most sense to ensure the widest possible usage. Similarly re: usage, note how the only cryptographic primitive used in the above protocol that is not currently used by Bitcoin wallets is asymmetric encryption. Being only two parties transactions can go through quickly when counter-parties are available, and they can timeout and fallback to standard transactions otherwise. Bandwidth usage is a small multiple of the transactions themselves; potentially less if return-path routing of the replies can be made to work properly.

FWIW I'm planning on implementing this, either directly in the satoshi client, or as a prototype in python-bitcoinlib. It's a good complement to more complex schemes utilizing multi-party cryptography primitives for mixes among semi-centralized groups.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on August 30, 2013, 11:02:42 AM
Quote
What about DOS attacks? Can't someone refuse to sign even if the transaction is valid?

Yes, this can be DOS attacked in two different ways: someone can refuse to sign a valid joint transaction, or someone can spend their input out from under the joint transaction before it completes.

However, if all the signatures don't come in within some time limit, or a conflicting transaction is created, you can simply leave the bad parties and try again. With an automated process any retries would be invisible to the user. So the only real risk is a persistent DOS attacker.

In the non-decentralized (or decentralized but non-private to participants) case, gaining some immunity to DOS attackers is easy: if someone fails to sign for an input, you blacklist that input from further rounds. They are then naturally rate-limited by their ability to create more confirmed Bitcoin transactions.

I don't see any way for the DoS adversary to spend the input before the joint transaction completes, if the joint transaction is atomic in the current block. If the joint transaction has been populated to all mining pools, then the input is disallowed by those pools to be double-spent in another transaction in the same block. If there is a competing PoW fork which didn't grab the joint transaction, then which ever fork wins will unwind the transactions of the losing fork(s). Am I missing something or was your point specific to limitations of Bitcoin (and not any altcoin in general)?

If those who want to participate in the joint transaction must sign with their private key to prove they have the funds available, before the set of payers (participant signers) is selected, then they can be fined for not signing the joint transaction. Am I missing something?

I do not know what Bitcoin miners do when they see double-spend attempts in the same atomic block. I am thinking they should submit these to the blockchain under some special transaction which fines the payer.

I guess one issue is that for example with ring (group) signatures, the identity of the signers of the outputs is not known, so if the sum of the outputs doesn't match the sum of the inputs, then it is not known whom to penalize for oversubscribing (DoS) the outputs. We don't want a bijective mapping between inputs and outputs.

This is not decentralized in the sense that the blockchain is a central ledger, but it is meta-decentralized in the sense that PoW input entropy is.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: genjix on August 30, 2013, 11:10:23 AM
lol just received this email about our coinjoin server. we are running nothing except tor and our own software (checked processes).

-----Original Message-----

From: abuse@hetzner.de
Sent: 30 August 2013 07:54
To: XXX
Subject: Abuse Message [AbuseID:0D0482:15]: AbuseNormal: 22-102567054 Notice of
Unauthorized Use of Paramount Pictures Corporation Property

Dear Mr XXX,

We received information about spam or abuse from paramount@copyright-compliance.com.
Please take all necessary measures to avoid this in the future.

Furthermore we request that you send a short response within 24 hours to us and to
the complainant. This response should contain information about how this could
happen and what you intend to do about it.

How to proceed:
-       Solve the problem
-       Send a response to us: Use the following link:
http://abuse.hetzner.de/statements/?token=gdfsdfggdghhdddghhdg
-       Send a response by email to the complainant

A technician will check the data and coordinate further proceeding. If we received
multiple complaints, the situation can lead to a server blocking.

Important note:
When you reply to us, please leave the abuse ID [AbuseID:djkdfkdgfsf] unchanged in the
subject line.


Best regards,

Sandra Betz

Hetzner Online AG
Stuttgarter Str. 1
91710 Gunzenhausen
Tel: +49
  • 9831 610061
Fax: +49
  • 9831 610062
abuse@hetzner.de
www.hetzner.de

Register Court: Registergericht Ansbach, HRB 3204
Management Board: Dipl. Ing. (FH) Martin Hetzner
Chairwoman of the Supervisory Board: Diana Rothhan

----- attachment -----

Return-path: <paramount@copyright-compliance.com>
Envelope-to: abuse@hetzner.de
Delivery-date: Thu, 29 Aug 2013 17:52:21 +0200
Received: from [67.128.96.38] (helo=newpop2.baytsp.com)
        by lms.your-server.de with esmtp (Exim 4.74)
        (envelope-from <paramount@copyright-compliance.com>)
        id 1VF4WC-0005Im-FE
        for abuse@hetzner.de; Thu, 29 Aug 2013 17:52:21 +0200
Received: from portalmail2.baytsp.com ([10.243.1.48])
        by newpop2.baytsp.com (8.14.4/8.14.4) with ESMTP id r7TFq9cU019137
        for <abuse@hetzner.de>; Thu, 29 Aug 2013 15:52:10 GMT
Date: Thu, 29 Aug 2013 15:52:09 GMT
From: "paramount@copyright-compliance.com" <paramount@copyright-compliance.com>
To: abuse@hetzner.de
Message-ID: <12570450.32906.1377791529817.JavaMail.dc@portalmail2>
Subject: 22-102567054 Notice of Unauthorized Use of Paramount Pictures
 Corporation Property
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: Clear (ClamAV 0.97.6/17768/Thu Aug 29 16:10:58 2013)
X-Spam-Score: 1.5 (+)
Delivered-To: he1-abuse@hetzner.de

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Notice ID: 22-102567054
Notice Date: 29 Aug 2013 15:52:08 GMT

Hetzner Online AG

Dear Sir or Madam:

Irdeto USA, Inc. (hereinafter referred to as "Irdeto") swears under penalty of
perjury that Paramount Pictures Corporation ("Paramount") has authorized Irdeto to
act as its non-exclusive agent for copyright infringement notification.  Irdeto's
search of the protocol listed below has detected infringements of Paramount's
copyright interests on your IP addresses as detailed in the below report.

Irdeto has reasonable good faith belief that use of the material in the manner
complained of in the below report is not authorized by Paramount, its agents, or the
law.  The information provided herein is accurate to the best of our knowledge.
Therefore, this letter is an official notification to effect removal of the detected
infringement listed in the below report.  The Berne Convention for the Protection of
Literary and Artistic Works, the Universal Copyright Convention, as well as
bilateral treaties with other countries allow for protection of client's copyrighted
work even beyond U.S. borders.  The below documentation specifies the exact location
of the infringement.

We hereby request that you immediately remove or block access to the infringing
material, as specified in the copyright laws, and insure the user refrains from
using or sharing with others unauthorized Paramount's materials in the future.

Further, we believe that the entire Internet community benefits when these matters
are resolved cooperatively.  We urge you to take immediate action to stop this
infringing activity and inform us of the results of your actions.  We appreciate
your efforts toward this common goal.

Please send us a prompt response indicating the actions you have taken to resolve
this matter, making sure to reference the Notice ID number above in your response.

If you do not wish to reply by email, please use our Web Interface by clicking on
the following link:
http://webreply.copyright-compliance.com/WebReply?webreplyhash=a1fd4ac345b02bfd8ccde04dafbefbb2

Nothing in this letter shall serve as a waiver of any rights or remedies of
Paramount with respect to the alleged infringement, all of which are expressly
reserved.  Should you need to contact me, I may be reached at the below address.

Regards,

Andrew Beck
Irdeto USA, Inc.
3255-3 Scott Blvd. Suite 101 Santa Clara, CA 95054
Phone: 408-492-8500  fax: 408-727-6743
paramount@copyright-compliance.com

*pgp public key is available on the key server at http://pgp.mit.edu

Note: The information transmitted in this Notice is intended only for the person or
entity to which it is addressed and may contain confidential and/or privileged
material.  Any review, reproduction, retransmission, dissemination or other use of,
or taking of any action in reliance upon, this information by persons or entities
other than the intended recipient is prohibited.  If you received this in error,
please contact the sender and delete the material from all computers.

This infringement notice contains an XML tag that can be used to automate the
processing of this data.  If you would like more information on how to use this tag
please contact Irdeto.

Evidentiary Information:

Notice ID: 22-102567054
Initial Infringement Timestamp: 29 Aug 2013 15:39:19 GMT
Recent Infringement Timestamp: 29 Aug 2013 15:39:19 GMT
Infringers IP Address: 46.4.92.107
Protocol: BitTorrent
Infringed Work: Jack Reacher
Infringing File Name: Jack.Reacher.2012.FRENCH.BDRip.XviD-AYMO.avi
Infringing File Size: 1464350720
Bay ID: 5166dd04b34ac587893959274914e9a782d8c375|1464350720
Port ID: 40670
Infringer's User Name:

- - ---Start ACNS XML
<?xml version="1.0" encoding="UTF-8"?>
<Infringement xmlns="http://www.acns.net/ACNS"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.acns.net/ACNS
http://www.acns.net/v1.2/ACNS2v1_2.xsd">
    <Case>
        <ID>22-102567054</ID>
        <Status>Open</Status>
    </Case>
    <Complainant>
        <Entity>Irdeto USA, Inc</Entity>
        <Contact>Andrew Beck</Contact>
        <Address>3255-3 Scott Blvd. Suite 101, Santa Clara, California 95054 United
States of America</Address>
        <Phone>408-492-8500,408-727-6743</Phone>
        <Email>paramount@copyright-compliance.com</Email>
    </Complainant>
    <Service_Provider>
        <Entity>Hetzner Online AG</Entity>
        <Email>abuse@hetzner.de</Email>
    </Service_Provider>
    <Source>
        <TimeStamp>2013-08-29T15:39:19.000Z</TimeStamp>
        <IP_Address>46.4.92.107</IP_Address>
        <Port>40670</Port>
        <Type>BitTorrent</Type>
        <UserName></UserName>
        <Number_Files>1</Number_Files>
        <Deja_Vu>No</Deja_Vu>
    </Source>
    <Content>
        <Item>
            <TimeStamp>2013-08-29T15:39:19.000Z</TimeStamp>
            <Title>Jack Reacher</Title>
            <FileName>Jack.Reacher.2012.FRENCH.BDRip.XviD-AYMO.avi</FileName>
            <FileSize>1464350720</FileSize>
            <URL></URL>
        </Item>
    </Content>
</Infringement>
- - ---End ACNS XML
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iQEcBAEBAgAGBQJSH24pAAoJEPbLkHDojX/o54sH/3xKVr2nWY17u26+ulU16T6i
gsrEizaKOnWqC+FSALnQUuDE+eUUyCtRJb/Ce21kPmn5xiaHv96EzwzbvRPCsnBg
ecKo/MKEUJfzTgwwgoMCKHRePhNwJikToH1Daj5xOJEWw3KXHCUN4IkfBMlfttkW
yH5hH0+AE5weD86TjApW35bzxgcjXoC3YNKzNXw6lgFaHv+SrK4A24Jh4UEJxo8+
qa4Ca7eN7gXvu10fy6TH6rW9eunsYkdA5Za6pEUUkPhKACPJHY6ORvIPGRhuSma7
RNwv+uJ9srgV/W54SniuUyU3jfgyW2OHH6Nej5ONC9oJg1GMo+mG3Jm5kCw7Sss=
=sF8x
-----END PGP SIGNATURE-----



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on August 30, 2013, 12:04:14 PM
I guess one issue is that for example with ring (group) signatures, the identity of the signers of the outputs is not known, so if the sum of the outputs doesn't match the sum of the inputs, then it is not known whom to penalize for oversubscribing (DoS) the outputs. We don't want a bijective mapping between inputs and outputs.

The only solution to this I see is to use divide-and-conquer to find the adversary (identity tied to the public key committed to the input). By dividing the set size in half and repeat, eventually the adversaries are discovered or they relent and complete the transaction. This is why a mandatory tx fee is important, so as to deplete their capital if they send to themselves.

The output signatures come at step 2, before step 3 where all sign their inputs, thus recursively repeating this operation is less time costly than being able to DoS step 3.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Hawkix on August 30, 2013, 12:29:51 PM
Just an idea - what if we moved the mixing service to miners as a part of the job they do?

- users would broadcast special half-baked transaction (just inputs)
- miners would somehow form the queue of unsigned inputs into mixing "batches" and provide a way how to query current batches
- users would broadcast their signatures of the batch
- when the batch is signed by all parties, its moved by miner into the current block, if after some timeout it is not signed (few blocks?), its dumped

This would reuse existing Bitcoin p2p network and add new message type(s). The transaction will remain the same, no need for fork. It will allow easy integration into existing clients.



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on August 30, 2013, 01:48:54 PM
Just an idea - what if we moved the mixing service to miners as a part of the job they do?

- users would broadcast special half-baked transaction (just inputs)
- miners would somehow form the queue of unsigned inputs into mixing "batches" and provide a way how to query current batches
- users would broadcast their signatures of the batch
- when the batch is signed by all parties, its moved by miner into the current block, if after some timeout it is not signed (few blocks?), its dumped

This would reuse existing Bitcoin p2p network and add new message type(s). The transaction will remain the same, no need for fork. It will allow easy integration into existing clients.

Thanks for copying my idea upthread, and you added an idea of how to integrate without a fork. I can't comment if that will work or not.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Hawkix on August 30, 2013, 01:58:08 PM
Thanks for copying my idea upthread, and you added an idea of how to integrate without a fork. I can't comment if that will work or not.
Not copied, my own ramblings. Which thread?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on August 30, 2013, 02:16:21 PM
Thanks for copying my idea upthread, and you added an idea of how to integrate without a fork. I can't comment if that will work or not.
Not copied, my own ramblings. Which thread?


My prior 4 posts in this thread today before you wrote yours. Ignoring the one about high-latency mix-nets.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: AnonyMint on August 30, 2013, 02:59:02 PM
The advanced crypto part isn't necessarily that advanced and doesn't require ZK proof systems. Such protocols were already designed:

http://blog.ezyang.com/2012/07/secure-multiparty-bitcoin-anonymization/

It just requires secure multi-party sorts, which is a more well studied subset of general MPC.

A couple minutes ago Phantomcircuit directed me to this writeup (http://blog.ezyang.com/2012/07/secure-multiparty-bitcoin-anonymization/)...

That has two weaknesses:

1. All transactions must be the same amount.

2. The participants have to be trusted to produce uniformly distributed keys. I think this means it isn't secure?


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: AnonyMint on August 30, 2013, 03:18:57 PM
Ok, so coin age would be your DoS countermeasure?

Note that attackers don't actually have to spend that input if they disrupt the protocol. They can use the same one over and over, even many times simultaneously.

PoW could be an option where participants can set a minimum PoW accepted and a maximum PoW they're themselves willing to perform. So for example if 10 people all have 2^15 work within their range of acceptable PoW (one has 2^15 as their lowest, another as their highest, they'll all generate a common input for PoW and start working on it. Then they start this scheme with the SMPC. That would indeed make the attack costly for somebody trying to break the scheme for as many as possible (DoS) and would make Sybil very costly.

Upthread earlier today I proposed a fee for not completing the transaction. I guess you are not proposing that because of timeouts when the participant can't complete but not due to malice?

Thus you propose PoW an a resource cost, hoping this will rate limit.

Hmm. But the rate limiting has to be severe enough that the adversary can't basically shut down transactions (if all are going to be mixed by default which is what I want) entirely, so I am thinking there needs to be a much more severe cost on the adversary.

All costs that fall on the adversary will also fall on the honest participants, but asymmetrically because the adversary will always incur the cost and the participant will only incur it on network timeout.

It isn't certain that you'd be able to tell WHICH input that the attacker used, at least not with my scheme where you hide who's using what input. Revealing who's using what input might not be optimal if a user want to use inputs already tied to himself AND some inputs that aren't already, and doesn't want the unlinked ones to become linked to him.

Send all inputs to one key first.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on August 30, 2013, 08:47:11 PM
So if my understanding is correct, a ring signature is comprised of the N public keys and N + 1 large random values (N + 3 for ECDSA), for each signer so (N + 1)^2 plus the N public keys total if each participant is only sending to one output. In practice, they will send to more than one output to hide correlation of input and output amounts.

Yet if my thinking is correct, these large signatures don't need to be stored in the blockchain permanently. This signature only needs to be shown as evidence to all near-term PoW peers for what goes permanently into the blockchain, which are spends for each input to a special public key (which can't spend any other way) which has "spends" corresponding to each output in the signature. So it appears this would require a soft-fork of Bitcoin, because the participants can't send to a normal public key.

Can anyone comment on whether my understanding is correct or not?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on August 30, 2013, 09:15:37 PM
Can anyone comment on whether my understanding is correct or not?
No, thats incorrect. Putting ring signatures in transactions would require a hard fork, and under our current security model would require storing the large signature.

Moreover, ring signatures would not be useful in the blockchain. Adam suggested (https://bitcointalk.org/index.php?topic=175156.msg2361587#msg2361587) (uh thanks for pointing to that, I missed that post!) using a ring signature for exactly the same purpose that I suggested blind signing: it would be a mechanism external to the blockchain that participants would communicate the set of outputs to each other without identifying the source.  If someone were to try to do what you're suggesting it would enable any of the participants in the transaction to steal the coins. This is exactly the opposite of what we want.

As an aside would you mind adding a link particular ECC ring signature scheme that you're looking at? A reasonably efficient ECC ring signature scheme would be useful to have, and might result in a faster and more compact implementation than the blinded signature approach (esp with many participants). Though I'm not sure how to prevent DOS attacks in such a scheme, since if you get too many outputs you can't tell which party was the cheater, though perhaps some ring signature system would in the event of failure have a way to deanonymize the users so they could determine who produced the extra output.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on August 30, 2013, 09:59:49 PM
Can anyone comment on whether my understanding is correct or not?
No, thats incorrect. Putting ring signatures in transactions would require a hard fork, and under our current security model would require storing the large signature.

If there exists a secure proof (the group signature, plus the spend transactions signed by all participants) that total of inputs match the total of outputs and all peers have agreed on this by accepting the block, then we don't need to keep that proof around in the blockchain. We can just keep the spend transactions to a key and spends from that key to the outputs. This would be a special key that the miner can not spend any other way than to providing the matching secure proof. If you disagree, please kindly explain why and not just assert I am wrong without any explanation. I assume you are correct, but I need to see why? Thank you in advance for helping me to understand.

Moreover, ring signatures would not be useful in the blockchain. Adam suggested (https://bitcointalk.org/index.php?topic=175156.msg2361587#msg2361587) (uh thanks for pointing to that, I missed that post!) using a ring signature for exactly the same purpose that I suggested blind signing: it would be a mechanism external to the blockchain that participants would communicate the set of outputs to each other without identifying the source.

Yes, but I am explaining how I am thinking we can use the miner to help out in a special way as I have described upthread.

If someone were to try to do what you're suggesting it would enable any of the participants in the transaction to steal the coins. This is exactly the opposite of what we want.

How so? The participants sign to a special key that can't be spent any other way (blockchain will forbid it).

As an aside would you mind adding a link particular ECC ring signature scheme that you're looking at? A reasonably efficient ECC ring signature scheme would be useful to have, and might result in a faster and more compact implementation than the blinded signature approach (esp with many participants). Though I'm not sure how to prevent DOS attacks in such a scheme, since if you get too many outputs you can't tell which party was the cheater, though perhaps some ring signature system would in the event of failure have a way to deanonymize the users so they could determine who produced the extra output.

Upthread, I described a divide-n-conquer strategy for identifying the adversarial DoS participant.

I just pulled up the first thing on Google, not sure if it is applicable, Anonymous signcryption in ring signature scheme
over elliptic curve cryptosystem (http://www.signcryption.org/publications/pdffiles/chung-wu-lai-jcis06-CSI-38.pdf)

Thanks for the reply.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on August 30, 2013, 10:19:52 PM
If there exists a secure proof (the group signature, plus the spend transactions signed by all participants) that inputs match the outputs and all peers have
agreed on this by accepting the block, then we don't need to keep that proof around in the blockchain. We can just keep the spend transactions to a key and spends from that key to the outputs. This would be a special key that the miner can not spend any other way than to providing the matching secure proof. If you disagree, please kindly explain why and not just assert I am wrong without any explanation. I assume you are correct, but I need to see why? Thank you in advance for helping me to understand.
This is oftopic, I was trying to avoid the Bitcoin 101 in this thread.

The security model of Bitcoin is that nodes do not trust the network. The network is anonymous parties and could be chalk full of sybils, so we consider it malicious at all times.  We verify _everything_ for ourselves that can be— the one thing that cannot be is transaction ordering.  Because everything is verified the potential for gain in sybil attacking or lying about the ordering is small.  Under what you're suggesting miners could steal arbitrary coins from third parties at the expense of mining a few blocks (whatever depth you require to permit hiding the proof). This isn't the security model we've adopted, and it's one that might unhinge the economic alignment of miners.

As to why it would be a forking change— you want the Bitcoin network to allow the spending of coin based not on the current signature types allowed but on a new ring type.  These transactions would look like theft to the existing network and so they can't be supported without a hardfork to relax the rules.

Quote
How so? The participants sign to a special key that can't be spent any other way (blockchain will forbid it).
A ring signature specifies N keys and then provides a signature which could have been provided by any of the N. I may have been misunderstanding what you were suggesting but it sounded like you were saying that a transaction would be signed by a ring signature over its inputs.  This means that without your consent I could take a coin of mine, and a coin of yours, and write a transaction paying to two addresses of mine, and provide a ring signature ... and steal your coin.

If instead you mean that it would also require the individual scalar signatures. Then there is never any reason to have the ring signature in the blockchain, the participants could just perform it externally and sign conditionally on it passing.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on August 30, 2013, 10:30:48 PM
I pushed the beginnings of a framework for a CoinJoin implementation using RSA blinded signature operations. It's written in Python and under the MIT license:

https://github.com/maaku/coinjoin

So far it's a storage layer for the various objects and message involved in the protocol, some simple primitives for the blinding operations, and a few utilities for pulling outputs from JSON-RPC. I'm working on more primitives that I will probably add next week, including tools for creating messages at various stages, and eventually getting this running over BitMessage.

Patches welcome.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on August 30, 2013, 10:47:25 PM
If there exists a secure proof (the group signature, plus the spend transactions signed by all participants) that inputs match the outputs and all peers have
agreed on this by accepting the block, then we don't need to keep that proof around in the blockchain. We can just keep the spend transactions to a key and spends from that key to the outputs. This would be a special key that the miner can not spend any other way than to providing the matching secure proof. If you disagree, please kindly explain why and not just assert I am wrong without any explanation. I assume you are correct, but I need to see why? Thank you in advance for helping me to understand.

This is oftopic, I was trying to avoid the Bitcoin 101 in this thread.

I think maybe I am the one teaching you Bitcoin 101 here... (yes I know you are a Bitcoin core dev and all due respect is accorded to you)

The security model of Bitcoin is that nodes do not trust the network. The network is anonymous parties and could be chalk full of sybils, so we consider it malicious at all times.  We verify _everything_ for ourselves that can be— the one thing that cannot be is transaction ordering.  Because everything is verified the potential for gain in sybil attacking or lying about the ordering is small.

I don't know why you mention Sybil attacks, since miner reputation is irrelevant.

The attacker must have 51% of the difficulty to be dishonest in order to cheat against the others who respect the protocol. Miners have an incentive to ignore what does not match the group signature proof, because other miners will ignore them, and they would waste effort doing PoW on a fork that the majority rejects.

That is basic Bitcoin 101 stuff. I think you are conflating the need to verify the transaction chain with my point. The transaction chain must be verified, because it is the way to make sure a more recent spend did not occur.

Under what you're suggesting miners could steal arbitrary coins from third parties at the expense of mining a few blocks (whatever depth you require to permit hiding the proof). This isn't the security model we've adopted, and it's one that might unhinge the economic alignment of miners.

The miner(s) can not steal anything unless they have 51% of the difficulty as explained above.

Admittedly this is worse than now, where a 51% attack can't spend other people's coins. But if you have a 51% attack, then you've got big problems any way. And as soon as a few coins are misspent, everyone will realize the network is compromised. Just keep the group signature proof in the blockchain long enough for the participants to file a public claim in the media. So lets say 1000 blocks?

As to why it would be a forking change— you want the Bitcoin network to allow the spending of coin based not on the current signature types allowed but on a new ring type.  These transactions would look like theft to the existing network and so they can't be supported without a hardfork to relax the rules.

Apology I did not make it clear that I wasn't disputing your point about hard fork.

Quote
How so? The participants sign to a special key that can't be spent any other way (blockchain will forbid it).
A ring signature specifies N keys and then provides a signature which could have been provided by any of the N. I may have been misunderstanding what you were suggesting but it sounded like you were saying that a transaction would be signed by a ring signature over its inputs.  This means that without your consent I could take a coin of mine, and a coin of yours, and write a transaction paying to two addresses of mine, and provide a ring signature ... and steal your coin.

If instead you mean that it would also require the individual scalar signatures. Then there is never any reason to have the ring signature in the blockchain, the participants could just perform it externally and sign conditionally on it passing.

I am saying that N participants (inputs) can make M signatures for outputs, where M >= N. If the total BTC of outputs != total BTC of inputs, then the N participants don't sign their inputs. Reset and try again.

When they don't match, that is a DoS, someone is trying to cheat. I explained upthread how to use divide-n-conquer to isolate the malicious participant(s).

Got it now?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on August 30, 2013, 10:56:34 PM
I sold bitcoins today to a forex trader, and we had a long discussion about Bitcoin and the effects it could have on global finance.

At one point in the conversation I brought up CoinJoin and what it makes possible and his immediate reaction was, "That will have to be stopped."

I replied, "What is the US government going to do; tell Chinese, European, and Russian bitcoin miners what transactions they are and are not allowed to include in blocks?"

When I said that his eyes widened and his facial expressions had "Oh, shit" written all over it.

I rather enjoyed that part of the conversation.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on August 30, 2013, 11:03:01 PM
At one point in the conversation I brought up CoinJoin and what it makes possible and his immediate reaction was, "That will have to be stopped."
They can't even be distinguished. Short of a complete lockdown (and a total failure of the system) there is no way to block the activity or even reliably measure how much of it is going on.

I don't think this actually presents much concern to authorities— they manage to survive in a world where cash and other asset transfers leaves few records already.  When tax authorities question you to make sure you're paying your taxes, they'll ask to see your books same way it works with anything else... and nothing in this thread will protect someone there, at least in the US the responsibility is on the taxpayer to show they paid their taxes.  But in any case, the political debate is moot... just due to the technological inevitability of this: I've tried to think of a way to prevent it, and I cannot.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on August 30, 2013, 11:13:33 PM
The miner(s) can not steal anything unless they have 51% of the difficulty as explained above.

Admittedly this is worse than now, where a 51% attack can't spend other people's coins. But if you have a 51% attack, then you've got big problems any way. And as soon as a few coins are misspent, everyone will realize the network is compromised. Just keep the group signature proof in the blockchain long enough for the participants to file a public claim in the media. So lets say 1000 blocks?

And even there may be a solution to this 51% attack that enables the miners spending the coins. We keep a merkel hash of these signatures forever, so the spenders (or bitarchive.org ... does it exist?) can keep copies of the signatures and later prove if the miners have cheated. This would serve for rebuilding the blockchain manually, because with a 51% attack, the Bitcoin world is fubar anyway.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on August 31, 2013, 12:15:45 AM
Please keep posts on-topic. I'm going to start splitting non-coinjoin discussions out of this thread.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: marcus_of_augustus on August 31, 2013, 03:45:58 AM
At one point in the conversation I brought up CoinJoin and what it makes possible and his immediate reaction was, "That will have to be stopped."
They can't even be distinguished. Short of a complete lockdown (and a total failure of the system) there is no way to block the activity or even reliably measure how much of it is going on.

I don't think this actually presents much concern to authorities— they manage to survive in a world where cash and other asset transfers leaves few records already.  When tax authorities question you to make sure you're paying your taxes, they'll ask to see your books same way it works with anything else... and nothing in this thread will protect someone there, at least in the US the responsibility is on the taxpayer to show they paid their taxes.  But in any case, the political debate is moot... just due to the technological inevitability of this: I've tried to think of a way to prevent it, and I cannot.


Precisely, the political debate is moot. Because the technology is economically superior and demands this solution, it is inevitable. In fact, I would not be surprised to see a successful CoinJoin functionality implemented in an alternate client before the end of the year, e.g. as coderrr's coin selection patch was. And this will only be Gen 0 for anonymising tools ...

The modern State needs to abandon their utopian panopticon matrix ambitions and go back to doing proportional policing relevant to a free society, for many reasons too numerous to mention.

Besides, this is a Development & Technical section ... suffice it to say, CoinJoin and other anonymising tools are inevitable ... just like Judgement Day.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on August 31, 2013, 04:40:28 PM
How does this compare to CoinWitness?

CoinWitness is even rocket-sciency than Zerocoin, it also shares many of the weaknesses as a privacy-improver: Novel crypto, computational cost, and the huge point of requiring a soft fork and not being available today. It may have some scaling advantages if it is used as more than just a privacy tool. But it really is overkill for this problem, and won't be available anytime real soon.

After further thought off-chain transactions with CoinWitness is insecure, i.e. bringing off-chain transaction back on to the blockchain at par is insecure. How can we be sure there wasn't a double-spend?

This is analogous to trying to operate multiple blockchains with a fixed value between them.

If coins are allowed to be moved between blockchains at par (no market exchange variance) and the blockchains don't exchange coins at par with any blockchains that don't adhere, the problem remains that 50% attacking the blockchain with the lowest PoW difficulty will infect with ill effects the blockchains with higher PoW difficulty.



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on August 31, 2013, 05:22:21 PM
After further thought off-chain transactions with CoinWitness is insecure, i.e. bringing off-chain transaction back on to the blockchain at par is insecure. How can we be sure there wasn't a double-spend?
This is explained in the CoinWitness post, it's as secure as you wish to make it. It's also offtopic. Please stay on-topic and if you want to talk about that please post in that thread.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: phillipsjk on August 31, 2013, 08:40:04 PM
(edit: deleted/rewrote some stuff about the agpl)

Ideally the implementation would be linkable into regular end user wallets so anyone can run a server, that's the more Bitcoinish way to doit, but the AGPL license prevents that as no existing wallet is licensed that way (and I doubt it will be changing).


Can't MIT licensed wallets be relicensed under the AGPL?

The AGPL says that the user is allowed to access the source code; even while interacting with a remote server.

The remote server should not be directly connected to a live wallet anyway.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Tom Scholl on August 31, 2013, 09:17:09 PM
I've realised that bitprivacy owes a lot to the original CoinJoin concept, and updated the github page (https://github.com/dustyneuron/bitprivacy) appropriately.

When/if I get time I'll work on making it "just work".


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: phelix on August 31, 2013, 10:04:04 PM
What about adding this into server based clients with matching via the server? (Electrum, Blockchain.info, Mycelium...)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: brooklynafro on September 01, 2013, 11:03:24 AM
hi,
i'm thinking about coinjoin transactions and how they are supposed to be indistinguishable from normal transactions.

some notes:
a) the number of participants of a coinjoin transaction must be variable.
    otherwise, if _all_ coinjoin transactions contain 55 inputs, then that's a pretty strong distinguisher.

b) the distinguishability of the coinjoin transaction is equal to its weakest link.
    that is, if two people in a coinjoin tx use input addresses that have been reused and can be linked to their identity, then the whole coinjoin tx has been busted.

i also wonder whether building a decentralized coinjoin system is as easy as some people here believe it is.
i think it's a good idea to design it and state its threat model before standarizing coinjoin.
otherwise, we will be stuck with the centralized coinjoin variant, where anyone can join the public channels and log the mixes.

cheers!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on September 01, 2013, 11:21:10 AM
b) the distinguishability of the coinjoin transaction is equal to its weakest link.
    that is, if two people in a coinjoin tx use input addresses that have been reused and can be linked to their identity, then the whole coinjoin tx has been busted.
Interesting point... though it depends on the specifics: Perhaps the  transactions linking them to their identities were the CJ ones and the later apparent CJ is just a single person.

Don't let me overstate the indistinguishably too much, there are many potential transaction pattern side channels (e.g. from the use of compressed or uncompressed public keys, for example, down to what times of day transactions happen) but at a low level these transactions are not fundamentally unusual.

Quote
i also wonder whether building a decentralized coinjoin system is as easy as some people here believe it is.
i think it's a good idea to design it and state its threat model before standarizing coinjoin.
otherwise, we will be stuck with the centralized coinjoin variant, where anyone can join the public channels and log the mixes.
I think it's pretty hard, not in the overall components but in all the details.  My expectation is that there will be multiple systems for some time, if not forever, offering differing properties and tradeoffs. The harm from the anonymity set reduction that would result from that may be partially addressed by users that use multiple tools, and from them making their transactions look externally indistinguishable.

Even in the centralized model think it can be fairly easily arranged so that random non-participating observers can't tell what txins are in flight, e.g. a meeting point host is selected an inputs are only revealed to it. Maaku has also already implemented chaum blinded signatures, so the input-output correspondence can be hidden from the meeting point.

I think there are different application and threat models in flight here. For me the most important in the short term are the weakest ones— just getting a non-trivial number of joint transactions in use in order to disrupt the analysis for all users (including ones who've never used CJ) will be a big practical improvement.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Murphant on September 01, 2013, 04:09:29 PM
I have done some work previously on the problem and came up with a (theoretical) solution that is quite analogous to CoinJoin but that uses a fixed network off 2-party txs instead of a potentially bigger one. You can see the video here
http://www.youtube.com/watch?v=6hc8qaR_Fok&list=PLUOP0P68GJ3BGjfqoLLnzAefk3ZzXQtJ7&index=35
but as there is a lot of what I am talking about that has already been discussed here, I would like to simply upload the pdf. Is there a website similar to pastebin where I can do that for pdfs? I also have a more detailed description of the network that might be of interest here that is also in pdf format.

Someone previously proposed using Secure Multiparty Computing before to implement CJ, but one must realise that SMC is only a set of tools. E.Z.Yang proposed one specific implementation using sorting, which is a cool idea, but according to Yang himself is currently not feasible in practice. In his own words, "The big obstacle is that secure multiparty sorting is somewhat difficult to implement with large keys (since integer comparison operations tend to only handle a few bits at a time)." The hunt is still on to find an efficient way to use SMC to solve the problem.

I am quite excited that people are working on making this work and will be trying the programs proposed here when I can.

Edit:
Link to the video's pdf: https://www.dropbox.com/s/nvkvo1dl3xif87v/PresentationBitcoin2013.pdf


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Natanael on September 01, 2013, 09:15:35 PM
It isn't certain that you'd be able to tell WHICH input that the attacker used, at least not with my scheme where you hide who's using what input. Revealing who's using what input might not be optimal if a user want to use inputs already tied to himself AND some inputs that aren't already, and doesn't want the unlinked ones to become linked to him.

Send all inputs to one key first.

I don't see how that solves anything. You just openly linked your own inputs together yourself, then.

Someone previously proposed using Secure Multiparty Computing before to implement CJ, but one must realise that SMC is only a set of tools. E.Z.Yang proposed one specific implementation using sorting, which is a cool idea, but according to Yang himself is currently not feasible in practice. In his own words, "The big obstacle is that secure multiparty sorting is somewhat difficult to implement with large keys (since integer comparison operations tend to only handle a few bits at a time)." The hunt is still on to find an efficient way to use SMC to solve the problem.

I am quite excited that people are working on making this work and will be trying the programs proposed here when I can.

General SMC/MPC (myself I usually abbreviate it as SMPC) does exist. But it seems to be less efficient than specific ones like for sorting. I am eagerly waiting for efficient general SMPC to become usable for average joes. :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: qxzn on September 02, 2013, 03:36:45 AM
Is there a website similar to pastebin where I can do that for pdfs? I also have a more detailed description of the network that might be of interest here that is also in pdf format.

Dropbox?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on September 03, 2013, 07:00:47 AM

As I write this people with unknown motivations are raining down tiny little payments on old addresses, presumably in an effort to get wallets to consume them and create evidence of common address ownership.


I don't quite understand this.  These dust are being sent to old addresses.  That means that whomever has the private key that can spend the money at the old txout can also use that same key to spend the money at the new "tiny little payment" txout? 

So if the dust is spent, there is evidence that the old address represents someone who is still paying attention and still has the key to that old money.  That seems like something important to know in trying to assess the real currency supply (ie, someone wants to estimate how much bitcoin has been lost).  That is not particularly dangerous or adversarial; it's just good sense to know. 

But it is dangerous to privacy, because if dust sent to multiple different addresses is gathered together into one account, that could be taken for evidence that the different addresses are in fact controlled by the same person?

Do I understand the threat right?

The correct solution then for the account holder, is to use the 'dust' and the 'old account' with the same key both as txin for a new transaction, with a single output.  There is no harm in letting someone know that the money has not been lost and that its owner is still paying attention, but consolidating the dust together with the account whose key it shares should do no harm to privacy. 

Is there any reason why that solution would be the wrong thing for the account holders to do?





Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Luckybit on September 03, 2013, 11:34:06 PM
This seems overly complicated. Is there any reason why Bitcoin isn't private enough as it is?
You presented a hypothetical situation which has not occurred yet.  It's not perfectly private but compared to credit cards and banks its very private. It's almost as private as cash.
I edited that post down from a longer (4000 word?) version which included some specific examples that I had some personal involvement in: The (third?) ozcoin thief, who was identified by sending funds to a wallet service that reused addresses (and ultimately had those funds clawed back), and a person who had an insecure brain wallet found by a whitehat, ultimately tracked down and contacted due to a mining pool which reused addresses.

There are many other examples of privacy in Bitcoin being weak— one only needs to spend a few minutes browsing through bc.i's public block explorer interface (http://blockchain.info/) to see real names attached to transactions (found by spidering webforums) and frequently accurate IP addresses (associated by connecting to many nodes), and from there you can find additional related addresses with the taint analysis button. Or look at the academic research (http://arxiv.org/abs/1107.4524) "Bitcoin is not inherently anonymous. It may be possible to conduct transactions is such a way so as to obscure your identity, but, in many cases, users and their transactions can be identified." (papers on Bitcoin are of, ahem, highly variable quality— but the point remains, Bitcoin's privacy as it is today is not very good).

The privacy gap between Bitcoin and cash for most users is enormous, enough so that we have an explicit warning on Bitcoin.org (http://bitcoin.org/en/you-need-to-know):
Quote from: bitcoin.org
"Some effort is required in order to protect your privacy with Bitcoin. All Bitcoin transactions are stored publicly and permanently on the network, which means anyone can see the balance and transactions of any Bitcoin address. However, the identity of the owner cannot be associated with their Bitcoin address until personal information is revealed by the owner during an exchange. This is why it is recommended for Bitcoin owners to use many different Bitcoin addresses; in fact, you should create a new one each time you receive money. This is especially important for public uses such as websites. You might also want to consider hiding your computer's IP address with a tool like Tor so that it cannot be logged."

Ignorance of these limitations makes the situation worse because without being acutely aware of the risk you will transact in ways that leaks more information about you and the parties you trade with.

Okay here is a potential attack which is enabled by anonymity in the Bitcoin network.

Let's say I'm a government agency and I decide to exploit the fact that Bitcoin allows anonymous transactions. What I could do is covertly corrupt and take over entire countries utilizing anonymous transactions. I could initiate a covert operation where my government prints unlimited amounts of fiat currency, then it's agents go and buy Bitcoins and then these agents can now bribe any politician anywhere in the world.  For sake of argument let's say the currency is the dollar and the agency is the CIA.

What is to stop that agency from playing Santa and bribing anyone and everyone with unlimited ability to buy Bitcoins or mine them? In this case being anonymous would allow for copious amounts of political corruption and opulence at the expense of democracy itself.

Now for a less conspiracy based attack, how about we look at Satoshi Nakamoto himself? A private citizen who has a million Bitcoins? If we make the network anonymous what is to stop him from taking over entire countries politically? He would essentially gain almost Jesus like power over countries where he would be able to bribe any politician, any private citizen, with anonymous payments into their Bitcoin wallets.

In a pseudo-anonymous world we would know at least that someone we suspect to be Satoshi Nakamoto or affiliated with the early blocks are spending coins and we would know what amounts and other little details so that we could limit corruption via transparency. How can we limit corruption in a world where the 1% can spend anonymously?

Despite the myth and rumor, cash is not anonymous. You cannot get cash from an ATM without being on camera. You cannot accept cash from another person without them potentially finding out your identity or seeing your face. If you send cash to a politician in the mail your finger prints and other evidence will be left behind. Bitcoin is different because if it becomes anonymous then any billionaire in the 1% could decide to buy a state political system and systematically bribe politicians with anonymous Bitcoin rewards and there would be no way to counter this except with a fork.

Ultimately I think anonymity seems to be more a reaction to government overreach but not a long term solution to government corruption. If you put in anonymity then the corruption may become more hidden, and governments wont lose any power. Governments will be able to finally get involved in manipulating the Bitcoin economy and network. They'll be able to do it covertly with operatives, but there is nothing to stop a government from doing this.

For that reason I think more thought on the philosophical level should go into how to implement anonymity in a way which it cannot easily be exploited by the bad guys or have unintended consequences. If corruption is why our governments are bad, enabling it is only going to make it worse. I think for myself what I want is the ability to buy something privately and not have what I buy be known, but I don't necessarily need my transactions hidden. Anyone can know my pseudonym spent X amount of Bitcoins, just so long as they don't know what I spent it on.

If people want to know what I spent it on they'll have to ask personally. That is private information. Secret is a different matter because then I wouldn't even be able to tell you. So how do we set things up so that if I wanted to help fight against corruption or clear myself in an investigation I can do so while also maintaining my anonymity? I think pseudo-anonymity would allow me to do it easiest because I could digitally sign my receipts detailing what I purchased and it could be released in the future to clear myself of any wrongdoing.

I think as long as the user has the ability to be pseudo-anonymous while also having the ability to do record keeping, then if there is an incident then Alice has detailed records of all her transactions and what she purchased which she can give to Gordon to prove her innocence. If she does not have this information then she cannot prove her innocence to Gordon and that is an existential danger to Alice. I'm interested in lowering the risk to Alice (who represents the user who is using Bitcoin for legitimate purposes). I don't want to help Mallory or Eve.


At one point in the conversation I brought up CoinJoin and what it makes possible and his immediate reaction was, "That will have to be stopped."
They can't even be distinguished. Short of a complete lockdown (and a total failure of the system) there is no way to block the activity or even reliably measure how much of it is going on.

I don't think this actually presents much concern to authorities— they manage to survive in a world where cash and other asset transfers leaves few records already.  When tax authorities question you to make sure you're paying your taxes, they'll ask to see your books same way it works with anything else... and nothing in this thread will protect someone there, at least in the US the responsibility is on the taxpayer to show they paid their taxes.  But in any case, the political debate is moot... just due to the technological inevitability of this: I've tried to think of a way to prevent it, and I cannot.


Precisely, the political debate is moot. Because the technology is economically superior and demands this solution, it is inevitable. In fact, I would not be surprised to see a successful CoinJoin functionality implemented in an alternate client before the end of the year, e.g. as coderrr's coin selection patch was. And this will only be Gen 0 for anonymising tools ...

The modern State needs to abandon their utopian panopticon matrix ambitions and go back to doing proportional policing relevant to a free society, for many reasons too numerous to mention.

Besides, this is a Development & Technical section ... suffice it to say, CoinJoin and other anonymising tools are inevitable ... just like Judgement Day.

When we design these technologies we should look at use cases. In my thinking the user worth protecting in my use case models is Alice. Alice is the user who wants to use these technologies for legitimate purposes, who wants her privacy to buy books without Eve or Mallory knowing everything she buys without a warrant.

Gordan (the government agent) wants to investigate Mallory (the malicious user). if he has a warrant he should be able to go to Alice and get information from Alice to reconstruct the events. He will want to know what she purchased, when, what Bitcoin addresses she owns, etc. The addition of anonymity on the network puts an additional burden on Alice to keep records of everything she purchases. It also will make it much more likely that she'll be contacted by Gordon as part of an investigation.

The solution I offer is to make detailed record keeping easy and simple. These records should be good enough that if investigators do have a warrant that you can show that you're not a threat. This is necessary to protect Alice by lowering her risk of being falsely accused and it helps save Gordon time because he wont have to worry about as many false positives.

Mallory and Eve are the problem characters. Eve wants to wiretap everyone without a warrant or reason and just snoop around. Mallory wants to hack everyone or use the Bitcoin network for malicious purposes such as pursuit of political power, as part of a crime network, or perhaps a government plot or conspiracy.

Alice justs wants to be able to buy books and not have everyone know what book she's buying and when. If there is a warrant Alice is willing to provide the information to clear herself and prove she's not involved with terrorism. The point here is that any design has to make it easy for the user to deal with different plausible scenarios. The default user is Alice, but Mallory or Gordon could also be users of the Bitcoin network.

The idea I have is to empower Alice to collect and store her own digital fingerprint and digital trail. This trail could be useful if she's ever questioned by Gordon. It should have as much or as little detail as deemed necessary to legally clear herself and the amount of detail in the records should be set by Alice but it is clear to me that there can be no invisible transactions in a secure system.

The transactions have to be recorded somewhere by someone. It does not have to be recorded by Eve though. So when you take transactions off the public ledger, in my opinion you must record transactions on a private ledger of your own. This means Alice can have anonymous transactions, but she's going to have to keep detailed records of account of each of these transactions, because someday she's may have to explain those transactions. The assumption people have is that Alice will be able to have anonymous transactions without any added responsibility, that is very unlikely. In my opinion it means more responsibility on Alice.

It's going to reach a point eventually where if Alice cannot explain every transaction by providing her private ledger to Gordon during the investigation, that she could be jailed. As a result it may become just as important to backup your transactions and digital details as it is to backup your wallet. Right now it's all handled by Bitcoin itself so no one is forced to religiously record every transaction they make.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: gmaxwell on September 04, 2013, 12:02:15 AM
If you put in anonymity
Nothing being discussed here is a "put in", this thread is about existing functionality which is fundamental to Bitcoin and has been there since day one, if not widely recognized.

Quote
while also having the ability to do record keeping, then if there is an incident then Alice has detailed records of all her transactions and what she purchased which she can give to Gordon to prove her innocence. If she does not have this information then she cannot prove her innocence to Gordon and that is an existential danger to Alice. I'm interested in lowering the risk to Alice
I don't think it's even possible to construct a system in the context of Bitcoin that doesn't have a property of permitting strong personal record-keeping. It would certainly be difficult to accomplish, and I don't think anyone currently wants such a system. I agree with you that the ability to keep records is important, and the fact that users can (and should) keep their own private records which could potentially be discovered as part of some lawful process is, in fact, one of the arguments that I give as to why privacy does not have an excessive risk of harm to society.

But it is dangerous to privacy, because if dust sent to multiple different addresses is gathered together into one account, that could be taken for evidence that the different addresses are in fact controlled by the same person?

Do I understand the threat right?

The correct solution then for the account holder, is to use the 'dust' and the 'old account' with the same key both as txin for a new transaction, with a single output.  There is no harm in letting someone know that the money has not been lost and that its owner is still paying attention, but consolidating the dust together with the account whose key it shares should do no harm to privacy. 

Is there any reason why that solution would be the wrong thing for the account holders to do?
You understand the concern there.  And your proposed solution is a correct one but for two issues: It doesn't reflect the behavior of current wallet software, and making additional payments in that 1:1 manner takes more space and pays more transaction fees. A third option of just ignoring unsolicited payments, though this would have some long term adverse impacts on the system.



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: marcus_of_augustus on September 04, 2013, 01:22:01 AM
Luckybit:

Quote
The solution I offer is to make detailed record keeping easy and simple.

You're not offering any solutions at all as far as I can tell you're just blathering about philosophy of design, like too many of us here no doubt ..... at some point it comes down to "code it or it didn't happen".

Also your approach of trying to dream up and cover every possible use case is futile.  In the end, the coders get to decide what gets experimented with and the market gets to decide what gets adopted. My position is that strongly anonymous money is economically superior so the market will prefer to use it. I've seen zero evidence or research from the advocates for traceable (stasi) money that this is not the case. Ask yourself if you really want to know what that $100 bill in your wallet was used for before you owned it? Would you throw it away if you knew it had once been used to buy cocaine or pay for a hooker or a child slave? Money is money, an economic good, try not to confuse it with other technologies which it is not.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: sunnankar on September 04, 2013, 06:14:52 AM
My position is that strongly anonymous money is economically superior so the market will prefer to use it.

I am not sure why that position could be argued with. There are three main costs attached with current currencies and payment systems: time, money and privacy.

Bitcoin and implementations like CoinJoin simply decrease those costs in spite of price controls like price floors such as linking identity to account/credit card, etc. with Coinbase and ACH accounts.

And if Bitcoin does not relentlessly drive down those costs then some substitute good will arise that will drive down those costs and the result, everything else being equal, will be decreased demand for Bitcoin and increased demand for the substitute because it has a lower cost but equal or greater utility.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Luckybit on September 04, 2013, 10:18:13 AM
Luckybit:
Ask yourself if you really want to know what that $100 bill in your wallet was used for before you owned it? Would you throw it away if you knew it had once been used to buy cocaine or pay for a hooker or a child slave? Money is money, an economic good, try not to confuse it with other technologies which it is not.

It's not my business to know that. I'm not asking for a stasi coin where I know what everyone purchased. Thats not the case I was making. I'm saying if we go anonymous then each of us will have an increased level of responsibility. We will have to keep track of all of our own purchases and when the investigators question us we will have to give them that information. We will have to explain receipt by receipt and in detailed records what we did with our coins. We will basically be required to report our economic activity just as banks are required to do so now because we will essentially be our own personal banks.

I admit that is better than the way things are now where everything we purchase with a credit card is automatically known to the whole world. They know what books we read, what movies we watch, and more without having to have a warrant or any reason to know it. No one is supporting their ability to snoop on us without a warrant.

At the same time it was also made clear to me that Bitcoin is not private enough. I'm in agreement that Bitcoin needs greater privacy protection. The question is how do we do it in a smart way. Do it in the wrong way and the whole experiment could fall apart. In my opinion the right way is we have anonymous purchases but also an pseudo-anonymous way to report our purchases if there is an investigation.

Imagine there is an incident and you want to be pro-active to separate yourself from the child trafficking incident? The way to do this would be to upload pseudo-anonymously your transaction details complete with notes on what you purchased to the investigator and digitally sign it. This would rule you out immediately.

The only concern I have about it is minimizing the risk of false positives and of people getting sucked into incidents in dragnets. The investigators have a job to do, we want privacy. I don't see why we have can't both win.

The solution I offer: We must regulate ourselves and be at least as responsible as traditional banks are now. This would mean we will have to keep track of whatever records/pseudo-identities necessary to help in whatever investigation. Just as ISP's are now required to keep records, and banks are required to keep records, if we each become our own ISP through a meshnet and we each become our own bank through peer to peer Bitcoin it actually means with this increase in freedom we will also have an increased responsibility. It's an unavoidable consequence of growing up as a new technology. Our transaction logs right now aren't very detailed, but in the future it will probably be a situation where every single Bitcoin transaction you make produces a detailed digital receipt which gets encrypted and emailed to your email address. Right now if you conduct transactions on Wallet A and then delete the wallet then all those transactions from that pseudo-identity are lost? No they are stored on the public ledger but what is lost is your connection to it.

Then you do transactions from wallet B and wallet C, and lets say you actually save transaction details here? Well then you have all the various off-chain transactions and websites with built in wallets, ultimately its messy.

At some point pressure will build to create a unified pseudo-identity management system where a user creates a persistent pseudo-anon master wallet identity and all the additional extra pseudo-identities are branched from that similar to the master password in Mozilla. Then the user could basically sign in once with the master identity and select any of the different pseudo-identities with their own wallets as a completely different identity. It does not change the fact that if something goes wrong they will have to own the master identity and all the pseudo-identities branched from it. The investigators looking for a specific wallet address could rule them out quick.

I don't see any other way it could play out.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: marcus_of_augustus on September 04, 2013, 12:30:31 PM
Yeah, you seem pretty lost. The technology is not going to do what you want ... sorry. There was time when ISPs and banks weren't required to keep records (I don't think you would remember it), the world was definitely a better place then. These are requirements that were brought in by the police state surveillance grid that you recognise as malignant, but not their methods ....


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on September 04, 2013, 03:27:43 PM
I think it's kind of moot in any case. Being able to keep good records on your own, privately, is an essential feature to offer— just the basis of good book keeping. Your political motivations for doing so (or not) really aren't important for the technology.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: DumbFruit on September 05, 2013, 02:11:04 PM
The solution I offer: We must regulate ourselves and be at least as responsible as traditional banks are now. This would mean we will have to keep track of whatever records/pseudo-identities necessary to help in whatever investigation.
First of all, that's not a solution, and secondly, the pseudo-problem you're trying to solve is not under the scope of Bitcoin.

Bitcoin is a currency, not a surveillance protocol. So the improvements on Bitcoin should be made in the direction of the former and not the direction of the latter.

It is not the responsibility of users of currency to facilitate the investigations of third parties. Though I reject the idea that anyone should assist the investigations of any presumed authority that claims to be a "monopoly on violence."*

For the same reason I reject the idea that a fully anonymous Bitcoin is "less responsible" than a pseudonymous Bitcoin.

The records that participants voluntarily keep are for their use only, and exist to prevent fraud and extortion, not to hold people accountable for transactions deemed unethical by the local oligarchy's inquisitors.

It is further beyond ridiculous to want to avoid bribes to oligarchs because you fear that bribery will cause them to abuse power. Even if you naively thought politicians would be beneficent rulers without the influence of bribery, the political structure of governing cannot be cured of the ignorance that causes the majority of the damage.

If you doubt this, consider the knowledge that politicians of the world possess. Name the politician that is a professional in the fields of medicine, road construction, gumball manufacturing, carpentry, and aeronautics. Name for me one politician for whom it cannot be said is an intellectual infant in the vast majority of all fields he claims to be arbiter of.

If any particular oligarchy is indistinguishable from a mob of infants deciding on arbitrary matters, then it hardly matters if their intentions are good or evil. Their actions can only be inept, heavy-handed, short sighted, and destructive.

TLDR
There will always be Luddite puerile power mad oligarchs in the world, that's not Bitcoin's problem.

*Barry Soetoro Jr


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Rassah on September 05, 2013, 04:03:55 PM
Watching, and hopefully participating.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: markm on September 07, 2013, 12:52:31 AM
lol just received this email about our coinjoin server. we are running nothing except tor and our own software (checked processes).

Tor gateway or merely the normal default Tor node mode (internal node that does not go out getting files of the lightnet for someone else somewhere out on the Tor/dark net?

-MarkM-


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: cr1776 on September 08, 2013, 06:10:05 PM
One thing to be aware of is the potential lack of security even using Tor right now, so one should be using Tor 2.4 or later even though it is alpha. See below.  Once CoinJoin is live, one should be aware of Tor versions for best practices in privacy.

http://arstechnica.com/security/2013/09/majority-of-tor-crypto-keys-could-be-broken-by-nsa-researcher-says/



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: jgarzik on September 08, 2013, 07:56:08 PM
One thing to be aware of is the potential lack of security even using Tor right now, so one should be using Tor 2.4 or later even though it is alpha. See below.  Once CoinJoin is live, one should be aware of Tor versions for best practices in privacy.

http://arstechnica.com/security/2013/09/majority-of-tor-crypto-keys-could-be-broken-by-nsa-researcher-says/

And

https://twitter.com/jgarzik/status/376210228863172609
https://twitter.com/jgarzik/status/376210514562404352



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: cr1776 on September 08, 2013, 11:49:22 PM
Very true.  Unfortunately Tor (et al) are not yet to the point that many would like.  :-)

One thing to be aware of is the potential lack of security even using Tor right now, so one should be using Tor 2.4 or later even though it is alpha. See below.  Once CoinJoin is live, one should be aware of Tor versions for best practices in privacy.

http://arstechnica.com/security/2013/09/majority-of-tor-crypto-keys-could-be-broken-by-nsa-researcher-says/

And

https://twitter.com/jgarzik/status/376210228863172609
https://twitter.com/jgarzik/status/376210514562404352




Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Natanael on September 09, 2013, 11:55:09 PM
There's actually an efficient MPC protocol now that appears to be as secure as my scheme requires! (Which I personally use to call SMPC = *secure* multiparty computation)

http://phys.org/news/2013-09-breakthrough-cryptography-result.html - also links to it's paper

Hopefully it will be released as open source as well.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ghgr on September 10, 2013, 05:23:54 PM
I propose a specification of the CoinJoin protocol. It is not yet implemented, but if you find the work-flow sound it would not be hard to make an IRC bot with the sx command line utilities as a proof-of-concept.

The idea is a P2P network where a thread is relaying all transactions. Another thread is in charge of the mixing.

A first, simple implementation would be an IRC bot which sends and listens to encoded transactions. Of course this approach would not be P2P, but a public channel in a hidden IRC server provides several advantages:

   -Easy implementation: IRC servers already exist. Bots enter to the channel #coinjoin (for example) and speak there.
   -Soft trust system:
      - If we trust the IRC server (for large values of 'trust') and only registered nicks are allowed to talk in the channel, a Sybil attack will be difficult.
      - We can chat (privately or publicly) with some users and thus allow them to prove their identity (by signing a given message, telling you a private joke, etc.)

The concept is composed by two parts (threads):

   1) Communications thread: In the case of the IRC server architecture, it has the method "sendTransaction" and "listenToTransaction". The first one "chats" in the channel and the latter listens to transactions and stores them in memory.

   2) The actual mixing part: Its work-flow is showed in the link [1]. It has been designed with yEd (http://www.yworks.com/en/products_yed_download.html) and the file (if you want to edit it) is [2] . The main points are:

      - It handles "change" addresses. If you want to mix 47 BTC, it will be a pain (really!) to make 47 inputs of 1 BTC and mix the separately. This approach allows you to send the 47 BTC as input, recover 1 BTC (for example) mixed and your 46 BTC back (of course, not mixed! In order to avoid confusion, this change address is the same as the input address). Fees are deduced from the change address, and thus you can serialize this method trivially as many times as you want.

      - Random decisions to avoid an attacker that listens how the transaction is constructed to map inputs with outputs. Each time transactions are composed in a different order.

      - If something goes wrong (bad signature, peer not responding, etc.) the output is discarded and the process restarted.


Q: What means checkTransaction?

A:
1) Are inputs confirmed (at least 1 confirmation)? OR, Are all unconfirmed previous transactions valid (for the Bitcoin network) and with enough fee?
AND
2) Signatures match?
AND
3) Is there enough transaction fee?
AND
4) Are all outputs equal AND sum(outputs) < sum(inputs)?


[1] http://i41.tinypic.com/5p3k02.jpg

[2] http://www18.zippyshare.com/v/26446175/file.html


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on September 10, 2013, 06:20:51 PM
In order to avoid confusion, this change address is the same as the input address).
This is a terrible idea. You have to specify the input you want to spend, just specify the address you want change to be assigned to too.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ghgr on September 10, 2013, 06:30:57 PM
In order to avoid confusion, this change address is the same as the input address).
This is a terrible idea.

No it is not. Take a look at the flowchart. The way the transaction is constructed does not leak information about which input goes with which output.

For example (fees excluded for clarity)

Inputs:
1) 50 BTC from 1addr1
2) 100 BTC from 1addr2

Outputs:
1) 1 BTC to 1addrX
2) 1 BTC to 1addrY
3) 49 BTC to 1addr1
4) 99 BTC to 1addr2


The change is sent to the same address in order to avoid confuse the user (it was 1addr1 the mixed, or was it 1addrY?).

Anyway, if you *really* want to specify a different one, it is trivial to do that.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on September 10, 2013, 06:57:33 PM
Don't reuse the input address. Don't ever reuse addresses, particularly in protocol.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ghgr on September 10, 2013, 07:28:59 PM
Don't reuse the input address. Don't ever reuse addresses, particularly in protocol.

I agree that it might not be ideal, but it does not compromise the anonymization. It is not intended to be pretty, but useful, and to decrease the chance of the user making mistakes.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on September 10, 2013, 07:32:03 PM
I agree that it might not be ideal, but it does not compromise the anonymization. It is not intended to be pretty, but useful, and to decrease the chance of the user making mistakes.
If you obtain an explicit change address from the user there won't be any confusion or mistakes. And it does reduce privacy— otherwise a third party is still unsure about the ownership of the change, if less unsure than they are about the other outputs.

Are you planning on writing software that does this? if not, the debate is kind of moot.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ghgr on September 10, 2013, 08:07:44 PM
I will answer the two questions:

1) Why is there a change address?
Because more often than not the user has more coins than the standard amount to mix (for example, 1 BTC).

2) Why is the same as the input address?
Because it makes clear that these funds are NOT mixed. Not only slightly mixed (in my previous example, the output with 49 BTC is obvious where it came from). There is no such thing as "little unsure". Funds are completely anonymous*, or they are identifiable. And I chose to make it clear in the protocol.

I would like feedback in the protocol itself. For example, how can a transaction be re-identified, or under which circumstances the program may be stuck. If you still believe that reusing the change address would compromise anonymity, please give a concrete example of how.

If it is OK, developing the program is quite straightforward. All the tools exist already (it can be even a bash script with the sx tools).


*Under certain assumptions, like for example excluding the other party (this is why the process is repeated several times)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on September 10, 2013, 09:08:21 PM
The client knows from the history which outputs were added as part of the mix, and which were the result of explicit change addresses. This information needs to be tracked anyway because joined coins are not completely anonymous. At best each join adds only a few bits of entropy, and any competent implementation would have to track how much entropy is added with each mix, and therefore would be perfectly capable of setting entropy=0 for change outputs.

EDIT: BTW, in case anyone hasn't seen it, I'm running a crowdfund (https://bitcointalk.org/index.php?topic=291283.0) to finish the chaum blinded signature version of the protocol that I've started working on (https://github.com/maaku/coinjoin).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on September 11, 2013, 01:55:08 AM
Here is something that would help.

Standardize some coin denominations, call 'minted coin'.  Random other denominations call 'bullion', for 'bulk metal.' 

Let a standard minted coin be anything that starts with 1, 25, or 5, and the rest of whose digits are zero. 

phase 1.  Merchants start splitting input into minted coin into own wallets, giving back minted coin as change.   Trigger phase 2 when 90% transactions last 100 blocks done exclusively with minted coin input & output. 

phase 2.  Now make 'normal' transaction be transaction exclusively in minted coin.  Other transactions still legal, just not 'normal' anymore (or maybe not 'normal' unless accompanied by bigger tx fee for miner). 

phase 3.  Clients concerned with privacy may start participate exclusively in tx have exactly same number, denomination, for input & output, and at least 2 inputs largest size coin used.  Other clients, not care, may allow tx where take maybe some number coin at same address , but if so let make another standard size coin. 

Easy for someone to figure out what's going on when there's an input that's 3.88 BTC, an output that's 3 BTC, and an output that's .88 BTC. 

Much less easy when there are 3 inputs of 1 BTC, 3 inputs of .25 BTC, 2 inputs of .05 BTC, and 3 inputs of 0.1 BTC, and output is exactly the same number and size of coins.  No way to know which is change going back to buyer.  No way to know which inputs & outputs represent buyer, which seller.  Maybe seller has inputs too, and is making change  Not even a way to know if the thing somebody bought cost 0.5 BTC or 3 BTC or 3.5 BTC, etc. Every address used have one coin, every address paid to have one coin. 

Trades in 'bullion' (arbitrary N-digit denominations) still possible, maybe not 'standard', or may require small 'minting fee'.  But also possible exchange 'bullion' for 'minted coin'  of standard denominations, down to level of negligible dust award for miners.   Not even possible when watching to tell difference between someone changing own 'bullion' for goods with merchant take 'minted coin' and getting 'minted coin' change, from someone just changing own bullion for minted coin.

Makes 'coinjoin' privacy by default.  Money go through a few ordinary trades under new rules, specially trades with or by privacy enforcing clients, no longer possible tell who own which. Is soft fork only; all tx legal under new rules also legal under old.  Takes no 'mixing' as such or 'mixers.'  Requires trust no extra party.  Implementation simple and easy make secure.

Edward.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Hawkix on September 11, 2013, 08:57:01 AM
I would prefer mixing arbitrary values of BTC. Ideally, the adversary should not be able to distinguish on-purpose mixing transaction from normal multiple input/multiple output transactions.

That's why I would like to do the mixing kind of automatically, from the queue of transactions to be mined.

If there are signed transactions A1+A2->X1+X2 from one user, B1->Y1+Y2 from other, etc., there should be a mechanism how to "RESIGN" mixing large transaction A1+B1+A2 -> X2+Y1+X1+Y2. If both A and B sign this and add a slighly better fee, it will be mined. It may look like double spend, but this could be solved using special "propose transaction" message instead of "broadcast transaction".

Thus, the Bitcoin transfers of users, who do not know each other, will be, kinda automatically (think of "offer for mixing" checkbox in Bitcoin-QT) mixed together by the network prior to be mined. Could save some blockchain space, too.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ghgr on September 11, 2013, 09:05:27 AM
That's a neat idea (mixing large transactions) but unfortunately I cannot see how it could be implemented. When signing an input we sign a hash of the outputs, and thus adding new outputs will require to re-sign the transaction (as you already stated).

So, the transaction must go back and fort (in order to resign it each time an output is added) and the miner becomes essentially the rendez-vous server.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on September 11, 2013, 09:53:52 AM
That's a neat idea (mixing large transactions) but unfortunately I cannot see how it could be implemented. When signing an input we sign a hash of the outputs, and thus adding new outputs will require to re-sign the transaction (as you already stated).
So, the transaction must go back and fort (in order to resign it each time an output is added) and the miner becomes essentially the rendez-vous server.
That isn't the case, and if you see the "taint rich (https://bitcointalk.org/index.php?topic=139581.0)" link in the post, you can see I went and performed these transactions with people with no back and forth, there is a single round trip:  I offer inputs and outputs, you respond with inputs and outputs and your signature, I then add my signature. If you'd like we can do one together too.

My main motivation in creating that long writeup was correcting that misconception.  For SIGHASH_ALL these can be accomplished by simply agreeing on the outputs before any signing begins. (Obviously things are even simpler with SIGHASH_SINGLE, but that doesn't have the desirable privacy properties).

Standardize some coin denominations, call 'minted coin'.
I tried pretty hard a couple years ago to get pools to round up their payments to non-jagged numbers like 0.01, because the highly jagged outputs they produce are bad for privacy and produce more bloaty change... and had absolutely zero luck. I am not anticipating great success on any kind of denominationalizing bitcoin. Maybe if the block explorers that give the misleading "account" view go away and people use more clients that show a more accurate "coin" view people will start to care more about the denomination of the coins they receive.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: jgarzik on September 11, 2013, 10:01:58 AM
I tried pretty hard a couple years ago to get pools to round up their payments to non-jagged numbers like 0.01, because the highly jagged outputs they produce are bad for privacy and produce more bloaty change... and had absolutely zero luck.

Interesting.  I had not thought about the privacy implications of the jagged numbers, just the bloaty change part.



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ghgr on September 11, 2013, 10:11:44 AM
Thanks for your answer, gmaxwell.

So, if I understand correctly, what you propose in your "I taint rich" thread is:

- You say publicly that someone make a transaction with this schema (first transmission):

inputs:
 a) His address (spendable previous output with X BTC)
 b) Your address (spendable previous output with 1 BTC)

outputs:
 a) A different address of him (X BTC)
 b) You address (with 1 BTC)

- This transaction is signed and sent back to you (cited: "via PM, anonymous gpg encrypted email, or a post in this thread") (second transmission).

- You sign this transaction and announce it (third transmission)

Or, in other words, in order to agree on the outputs, we need to have a rdv server (either an IRC server, a Forum -as in your thread-, a P2P network, etc.). We cannot avoid playing ping-pong with the transactions (I have nothing against it. In fact I proposed a detailed specification some post above).


For SIGHASH_ALL these can be accomplished by simply agreeing on the outputs before any signing begins.

How can we agree on something without previous communication? What is the advantage over, for example, sending back and forth the transaction?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: TierNolan on September 11, 2013, 10:24:48 AM
.... there should be a mechanism how to "RESIGN" mixing large transaction A1+B1+A2 -> X2+Y1+X1+Y2. If both A and B sign this and add a slighly better fee, it will be mined.

You don't actually need a larger fee.  Once the block size limit is hit, "better" means a larger fee per kb.

If miners can swap 2 transactions that are 250 bytes each with 1 transaction that is 400 bytes, then that gives them 100 bytes to use for other fee paying transactions.

This creates the right incentives on both sides.  If your client signs a "resign" transaction, then it can save you fees and the miners have an incentive to use that lower fee transaction instead of the 2 originals, since it pays more per byte.

However, the problem is that someone monitoring all the transactions will see the original transaction and so can link the outputs with inputs.  However, the info wouldn't be included in the block chain.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on October 15, 2013, 07:23:39 AM
On this general subject, I've been enjoying Peter Todd's dust-b-gone: https://github.com/petertodd/dust-b-gone/

It works with Bitcoin-qt / bitcoind and scans your wallet for tiny coins and signs them off to be joined away... both thwarting dust payment deanonymization attempts and defragmenting your wallet a bit.  I wish Peter would do the last bit of effort to figure out how to produce a windows binary like p2pool has to make it easier for people to use. :)

(I've audited it and test it, and I consider it perfectly safe to use as of the current version)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: hashman on October 15, 2013, 09:12:39 AM
Thanks for this thread GM et al.!

A couple issues perhaps you can help me with. 

1) Coinjoin as I see it adds some plausible deniability but the taint is still there.  Anonymity is probably not the right word.  If one of the input addresses is considered a red flag, all you've done at the end is generate a little extra work for researchers who now need to follow all the outputs to see who took the money.  As I understand it, the zerocoin protocol does no better.. and in fact to do better is impossible because if we can't follow the money, we don't know it's real.  Trustworthy private mixers on the other hand could offer some real anonymity.  To spell this out further, I have some coins at address 1A and I want them moved to address 1B with no public record of ever having been associated in any way with 1A.  Can coinjoin do that?  No. Can zerocoin?  No.  I guess this is what you meant by certain users able to pay for better anonymity will not bother with coinjoin. 

2) Dust payment deanonymization?  Huh?  All payments / TXs are already public.  How does adding a dust address to somebody's addy change anything?  This cannot be the motivation for a dust-to-old-addresses sender.  There is already a tag marking every address on the blockchain: the address.  I want to hear more about this "R" attack.   


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: molecular on October 15, 2013, 09:26:01 AM
1) Coinjoin as I see it adds some plausible deniability but the taint is still there.  Anonymity is probably not the right word.  If one of the input addresses is considered a red flag, all you've done at the end is generate a little extra work for researchers who now need to follow all the outputs to see who took the money.

The way I see it, this is not true. No amount of extra work will enable researches (or whoever) to prove address X is now the owner of the "red flag coins". Any of the output addresses of the coinjoin tx could be the "real" owner.

Please explain if I'm wrong.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: hashman on October 15, 2013, 09:43:35 AM
1) Coinjoin as I see it adds some plausible deniability but the taint is still there.  Anonymity is probably not the right word.  If one of the input addresses is considered a red flag, all you've done at the end is generate a little extra work for researchers who now need to follow all the outputs to see who took the money.

The way I see it, this is not true. No amount of extra work will enable researches (or whoever) to prove address X is now the owner of the "red flag coins". Any of the output addresses of the coinjoin tx could be the "real" owner.

Please explain if I'm wrong.


You're right, this removes proof that the funds were yours.  You have plausible deniability.  They only could be yours, as your address is one of those publicly associated with the red flag coins.  As you can tell this is somewhat different to the functionality of a tumbler, where at the end of the day your new address is not associated with the red flag coins on the public record.       


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: molecular on October 15, 2013, 01:03:58 PM
1) Coinjoin as I see it adds some plausible deniability but the taint is still there.  Anonymity is probably not the right word.  If one of the input addresses is considered a red flag, all you've done at the end is generate a little extra work for researchers who now need to follow all the outputs to see who took the money.

The way I see it, this is not true. No amount of extra work will enable researches (or whoever) to prove address X is now the owner of the "red flag coins". Any of the output addresses of the coinjoin tx could be the "real" owner.

Please explain if I'm wrong.


You're right, this removes proof that the funds were yours.  You have plausible deniability.  They only could be yours, as your address is one of those publicly associated with the red flag coins.  As you can tell this is somewhat different to the functionality of a tumbler, where at the end of the day your new address is not associated with the red flag coins on the public record.      

I understand you reasoning, but I'm not sure this distinction can be made:

If you argue using coin taint, consider that you might also end up with other tainted coins -- let's say some purple coins -- coming from your traditional tumbler. The tumbler doesn't magically give you "clean" coins either (unless it distributed freshly mined ones somehow, and here you can see the upside of buying mining contracts and such, but that's not tumbling, but selling clean coins), but give you coins from other users, likely to have some bad taste to them, too.

So tumbling the coins equally leaves you with nothing more than plausible deniability and a bunch of tainted coins. You might have successfully removed your red taint, but are now stuck with purple taint.

I don't quite see a qualitative difference here.

Maybe we'd have to define more exactly the goal(s) we want to achieve here?

If we want to make bitcoin more anonymous in general, for example, widespread frequent casual use of coinjoin seems to be a very good way.

If we want to specifically and completely remove a certain colored taint from some coins, the use of a traditional "laundry" may be more adequate.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on October 15, 2013, 05:26:57 PM
I am not sure if anyone mentioned this upthread, but the security of mixing means trusting the other parties to not link their input identity with their output identity (which they could do by not anonymizing their IP address successfully or spending patterns that can be analyzed). Thus the anonymity and privacy obtained is unpredictable.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on October 15, 2013, 05:29:59 PM
Thus the anonymity and privacy obtained is unpredictable.
It is never less than not including their inputs at all.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Murphant on October 15, 2013, 05:57:45 PM

If we want to specifically and completely remove a certain colored taint from some coins, the use of a traditional "laundry" may be more adequate.


If we assume that laundries are easily identifiable on the network, I disagree that using one actually removes the taint. If tainted coins enter a laundry, then any coins exiting the laundry from that point on will share some of that taint, including the coins that the original owner of the tainted coins got back. Thus the result is the same as using CoinJoin, although the taint dissipation is executed faster in the laundry case.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on October 15, 2013, 06:05:11 PM
1) Coinjoin as I see it adds some plausible deniability but the taint is still there.  Anonymity is probably not the right word.  If one of the input addresses is considered a red flag,
This is really a question for how _much_ these tools are used. What you're pointing to is that there is an information leak whenever the anonymity set is less than all users of the system. It's actually even worse than that: only a very small fraction of the world uses Bitcoin at all: So even if every transaction were anonymous internally to Bitcoin there would still be an information leak from the fact that you used Bitcoin at all.  The same kind of thing exist for any other anonymity system: Even if Tor was perfect, you'd still be a member of the tiny set of people using Tor (or had even heard of it), and in practice there are far more leaks than that (time of day, subject matter interests, languages spoken, etc).

What this says to me is that trying to draw a hard line at "no information loss" is misguided because no system can actually achieve that when you consider all possible information sources (and, of course, real attackers are not confined to stay within the bounds of your pretty little system: they will consider all possible information sources).

In general I prefer to say these are techniques to improve your privacy. In the conventional understanding of the word privacy we realize that privacy is seldom absolute.  Because of the public ledger Bitcoin's privacy is very fragile.  With current use practices today snooping so simple that webpages automate it for you easily can tell you all kinds of information about who transactions with who, and how much coin they have, how much they're earning, etc. You can't always answers these questions totally cold, but as soon as someone sends you funds you have a piece of yarn to yank on, and often their privacy will more or less completely unravel.

If zero information leak is not generally obtainable then what should we consider private or anonymous?  It depends a lot on the situation and the people involved.  But in considering something as a tool to improve privacy I don't need to draw bright lines: More privacy is better than less (when you actually want non-privacy you can always selectively disclose to the parties you wish to disclose to).

Besides, there are not-quite-privacy related motivations here too: Bitcoin's privacy limitations are a fungibility risk: If blacklisted coins become the norm Bitcoin may become unattractive to trade with because no one wants the risk of finding out they accepted a black coin, or we could potentially lose decentralization because accepting a feed from some centralized blacklisting authority may be the only reliable way to avoid receiving a black coin. Even if coinjoin usage did nothing to make anyone "anonymous" if it made attempts at large scale coin blacklisting cause too much collateral damage and fail at birth, that would be enough justification for it.

My thinking here is if the tools are easy and cheap they can be used very widely. Above all other criteria widespread usage is what makes the difference between your "plausible denyability" and whatever you'd call actual "anonymity". I'm also more generally concerned with more casual levels of privacy:  I don't want the guy at the coffee shop knowing my income or net worth. I don't want my landlord raising my rent because he see that I can afford it. I don't want my inlaws scrutinizing my purchases. Privacy is important to personal autonomy and dignity, and financial privacy can be important to protecting you from thieves and discrimination.

But because these risks are individually low probability and distant I don't want to put my funds at risk or pay a bunch of fees to achieve it. This takes "laundry" services mostly off the table as they have monitoring risk (mostly not my concern), theft risk, and fees. More abstractly, since I think other boring users would also conclude the same thing, I might expect 99% of the funds involved in such a service to be the proceeds of crimes. While recovering my privacy might be worth some risk of being falsely implicated in someone elses crime, paying for the privileged of having a 99% chance of receiving crime involved coins would be a bad deal.  Anonymity systems with only one kind of user really are useful to no one, and to be useful to common boring users overheads like fees and theft risk need to be eliminated.  I believe that relative to the overall scale of the economy criminal activity is small, but that only matters if you have privacy mechanisms the whole economy will participate with.

Quote
How does adding a dust address to somebody's addy change anything?  This cannot be the motivation for a dust-to-old-addresses sender.  There is already a tag marking every address on the blockchain: the address.  I want to hear more about this "R" attack.  
Assuming no coinjoin or shared wallet usage, when a transaction spends two coins paid to different addresses you can make a assumption that the a common party is probably the 'owner' of all the involved keys and the sender of the transaction.  Prior to the transaction you may not have had any information that those three 'identities' (coin1 scriptPubKey, coin2 scriptPubKey, and the party paying you) were one and the same.

When someone transacts in the intended way with a fresh address for every transaction the information leak is minimized: no more interconnection happens than is strictly needed, and the interconnection doesn't snowball.

If, after you've exhausted the funds sent to a particular scriptPubKey, someone sends you a tiny amount of coin to that scriptPubKey and you spend it in a new transaction then whatever linkage they knew carries forward and your deanonymization grows as a sufficiently small payment will only be useful when spent in combination with other coins. After several applications of this its very likely that all addresses in that wallet become publicly interconnected.  Turning a theoretical weakness ("You might not be very private") into an actual one.

Since those payments are necessarily small (when used to attack all users generically) and since they were non-solicited I think giving them away in coinjoin transactions is an elegant countermeasure: Its as least as good as never spending them, but it also sweeps the crud out of the UTXO set and salts the public ledger with misleading information.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on October 15, 2013, 06:32:50 PM
Thus the anonymity and privacy obtained is unpredictable.
It is never less than not including their inputs at all.

Agreed. However, the former can't relied on any more than the latter with any certainty. So what is the point of depending on it?

The only reliable solution is to source your coins in small values, so you don't need to split value. Yet this is not possible if the payer is splitting and paying you numerous times, e.g. an employer. You can launder them to cash or through mining hardware.

Plus all mixers may eventually be tainted. At least mining can't be tainted (assuming the coin forces all miners to anonymize their IP or you don't need to for the level of privacy you need).

Plus subject to DoS attacks if we don't use zero knowledge.

And it would be much more amenable to the law enforcers if we don't mix our coins with potentially illegal activity.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: hashman on October 17, 2013, 09:43:19 AM
1) Coinjoin as I see it adds some plausible deniability but the taint is still there.  Anonymity is probably not the right word.  If one of the input addresses is considered a red flag,
This is really a question for how _much_ these tools are used. What you're pointing to is that there is an information leak whenever the anonymity set is less than all users of the system. It's actually even worse than that: only a very small fraction of the world uses Bitcoin at all: So even if every transaction were anonymous internally to Bitcoin there would still be an information leak from the fact that you used Bitcoin at all.


I guess I wasn't getting that deep, sorry.  Just pointing out that in coinjoin there is still some fractional taint visible on the blockchain.  If we trade private keys off-chain then we can control money with 0 taint.  Well, 0 taint on blockchain anyway, but still taint in some other ways you describe.  Anyway, more privacy is better so thanks for spelling it out for us :) 


Quote

If, after you've exhausted the funds sent to a particular scriptPubKey, someone sends you a tiny amount of coin to that scriptPubKey and you spend it in a new transaction then whatever linkage they knew carries forward and your deanonymization grows as a sufficiently small payment will only be useful when spent in combination with other coins. After several applications of this its very likely that all addresses in that wallet become publicly interconnected.  Turning a theoretical weakness ("You might not be very private") into an actual one.


OK, I hadn't caught the bit about sending the dust to empty wallets only.  Still seems a bit odd but now I understand what y'all been talking about :)  Seems like coincontrol is getting more and more necessary. 


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Financisto on October 18, 2013, 04:11:52 AM
Coinjoin is a great idea.

Not because it is theorically brilliant, but because it is rather pragmatic.

It's way uncomplicated in order to implement than Zerocoin alternative.

I'm gonna pay close attention to this thread and to the development of it.

Keep up the good work.

Cheers!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: n8rwJeTt8TrrLKPa55eU on October 19, 2013, 10:37:02 PM
It looks like blockchain.info is rolling out a CoinJoin service under the name "Sharedcoin Trustless Mixing".  For non-b.i users, piuk says there will be a browser extension eventually available.

Sharedcoin trustless mixing now available for testing

Sharedcoin uses a technique known as coinjoin to provide coin mixing without needing to trust any third party with your funds. The service still relies on a centralised server but that server only co-ordinates transactions without any funds passing through it. The main advantages are significantly less risk for both the user and operator and no requirement to keep any logs.

Anyone interested in testing can login using the following link:

https://blockchain.info/wallet/login?enable_sharedcoin=true

Please test with small amounts only (0.5 BTC max). 0.1 BTC is the minimum send amount. If you experience any errors please record the output from the javascript console (http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers/8555#8555).

The current client stages are:

- The client will submit its "offer", which is the inputs it wants mixing and the desired outputs.
- The server waits a certain amount of time for other clients to submit their offers.
- The server combines everyone's offers and creates a "proposal".
- The clients check they are happy with the proposal and signs their inputs.
- The server submits the final transaction.

The entire process takes about 40 seconds.

Features currently supported:

- Variable number of inputs and outputs per client
- Variable input and output values.
- Randomised fees.
- Ability to draw upon reserve funds when no other participants are available for mixing.
- Taint analysis determines the appropriate inputs to mix.

Features planned:

- Multiple iterations using temporary addresses never saved inside wallets.
- Better randomisation of change outputs and splitting of outputs between multiple iterations.
- Better progress indication.
- Documented Client APIs and SDK.

Example sharedcoin transaction:
 https://blockchain.info/tx/72316782bf48d0cd232b888a7b9ea03f88ba79fac28273cd2aa1804683235412?show_adv=true

The amount currently available in the reserve pool is low, this will be gradually increased over time but during the testing phase if anyone manages to manipulate the client to withdraw excess funds from the pool they can keep that amount.

Client source available at: https://github.com/blockchain/My-Wallet/blob/master/sharedcoin.js
Server status can be viewed while testing at: https://api.sharedcoin.com/


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Peter Todd on October 19, 2013, 10:46:49 PM
It works pretty well, although currently there's a serious privacy problem because the pool uses compressed keys, while the blockchain.info client only uses compressed keys, even for sharedcoin change. To figure out where the money came from and went you just have to match up uncompressed inputs to uncompressed outputs. In addition to that the pool re-uses addresses, and the client doesn't, so it's pretty easy to figure out which addresses are in the pool and use them to isolate the client addresses.

Having said that, both problems can be easily fixed.



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on October 30, 2013, 08:00:19 AM
I guess I wasn't getting that deep, sorry.  Just pointing out that in coinjoin there is still some fractional taint visible on the blockchain.
So, does this (https://bitcointalk.org/index.php?topic=321228) make you happy?

I still don't agree that it's quite the amount of qualitative difference you were drawing, but considering that the alternative will potentially gain regular escrow users in their anonymity set, perhaps its more interesting to you.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: wumpus on October 30, 2013, 04:17:01 PM
Quote
Anonymity systems with only one kind of user really are useful to no one, and to be useful to common boring users overheads like fees and theft risk need to be eliminated.  I believe that relative to the overall scale of the economy criminal activity is small, but that only matters if you have privacy mechanisms the whole economy will participate with.
I really like this idea. Simple and practical. It foils the most obvious attempts to correlate addresses and follow money (by using just the blockchain) without requiring users to have to engage in suspicious behaviour such as using a laundry. It can also be automated pretty well.
I'd like to include support for this in the Bitcoin-Qt client, once we figure out how a user friendly interface for this could work.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on October 30, 2013, 04:30:47 PM
I really like this idea. Simple and practical. It foils the most obvious attempts to correlate addresses and follow money (by using just the blockchain) without requiring users to have to engage in suspicious behaviour such as using a laundry. It can also be automated pretty well.
I'd like to include support for this in the Bitcoin-Qt client, once we figure out how a user friendly interface for this could work.
I suppose one way to go about the interface would be to first add some infrastructure for queued/delayed transactions. E.g. you could tell it {I want to pay 1AAA, with a timeout of N seconds} and it queues it and returns just a locally significant handle instead of a TXID (and in the GUI shows it in some queued transactions tab). This could obviously be used purely locally to merge multiple outputs of your own into a sendmany.  With that in place, I think casual coinjoins (where you're not trying super hard to match values, and only making them where you would have otherwise made a payment) would have no further interface impact except a switch to enable/disable using them to process queued transactions.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Rassah on October 31, 2013, 05:33:47 AM
Did Amir's implementation of this go down? The Tor site is inaccessible. Are there any other places where this is currently usable?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Anon136 on November 02, 2013, 08:22:44 PM
what happens if the facilitator is compromised?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on November 02, 2013, 09:25:40 PM
what happens if the facilitator is compromised?

Depends on which implementation you are talking about. In gmaxwell's protocol and my crowd-fund (https://bitcointalk.org/index.php?topic=291283.0) proposal, outputs are blinded so neither the facilitator nor any of the participants know which outputs belong to any of the others. So the facilitator doesn't have to be trusted, other than to complete the protocol. Genjix's server doesn't use blind signing & anonymous revelation, so I'd imagine you'd be able to trace ownership from the facilitator's logs (I haven't looked at his code, however).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: piuk on November 03, 2013, 02:00:40 AM
Blockchain.info's coinjoin implementation (Shared coin) is now available in the wallet interface by default.
 
http://i.imgur.com/nLUjJGI.png

It uses a hybrid approach mixing with other clients and a pool provided by the server. The advantage to this approach is a) there is no long wait time needed for other clients to join in your transaction (hence easier to bootstrap if usage is low initially) b) the server always has a large pool available which can be used to reduce transaction taint more effectively. Browser extension coming soon.

Depends on which implementation you are talking about. In gmaxwell's protocol and my crowd-fund (https://bitcointalk.org/index.php?topic=291283.0) proposal, outputs are blinded so neither the facilitator nor any of the participants know which outputs belong to any of the others. So the facilitator doesn't have to be trusted, other than to complete the protocol.

I think there is a flaw in the blind signing solution. The client doesn't know how many other genuine participants have joined in a transaction so if the server was malicious it could lie, add its own outputs, and force one participant per transaction. With only one genuine participant in the transaction even if the outputs are blind signed it simple to connect the correct inputs.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Peter Todd on November 03, 2013, 03:16:13 AM
Blockchain.info's coinjoin implementation (Shared coin) is now available in the wallet interface by default.


Thank you! This is great news.

Depends on which implementation you are talking about. In gmaxwell's protocol and my crowd-fund (https://bitcointalk.org/index.php?topic=291283.0) proposal, outputs are blinded so neither the facilitator nor any of the participants know which outputs belong to any of the others. So the facilitator doesn't have to be trusted, other than to complete the protocol.

I think there is a flaw in the blind signing solution. The client doesn't know how many other genuine participants have joined in a transaction so if the server was malicious it could lie, add its own outputs, and force one participant per transaction. With only one genuine participant in the transaction even if the outputs are blind signed it simple to connect the correct inputs.

I replied (https://bitcointalk.org/index.php?topic=291283.msg3146796#msg3146796) to maaku's crowd-fund proposal with similar concerns. In the general case I think blind-signing is a overly complex cryptographic solution looking for a problem. What you describe is just a particularly bad example of how it doesn't actually give you any anti-sybil protection if you don't know who the counterparts to the transaction are. I proposed that two-party mixes (https://bitcointalk.org/index.php?topic=279249.msg3041593#msg3041593) be used in the general case. The cryptography required is almost trivial and can be done with existing libraries used for their intended purpose, the user experience is good because the transactions can happen almost as fast as regular ones and it's easy to do the negotiations on the existing P2P network, and finally the anti-sybil resistance claimed is much more honest: we know we can't prevent sybil attacks, but we can make them cost a lot of transaction fees.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on November 03, 2013, 03:27:22 AM
I think there is a flaw in the blind signing solution. The client doesn't know how many other genuine participants have joined in a transaction so if the server was malicious it could lie, add its own outputs, and force one participant per transaction. With only one genuine participant in the transaction even if the outputs are blind signed it simple to connect the correct inputs.

That's why you use multiple facilitators, and act as act as facilitator yourself 1/N of the time. The implementation I'm working on is fully p2p.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Peter Todd on November 03, 2013, 03:38:11 AM
I think there is a flaw in the blind signing solution. The client doesn't know how many other genuine participants have joined in a transaction so if the server was malicious it could lie, add its own outputs, and force one participant per transaction. With only one genuine participant in the transaction even if the outputs are blind signed it simple to connect the correct inputs.

That's why you use multiple facilitators, and act as act as facilitator yourself 1/N of the time. The implementation I'm working on is fully p2p.

That's no better than the two-party case though - you have no idea if anyone else in the p2p network, facilitator or not, is real or part of a sybil attack, and it's still going to be slower to complete a transaction than the two-party alternative.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Peter Todd on November 03, 2013, 03:39:34 AM
Blockchain.info's coinjoin implementation (Shared coin) is now available in the wallet interface by default.

For transactions where I'm not in a rush - and am willing to leave my bc.i client running - think you could add an advanced option where you give the wallet a destination address and a timeout and it waits until someone else is available to do a coinjoin?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dserrano5 on November 03, 2013, 07:42:17 AM
Blockchain.info's coinjoin implementation (Shared coin) is now available in the wallet interface by default.

Way to go piuk! It's a centralised effort but it's better to have a centralised coinjoin than no coinjoin at all.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: molecular on November 03, 2013, 09:40:36 AM
Blockchain.info's coinjoin implementation (Shared coin) is now available in the wallet interface by default.

Way to go piuk! It's a centralised effort but it's better to have a centralised coinjoin than no coinjoin at all.

I totally agree. However I think it should be made transparent that with this solution, the facilitator can map inputs to outputs easily and you have to trust him with retaining your own personal privacy.

One question piuk: does your servers in any way store records that would allow this mapping to be conducted by some entity gaining access to your databases?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on November 03, 2013, 01:44:39 PM
One question piuk: does your servers in any way store records that would allow this mapping to be conducted by some entity gaining access to your databases?
You should never asks this question of any service.

Why? Because the answer you receive doesn't matter because you have no way to independently to verify the truth of a response.

A dishonest operator can lie.

An honest operator might not start out keeping logs, but could be ordered to do so and forbidden from telling you the truth via the threat of going to jail.

An honest operator might not realize they are keeping logs because their system has been compromised.

Under no circumstances can you trust someone's word about not keeping logs. This applies to VPN providers, bitcoin mixers, email hosts, or any other privacy-sensitive service. If it's conceivably possible that they are keeping privacy-destroying logs then you must assume they are, and act accordingly.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: CIYAM on November 03, 2013, 01:47:31 PM
Under no circumstances can you trust someone's word about not keeping logs. This applies to VPN providers, bitcoin mixers, email hosts, or any other privacy-sensitive service. If it's conceivably possible that they are keeping privacy-destroying logs then you must assume they are, and act accordingly.

I hate to do this (in fact it might be the first time I actually have) but:

+1


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Peter Todd on November 03, 2013, 03:34:42 PM
Under no circumstances can you trust someone's word about not keeping logs. This applies to VPN providers, bitcoin mixers, email hosts, or any other privacy-sensitive service. If it's conceivably possible that they are keeping privacy-destroying logs then you must assume they are, and act accordingly.

piuk, and my, point is that decentralized P2P systems with anonymous counterparties aren't necessarily any better because you can't know if your counterparties to the coinjoin are the NSA/FBI/whatever.

At least with a central service if they are honest you're well protected. With P2P stuff every transaction you make may or may not be deanonymized.

Best to use both if you really need to be able to count on the privacy... and hopefully someone will come up with a off-chain transfer system on some Tor site that implements chaum tokens.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: genjix on November 03, 2013, 04:02:45 PM
to make coinjoin work properly we first need decentralised identity and reputation systems to protect against that. otherwise just making it p2p for the fun of it is not doing anything.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on November 03, 2013, 04:03:00 PM
piuk, and my, point is that decentralized P2P systems with anonymous counterparties aren't necessarily any better because you can't know if your counterparties to the coinjoin are the NSA/FBI/whatever.
It turns into a numbers game. If x% of the participants are evil, then you need to mix 1/x times.
Best to use both if you really need to be able to count on the privacy... and hopefully someone will come up with a off-chain transfer system on some Tor site that implements chaum tokens.
I agree the ideal solution is a cryptographic protocol in which nobody can cheat, even if all the participants are evil.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on November 03, 2013, 04:05:20 PM
otherwise just making it p2p for the fun of it is not doing anything.
Actually it is doing something - providing a type of plausible deniability.

Suppose CoinJoin transactions become a frequent occurrence in the blockchain. I can now spend funds from my wallet using transactions that appear to be CoinJoins, but are actually only my funds. I might only need to use "real" CoinJoin transactions some small percentage of the time.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Trader Steve on November 03, 2013, 05:00:06 PM

Best to use both if you really need to be able to count on the privacy... and hopefully someone will come up with a off-chain transfer system on some Tor site that implements chaum tokens.

Could Open Transactions play a role in any of this?

https://github.com/FellowTraveler/Open-Transactions




Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: molecular on November 03, 2013, 08:17:50 PM
One question piuk: does your servers in any way store records that would allow this mapping to be conducted by some entity gaining access to your databases?
You should never asks this question of any service.

Why? Because the answer you receive doesn't matter because you have no way to independently to verify the truth of a response.

A dishonest operator can lie.

An honest operator might not start out keeping logs, but could be ordered to do so and forbidden from telling you the truth via the threat of going to jail.

An honest operator might not realize they are keeping logs because their system has been compromised.

Under no circumstances can you trust someone's word about not keeping logs. This applies to VPN providers, bitcoin mixers, email hosts, or any other privacy-sensitive service. If it's conceivably possible that they are keeping privacy-destroying logs then you must assume they are, and act accordingly.

There's the possiblity he will just say: yes, we keep logs. In that case the question would've made sense.



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: molecular on November 03, 2013, 08:23:50 PM
otherwise just making it p2p for the fun of it is not doing anything.
Actually it is doing something - providing a type of plausible deniability.

Suppose CoinJoin transactions become a frequent occurrence in the blockchain. I can now spend funds from my wallet using transactions that appear to be CoinJoins, but are actually only my funds. I might only need to use "real" CoinJoin transactions some small percentage of the time.

Exactly.

There's this huge upside to widespread use of coinjoin transactions (no matter how they've been assembled) in general (even affecting people that don't ever use coinjoin), because it torpedoes the assumption that all inputs of a transaction are owned by a single entity that can currently pretty reliably be used to cluster addresses, which is the most common (valid) argument used when arguing that bitcoin isn't as private as many think.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Anon136 on November 05, 2013, 03:21:04 PM
I think there is a flaw in the blind signing solution. The client doesn't know how many other genuine participants have joined in a transaction so if the server was malicious it could lie, add its own outputs, and force one participant per transaction. With only one genuine participant in the transaction even if the outputs are blind signed it simple to connect the correct inputs.

That's why you use multiple facilitators, and act as act as facilitator yourself 1/N of the time. The implementation I'm working on is fully p2p.

That's no better than the two-party case though - you have no idea if anyone else in the p2p network, facilitator or not, is real or part of a sybil attack, and it's still going to be slower to complete a transaction than the two-party alternative.

how did we solve this with bitcoin? you could solve it here the exact same way. have the facilitators be the 6 most recent miners to contribute new blocks to the blockchain. or atleast the 6 most recent who agree to provide the service.

maaku if you read this also please tell me what you think.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on November 05, 2013, 06:50:05 PM
Anon136, there is no need to reduce the set of facilitators in any way, even by distributed consensus. But miners could certainly publish lists of perceived reliable facilitators in their blocks, helping others to find them. There's a proposal along these lines for peer lists that is currently circulating the development mailing list.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Anon136 on November 05, 2013, 09:13:42 PM
Anon136, there is no need to reduce the set of facilitators in any way, even by distributed consensus. But miners could certainly publish lists of perceived reliable facilitators in their blocks, helping others to find them. There's a proposal along these lines for peer lists that is currently circulating the development mailing list.

what if the majority of the facilitators were actually a single malicious actor using multiple ip exit nodes? have you devised a mechanism for preventing him from being able to deduce information about transactions in this manner? or have you devised an alternative mechanism for insuring that no such actor is ever able to gain that much influence?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on November 05, 2013, 11:09:04 PM
Yes, the facilitator gains no extra information about the transaction than is observable from the outside, if blind signing is used (see gmaxwell's posts at the beginning of this thread).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Anon136 on November 05, 2013, 11:49:33 PM
thanks for clearing that up maaku.

*tangent warning* blind signatures are amazing. some people talk about how the future will be saved from tyranny through peaceful parenting. others through the political system. some through revolution. but my money is on the efforts of people like yourself and gmaxwell. idk if you ever stop to think about this, but just the hand full of you guys working on these sorts of technologies might be responsible for saving the entire human species from extinction or worse. i know that sounds dramatic but i really think its hard to overstate the importance of this sort of research.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Trader Steve on November 06, 2013, 12:16:05 AM
thanks for clearing that up maaku.

*tangent warning* blind signatures are amazing. some people talk about how the future will be saved from tyranny through peaceful parenting. others through the political system. some through revolution. but my money is on the efforts of people like yourself and gmaxwell. idk if you ever stop to think about this, but just the hand full of you guys working on these sorts of technologies might be responsible for saving the entire human species from extinction or worse. i know that sounds dramatic but i really think its hard to overstate the importance of this sort of research.

+1


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: marcus_of_augustus on November 06, 2013, 02:35:08 AM
Good stuff piuk ... someone needed to get the ball rolling and centralised 'trusted' CoinJoin is better than none.

Will be interested to see the statistics of how many people voluntarily choose to keep tx private when it is not so stigmatised and a simple, easy to use on/off toggle.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on November 13, 2013, 09:44:01 PM
Is destroying user's financial privacy and Bitcoin's fungiblity the next big business for someone to get rich quick on?

http://www.forbes.com/sites/kashmirhill/2013/11/13/sanitizing-bitcoin-coin-validation/

It doesn't have to be, but preventing this future requires substantial movement in the default behavior of everyday Bitcoin users, not just a minority of people with special interests.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on November 13, 2013, 09:54:06 PM
Does the protocol have any way for participants to negotiate on output size restrictions?

Either make all the outputs the exact same size, or maybe restrict them to something like integer (positive and negative) powers of two?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: oakpacific on November 14, 2013, 07:03:25 AM
Does the protocol have any way for participants to negotiate on output size restrictions?

Either make all the outputs the exact same size, or maybe restrict them to something like integer (positive and negative) powers of two?

I am thinking that if all the inputs and outputs are of the same size, there is no need for the server to know the mapping?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on November 14, 2013, 07:06:22 AM
I am thinking that if all the inputs and outputs are of the same size, there is no need for the server to know the mapping?
That's fine for a theoretical exercise, but in the real world you're going to have a wallet with outputs of random sizes.

Then you're going to need to spend them on a real purchase, also of a random size.

For the protocol to be usable there's got to be a way to deal with that.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on November 14, 2013, 07:09:28 AM
For this to work, there can not be an unambiguous mapping of input balances to output balances.

One way I can see to avoid that is a convention where outputs are always a standard size (integer powers of two, for example).

You put in a few random sized inputs, and get back several outputs of standard sizes so there's no way to tell which one belongs to what inputs.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on November 14, 2013, 07:20:20 AM
justusranvier, I'm not sure I follow. Mixing is only occurring within a single transaction. Within that transaction, some subset of the outputs must be same-sized. But I do not think there is any reason that all transactions must use the same (set of) output sizes...


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: oakpacific on November 14, 2013, 07:29:13 AM
I am thinking that if all the inputs and outputs are of the same size, there is no need for the server to know the mapping?
That's fine for a theoretical exercise, but in the real world you're going to have a wallet with outputs of random sizes.

Then you're going to need to spend them on a real purchase, also of a random size.

For the protocol to be usable there's got to be a way to deal with that.

But it would work for drug dealers trying to cash out, right?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on November 14, 2013, 07:31:58 AM
justusranvier, I'm not sure I follow. Mixing is only occurring within a single transaction. Within that transaction, some subset of the outputs must be same-sized. But I do not think there is any reason that all transactions must use the same (set of) output sizes...
If there's only one solution to the question of "which combinations of inputs add up to the individual output values" then the mixing isn't effective.

If I put in 5.2543 BTC worth of inputs and you put in 2.6098 BTC worth of inputs and we create a Coinjoin transaction it's possible for there to be only one combination of inputs which add up to each output. In that case the mixing could be trivially reversed, unless I'm missing something fundamental about CoinJoin.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: jedunnigan on November 14, 2013, 08:49:54 AM
One way I can see to avoid that is a convention where outputs are always a standard size (integer powers of two, for example).

I like this idea, although enforcing it network-wide might have other implications (or maybe not, I'm not sure). A script could be written to easily condense a users outputs prior to a CJ tx, so gmaxwell's original design can be followed:
Quote
To use this to increase privacy, the N users would agree on a uniform output size and provide inputs amounting to at least that size.

I think Peter Todd wrote something that cleans out dust, you could just rework that to accomplish the above methinks.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on November 14, 2013, 10:36:38 AM
Even when the inputs can be trivially separated, a party trying to do automated analysis still gets their taint tracking degraded by widespread CJ usage since they won't be able to assume cases where two separable inputs happened was an indication that the two inputs were owned by the same party. Obviously, perfect output indistinguishably is best, but even when the outputs are fully distinguishable (and everywhere in between) there is value too.

In other news, there is a Bitcoin-QT issue for this now:
https://github.com/bitcoin/bitcoin/issues/3226


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on November 14, 2013, 10:41:52 AM
Obviously, perfect output indistinguishably is best, but even when the outputs are fully distinguishable (and everywhere in between) there is value too.
Why not right now encourage a standard that will more often result in the superior case?

I'm not particularly thrilled with merely degrading taint calculations when analytic capability is only going to improve over time.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: oakpacific on November 14, 2013, 10:52:04 AM
I am thinking if we should conduct some field tests: get some people to use Coinjoin, and publish their transactions, others will employ every method they can come up with to try to determine which address has sent to which.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on November 14, 2013, 05:01:52 PM
Obviously, perfect output indistinguishably is best, but even when the outputs are fully distinguishable (and everywhere in between) there is value too.
Why not right now encourage a standard that will more often result in the superior case?

I'm not particularly thrilled with merely degrading taint calculations when analytic capability is only going to improve over time.

I'm not really sure I follow. From my analysis there is zero benefit to mandating common output sizes across multiple transactions. gmaxwell, am I mistaken?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Carlton Banks on November 14, 2013, 05:42:40 PM
How do you stop the greenlisting authority from saying to you "that's a suspiciously high porportion of multi-output transactions going to your green address, BANNED"?

How do you stop the greenlisting authority from contacting the blacklisting authority and saying to them "Caught another one. Blacklist all these addresses from these transactions. Still remaining unpsent inputs? Too bad."?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on November 14, 2013, 05:52:50 PM
Carlton, you don't reuse addresses. That was your mistake.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dserrano5 on November 14, 2013, 06:20:42 PM
As I just said in another thread, we achieve that by automatically "blacklisting" all addresses.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Carlton Banks on November 14, 2013, 07:22:15 PM
Carlton, you don't reuse addresses. That was your mistake.

I don't reuse addresses. I was proposing a hypothetical situation. Greenlisting schemes suppose that everyone will be happy to reuse one address that is linked to a real world identity. Get with the program.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on November 14, 2013, 07:28:39 PM
Obviously, perfect output indistinguishably is best, but even when the outputs are fully distinguishable (and everywhere in between) there is value too.
Why not right now encourage a standard that will more often result in the superior case?

I'm not particularly thrilled with merely degrading taint calculations when analytic capability is only going to improve over time.

I'm not really sure I follow. From my analysis there is zero benefit to mandating common output sizes across multiple transactions. gmaxwell, am I mistaken?
Consider a hypothetical CoinJoin transaction with several inputs and two outputs, A and B.

Output A is 5.21875 BTC and Output B is 3.4375.

In order for an attacker to break the mixing he must answer the question, "which combination of inputs add up to each output", and that question could likely have only one solution. If there is only one solution, the mixing has no value other than forcing the attacker to spend a bit of CPU power on it.

If the participants in the mix instead choose to only use integer powers of 2, they can break their desired outputs down like this:

Output A can be broken down as follows:
1 x 22
1 x 20
1 x 2-3
1 x 2-4
1 x 2-5

Output B can be broken down as follows:

1 x 21
1 x 20
1 x 2-2
1 x 2-3
1 x 2-4

So now the transaction has 10 outputs: 4 BTC, 1 BTC, 1 BTC, 250 mBTC, 125 mBTC, 125 mBTC, 62.5 mBTC, 62.5 mBTC, 31.25 mBTC.

The odds of finding an unambiguous mapping of inputs to outputs should be far lower in the second case.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: jquinn on November 14, 2013, 07:50:12 PM
I'm trying to get a fundraiser rolling on reddit.

http://www.reddit.com/r/Bitcoin/comments/1qmhkh/coinjoin_fundraising_drive/

Donated a $100.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ShadowOfHarbringer on November 14, 2013, 07:54:14 PM
Apparently people are plotting behind the scenes to put whitelisting, blacklisting and redlisting (https://bitcointalk.org/index.php?topic=333824.0) and other terrible ideas into Bitcoin.

Perhaps we should seriously speed up initiatives like CoinJoin, CoinSwap and CoinControl so people start massively mixing coins and make such efforts unfeasible.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Carlton Banks on November 14, 2013, 08:01:41 PM
Apparently people are plotting behind the scenes to put whitelisting, blacklisting and redlisting (https://bitcointalk.org/index.php?topic=333824.0) and other terrible ideas into Bitcoin.

Perhaps we should seriously speed up initiatives like CoinJoin, CoinSwap and CoinControl so people start massively mixing coins and make such efforts unfeasible.

This assumes that you opt-in to the listing with your real world ID, then obscure the source of your funds with anonymity schemes as you've denoted. But with CoinJoin, this could get you banned from the listings people, and potentially get all the CoinJoiners you collaborated with blacklisted too.

I think the best way is to encourage miners to ban the clean addresses from tx processing. If that doesn't succeed, use or develop another coin.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ShadowOfHarbringer on November 14, 2013, 08:04:30 PM
Apparently people are plotting behind the scenes to put whitelisting, blacklisting and redlisting (https://bitcointalk.org/index.php?topic=333824.0) and other terrible ideas into Bitcoin.

Perhaps we should seriously speed up initiatives like CoinJoin, CoinSwap and CoinControl so people start massively mixing coins and make such efforts unfeasible.

This assumes that you opt-in to the listing with your real world ID, then obscure the source of your funds with anonymity schemes as you've denoted. But with CoinJoin, this could get you banned from the listings people, and potentially get all the CoinJoiners you collaborated with blacklisted too.

I think the best way is to encourage miners to ban the clean addresses from tx processing. If that doesn't succeed, use or develop another coin.
Another option is to make CoinJoin/CoinSwap really popular. Perhaps make the client suggest mixing like by adding "mix coins with other's users coin" checkbox in the send coins GUI.

This way regulators will have no other way than to accept Bitcoin the way it is - mixed and untraceable.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dserrano5 on November 14, 2013, 08:07:38 PM
Perhaps we should seriously speed up initiatives like CoinJoin, CoinSwap and CoinControl so people start massively mixing coins and make such efforts unfeasible.

And/or incorporating it into clients so people wouldn't have to bother. E.g. I wouldn't mind to spend a millibit a week in network fees just to have my coins periodically mixed.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ShadowOfHarbringer on November 14, 2013, 08:14:43 PM
Perhaps we should seriously speed up initiatives like CoinJoin, CoinSwap and CoinControl so people start massively mixing coins and make such efforts unfeasible.

And/or incorporating it into clients so people wouldn't have to bother. E.g. I wouldn't mind to spend a millibit a week in network fees just to have my coins periodically mixed.
Exactly what I am talking about.

We must make coin mixing almost as common as sending them. This way governments will have no choice but face the reality.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Carlton Banks on November 14, 2013, 08:17:52 PM
Another option is to make CoinJoin/CoinSwap really popular. Perhaps make the client suggest mixing like by adding "mix coins with other's users coin" checkbox in the send coins GUI.

This way regulators will have no other way than to accept Bitcoin the way it is - mixed and untraceable.

More difficult to popularise anonymising features than it is to find out what colour the biggest miners like their address lists. If they want the lists transparent, instead of red, black blue green or white, then they should prefer to ban any such coloured listed addresses from their transaction inclusions.

Let's push to hit these lists right at their fundamentals, make them undesirable and unusable, not the other way around.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: btc4ever on November 14, 2013, 08:21:00 PM
Yes.  Mixing must be the norm, not the exception.

If it is the exception, then even the fact that you are engaging in it is suspicious.

Perhaps we should seriously speed up initiatives like CoinJoin, CoinSwap and CoinControl so people start massively mixing coins and make such efforts unfeasible.

And/or incorporating it into clients so people wouldn't have to bother. E.g. I wouldn't mind to spend a millibit a week in network fees just to have my coins periodically mixed.
Exactly what I am talking about.

We must make coin mixing almost as common as sending them. This way governments will have no choice but face the reality.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Carlton Banks on November 14, 2013, 08:22:28 PM
Perhaps we should seriously speed up initiatives like CoinJoin, CoinSwap and CoinControl so people start massively mixing coins and make such efforts unfeasible.

And/or incorporating it into clients so people wouldn't have to bother. E.g. I wouldn't mind to spend a millibit a week in network fees just to have my coins periodically mixed.
Exactly what I am talking about.

We must make coin mixing almost as common as sending them. This way governments will have no choice but face the reality.

I think there are too many compliant goody goodies out there for this to work. You only have to craft a well thought through smear campaign against anonymising and most people will be too anxious to rebel against it, they will believe the nonsense is true.

There are fewer miners than users, and they are naturally determined risk takers. They are easier to convince of the drawbacks than average users, especially as they have probably got more BTC balance whose long term value and viability they wish to protect.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: dserrano5 on November 14, 2013, 08:32:44 PM
Code:
Key from Pieter (pgp signature to be provided later):

0292782efcb08d621c360d055f407c8e75ffbbd06f6b7009c1432ca9eaa6732592

Oops, seems that a signature was forgotten ;). I'll donate half a coin to this as soon as the sig is in place!

Please everyone consider donating.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: phillipsjk on November 14, 2013, 09:00:36 PM
Perhaps we should seriously speed up initiatives like CoinJoin, CoinSwap and CoinControl so people start massively mixing coins and make such efforts unfeasible.

And/or incorporating it into clients so people wouldn't have to bother. E.g. I wouldn't mind to spend a millibit a week in network fees just to have my coins periodically mixed.

Such coins are not at rest, thus can be stolen by a determined cracker.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on November 14, 2013, 09:24:06 PM
Consider a hypothetical CoinJoin transaction with several inputs and two outputs, A and B.

Output A is 5.21875 BTC and Output B is 3.4375.

...

The mixing application described in the OP uses same valued outputs for two reasons: (1) to avoid this sort of identification, and (2) to prevent the facilitator from learning identities through blind signatures. This requires that within a single transaction, the mixed outputs must have the same value denominations (or be divided into groups of same-valued denominations). The hypothetical given is a weaker protocol than the OP.

That said, there is no reason that the common denomination used by one transaction has to match or be a multiple of the common denomination of another - that gains you nothing as far as I can tell.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on November 15, 2013, 12:28:01 AM
The mixing application described in the OP uses same valued outputs
And I believe that drastically reduces its usefulness.

It's fine as an academic exercise but how people actually use their bitcoins in the real world is considerably more messy. Unless you can handle situations where the users need to mix differing amounts of coins you'll either degrade the mixing to uselessness or else end up with a double coincidence of wants problem where nobody can find suitable partners top mix with.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: jedunnigan on November 15, 2013, 12:42:23 AM
The mixing application described in the OP uses same valued outputs
And I believe that drastically reduces its usefulness.

It's fine as an academic exercise but how people actually use their bitcoins in the real world is considerably more messy. Unless you can handle situations where the users need to mix differing amounts of coins you'll either degrade the mixing to uselessness or else end up with a double coincidence of wants problem where nobody can find suitable partners top mix with.

Yea, and to that effect there should be a step prior to the CJ where outputs are made uniform.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Carlton Banks on November 15, 2013, 12:45:17 AM
The mixing application described in the OP uses same valued outputs
And I believe that drastically reduces its usefulness.

It's fine as an academic exercise but how people actually use their bitcoins in the real world is considerably more messy. Unless you can handle situations where the users need to mix differing amounts of coins you'll either degrade the mixing to uselessness or else end up with a double coincidence of wants problem where nobody can find suitable partners top mix with.

A decentralised approach would provide enough variety so that the number of people who have to compromise would decrease, but I agree that this harms the effectiveness of the anonymity of inputs. It would also be less easy to convince a nosy listing agency that you were settling several hundred payments in a single transaction... especially when several hundred other CoinJoin participants could be making the same claim to the very same transaction to the same agency. It's not possible that you're all the sole originator of the same transaction.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: theymos on November 15, 2013, 12:59:07 AM
CoinJoin needs to be nicely implemented in Bitcoin-Qt before any of these ridiculous blacklist proposals take off. So for the next 30 days, I will match donations to the CoinJoin bounty fund (3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk), up to a maximum of 5 BTC. Just donate to that address, and in 30 days I'll donate the difference between the current received amount (16.21420773) and the received amount at that time (max 5 BTC).

Edit: Paid 5 BTC.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gweedo on November 15, 2013, 01:40:42 AM
CoinJoin needs to be nicely implemented in Bitcoin-Qt before any of these ridiculous blacklist proposals take off. So for the next 30 days, I will match donations to the CoinJoin bounty fund (3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk), up to a maximum of 5 BTC. Just donate to that address, and in 30 days I'll donate the difference between the current received amount (16.21420773) and the received amount at that time (max 5 BTC).

I agree so I just send ~$50 to donations https://blockchain.info/tx/37fa76c95c06c4f35ac4069a84d75a022275a80bd35a05e102c8f6ad4d02646d


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Trader Steve on November 15, 2013, 02:27:09 AM
CoinJoin needs to be nicely implemented in Bitcoin-Qt before any of these ridiculous blacklist proposals take off. So for the next 30 days, I will match donations to the CoinJoin bounty fund (3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk), up to a maximum of 5 BTC. Just donate to that address, and in 30 days I'll donate the difference between the current received amount (16.21420773) and the received amount at that time (max 5 BTC).

Theymos, you rock! I've already donated but you've inspired me to send a little more.





Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: solex on November 15, 2013, 03:52:43 AM
theymos, gmaxwell, everyone - excellent project! My donation on the way too...


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: coinft on November 15, 2013, 04:18:38 AM
theymos, gmaxwell, everyone - excellent project! My donation on the way too...


IMHO we should motivate miners to operate liquid CoinJoin pools and pass all their new block rewards through it. Then integrate CoinJoin in as many clients as possible, for automatic or semi-automatic use. When everything is tainted, nothing is, and all list operators will look pretty stupid.

It's in the best interest of miners that bitcoins remain fungible long term, but some short sighted individual miners might object to getting slightly tainted coins. This could be offset by a small fee paid by CoinJoin users, and shared between pools and miners.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: oakpacific on November 15, 2013, 04:31:23 AM
theymos, gmaxwell, everyone - excellent project! My donation on the way too...


IMHO we should motivate miners to operate liquid CoinJoin pools and pass all their new block rewards through it. Then integrate CoinJoin in as many clients as possible, for automatic or semi-automatic use. When everything is tainted, nothing is, and all list operators will look pretty stupid.

It's in the best interest of miners that bitcoins remain fungible long term, but some short sighted individual miners might object to getting slightly tainted coins. This could be offset by a small fee paid by CoinJoin users, and shared between pools and miners.

I tend to think that Coinjoin pools should be like Tor flashproxies, ephemeral, ad-hoc and untrackable.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: CIYAM on November 15, 2013, 04:46:29 AM
Have sent some BTC and would be more than happy to set up a project on CIYAM Open for this (free of charge for its lifetime of course).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: westkybitcoins on November 15, 2013, 06:58:54 AM
Consider a hypothetical CoinJoin transaction with several inputs and two outputs, A and B.

Output A is 5.21875 BTC and Output B is 3.4375.

In order for an attacker to break the mixing he must answer the question, "which combination of inputs add up to each output", and that question could likely have only one solution. If there is only one solution, the mixing has no value other than forcing the attacker to spend a bit of CPU power on it.

If the participants in the mix instead choose to only use integer powers of 2, they can break their desired outputs down like this:

Output A can be broken down as follows:
1 x 22
1 x 20
1 x 2-3
1 x 2-4
1 x 2-5

Output B can be broken down as follows:

1 x 21
1 x 20
1 x 2-2
1 x 2-3
1 x 2-4

So now the transaction has 10 outputs: 4 BTC, 1 BTC, 1 BTC, 250 mBTC, 125 mBTC, 125 mBTC, 62.5 mBTC, 62.5 mBTC, 31.25 mBTC.

The odds of finding an unambiguous mapping of inputs to outputs should be far lower in the second case.


Hmm. It might simplify things by "approximating" powers of 2: 1, 2, 5, 10, 25, 50, 100, 250, 500, etc. Similarly, 0.5, 0.2, 0.1, 0.05, 0.02, 0.01, etc.

The downside is there's somewhat more risk of analysis matching inputs to outputs, but I would think the increased risk is very slight.

Among the benefits is that the math is simpler, allowing other ideas to be easily implemented (such as a cutoff value: everything under 0.000x BTC is lumped into one output. If a small, random transaction fee is also included, this avoids dust outputs but is still resistant to analysis.)

For example, your above outputs, after removing small transactions fees, might break down to

 A) 5.21872289 (prior output after removing a randomized 0.00002711 txn fee) =
  5 + 0.2 + 0.01 + 0.005 + 0.002 + 0.001 + 0.0005 + 0.0002 + 0.0002289 BTC

 B) 3.43742991 (prior output after removing a randomized 0.00007039 txn fee) =
  2 + 1 + 0.2 + 0.2 + .02 + 0.01 + 0.005 + 0.002 + 0.0002 + 0.0002 + 0.00002991 BTC

Almost all of the privacy, and the coins are less noticeable (as opposed to values like 0.03125 BTC) even just sitting in the wallet. And this would be a much better result too for those of us managing coins in paper wallets who need to determine how many change addresses to grab to spend X bitcoins.

Just a thought.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on November 15, 2013, 07:11:25 AM
Among the benefits is that the math is simpler, allowing other ideas to be easily implemented (such as a cutoff value: everything under 0.000x BTC is lumped into one output. If a small, random transaction fee is also included, this avoids dust outputs but is still resistant to analysis.)
If outputs are in the form of Xn, then you can easily implement a cutoff by specifying a minimum value for n. Leftovers just get added to the transaction fee.

I really don't care if there is a recommended standard of X=2, or X=5, or if an explicit negotiation step is added to the protocol to choose a value for X, just as long as there's some way to do it that actually gets implemented.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dserrano5 on November 15, 2013, 07:27:03 AM
CoinJoin needs to be nicely implemented in Bitcoin-Qt before any of these ridiculous blacklist proposals take off. So for the next 30 days, I will match donations to the CoinJoin bounty fund (3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk), up to a maximum of 5 BTC.

Way to go!

I'm upping my offer from 0.50 to 0.75 but please tell Pieter to sign his pubkey in the second message of this thread.

Thank you!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: NewLiberty on November 15, 2013, 08:25:53 AM
interesting...


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: phelix on November 15, 2013, 10:05:27 AM
CoinJoin needs to be nicely implemented in Bitcoin-Qt before any of these ridiculous blacklist proposals take off. So for the next 30 days, I will match donations to the CoinJoin bounty fund (3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk), up to a maximum of 5 BTC. Just donate to that address, and in 30 days I'll donate the difference between the current received amount (16.21420773) and the received amount at that time (max 5 BTC).
Cool.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Arksun on November 15, 2013, 03:26:27 PM
Ok so most of this goes way over my head of understanding, so can someone just tell me. Using such a system as this, if I make a payment to an address, does the receiver still see my address as the address the payment came from, or do they receive the correct amount of Bitcoins, but from some other unknown address?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Hawkix on November 15, 2013, 03:48:03 PM
CoinJoin is like collecting 20 of 100 USD bills into a hat and then passing the hat to another group of 20 people, each one takes its 100 USD bill. Noone knows who gives you which bill.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Anon136 on November 15, 2013, 04:11:03 PM
theymos you rock! here is some more donation for you to generously match ;D

transaction id: a2ce643656a516784dbb32547408831226b3fc737552377cfd64cc8066fff850


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Arksun on November 15, 2013, 04:55:33 PM
CoinJoin is like collecting 20 of 100 USD bills into a hat and then passing the hat to another group of 20 people, each one takes its 100 USD bill. Noone knows who gives you which bill.

Ah ok, so this would basically be useless for any kind of eCommerce, or paying in restaurant with bitcoins etc because they wouldn't know who paid for it.  I sincerely hope this would then be an optional way of transferring rather than a replacement right?, otherwise it would pretty much destroy Bitcoin as a means for paying for goods.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: jl2012 on November 15, 2013, 04:57:57 PM
CoinJoin is like collecting 20 of 100 USD bills into a hat and then passing the hat to another group of 20 people, each one takes its 100 USD bill. Noone knows who gives you which bill.

Ah ok, so this would basically be useless for any kind of eCommerce, or paying in restaurant with bitcoins etc because they wouldn't know who paid for it.  I sincerely hope this would then be an optional way of transferring rather than a replacement right?, otherwise it would pretty much destroy Bitcoin as a means for paying for goods.

The merchant doesn't need to know who paid because every time they issue a bill they use a brand new address. Forget address reuse


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: jquinn on November 15, 2013, 05:22:50 PM
Even if you can't afford to donate BTC, anyone who has a reddit account can help out by upvoting and commenting on this fundraising drive I posted:

http://www.reddit.com/r/Bitcoin/comments/1qmhkh/coinjoin_fundraising_drive/

If we can get this onto the front page of r/bitcoin I think we could get some decent coin.

Also, I'm getting a report of a problem sending coin to the address. I originally tried to use the reddit bitcoin tip bot to send it, but kept getting rejected. I eventually just used Coinbase. Now someone is commenting saying that bitcoin tip bot, Mt. Gox, and even Armory all rejected their attempts to send coin.

Here is the Armory error: "You have entered 1 invalid addresses. The errors have been highlighted on the entry screen."

Does anyone have any idea why that would be happening?

EDIT: The commenter just posted the Mt Gox error: "This address is not on the right network"


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Peter Todd on November 15, 2013, 05:35:43 PM
Does anyone have any idea why that would be happening?

EDIT: The commenter just posted the Mt Gox error: "This address is not on the right network"

Armory and Mt Gox, and all bitcoinj-derived wallets, don't support P2SH addresses yet. Electrum does support P2SH, and so does Bitcoin-QT.

P2SH was added about two years ago - about time wallets upgrade...


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on November 15, 2013, 05:47:30 PM
Ah ok, so this would basically be useless for any kind of eCommerce, or paying in restaurant with bitcoins etc because they wouldn't know who paid for it.  I sincerely hope this would then be an optional way of transferring rather than a replacement right?, otherwise it would pretty much destroy Bitcoin as a means for paying for goods.

No, you have a misunderstanding of how bitcoin works. There is no "from" address. A merchant knows when they've been paid because they receive payment to a one-time-use address they generated specifically for the transaction. The way this would work in CoinJoin is that you pretend that you are mixing X coins, where X is the amount that you are paying the merchant, and then use the key id provided by the merchant for your blinded output.

And yes, this is a PURELY higher-level protocol that makes no changes to how bitcoin currently operates.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on November 15, 2013, 05:53:35 PM
Does anyone have any idea why that would be happening?

EDIT: The commenter just posted the Mt Gox error: "This address is not on the right network"

Armory and Mt Gox, and all bitcoinj-derived wallets, don't support P2SH addresses yet. Electrum does support P2SH, and so does Bitcoin-QT.

P2SH was added about two years ago - about time wallets upgrade...
Armory will get P2SH "soon", at least: https://github.com/etotheipi/BitcoinArmory/issues/127


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: BigJohn on November 15, 2013, 08:34:29 PM
This does sound great. But I'm not sure I understand how this helps the Blacklist/Whitelist issue. If TPTB still make some kind of Whitelist where merchants are only allowed to accept coins from certain "white" addresses, what does something like CoinJoin offer against that?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: solex on November 15, 2013, 08:38:29 PM
This does sound great. But I'm not sure I understand how this helps the Blacklist/Whitelist issue. If TPTB still make some kind of Whitelist where merchants are only allowed to accept coins from certain "white" addresses, what does something like CoinJoin offer against that?

Address re-use is being actively discouraged now. Once this becomes the norm then whitelists will be irrelevant.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: BigJohn on November 15, 2013, 08:39:37 PM
In what way is it being discouraged? Is it anything beyond informing people that it's bad practice? I'd like to see some anti-address-reuse measure become baseline, maybe even in the protocol itself if possible. Does CoinJoin have anything to do with address reuse then?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: solex on November 15, 2013, 09:15:09 PM
In what way is it being discouraged? Is it anything beyond informing people that it's bad practice? I'd like to see some anti-address-reuse measure become baseline, maybe even in the protocol itself if possible. Does CoinJoin have anything to do with address reuse then?

https://bitcointalk.org/index.php?topic=334316.0

This might be a premature decision, and only is effective per block, but hopefully the side-effect is faster adoption of BIP32

https://en.bitcoin.it/wiki/BIP_0032


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: BigJohn on November 15, 2013, 09:24:44 PM
Awesome. Thanks for the information. That seems like a great idea putting that on the miners.

I have another question, I've asked this before but I don't quite understand why it wouldn't work. Couldn't the protocol be changed so that once an address is spent, it also becomes invalid? That way someone couldn't use an address to pay for something more than once, but he could still receive any number of incoming transactions to it before he decides to spend it. Transactions going to an invalid address would just not be accepted by miners and thus bounced back. This would mean that any attempts to whitelist addresses would be moot because an address disappears after use. What am I missing? Wouldn't this work?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: solex on November 15, 2013, 09:47:54 PM
Awesome. Thanks for the information. That seems like a great idea putting that on the miners.

I have another question, I've asked this before but I don't quite understand why it wouldn't work. Couldn't the protocol be changed so that once an address is spent, it also becomes invalid? ... What am I missing? Wouldn't this work?

The place for this is in wallet software, not the protocol.
There should still be freedom of choice where someone who loves their vanity address more than their privacy can still use it (send from it) as long as they like.






Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ShadowOfHarbringer on November 15, 2013, 10:05:21 PM
Already donated.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on November 16, 2013, 12:49:40 AM
Does CoinJoin have anything to do with address reuse then?

No, nothing at all. Completely orthogonal issues.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: niniyo on November 16, 2013, 01:07:03 AM
I'd like it if someone could address a concern I raised in another thread, but is relevant to mention here:

The outputs of a CoinJoin transaction will have an amount of red taint equal to the amount of red taint on the inputs.  So basically half of the participants will get cleaner coins and half will get dirtier coins.  There is no net reduction in red taint.

Unless you are assuming that number-of-hops somehow makes your redcoins less red, but I don't believe this to be the case.  The redness factor is really about the source transactions that lead into your transaction, and if a high % of those are red then your coins are tainted.

What incentive is there for clean coins to participate in CoinJoin?  Wouldn't it tend to be the case that CoinJoin inputs are all quite red?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on November 16, 2013, 01:15:35 AM
What incentive is there for clean coins to participate in CoinJoin?  Wouldn't it tend to be the case that CoinJoin inputs are all quite red?
Because the whole concept of "red" to begin with is a human imposed concept which is senseless in a world where people are widely and casually using coinjoin. This is why its important that it be made as easy and as cheap as possible, because its not really useful to anyone unless its usable by everyone.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: oakpacific on November 16, 2013, 01:38:43 AM
I'd like it if someone could address a concern I raised in another thread, but is relevant to mention here:

The outputs of a CoinJoin transaction will have an amount of red taint equal to the amount of red taint on the inputs.  So basically half of the participants will get cleaner coins and half will get dirtier coins.  There is no net reduction in red taint.

Unless you are assuming that number-of-hops somehow makes your redcoins less red, but I don't believe this to be the case.  The redness factor is really about the source transactions that lead into your transaction, and if a high % of those are red then your coins are tainted.

What incentive is there for clean coins to participate in CoinJoin?  Wouldn't it tend to be the case that CoinJoin inputs are all quite red?

If you are a Bitcoin investor, then you really should give a damn about Coinjoin. Destroying its fungibility would allow Wall Street's money masters to separate Bitcoin into assets of different sorts, like "good bitcoins" and "bad bitcoins", and manipulate their values while giving themselves unfair advantages like they have always been doing(e.g., with gold). The bitcoins they control will obviously be A+ grade, and yours may become entirely worthless someday even if you just hoard them and do nothing, to ensure your asset doesn't get depreciated is a pretty big incentive I guess.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: LightRider on November 16, 2013, 07:22:40 AM
But if you mix all of the coins, how can I blacklist them and allow governments to intervene? - Mike Hearn


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: TradeFortress on November 16, 2013, 08:50:40 AM
I'd like it if someone could address a concern I raised in another thread, but is relevant to mention here:

The outputs of a CoinJoin transaction will have an amount of red taint equal to the amount of red taint on the inputs.  So basically half of the participants will get cleaner coins and half will get dirtier coins.  There is no net reduction in red taint.

Unless you are assuming that number-of-hops somehow makes your redcoins less red, but I don't believe this to be the case.  The redness factor is really about the source transactions that lead into your transaction, and if a high % of those are red then your coins are tainted.

What incentive is there for clean coins to participate in CoinJoin?  Wouldn't it tend to be the case that CoinJoin inputs are all quite red?

If you are a Bitcoin investor, then you really should give a damn about Coinjoin. Destroying its fungibility would allow Wall Street's money masters to separate Bitcoin into assets of different sorts, like "good bitcoins" and "bad bitcoins", and manipulate their values while giving themselves unfair advantages like they have always been doing(e.g., with gold). The bitcoins they control will obviously be A+ grade, and yours may become entirely worthless someday even if you just hoard them and do nothing, to ensure your asset doesn't get depreciated is a pretty big incentive I guess.
Exactly. Redlisting will turn into blacklisting and it will turn into whitelisting if not stopped.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Herbert on November 16, 2013, 10:38:41 AM
In light of the recent strange discussions/opinions by leading bitcoin foundation members this is even more important. Just added 0.5 BTC to the bounty. Wish I had more time to work on this myself...


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: HBBZ on November 16, 2013, 02:57:03 PM
Privacy is the lifeline, otherwise there is no competition with traditional banking system. Thanks a lot for your contributions.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dawie on November 16, 2013, 07:45:44 PM
Guys, this is one immensely valuable undertaking.  Spread the word and let's secure fungibility like Satoshi intended.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Anon136 on November 16, 2013, 08:02:27 PM
I dont understand the advantage of using tor. unless of course you wanted to, in addition to hiding information about your transaction, actually hide the fact that you are participating in the bitcoin system entirely. Wouldn't the coinjoin facilitator just publish a public key that all other participants could use to encrypt their transaction?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on November 16, 2013, 08:10:57 PM
I dont understand the advantage of using tor. unless of course you wanted to, in addition to hiding information about your transaction, actually hide the fact that you are participating in the bitcoin system entirely. Wouldn't the coinjoin facilitator just publish a public key that all other participants could use to encrypt their transaction?
If you don't use tor (or another similar network) then the peers you're talking to could record your IP, which you presumably want to keep private too. I mostly pointed it out to head off comments like "OMG YOUR PEERS CAN RECORD YOUR IP!" ... yes, they can, other things fix that. This is intended to address privacy in the blockchain. :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on November 16, 2013, 08:23:29 PM
Figuring out how to construct CoinJoin transactions is just the first step in having a usable system.

The rest of the work is the nuts and bolts of how users actually find suitable mixing partners.

Based on how users are likely going to want to employ CoinJoin, there are going to be two general classes of clients:

  • Opportunistic clients which are configured to wait for suitable conditions and perform mixing in the background. These will necessarily be clients where the private keys are stored on a online machine. Mixing is not time sensitive at all for them.
  • Immediate clients who want to use a CoinJoin transaction to send bitcoins. They need to be able to complete the protocol quickly, within a few seconds, because they using an Armory-style offline wallet where they need to save an unsigned transaction to a suitable medium, cross the air gap, sign the transaction, and broadcast it all before the BitPay timer runs out.

In order for the immediate clients to be able to operate, you need a lot of opportunistic clients. Also, some of the opportunistic clients will be FBI honeypots, so there's that too.

Right off the bat, a CoinJoin negotiation protocol should be work over Tor. The TorChat (https://github.com/prof7bit/TorChat) system is a good model for this - they actually bundle a Tor binary directly into their application so that a TorChat user doesn't need to download, install, and configure Tor separately. They also use the hidden service URL as a user name, which means you don't need some additional name mapping system.

It's too bad the Tor project hasn't separated their core functionality library into a library that could be used by third-party applications, despite repeated calls to do so (https://www.google.com/#q=embed+tor+into+other+application).

Perhaps CoinJoin clients could just work through the libpurple plugin for TorChat.

Once the clients all meet up, they need a way to negotiate parameters like output sizes. If an immediate client wants to use CoinJoin for a purchase, it's not likely that any other immediate clients are going to have the exact same output size needs, so they'll have to rely on opportunistic clients who have specified a compatible range of acceptable output sizes.

tl;dr: Clients need a protocol by which they can register their willingness to participate in a CoinJoin, and any relevant constraints which determine who is and is not a suitable partner, over a secure channel (because even though you might theoretically do it in the clear, people who want CoinJoin are also going to want to have IP address-level privacy too).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Anon136 on November 16, 2013, 08:47:58 PM
I dont understand the advantage of using tor. unless of course you wanted to, in addition to hiding information about your transaction, actually hide the fact that you are participating in the bitcoin system entirely. Wouldn't the coinjoin facilitator just publish a public key that all other participants could use to encrypt their transaction?
If you don't use tor (or another similar network) then the peers you're talking to could record your IP, which you presumably want to keep private too. I mostly pointed it out to head off comments like "OMG YOUR PEERS CAN RECORD YOUR IP!" ... yes, they can, other things fix that. This is intended to address privacy in the blockchain. :)


Supposing you did nothing to obfuscate your ip, would the peers you are talking to have any means by which to link your ip address to the outputs of the transactions that belonged to you? or would they simply be recording the fact that your ip address participated in that particular coinJoin session?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Come-from-Beyond on November 16, 2013, 09:19:27 PM
The idea can also be used more casually. When you want to make a payment, find someone else who also wants to make a payment and make a joint payment together.

This thread is so big. Could anyone, who managed to read it, tell me what prevents CIA/FBI/MI6 from taking part in most of such transactions? This would let them to "break" privacy, coz they know which inputs and outputs r their own. Bitcoin network is already flooded with a lot of "spying" nodes, the same approach can be used against CoinJoin.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: User705 on November 16, 2013, 09:48:54 PM
CoinJoin needs to be nicely implemented in Bitcoin-Qt before any of these ridiculous blacklist proposals take off. So for the next 30 days, I will match donations to the CoinJoin bounty fund (3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk), up to a maximum of 5 BTC. Just donate to that address, and in 30 days I'll donate the difference between the current received amount (16.21420773) and the received amount at that time (max 5 BTC).
Would like to donate 1BTC and possibly more.  blockchain.info says invalid address though.   >:(


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on November 16, 2013, 10:11:23 PM
It's a perfectly valid address. You just need to use Bitcoin-Qt or another sane wallet application.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Carlton Banks on November 16, 2013, 10:12:02 PM
CoinJoin needs to be nicely implemented in Bitcoin-Qt before any of these ridiculous blacklist proposals take off. So for the next 30 days, I will match donations to the CoinJoin bounty fund (3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk), up to a maximum of 5 BTC. Just donate to that address, and in 30 days I'll donate the difference between the current received amount (16.21420773) and the received amount at that time (max 5 BTC).
Would like to donate 1BTC and possibly more.  blockchain.info says invalid address though.   >:(

Send from the Bitcoin Qt client, I think it's the only client that supports these P2SH address types. (beginning with a 3)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gweedo on November 16, 2013, 10:23:12 PM
CoinJoin needs to be nicely implemented in Bitcoin-Qt before any of these ridiculous blacklist proposals take off. So for the next 30 days, I will match donations to the CoinJoin bounty fund (3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk), up to a maximum of 5 BTC. Just donate to that address, and in 30 days I'll donate the difference between the current received amount (16.21420773) and the received amount at that time (max 5 BTC).
Would like to donate 1BTC and possibly more.  blockchain.info says invalid address though.   >:(

Send from the Bitcoin Qt client, I think it's the only client that supports these P2SH address types. (beginning with a 3)

Electrum does as well.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on November 16, 2013, 10:24:22 PM
Send from the Bitcoin Qt client, I think it's the only client that supports these P2SH address types. (beginning with a 3)
Pretty embarrassing that the Bitcoin ecosystem can't keep up with a couple year old feature. It's not the only thing, some websites will, electrum will, the SX tools will. But armory, nothing bitcoinj based, or blockchain.info will.

It's a real bummer because I think that using a multi-signature escrow is the right and proper thing to do here. I don't think I should personally be holding money set aside for this— my computer security is good, but I think no single person should be entrusted with holding non-trivial amounts of other folks money.  How many bitcoins have been stolen that could have been avoided if the norm was to use in blockchain escrows for things, but people didn't because of silly wallet compatibility?  :(  (And perhaps people will understand that I'm really not being a rabid bitcoin-qt advocate when I say that I'm not super eager to see lots of alternative implementations, they really do complicate the ecosystem and make new features harder for people to use)  [/OT]


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gweedo on November 16, 2013, 10:30:41 PM
Pretty embarrassing that the Bitcoin ecosystem can't keep up with a couple year old feature.

This, I don't want to make this off-topic cause coinjoin is a great feature, but P2SH is also another important feature. I am surprised Armory doesn't support it since it uses the bitcoind/bitcoin-qt as a backend. To what extent I don't know but it should be easy to add at least sending to that type of address.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: theymos on November 16, 2013, 10:34:40 PM
Someone should create a site where you enter a P2SH address, it gives back a traditional address, and when it receives money at the traditional address, it immediately forwards the unconfirmed BTC to the P2SH address. (Unmodified Bitcoin-Qt can do this sort of thing, I think.) Not terribly secure, but better than giving up on advanced features entirely.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gweedo on November 16, 2013, 10:42:28 PM
Someone should create a site where you enter a P2SH address, it gives back a traditional address, and when it receives money at the traditional address, it immediately forwards the unconfirmed BTC to the P2SH address. (Unmodified Bitcoin-Qt can do this sort of thing, I think.) Not terribly secure, but better than giving up on advanced features entirely.

If anyone wants me to forward their funds to that just pm me. I have done many escrows and I can do coin control (I have he patch) so you would be able to track it and make sure. You would have send some extra to make sure I have enough for transaction fees.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on November 17, 2013, 12:27:25 AM
Pretty embarrassing that the Bitcoin ecosystem can't keep up with a couple year old feature.

This, I don't want to make this off-topic cause coinjoin is a great feature, but P2SH is also another important feature. I am surprised Armory doesn't support it since it uses the bitcoind/bitcoin-qt as a backend. To what extent I don't know but it should be easy to add at least sending to that type of address.
https://github.com/etotheipi/BitcoinArmory/issues/127

Quote from: etotheipi
Yes, I've resisted updating the interface to support this because changing the supported address formats without exhaustive testing can lead to money-losing bugs. The change is, at its core, quite simple. But making sure it's integrated correctly is not.

After 0.90 is released, I'll do the upgrade to support sending to P2SH addresses for 0.91. When I finally implement multi-sig in the wallets, I'll make sure that the interface works with it naturally.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gweedo on November 17, 2013, 01:34:07 AM
Pretty embarrassing that the Bitcoin ecosystem can't keep up with a couple year old feature.

This, I don't want to make this off-topic cause coinjoin is a great feature, but P2SH is also another important feature. I am surprised Armory doesn't support it since it uses the bitcoind/bitcoin-qt as a backend. To what extent I don't know but it should be easy to add at least sending to that type of address.
https://github.com/etotheipi/BitcoinArmory/issues/127

Quote from: etotheipi
Yes, I've resisted updating the interface to support this because changing the supported address formats without exhaustive testing can lead to money-losing bugs. The change is, at its core, quite simple. But making sure it's integrated correctly is not.

After 0.90 is released, I'll do the upgrade to support sending to P2SH addresses for 0.91. When I finally implement multi-sig in the wallets, I'll make sure that the interface works with it naturally.

OK that sounds promising. Yeah he working on a whole bunch of features for those new wallets.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: oakpacific on November 17, 2013, 08:46:53 AM
Send from the Bitcoin Qt client, I think it's the only client that supports these P2SH address types. (beginning with a 3)
Pretty embarrassing that the Bitcoin ecosystem can't keep up with a couple year old feature. It's not the only thing, some websites will, electrum will, the SX tools will. But armory, nothing bitcoinj based, or blockchain.info will.

It's a real bummer because I think that using a multi-signature escrow is the right and proper thing to do here. I don't think I should personally be holding money set aside for this— my computer security is good, but I think no single person should be entrusted with holding non-trivial amounts of other folks money.  How many bitcoins have been stolen that could have been avoided if the norm was to use in blockchain escrows for things, but people didn't because of silly wallet compatibility?  :(  (And perhaps people will understand that I'm really not being a rabid bitcoin-qt advocate when I say that I'm not super eager to see lots of alternative implementations, they really do complicate the ecosystem and make new features harder for people to use)  [/OT]

Besides, I haven't seen a Coinjoin implementation supporting it! So instead of sending donations to the fund address I send to your personal donation address.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: mmeijeri on November 17, 2013, 09:19:09 AM
I came to this thread late and it may have been mentioned before, but the other day over on Twitter @puellavulnerata mentioned an interesting idea that may be combined with this:

https://twitter.com/puellavulnerata/status/401366089159815168

The idea is to use coinbase transactions for mixing. People would send payments to a cooperating miner in the form of large transaction fees and the miner would then add redistribution outputs to its normal list of outputs. One advantage would be that such a transaction would enlist the help of the miners in the (probably anonymous) mining pool. The fact that the transactions with large fees look suspicious while ordinary joint transactions don't would be a disadvantage. I'm not sure if the coinbase idea can be used to improve the CoinJoin system, but I think it's worth thinking about.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: jl2012 on November 17, 2013, 01:56:57 PM
I came to this thread late and it may have been mentioned before, but the other day over on Twitter @puellavulnerata mentioned an interesting idea that may be combined with this:

https://twitter.com/puellavulnerata/status/401366089159815168

The idea is to use coinbase transactions for mixing. People would send payments to a cooperating miner in the form of large transaction fees and the miner would then add redistribution outputs to its normal list of outputs. One advantage would be that such a transaction would enlist the help of the miners in the (probably anonymous) mining pool. The fact that the transactions with large fees look suspicious while ordinary joint transactions don't would be a disadvantage. I'm not sure if the coinbase idea can be used to improve the CoinJoin system, but I think it's worth thinking about.

This won't work. In case there is a chain re-org, the fee will be grabbed by a different miner


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on November 17, 2013, 05:54:35 PM
Besides, I haven't seen a Coinjoin implementation supporting it! So instead of sending donations to the fund address I send to your personal donation address.

Mine does (as outputs, at least). Using P2SH inputs safely requires a message signing algorithm compatible with multi-sig scriptPubKeys. This is a separate problem that does need to be solved as well.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Michael_S on November 17, 2013, 11:35:45 PM
Good to know about the CoinJoin initiative. After reading the thread, I  understand the view that it will have more value the more common it becomes in normal use.

I'd just like to clarify what CoinJoin is NOT able to do, to avoid seemingly frequent misunderstandings (and where it is different from traditional mixing services) - and I have a proposal further below.

All CoinJoin transactions considered in my example are "N=3", and I assume that all transactions are of 1 BTC, there is no change involved (unless stated otherwise) and Tx fees are neglected for the sake of simplicity/clarity:

Person A sends 1BTC from Address 1A1in and uses 1A1out as output (change of 1 BTC goes to 1A2in).
Person B sends 1BTC from Address 1B1in and uses 1B1out as output (no change).
Person C sends 1BTC from Address 1C1in and uses 1C1out as output (no change).

At this point, outside taint analysis cannot tell who is the owner of 1A1out/1B1out/1C1out, even if the owners of 1A1in/1B1in/1C1in were perfectly known. So the taint seems to be removed. But in fact the taint is only "hidden" and may re-appear, as we'll see further below!

Now Person A has another coin that he wants to clean, so he engages in another CoinJoin transaction with N=3:

Person A sends 1BTC from Address 1A2in and uses 1A2out as output (no change).
Person X sends 1BTC from Address 1X2in and uses 1X2out as output (no change).
Person Y sends 1BTC from Address 1Y2in and uses 1Y2out as output (no change).

At this point, Person A has 2 BTC in his wallet, namely 1 BTC in 1A1out and 1A2out respectively. No outside observer can know that these are his addresses, even if it was publicly known that 1A1in belongs to him. So it seems that Person A has "cleaned" these 2 BTC.


But now Person A makes a fatal mistake, because he doesn't know how CoinJoin works internally and succumbs to the fallacy that his addresses 1A1out and 1A2out are "perfectly cleaned" (as if he had used a traditional mixing service or an online-wallet-"back-and-forth"-transfer or alike):

He sends over, say 1.5 BTC, to his Friend "F", so the transaction is his:
Input = 1A1out and 1A2out (=1+1 =2 BTC).
Output = 1Friend (1.5 BTC) and 1Achange (0.5 BTC to his own new change address).

Now, for an outside observer of the blockchain it is utmost easy (even manually w/o automated scripts) to re-associate addresses 1A1out and 1A2out with 1A1in and hence with person A. This would not have happened if Person A had done proper (manual) "CoinControl", or if he had mixed his coins with a (trustable!) traditional mixer.

Even worse: If Person B makes the same mistake as Person A, then also the address 1C1out of Person C is 100% tainted again, even if she (Person C) did not make any mistake herself!

This is an argument for choosing greater N (or for cascading MANY CoinJoin transactions of N=2), to reduce the probability of getting re-tainted due to mistakes made by the other CoinJoin participants.

So generally, users of CoinJoin must know that any taint that was (temporarily) removed thanks to CoinJoin gets re-established if the user uses different CoinJoin outputs as common inputs for a future transaction. This taint easily re-appears in the same way even if the user performed a cascade of CoinJoin transactions. So careful manual coin-control is indispensable, and maybe clients will implement algos to support the user in his/her coin-control to try avoid re-establishment of taint that was formerly removed by CoinJoin type of techniques, and warn the user when necessary.

So I would use a different terminology: Instead of saying that CoinJoin (and alike) "remove" the taint, I'd rather say it "hides" the taint, or to keep the picture of "colored" coins:
CoinJoin and alike techniques do not remove a [red/black/violet/blue] taint, but they paint white color over this taint. If the user itself practices bad coin control afterwards (or if the other co-participants of the CoinJoin transaction do so), the white paint covering the taint gets peeled-off and the taint re-appears.

This is a fundamental restriction that all blockchain-based-multi-signature taint removal techniques (bitprivacy, CoinJoin, ZeroCoin) have in common as I understand. So the uninformed user may get a false sense of safety for his/her privacy when using these techniques. The only possibility for complete taint removal (instead of just over-painting the taint) is an "off-blockchain mixer", which of course has other disadvantages:
(1) need to trust that the operator does not make records which it hands over to some "3-or-more-Letters-Org"
(2) need to trust the operator that he does not simply keep my coins.

The first disadvantage (1) can be alleviated by looking where the mixer service is located. If there are some mixers in "free" countries, or in some countries that do not co-operate with each other well (e.g. Country X + Y), I should be quite safe w.r.t. risk (1) if I simply concatenate a mixing in country X followed by a mixing in country Y.

For disadvantage (2):
Apparently the only way around is to split-up the amount to be cleaned into smaller quantities and serialize the procedure. E.g. if I want to clean 100 BTC, I serialize it into 100 times 1 BTC, i.e. I will not send out the (n+1)th BTC to the mixer before I have received the nth BTC back. So my risk of fraud gets reduced to 1 BTC. The price I pay is the increased Tx fees, so I can half these fees by accepting twice the risk by selecting 2 BTC increments for the mixing procedure instead of 1 BTC.
Of course it would be nice if mixing APIs could be standardized and built into the BTC clients, such that a background job can be scheduled from the client, i.e. user selects addresses and amount for taint removal, plus the mixing increments, and the mixing server should be able to communicate his fee policy and the one-time address per mixing job via the API, while the client communicates mixing jobs (amount, source address, pay-back address(es)) to the mixer etc. The client preferably also is configurable w.r.t. time increments (do not send (n+1)th mixing job over immediately after nth mixing job is done, but wait n seconds, where n is configurable by the user and follows e.g. a random poisson distribution to make timestamp-based blockchain analysis more difficult. The mixing BTC amounts accepted by the mixer per job should not be arbitrary, but a fixed set (e.g. only allow 1*10^n and 3*10^n BTC per job, where n can be [...]), to make blockchain analysis based on tracking equal transfer sizes more difficult. The mixer may also send the return to multiple addresses (as specified by the user client via the API) in multiple transactions, to make tracking more difficult. Another idea is to include a "provably fair gambling element" in the payback strategy of the mixer (whose statistical sigma could be agreed upon with the client via the API), to further randomize the payout and make tracking more difficult (e.g. payback = 100% +/-n% -he% - Tx fee, while "n" is Gaussian distributed with STD=sigma as chosen by the client and sigma<=sigma_max as defined by the mixer, and he(%) is the "house edge" of the mixer's payback randomization service)! Whether the "house edge" of this gambling element is 0% or actually more (i.e. mixer takes extra fee for this randomization/obfuscation element) is up to the mixer policy. The "provably fair" verification of the "gambling randomization" would also have to be part of the API, so that the client can verify that this randomization is really fair. The payout times of the mixer should have a variable delay relative to the incoming payments, to make tracking even more difficult. Etc.)

While writing this, I think it would be good to define a BIP for a mixer-client API that supports all these features *. Does anyone know if this has happened already?

After a while, I assume that an infrastructure of mixers will evolve, similarly to the infrastructure of mining pools that we know today. They can differentiate from each other w.r.t. server location/jurisdiction, fee structure, blockchain trackability defense mechanisms (see examples above), etc.

* If you guys think this makes sense, I may start to work on the definition of such a BIP. Sorry this is OT for CoinJoin (albeit related), but the ideas developed while writing this. Further discussions on this in a separate thread I guess(?), if considered useful.

-------------------------------------------------------------------

2nd topic:
Idea how to minimize the likelihood of a CoinJoin sybil attack (i.e. that the N-1 co-participants of my CoinJoin transaction are "3-letter-hostile-organization spies"):
  • I initiate TWO CoinJoin transactions instead of just one, of equal output size, and at about the same time, but I inject them at different points of the network if possible (so that an observer does not know they both origin from me).
  • When all co-participants have completed their inputs to reach the number N (here I assume N=10 or so at least), I check if BOTH of my inputs show up amongst these N.
    • If yes, I can fairly assume that the CoinJoin server did not get flooded with 3-letter-hostile spying-transactions and also the other N-2 inputs are probably legit, and I will sign my two transactions.
    • If no, I must assume that the other N-1 transactions are hostile and my second input has been "squeezed-out" and pushed to the next CoinJoin transactions, and I better refrain from signing and try again later. Or I sign anyway (because my non-signing might get interpreted as a DOS attack) but then initiate another CoinJoin transaction were hopefully both of my inputs will show up then...


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: mxmz.in on November 18, 2013, 12:54:44 AM
...
Input = 1A1out and 1A2out (=1+1 =2 BTC).
...


If the CoinJoin functionality gets implemented within the wallet, shouldn't the the wallet prohibit using 1A1out and 1A2out in the same transaction?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Michael_S on November 18, 2013, 01:21:57 AM
...
Input = 1A1out and 1A2out (=1+1 =2 BTC).
...


If the CoinJoin functionality gets implemented within the wallet, shouldn't the the wallet prohibit using 1A1out and 1A2out in the same transaction?
In my view I'd say "yes". That's what I meant when I said the client (wallet) SW should support the user in his coin control.
But what if the user needs to spend a LARGE amount of BTCs from his wallet? Then it cannot be avoided and the coins get "re-tainted". Of course the user (or wallet client) could initiate two separate transactions (within a short time) to the same output address "1Friend", but this hardly makes any difference (except that an observer could not prove 100% that 1A1out and 1A2out have the same owner, it would only be obvious at 99.99...% certainty.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dserrano5 on November 18, 2013, 10:53:57 AM
But what if the user needs to spend a LARGE amount of BTCs from his wallet? Then it cannot be avoided and the coins get "re-tainted". Of course the user (or wallet client) could initiate two separate transactions (within a short time) to the same output address "1Friend", but this hardly makes any difference (except that an observer could not prove 100% that 1A1out and 1A2out have the same owner, it would only be obvious at 99.99...% certainty.

User could always use CoinJoin again to pay 1Friend, so the inputs to the joint transaction would be 1A1out, 1A2out and some others. No one would know that 1A1out and 1A2out belong to the same person.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Murphant on November 18, 2013, 05:41:14 PM
For disadvantage (2):
Apparently the only way around is to split-up the amount to be cleaned into smaller quantities and serialize the procedure. E.g. if I want to clean 100 BTC, I serialize it into 100 times 1 BTC, i.e. I will not send out the (n+1)th BTC to the mixer before I have received the nth BTC back. So my risk of fraud gets reduced to 1 BTC. The price I pay is the increased Tx fees, so I can half these fees by accepting twice the risk by selecting 2 BTC increments for the mixing procedure instead of 1 BTC.
gmaxwell's  "CoinSwap (https://bitcointalk.org/index.php?topic=321228)" introduces a framework that enables "secure" mixing in the sense that the mixer can't run with your coins. I believe CoinSwap is better for dedicated mixing than splitting funds into smaller quantities because it does not just spread the risk, it brings it down to just about zero. Additionally, the Tx fees are lower.

2nd topic:
Idea how to minimize the likelihood of a CoinJoin sybil attack (i.e. that the N-1 co-participants of my CoinJoin transaction are "3-letter-hostile-organization spies"):
  • I initiate TWO CoinJoin transactions instead of just one, of equal output size, and at about the same time, but I inject them at different points of the network if possible (so that an observer does not know they both origin from me).
  • When all co-participants have completed their inputs to reach the number N (here I assume N=10 or so at least), I check if BOTH of my inputs show up amongst these N.
    • If yes, I can fairly assume that the CoinJoin server did not get flooded with 3-letter-hostile spying-transactions and also the other N-2 inputs are probably legit, and I will sign my two transactions.
    • If no, I must assume that the other N-1 transactions are hostile and my second input has been "squeezed-out" and pushed to the next CoinJoin transactions, and I better refrain from signing and try again later. Or I sign anyway (because my non-signing might get interpreted as a DOS attack) but then initiate another CoinJoin transaction were hopefully both of my inputs will show up then...

This is an interesting way to do so. However, it is vulnerable to having a mixing service that is not used very much, in which case only you and 3-letter organizations are trying to mix at any given time. In this case, you will probably have both your inputs included but are still being tracked. Of course, it would mean quite an expenditure for that organization, especially since they are only keeping track of you. In any case, I see CoinJoin as a casual solution that works to give low anonymity to the Bitcoin network as a whole rather than high anonymity to a limited group of people.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Michael_S on November 18, 2013, 08:36:40 PM
But what if the user needs to spend a LARGE amount of BTCs from his wallet? Then it cannot be avoided and the coins get "re-tainted". Of course the user (or wallet client) could initiate two separate transactions (within a short time) to the same output address "1Friend", but this hardly makes any difference (except that an observer could not prove 100% that 1A1out and 1A2out have the same owner, it would only be obvious at 99.99...% certainty.

User could always use CoinJoin again to pay 1Friend, so the inputs to the joint transaction would be 1A1out, 1A2out and some others. No one would know that 1A1out and 1A2out belong to the same person.
Ok, this might slightly improve it at first glance, but I am not at all convinced that it really does. Maybe it does the contrary.

A blockchain observer may still wonder why 1A1out and 1A2out are inputs to the same (CoinJoin-like) transaction. I assume that blockchain analysis uses some sort of scoring or probability method, and the hypothesis that 1A1out and 1A2out belong to the same owner will still get a very high score here.
Furthermore, remember that in CoinJoin all outputs have the same size. So in this case one output is 1.5 BTC to 1Friend, so the other two outputs (going to new addresses of Person A himself) each have 1.5 BTC too. So the sum of all inputs must be at least 4.5 BTC. So Person A must have at lest 4.5 BTC in his wallet although he just wants to transfer 1.5 BTC to 1Friend.

So additional constraints are introduced.

Moreover, from this we see that even addresses of Person A's wallet that were formerly independent are now "entangled" in some way. So we could even consider that the taint spreads over yet unassociated addresses, and privacy things get even worse, not better, by this suggestion.

One would have to analyze this much deeper to tell if taint really gets improved here, by taking into account the methods that are used for blockchain analysis techniques... it is certainly not a trivial subject. Approaching it with simple human intuition may lead to fallacies.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Michael_S on November 18, 2013, 08:47:59 PM
For disadvantage (2):
Apparently the only way around is to split-up the amount to be cleaned into smaller quantities and serialize the procedure. E.g. if I want to clean 100 BTC, I serialize it into 100 times 1 BTC, i.e. I will not send out the (n+1)th BTC to the mixer before I have received the nth BTC back. So my risk of fraud gets reduced to 1 BTC. The price I pay is the increased Tx fees, so I can half these fees by accepting twice the risk by selecting 2 BTC increments for the mixing procedure instead of 1 BTC.
gmaxwell's  "CoinSwap (https://bitcointalk.org/index.php?topic=321228)" introduces a framework that enables "secure" mixing in the sense that the mixer can't run with your coins. I believe CoinSwap is better for dedicated mixing than splitting funds into smaller quantities because it does not just spread the risk, it brings it down to just about zero. Additionally, the Tx fees are lower.
Thanks, I will have a look at CoinSwap...

2nd topic:
Idea how to minimize the likelihood of a CoinJoin sybil attack (i.e. that the N-1 co-participants of my CoinJoin transaction are "3-letter-hostile-organization spies"):
  • I initiate TWO CoinJoin transactions instead of just one, of equal output size, and at about the same time, but I inject them at different points of the network if possible (so that an observer does not know they both origin from me).
  • When all co-participants have completed their inputs to reach the number N (here I assume N=10 or so at least), I check if BOTH of my inputs show up amongst these N.
    • If yes, I can fairly assume that the CoinJoin server did not get flooded with 3-letter-hostile spying-transactions and also the other N-2 inputs are probably legit, and I will sign my two transactions.
    • If no, I must assume that the other N-1 transactions are hostile and my second input has been "squeezed-out" and pushed to the next CoinJoin transactions, and I better refrain from signing and try again later. Or I sign anyway (because my non-signing might get interpreted as a DOS attack) but then initiate another CoinJoin transaction were hopefully both of my inputs will show up then...

This is an interesting way to do so. However, it is vulnerable to having a mixing service that is not used very much, in which case only you and 3-letter organizations are trying to mix at any given time. In this case, you will probably have both your inputs included but are still being tracked. Of course, it would mean quite an expenditure for that organization, especially since they are only keeping track of you. In any case, I see CoinJoin as a casual solution that works to give low anonymity to the Bitcoin network as a whole rather than high anonymity to a limited group of people.
I agree this "solution" of mine is far from optimum... I also agree with your last sentence, it can't be pointed out clearly enough that CoinJoin just provides low anonymity, and I think there is high probability that the normal user will succumb to the fallacy that CoinJoin is really providing great anonymity, and it will be communicated by the media etc. in this simplistic way as well, I predict (unless they read this posting). So the users are happy, the NSA is happy, the gov't as well, so everyone is happy. Everybody has peace of mind, and the informed user can still care about his anonymity by CoinControl and other techniques... So everyone is happy.

I also acknowledge that the sole existence and integration of CoinJoin in the client SW and its widespread use is reason enough to render an approach of introducing red/blacklistings increasingly useless, and this alone may fully justify CoinJoin. And I think this is the main intention of the OP et al.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Michael_S on November 18, 2013, 10:01:42 PM
For disadvantage (2):
Apparently the only way around is to split-up the amount to be cleaned into smaller quantities and serialize the procedure. E.g. if I want to clean 100 BTC, I serialize it into 100 times 1 BTC, i.e. I will not send out the (n+1)th BTC to the mixer before I have received the nth BTC back. So my risk of fraud gets reduced to 1 BTC. The price I pay is the increased Tx fees, so I can half these fees by accepting twice the risk by selecting 2 BTC increments for the mixing procedure instead of 1 BTC.
gmaxwell's  "CoinSwap (https://bitcointalk.org/index.php?topic=321228)" introduces a framework that enables "secure" mixing in the sense that the mixer can't run with your coins. I believe CoinSwap is better for dedicated mixing than splitting funds into smaller quantities because it does not just spread the risk, it brings it down to just about zero. Additionally, the Tx fees are lower.
Thanks, I will have a look at CoinSwap...

[...]
Now I had a look at CoinSwap. Nice! I was not aware of a concept like these "hash-locked" transactions.

I am wondering whether it is possible to combine the CoinSwap and CoinJoin concepts. Idea (Ex. N=3 again):

Traditional CoinJoin:
   ConJoin Transaction: inputs = (1Ain, 1Bin, 1Cin), outputs = (1Aout, 1Bout, 1Cout).

New "CoinJoinSwap":
   ConJoin Transaction 1: inputs = (1Ain, 1Bin, 1Cin), outputs = (1Xout, 1Yout, 1Zout).
   ConJoin Transaction 2: inputs = (1Xin, 1Yin, 1Zin), outputs = (1Aout, 1Bout, 1Cout).
So here 6 participants are involved, namely Persons A, B, C, X, Y, Z.

Contrary to normal CoinJoin, taint is really removed instead of just "hidden".

A CoinSwap-like protocol would have to be defined to make sure that no funds can be embezzled (via hash-locked techniques?), and that no connections between the two CJ transactions can be made from the outside observer. And hopefully, it can be done in a way that there's not a "single-point-of privacy-leak" like in CoinSwap where "Carol can tell about Alice".

I am stopping here, because I did not understand CoinSwap to the last detail yet, but I have the feeling that such combined mechanism could be possible and trying to inspire...


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on November 18, 2013, 10:22:43 PM
Michael, your examples indicate bad coin control and insufficient anonymity sets, not in inherent unknown weakness in CoinJoin.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dserrano5 on November 19, 2013, 08:31:54 AM
Furthermore, remember that in CoinJoin all outputs have the same size. So in this case one output is 1.5 BTC to 1Friend, so the other two outputs (going to new addresses of Person A himself) each have 1.5 BTC too. So the sum of all inputs must be at least 4.5 BTC. So Person A must have at lest 4.5 BTC in his wallet although he just wants to transfer 1.5 BTC to 1Friend.

Good point. However outputs don't have to be the same value but could be among a set of values. And with the advent of HD wallets, I could ask my friend for an extended pubkey so I could generate as many addresses of them as I wanted, and I would set up the outputs of the CJ accordingly. For example if the outputs must be powers of two between 2^16 and 2^32 satoshis, I could roughly fit 1.5 BTC into that. (2^27 + 2^23 + 2^22 + 2^21 + 2^20) / 1e8 = 1.49946368.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on November 19, 2013, 04:27:40 PM
I appreciate the thought here with coinjoin, but the fact remains that people need to actually use it, and then people need to actually pay (transaction fees) for it. 

Honestly, I don't think they will.  If the manager of a sandwich shop spends 1/10 of 1% of his receipts on coinjoin transactions, he's going to get fired.  If you ask naive user Joe whether he's willing to spend an extra fifty cents for some abstract thing like privacy on a legitimate $500 transaction, he's going to say no because he doesn't care enough in the immediate case. 

If you want privacy, then you need to fix the protocol so that *EVERY* transaction is a mix, and people *DON'T* have to pay extra for mixing.

My thought on this is that the clients need to prefer producing outputs in "standard" coin sizes (to separate output addresses) such as [1 | 2.5 | 5] * 10^N - for ALL outputs including change - and that whenever possible *both* sides of a transaction need to be providing inputs that add up to at least twice the amount of money that's actually required to change hands. 

'Coz honestly, it doesn't matter how good your coinjoin design is if people still have to pay tx fees to use it, because they won't.





Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Peter Todd on November 19, 2013, 05:40:24 PM
I appreciate the thought here with coinjoin, but the fact remains that people need to actually use it, and then people need to actually pay (transaction fees) for it. 

CoinJoin transactions are slightly smaller than non-CoinJoin because all parties can share the same transaction header, and thus are actually cheaper than the alternative.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on November 19, 2013, 05:47:46 PM
Yes, but as far as I can see the coinjoin is still a separate transaction with separate fees. 

Joe Blow buys a sandwich.  Why would joe blow, or the sandwich shop, then also pay to do coinjoin transactions?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on November 19, 2013, 05:57:12 PM
Yes, but as far as I can see the coinjoin is still a separate transaction with separate fees.  
Joe can pay for his sandwich directly— this is one option, but not a requirement. Please review the initial post, this is covered in detail.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Carlton Banks on November 19, 2013, 08:25:57 PM
It seems to me that you can cut down the chances of a CoinJoin being participated in by snoopy spying agencies by choosing low numbers of participants and doing numerous/frequent CoinJoins (and accepting the increased fees you pay as a cost of keeping your holdings private).

And when I say low numbers of participants, it also seems there is an option to choose to CoinJoin entirely with inputs and outputs of addresses that only belong to you. How could someone analysing the blockchain prove they were not trying to disentangle the identities of what would in effect be a spoofed CoinJoin? I'm not sure that they could.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on November 20, 2013, 05:31:50 PM
And when I say low numbers of participants, it also seems there is an option to choose to CoinJoin entirely with inputs and outputs of addresses that only belong to you. How could someone analysing the blockchain prove they were not trying to disentangle the identities of what would in effect be a spoofed CoinJoin? I'm not sure that they could.
Normal transactions do this all the time (ignoring creating faux-anonymous output values), but today people assume common use means common ownership.  Part of the advantage of CoinJoin is that if widely used it breaks the ability to assume that, recovering some privacy for everyone.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: jedunnigan on November 22, 2013, 03:05:43 AM
I just realized CoinJoin is actually an effective scaling tool; no longer would we have to increase the block size to handle more tx/s. Just bundle them in CoinJoin txs.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Anon136 on November 22, 2013, 05:39:05 AM
I just realized CoinJoin is actually an effective scaling tool; no longer would we have to increase the block size to handle more tx/s. Just bundle them in CoinJoin txs.

it only helps a little bit because it only saves the need to store some of the transaction headers. As far as the information inside of the body is concerned, you still have just as many inputs and outputs, its just as much data to be stored on the blockchain.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: jedunnigan on November 22, 2013, 06:40:48 AM
I just realized CoinJoin is actually an effective scaling tool; no longer would we have to increase the block size to handle more tx/s. Just bundle them in CoinJoin txs.

it only helps a little bit because it only saves the need to store some of the transaction headers. As far as the information inside of the body is concerned, you still have just as many inputs and outputs, its just as much data to be stored on the blockchain.
Ah true.

Someone debunk this idea: SwapJoin

I know you can only add up to [I think] 10 sigs in a multi sig transaction, but could you build the escrow transactions in the CoinSwap protocol with CoinJoin properties? Or is that a gross misunderstanding of how it works.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: BurtW on November 22, 2013, 08:19:38 AM
Bitcoin has been very good to me over these last few years.  I would hate to see it killed by these various validation proposals.

As of this posting the bounty pool at: https://blockchain.info/address/3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk contains a bit over 31 BTC.

In order to stand behind my signature below and support this effort I offer the following matching donation (inspired by Theymos):

I will donate 5 BTC as soon as the total in the fund goes over 36 BTC.



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: TierNolan on November 22, 2013, 12:05:04 PM
it only helps a little bit because it only saves the need to store some of the transaction headers. As far as the information inside of the body is concerned, you still have just as many inputs and outputs, its just as much data to be stored on the blockchain.

It could help if it covered time too.

If A pays B and then B pays C, then the 2 transactions could be combined to give A pays C. 

A pays C could have higher fee per kB than A pays B and B pays C, so it is worth it for a mining pool to combine them.

This could happen if the transaction pool started becoming a queue.  At the moment, transactions mostly get into the chain.

If transactions stayed unconfirmed for a while, then you could end up with more opportunities to collapse the transactions.  So, a longer queue makes the blockchain more efficient.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Carlton Banks on November 22, 2013, 02:36:57 PM
I just realized CoinJoin is actually an effective scaling tool; no longer would we have to increase the block size to handle more tx/s. Just bundle them in CoinJoin txs.

It could be used as a load balancing device for a system with a fixed block size limit. CoinJoins happen automatically to help compress more transactions into the available block space. This could provide a good argument against a scheme with a continuously variable block size, or to a scheme with no limit at all (although I don't think anyone has yet made any serious proposal for the latter)

It also illustrates that CoinJoin really is just that, joining inputs and outputs into single transactions, regardless of the utility you're seeking from doing so.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Anon136 on November 22, 2013, 06:33:31 PM
it only helps a little bit because it only saves the need to store some of the transaction headers. As far as the information inside of the body is concerned, you still have just as many inputs and outputs, its just as much data to be stored on the blockchain.

It could help if it covered time too.

If A pays B and then B pays C, then the 2 transactions could be combined to give A pays C. 

A pays C could have higher fee per kB than A pays B and B pays C, so it is worth it for a mining pool to combine them.

This could happen if the transaction pool started becoming a queue.  At the moment, transactions mostly get into the chain.

If transactions stayed unconfirmed for a while, then you could end up with more opportunities to collapse the transactions.  So, a longer queue makes the blockchain more efficient.

thats very clever tier


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on November 22, 2013, 06:39:45 PM
A thought occurred to me this morning.  Why are the blocks structured in such a way that you can tell in the first place which txins and txouts go with which transactions?  By the time the block is found most peers have already seen the transactions that the block is composed of.  We need a list of transactions, a list of txins, and a list of txouts.  There's no need to give information in the block about which txins and txouts go with which transactions.

Those who have seen the transactions already know. So they can still check everything they've seen in the block.  And the block structure doesn't need to make it easy to reconstruct the individual transactions. After the fact people can still check validity by treating a block the same way they treat a transaction now.

That makes coinjoin completely superfluous. And free.  And the default for all transactions.


Of course it's a hard fork. But it's worth it.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: marcus_of_augustus on November 22, 2013, 06:48:44 PM
A thought occurred to me this morning.  Why are the blocks structured in such a way that you can tell in the first place which txins and txouts go with which transactions?  By the time the block is found most peers have already seen the transactions that the block is composed of.  We need a list of transactions, a list of txins, and a list of txouts.  There's no need to give information in the block about which txins and txouts go with which transactions.

Those who have seen the transactions already know. So they can still check everything they've seen in the block.  And the block structure doesn't need to make it easy to reconstruct the individual transactions. After the fact people can still check validity by treating a block the same way they treat a transaction now.

That makes coinjoin completely superfluous. And free.  And the default for all transactions.


Of course it's a hard fork. But it's worth it.

I've often wondered about variations along this line myself ... and also if some kind of homomorphic encryption might used to conceal tx details completely and yet still have verifiable blocks ?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on November 22, 2013, 07:31:47 PM
I've often wondered about variations along this line myself ... and also if some kind of homomorphic encryption might used to conceal tx details completely and yet still have verifiable blocks ?
Adam had a whole thread on encrypted transactions (https://bitcointalk.org/index.php?topic=206303.0). Though without compact zero knoweldge proofs (like the stuff I discussed in the coinwitness thread) it's hard to make them not super brittle and inefficient, because anyone you pay has to receive and validate the whole decrypted history of a coin, since it can't be validated without the history.

If you had a zero knowledge proof that the transaction was valid (e.g. that all the outputs and inputs added up) which the network checked then you could accept the coin without re-verifying the history and, importantly, without revealing the history to the recipients. The trick is finding a system for zero knoweldge proofs which is powerful enough to prove the right things but fast and low bandwidth enough to actually use which doesn't have annoying limitations like requiring a trusted initialization.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: marcus_of_augustus on November 23, 2013, 05:51:31 AM
I've often wondered about variations along this line myself ... and also if some kind of homomorphic encryption might used to conceal tx details completely and yet still have verifiable blocks ?
Adam had a whole thread on encrypted transactions (https://bitcointalk.org/index.php?topic=206303.0). Though without compact zero knowledge proofs (like the stuff I discussed in the coinwitness thread) it's hard to make them not super brittle and inefficient, because anyone you pay has to receive and validate the whole decrypted history of a coin, since it can't be validated without the history.

If you had a zero knowledge proof that the transaction was valid (e.g. that all the outputs and inputs added up) which the network checked then you could accept the coin without re-verifying the history and, importantly, without revealing the history to the recipients. The trick is finding a system for zero knowledge proofs which is powerful enough to prove the right things but fast and low bandwidth enough to actually use which doesn't have annoying limitations like requiring a trusted initialization.

Thanks ... guess we'll keep searching for that trick.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on November 23, 2013, 08:35:26 AM
Actually, I already posted that.  https://bitcointalk.org/index.php?topic=314958.0

Using the Benaloh homomorphic encryption system you can check that txins and txouts are equal without knowing anything about their real values.  If you encrypt two bunches of numbers that add up to equal sums using Benaloh, the ciphertexts of those two bunches when interpreted as numbers have equal modular products. 

Actually making the transactions using that system would require more compute power, on the order of an RSA encryption per txout.  But checking it would require very little extra because modular multiplications are nearly as cheap on modern architectures as additions.

This would mean that tx fees have to be an explicit txout of the transaction, but we're talking about a hard fork anyway if we get that far. 


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on November 23, 2013, 11:33:21 PM
Using the Benaloh homomorphic encryption system you can check that txins and txouts are equal without knowing anything about their real values.  If you encrypt two bunches of numbers that add up to equal sums using Benaloh, the ciphertexts of those two bunches when interpreted as numbers have equal modular products.
But only if they have the same key. This is offtopic for this thread.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: onetimeuser on November 26, 2013, 02:23:11 AM
CoinJoin's fund is currently worth approx $24,987.90

This seems like more than enough money to fund development of such a feature. Are there any updates to its progress?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: oakpacific on November 26, 2013, 08:35:05 AM
Brainstorm: is there anyway to make fee payments anonymous as well? I figure that since on one hand some are concerned whether there will be enough unsuspected users to help them hiding the trail, otoh some are concerned about fees, it would be one stone for two birds if we can give some users the opportunity to have their fees paid by those willing, if they choose to do a Coinjoin transaction.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: andytoshi on December 11, 2013, 05:19:14 AM
Hey guys,

I have written a tool in Rust to make CoinJoining easier to do -- though it still requires creating and passing raw transactions. (I apologize for the weird language choice, but Rust is awesome. The first time the code compiled it worked correctly, that's just how good the static analysis is with this language.) Having said that, I have only done so much testing, so I encourage you guys to download and play with it:

https://github.com/apoelstra/coinjoin

Be aware that testing is perfectly safe -- no matter how badly my code mangles the transaction, any changes to the outputs will invalidate the signatures, so there is no additional risk of money loss from running the program. (On the other hand, make sure you verify every transaction you sign!)

From the README, there are two steps to using the program:

1. All parties who want to coinjoin create a raw transaction using createrawtransaction. They submit these to one individual, who enters them into CoinJoiner by running

./coinjoin-merge-unsigned

Then just copy/paste the transactions in, one on each line, followed by a blank line. The output will be an unsigned merged transaction.

2. This merged transaction is distributed to the original parties, who each sign it. Then they send these back to the individual running CoinJoiner, who merges them by running

./coinjoin-merge-signed

Then just copy/paste the signed transactions in, one on each line, followed by a blank line. The output will be a merged, signed transaction that is ready to be submitted to the bitcoin network.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: kjj on December 11, 2013, 05:29:22 AM
1. All parties who want to coinjoin create a raw transaction using createrawtransaction. They submit these to one individual, who enters them into CoinJoiner by running

./coinjoin-merge-unsigned

Then just copy/paste the transactions in, one on each line, followed by a blank line. The output will be an unsigned merged transaction.

Interesting approach.  This has some very nice advantages.  For example, we could add a flag to sendtoaddress that makes it return the unsigned tx hex.  Thus we take advantage of the coin selector built into the node, etc.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dserrano5 on December 11, 2013, 08:53:59 AM
CoinJoin needs to be nicely implemented in Bitcoin-Qt before any of these ridiculous blacklist proposals take off. So for the next 30 days, I will match donations to the CoinJoin bounty fund (3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk), up to a maximum of 5 BTC.

Way to go!

I'm upping my offer from 0.50 to 0.75 but please tell Pieter to sign his pubkey in the second message of this thread.

Ah, it took some time but he has finally signed it :).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: wumpus on December 11, 2013, 10:03:55 AM
Interesting approach.  This has some very nice advantages.  For example, we could add a flag to sendtoaddress that makes it return the unsigned tx hex.  Thus we take advantage of the coin selector built into the node, etc.
It'd also need to mark the inputs as spent so that further transactions don't double-spend.
This could be done using `lockunspent` but these are not saved when bitcoind is restarted.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: andytoshi on December 11, 2013, 04:14:56 PM
Interesting approach.  This has some very nice advantages.  For example, we could add a flag to sendtoaddress that makes it return the unsigned tx hex.  Thus we take advantage of the coin selector built into the node, etc.
It'd also need to mark the inputs as spent so that further transactions don't double-spend.
This could be done using `lockunspent` but these are not saved when bitcoind is restarted.


If anyone knows how to make JSON-RPC calls through Rust (or C), I'd be able to (a) do my own 'sendtoaddress' equivalent, and (b) check for double-spends, excessive fees, negative fees, etc, and flag these as errors.

Right now I only check things intrinsic to the transactions -- for merge-unsigned, I ensure there are no duplicate inputs; for merge-signed, I ensure that all transactions are identical modulo scriptSigs.

It's not terribly important to do lockunspent -- if somebody double-spends, the coinjoin will be invalid. Presumably they wanted to do the coinjoin, so they've just screwed themselves. So any double-spend blocking is purely a usability feature.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: genjix on December 12, 2013, 12:07:56 AM
https://medium.com/p/7f95a386692f

last paragraph


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Rassah on December 12, 2013, 07:51:26 AM
Hey, um, stupid question, and I'm just too drowsy to wrap my head around it, but if I use CounJoin on blockchain.info, where I have one input and one output, and sent 5 BTC through, with 5 BTC coming out on the other end, isn't it still fairly easy to track my 5 BTC,simply because that's the amount that went in and came out?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dserrano5 on December 12, 2013, 08:31:00 AM
if I use CounJoin on blockchain.info, where I have one input and one output

If you only have one input, you're not joining any coins. The point is mixing unspent outputs from several people/addresses so external observers can't figure out where each output has gone.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Rassah on December 12, 2013, 07:30:46 PM
if I use CounJoin on blockchain.info, where I have one input and one output

If you only have one input, you're not joining any coins. The point is mixing unspent outputs from several people/addresses so external observers can't figure out where each output has gone.

I understand, but if we have 3 people, I put in 5BTC, someone else puts in 2BTC, and the third person puts in 3.5BTC, the coins all get broken up into random amounts and go through two stage mix, in the end, we still have 5BTC, 2BTC, and 3.5BTC, just in new addresses. Isn't that fairly easy to track? I know I'm missing something... What is it?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Carlton Banks on December 12, 2013, 08:43:58 PM
if I use CounJoin on blockchain.info, where I have one input and one output

If you only have one input, you're not joining any coins. The point is mixing unspent outputs from several people/addresses so external observers can't figure out where each output has gone.

I understand, but if we have 3 people, I put in 5BTC, someone else puts in 2BTC, and the third person puts in 3.5BTC, the coins all get broken up into random amounts and go through two stage mix, in the end, we still have 5BTC, 2BTC, and 3.5BTC, just in new addresses. Isn't that fairly easy to track? I know I'm missing something... What is it?

The possibility that you could get 5 BTC sent to more than one address. Also, you could use the system to pay people too. So, you get your 5 BTC sent to 4 adddresess that belong to you, and the small fraction you are paying to someone else goes to their address. To the outside observer, do all 5 addresses belong to the original holder? Do they all belong to someone receiving a total of 5 BTC from the original holder? Or somewhere inbetween? Impossible to tell, and so analysing the transaction leaves you with lots of questions and no answers.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on December 12, 2013, 08:50:22 PM
I understand, but if we have 3 people, I put in 5BTC, someone else puts in 2BTC, and the third person puts in 3.5BTC, the coins all get broken up into random amounts and go through two stage mix, in the end, we still have 5BTC, 2BTC, and 3.5BTC, just in new addresses. Isn't that fairly easy to track? I know I'm missing something... What is it?

You don't re-assemble them into the original amounts. Why would you want to do that?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Rassah on December 12, 2013, 08:54:44 PM
I understand, but if we have 3 people, I put in 5BTC, someone else puts in 2BTC, and the third person puts in 3.5BTC, the coins all get broken up into random amounts and go through two stage mix, in the end, we still have 5BTC, 2BTC, and 3.5BTC, just in new addresses. Isn't that fairly easy to track? I know I'm missing something... What is it?

You don't re-assemble them into the original amounts. Why would you want to do that?

That's what Blockchain.info does. You send from a single address, you give it an amount and a destination address, and it goes through 2+ CoinJoin steps, split up into random amounts from your source address, then after all the steps gets recombined into the amount you sent (minus transaction fee) into your destination address. Basically, it's as if your amount is exploded into random chunks, and then recombined into the same amount. Unless multiple steps involve multiple different coinjoiners, and much of what you get isn't tied to your own bitcoin at all, I'm not sure it's secure.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on December 12, 2013, 08:56:31 PM
Then that's what bc.i does. That's not the protocol described in this thread.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Carlton Banks on December 12, 2013, 09:28:45 PM
So yes, blockchain.info has an implementation of CoinJoin, that doesn't do anything much useful. Unless it's configurable to do the job differently, of course.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: piuk on December 13, 2013, 12:24:04 AM
That's what Blockchain.info does. You send from a single address, you give it an amount and a destination address, and it goes through 2+ CoinJoin steps, split up into random amounts from your source address, then after all the steps gets recombined into the amount you sent (minus transaction fee) into your destination address. Basically, it's as if your amount is exploded into random chunks, and then recombined into the same amount. Unless multiple steps involve multiple different coinjoiners, and much of what you get isn't tied to your own bitcoin at all, I'm not sure it's secure.

Assuming you use a single input of the exact size then it will be recombined into the same output value. But the client will deliberately select more inputs than necessary in order to make determining the input value more difficult. The server will also add multiple outputs of the same size as your inputs.

Even if you are restricting outputs to power of two sizes, as in the original coinjoin proposal, the same issue is still a problem. Address A sends 2 * 0.1 BTC + 1 * 1 BTC outputs then Address BTC receives 2 * 0.1 BTC + 1 * 1 BTC soon after it is easy to connect the dots.

Mixing in the background rather than on demand is probably the best way to solve this.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on December 13, 2013, 02:25:16 AM
I don't see how CoinJoin can possibly ever be effective in a situation of address reuse.

Is Blockchain.info ever going to stop doing that?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Rassah on December 13, 2013, 06:57:04 AM
I don't see how CoinJoin can possibly ever be effective in a situation of address reuse.

Is Blockchain.info ever going to stop doing that?

I think they already have. Their default bitcoin transactions send change to new addresses, as does their CoinJoin.

I'm only using blockchain.info's coinjoin it to offload and split up my larger bitcoin purchases into cold storage. Hopefully it was sufficient enough for the last few deposits I made.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on December 13, 2013, 08:19:02 AM
Their default bitcoin transactions send change to new addresses, as does their CoinJoin.
When did that happen? That's a major change that deserves a large announcement. Are they using BIP32 to derive the new addresses?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: TierNolan on December 13, 2013, 11:44:22 AM
I understand, but if we have 3 people, I put in 5BTC, someone else puts in 2BTC, and the third person puts in 3.5BTC, the coins all get broken up into random amounts and go through two stage mix, in the end, we still have 5BTC, 2BTC, and 3.5BTC, just in new addresses. Isn't that fairly easy to track? I know I'm missing something... What is it?

You need to agree on a common amount.

Inputs (5, 2, 3.5)
Outputs
2
2
2
3 (your change)
1.5 (change for the 3.5 BTC guy)

You get one of the 2 BTC coins and your 3 BTC change coin.  Your software would need to remember that the 3 BTC change coin was not mixed, but the 2BTC one was.

In fact, you could split your 3 coin into two 1.5 BTC coins, so it would be slightly mixed.  You would get 2 of the 3 1.5 BTC outputs.

If there was only 2 into the mix, there would generally be two inputs and three outputs, so the guy who paid more gets (unmixed) change.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: phillipsjk on December 15, 2013, 09:32:15 PM
I got into a argument with somebody on IRC in #bitcoin over the suitability of coinjoin transactions for annoymised verifiable e-voting. justanotheruser's argument was that he could always verify that his choice got a "vote". My argument was that since the voters don't share their votes with each other, it is possible to mis-allocate votes without detection (as long as you are not too greedy).

This has implications for "normal" coinjoin transactions as well:
If:
  • There are more than two participants
  • Two or more participants try to send coins to the same address without directly communicating with each other. (This includes trying to send mining fees)
Then:
  • It is possible for a bad actor to misdirect some of those funds for their own purposes.
  • For the attack to work,  the original output must have at least as much funds as any one participant sent.

This works because non-communicating participants can only ever check that their own outputs look correct. One way to mitigate this is to phase out address reuse: which has not yet happened in practice.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on December 15, 2013, 09:40:32 PM
Excellent point!

As you note one workaround is don't reuse addresses— always good advice and here it doesn't have to be "phased out" in general but just by participants— but it's always better to be secure even if software is used dumbly.

I can suggest a trivial protocol addition that solves this without making the CJ transactions distinguishable or degrading privacy, but my solutions have some overhead. I'm curious if anyone can come up with a better way of doing it that doesn't have the overhead.

The general idea is that the merging party can just make a list (blindly) mapping their inputs to outputs, give the list to all players, and commit to the list so that all players know they got the same list.

Here is how it works:

The merging party makes a list with an entry for each output in the transaction. The entries have a nonce provided by each user either when they provide their input (or submitted their blindsigned tokens if blind signed tokens are in use). When they ask the users to sign they give the users the list and the users check and see that they are the credited party for every output they think they should be. Because they are just nonces they don't deanonymize users.

But to prevent the merging party from giving a different list to each user they must commit to it. I have two way to accomplish that:

The first is that we could require that a particular index in the outputs pay to an address which commits to the list: The merging party computes a new public key as an existing pubkey plus the H(list)*G, like a pay to contract (http://arxiv.org/abs/1212.3257), and a previously designated output pays to the resulting address. Given the list and original public key, everyone can check that that output commits to the same list. (And if two different users are given different lists, their signatures will not be merge-able since they would have signed different outputs).

(This designed output could belong to the merger or players could volunteer to have their output address placed in the designated position and to instead receive their payment at a pay-to-commit address. This is a little lame though, because it requires that there be at least one player that will tolerate receiving coins at a non-deterministic key.)

The second way to commit that I've come up with is to add an additional round to the protocol where you make a dummy transaction modified so that it won't ever be valid, e.g. using the list hash as an addition vin. Everyone signs this transaction and then only once they've seen this commitment signed by all the inputs will they sign the real transaction.

Needing an extra communications round or a non-deterministic output is kinda weak. Can better be done?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: mmeijeri on December 15, 2013, 10:38:51 PM
Couldn't you just eject all but one of the partial transactions that use the same addresses from the current CoinJoin operation, maybe based on the lowest value of some appropriate hash?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: phillipsjk on December 16, 2013, 08:28:31 AM
Couldn't you just eject all but one of the partial transactions that use the same addresses from the current CoinJoin operation, maybe based on the lowest value of some appropriate hash?
Who does the rejecting, and why should they be trusted?

I think an implication of GMaxwell's work-arounds is that such outputs can't be merged (which I think would be the ideal case).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: mmeijeri on December 16, 2013, 08:58:28 AM
Who does the rejecting, and why should they be trusted?

If it's an algorithmic decision, it doesn't matter, does it? But it was just something that popped into my mind, it's not a well thought out proposal.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: phillipsjk on December 16, 2013, 09:17:21 AM
The vulnerability is that the participants don't communicate their intentions with each other for fear of losing their privacy. (Address re-use has privacy implications on its own).

Algorithms are written by people. So they can be made to do thing you don't want. GMaxwell was making suggestions describing how people can share their intentions, without losing their privacy.

Edit: if we solve e-voting (as a side-effect), that would be a big achievement on its own.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: mmeijeri on December 16, 2013, 09:21:43 AM
Algorithms are written by people. So they can be made to do thing you don't want.

Not if it's part of a protocol.

Quote
GMaxwell was making suggestions describing how people can share their intentions, without losing their privacy.

Sure, I'm not saying his suggestion wouldn't be superior, just that this might be a quick initial fix. If there aren't other problems with it that is. There very well might be.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: phillipsjk on December 16, 2013, 09:23:46 AM
Algorithms are written by people. So they can be made to do thing you don't want.

Not if it's part of a protocol.


The protocol would have to describe how the participants become aware of the conflicting outputs (and how cheating by the mixer is prevented).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: piotr_n on December 16, 2013, 04:40:47 PM
I really don't understand all the applause and excitement on how "CoinJoin" is supposed to increase the users' privacy.

Are you kidding me?
This is not any new technology - personally I would not even call it an invention...
IMHO, it is rather a legal advise to use a plausible deniability in a possible cases against you.

At first it had been assumed (by some incompetent people) that all the inputs of a single transaction must always come from the same wallet (thus the same person).
What the author of the OP has invented is literally nothing - he only stated that technically inputs of a single transaction might just as well come from a completely different wallets - and this gives anyone a plausible deniability in any legal case (against him) that would be based on the assumption that all the inputs of a certain transaction came from his wallet.

In reality, assuming that you never disclose the content of your wallet (and if you did, CoinJoin won't help you anyway), you do not even need to find other parties to conduct CoinJoin!
You can just as well "CoinJoin" your own coins, as long as you are going to claim that they weren't all yours - and there will be no distinguishable difference whatsoever, from a CoinJoin tx made by a multiple parties.

CoinJoin does not create any additional privacy - it is actually less private than regular translations, since the process involves letting other people to know which coins are yours.
At best, it only gives you a reason to claim in court that not all the inputs were yours. The core of the "solution" here is a legal advise based on a technical properties of the bitcoin protocol.

So, not that I want to scare him, but as much as gmaxwell did not want to offend his big brother by helping to develop a software that would enable CoinJoin, he actually already did the most important part of the job by giving all the people the excuse that is the core of the invention here.

Therefore, since I am not so afraid of his brother, let me promptly point it out once again and remember: whenever anyone tells you that they traced your coins by "joined inputs" - just deny it and say that it was a CoinJoin transaction and not all the inputs were yours. Especially if it wasn't a CoinJoin transaction. :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: waxwing on December 16, 2013, 05:35:10 PM
Good point piotr_n. It makes you think about the game-theoretic infinite regresses going on here. I would really appreciate it if some people write plausible code into wallets for CoinJoin, because next time I am in despotic country X and the local thugs are rubberhosing my private keys out of me, I'd like them to be slightly less convinced that both those inputs were mine :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: piotr_n on December 16, 2013, 05:40:32 PM
Good point piotr_n. It makes you think about the game-theoretic infinite regresses going on here. I would really appreciate it if some people write plausible code into wallets for CoinJoin, because next time I am in despotic country X and the local thugs are rubberhosing my private keys out of me, I'd like them to be slightly less convinced that both those inputs were mine :)
If it makes you feel better my Gocoin already supports it, though I won't be going into details because as I said: it's pretty useless and all we need to make it even more plausible is a software that can do it, not the people to do it with, nor actually doing it.

Actually even the satoshi client supports it, ever since they added the create/sign raw transaction APIs.

So if you will ever need a court witness to demonstrate how easy it is to make a CoinJoin transaction, you know how to find me. :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: phillipsjk on December 16, 2013, 05:58:29 PM
Are you kidding me?
This is not any new technology - personally I would not even call it an invention...
IMHO, it is rather a legal advise to use a plausible deniability in a possible cases against you.

...

CoinJoin does not create any additional privacy - it is actually less private than regular translations, since the process involves letting other people to know which coins are yours.
At best, it only gives you a reason to claim in court that not all the inputs were yours. The core of the "solution" here is a legal advise based on a technical properties of the bitcoin protocol.

Privacy is not only for plausible deniability in a legal case against you: as waxwing alluded to, it is also designed to give plausible deniability if local thugs figure out you frequent a Bitcoin accepting shop and likely have a fat wallet.

I am not convinced doing coinjoin transactions with yourself gives the same deniability. You would first have to split your funds (a good idea anyway with the relentless climb in value), then mix them. However, without other parties, the spitting and mixing with no external links will look obvious on a graph of transactions.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: kjj on December 16, 2013, 06:00:55 PM
IMHO, it is rather a legal advise to use a plausible deniability in a possible legal cases against you.

...

CoinJoin does not give you any additional anonymity. At best, it only gives you a reason to claim in court that not all the inputs were yours. The core of the "solution" here is a legal advise based on a technical properties of the bitcoin protocol.

Coinjoin will be worthless in court.  Your case is not going to prosecution when the sole evidence is a bitcoin transaction.  Instead, that transaction is going to be used as the basis for collecting gobs and gobs of further evidence.  At that point, the coinjoin isn't going to help you in court, it is going to hurt you, since it will be evidence that you knew what you were doing was wrong and tried to bury the evidence.

We need massive large scale joining for two reasons.  One, if joining is routine, then you doing it isn't going to be evidence of wrongdoing anymore.

Two is to muddy the waters for mass surveillance.  Right now, it is nearly trivial to trace transactions back and forth until it lands on a discoverable point.  Assume for the moment that the NSA has total visibility into some exchange's HTTPS traffic and can see every deposit address they provide to users.  When your chain of transactions lands on one of those addresses, the FBI knows they just need to request the customer info for whichever account uses that address, and they've got you.

Now imagine the world with coinjoin.  Your coins break up and land in a dozen joint transactions.  From there, each one hits a dozen more, and a dozen more, and so on.  Now there are thousands or millions of things to track, and almost all of them will not be yours.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: piuk on December 20, 2013, 12:17:37 AM
Sharedcoin transactions on blockchain.info lowered to 0.0001 BTC per repetition. On average 1.8 unique participants are joining in together each transaction, so over several repetitions there is a very good chance your transaction will be directly mixed with other users not just the sharedcoin server.

When did that happen? That's a major change that deserves a large announcement. Are they using BIP32 to derive the new addresses?

It's just for Sharedcoin transactions and not BIP32 yet but I hope that will be available soon.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on December 20, 2013, 12:21:57 AM
It's just for Sharedcoin transactions and not BIP32 yet but I hope that will be available soon.
That blockchain.info encourages address reuse is really the only significant complaint I have with your service.

Fixing that would be a great thing for privacy.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Trader Steve on December 20, 2013, 12:41:43 AM
Sharedcoin transactions on blockchain.info lowered to 0.0001 BTC per repetition. On average 1.8 unique participants are joining in together each transaction, so over several repetitions there is a very good chance your transaction will be directly mixed with other users not just the sharedcoin server.

When did that happen? That's a major change that deserves a large announcement. Are they using BIP32 to derive the new addresses?

It's just for Sharedcoin transactions and not BIP32 yet but I hope that will be available soon.

Great service!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: andytoshi on December 23, 2013, 02:42:52 AM
For those willing to futz around with raw transactions, I have a simple centralized coinjoiner available here:

https://www.wpsoftware.net/coinjoin/

Basically, once you submit a transaction this opens a 15-minute window for others to submit a transaction. After the 15 minutes are up, the transactions are merged and everybody signs the merged transaction. Once all the signatures are received, the joiner submits the transaction.

Thanks very much to my testers, in particular gmaxwell and midnightmagic, for their excellent suggestions and bug-finding.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Sarchar on December 28, 2013, 09:06:39 AM
Would this strategy work?

Take N>3 coin joiners wishing to mix their coins and give them an order: A to B to C to D to E and back to A, forming a circle.

A is responsible for creating the first transaction. We proceed in rounds, each person receives the transaction from the person before them and forwards it to the next guy, where E returns it to A to form a circle.

Each person, upon receiving the transaction does the following:

If the received transaction is completely signed, then either forward the transaction onto the next guy or broadcast it to the bitcoin network. Forward randomly so the next in line can't figure out who signed last.

Otherwise, randomly add unspent inputs (from the blockchain utxo set) to the transaction and then add some random outputs. The inputs and outputs don't need to be owned by the person adding them, but eventually you need to include your final inputs and outputs. Next, select a few inputs added in a previous round and remove them (in the first round there will be nothing to remove). Do the same for outputs. Don't remove inputs or outputs that others added because they will assume you're trying to cheat and leave.  In a later round, say 2 or 3, optionally sign one of your real inputs. If a successive person changes the tx again, you'll have to resign in another, later round.

Continue rounds until all fake inputs and outputs have been removed and the remaining inputs have been signed.

The obvious downsides include having to resign multiple times, the potential for lots of rounds, and not scaling well to large values of N. Any other thoughts?



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on December 28, 2013, 04:04:59 PM
If the parties immediately before and after you in the loop are conspiring (or sibyls) then they can always tell which inputs/outputs you added, so this is less private than some of the schemes proposed, in which N-2 malicious parties in an N way join cannot tell the 2 honest parties apart, for all N>2 (assuming you have underlying anonymous communication).

Your protocol sounds somewhat similar to a reencryption mix, except a reencryption mix doesn't need the chaff because the values are encrypted. A problem with using them for CJ is that protocols to prove faithful operation (e.g. to catch a party trying to break it) are computation and bandwidth intensive. One of their upsides (also— somewhat the case for yours) is that they are not so dependent on an underlying anonymity network (also the case for a MPC sort).

I think another potential issue in your protocol is that someone can just keep changing inputs/outputs forever to jam it, and you can't tell who is doing it (well, not anymore than you can tell who is who absent a jammer).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: NewLiberty on December 28, 2013, 04:47:14 PM
For those willing to futz around with raw transactions, I have a simple centralized coinjoiner available here:

https://www.wpsoftware.net/coinjoin/

Basically, once you submit a transaction this opens a 15-minute window for others to submit a transaction. After the 15 minutes are up, the transactions are merged and everybody signs the merged transaction. Once all the signatures are received, the joiner submits the transaction.

Thanks very much to my testers, in particular gmaxwell and midnightmagic, for their excellent suggestions and bug-finding.
Brought forward


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Sarchar on December 28, 2013, 04:48:08 PM
If the parties immediately before and after you in the loop are conspiring (or sibyls) then they can always tell which inputs/outputs you added, so this is less private than some of the schemes proposed, in which N-2 malicious parties in an N way join cannot tell the 2 honest parties apart, for all N>2 (assuming you have underlying anonymous communication).

I considered this, but there's the extra advantage that nobody knows for sure if a single entity in the loop is indeed a single entity.  Consider a figure 8, where node C is at the apex, and when he receives the transaction, it's passed around a similar set of other nodes and returning back to C, he forwards it on in the other loop.  You'd have to control a large number of nodes in such a network to be able to produce any real association.

Quote
Your protocol sounds somewhat similar to a reencryption mix, except a reencryption mix doesn't need the chaff because the values are encrypted. A problem with using them for CJ is that protocols to prove faithful operation (e.g. to catch a party trying to break it) are computation and bandwidth intensive. One of their upsides (also— somewhat the case for yours) is that they are not so dependent on an underlying anonymity network (also the case for a MPC sort).

Do you have any more information on how a reencryption mix works w.r.t. CoinJoin?

Quote
I think another potential issue in your protocol is that someone can just keep changing inputs/outputs forever to jam it, and you can't tell who is doing it (well, not anymore than you can tell who is who absent a jammer).

True - it's especially problematic as N goes larger.  Worst case, you have to assume everyone in the group is against you.  Limit yourself to a low number of rounds and try other peers if the # of rounds is exceeded.  You could theoretically build a list of trusted peers where previous successful CJs have been executed, too.  All this is just workaround for a fundamental problem, though.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Patel on January 04, 2014, 01:50:43 AM
Have any Bitcoin core developers said anything about adding CoinJoin into the protocol?

Bump for this thread because it is important for Bitcoin


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on January 04, 2014, 05:45:30 AM
Have any Bitcoin core developers said anything about adding CoinJoin into the protocol?

Bump for this thread because it is important for Bitcoin

You don't need to add it to the protocol, CoinJoin operates just fine at a strictly higher level. But I suppose you mean adding support to the reference wallet for CoinJoin transactions? I would not be surprised to see that happen, but someone needs to write the code first.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on January 04, 2014, 05:50:37 AM
Have any Bitcoin core developers said anything about adding CoinJoin into the protocol?
Bump for this thread because it is important for Bitcoin
It doesn't need to be added to the protocol, thats part of the point.

If instead you mean the integrated Bitcoin-qt wallet, Wumpus and I have both commented that we'd like to see it there. I'd like to see more external implementation done first.  Inside the wallet is good for getting users, but it's not good for protocol R&D.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: BurtW on January 04, 2014, 08:33:59 AM
Bitcoin has been very good to me over these last few years.  I would hate to see it killed by these various validation proposals.

As of this posting the bounty pool at: https://blockchain.info/address/3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk contains a bit over 31 BTC.

In order to stand behind my signature below and support this effort I offer the following matching donation (inspired by Theymos):

I will donate 5 BTC as soon as the total in the fund goes over 36 BTC.
Done.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: solex on January 04, 2014, 07:42:57 PM
Fantastic BurtW!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: BurtW on January 04, 2014, 08:16:45 PM
$34K should get this done (I hope).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Voodah on January 05, 2014, 12:46:28 AM
Is Blockchain.info's Shared Send part of their closed source stuff?

Is it implemented along these guidelines?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ShadowOfHarbringer on January 05, 2014, 11:07:50 AM
Is Blockchain.info's Shared Send part of their closed source stuff?

Is it implemented along these guidelines?
I join the question.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: BurtW on January 05, 2014, 03:43:23 PM
As far as I can tell from the posts up thread the blockchain.info Shared Send system is a basic implementation of the centralized version of the proposal.

You can use it without a blockchain.info wallet, and read all about it here:  

https://blockchain.info/wallet/send-shared

From the FAQ on that page:

Quote
How does it work?
Coins send with shared send will be matched up with another user. When a match is found your coins will be swapped breaking the transaction chain from your own wallet. Coins will be swapped with multiple users making the chain even harder to follow.

I found this very interesting (also from the same FAQ):

Quote
How can you guarantee that the transaction chain will be broken?
There is no guess work involved, each shared transaction analyzes up to 50,000 outputs or 250 levels deep in the blockchain to ensure the coins sent to the destination address are 100% untainted with the original coins.

The source code for taint analysis calculations can be found on the Blockchain Github Project


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Rassah on January 06, 2014, 12:51:46 AM
As far as I can tell from the posts up thread the blockchain.info Shared Send system is a basic implementation of the centralized version of the proposal.

It's actually a plain mixing service that was implemented a long time ago, way before CoinJoin was proposed. They have a separate CoinJoin style transaction option that does use CoinJoin, but as far as I know, requires you to use a blockchain.info wallet, since CoinJoin has special nonstandard transactions. Fees are different, too, with 0.5% for Send-Shared, and a standard 0.0001BTC transaction fee for CoinJoin (with multiple mixes suggested, each one costing an extra 0.0001BTC)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: BurtW on January 06, 2014, 12:54:11 AM
As far as I can tell from the posts up thread the blockchain.info Shared Send system is a basic implementation of the centralized version of the proposal.

It's actually a plain mixing service that was implemented a long time ago, way before CoinJoin was proposed. They have a separate CoinJoin style transaction option that does use CoinJoin, but as far as I know, requires you to use a blockchain.info wallet, since CoinJoin has special nonstandard transactions. Fees are different, too, with 0.5% for Send-Shared, and a standard 0.0001BTC transaction fee for CoinJoin (with multiple mixes suggested, each one costing an extra 0.0001BTC)
Thanks for the info.  I did not realize the two were different.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: andytoshi on January 07, 2014, 12:33:14 AM

since CoinJoin has special nonstandard transactions.
Coinjoin does not need nonstandard transactions, nor should it use them -- it is NP-hard to determine whether an ordinary bitcoin transaction might be a coinjoin.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Voodah on January 07, 2014, 07:19:58 AM
As far as I can tell from the posts up thread the blockchain.info Shared Send system is a basic implementation of the centralized version of the proposal.

It's actually a plain mixing service that was implemented a long time ago, way before CoinJoin was proposed. They have a separate CoinJoin style transaction option that does use CoinJoin, but as far as I know, requires you to use a blockchain.info wallet, since CoinJoin has special nonstandard transactions. Fees are different, too, with 0.5% for Send-Shared, and a standard 0.0001BTC transaction fee for CoinJoin (with multiple mixes suggested, each one costing an extra 0.0001BTC)

Interesting, and yes, fees.

Their Shared Coin has a per repetition fee as well.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Rassah on January 07, 2014, 03:33:44 PM
Their Shared Coin has a per repetition fee as well.

The 0.5% fee is the fee they charge for the service. The Shared Coin fee is a transaction fee that goes to the miners.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: prezbo on January 18, 2014, 08:07:38 AM
When there are two outputs to the same address with the same value (for example, two people want to donate 1 btc each to wikileaks), what prevents the service owner from swapping one of them with their own address?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on January 18, 2014, 09:31:28 AM
You would never sign it.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Qoheleth on January 18, 2014, 09:44:04 AM
You would never sign it.
But how would you know? If only one Wikileaks donation makes it into the final txn,  wouldn't each participant just assume it was their donation? How could they tell otherwise?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on January 18, 2014, 10:07:35 AM
You would never sign it.
But how would you know? If only one Wikileaks donation makes it into the final txn,  wouldn't each participant just assume it was their donation? How could they tell otherwise?

It's the way the protocol works.  You don't just have your balance lowed and some other balance somewhere raised; inbetween there is something called a 'transaction' specifying very specific things  which must be digitally signed.  

If you and someone else both send money to Wikileaks, you both sign your transactions.  The transactions, even for identical amounts, are not identical.  For one thing they will name different unspent txouts to spend; for another they'll have different timestamps.  For a third thing they will specify different addresses for "change" to come back to.  All of these things will be combined in a hash function to give your transaction a transaction ID which is unique.

If someone violates the protocol and sends some other guy's transaction to you to sign, your bitcoin client will look at it and say, "hey, I don't even own this particular txout that this transaction is trying to spend, and this isn't my transaction ID, and the timestamp is wrong, and the change address isn't any I've ever given out.  Heck, the change address is not even one I have a key to spend.  WTF?"  

Meanwhile, if someone tries to use a transaction that you have signed, but with a changed payee, it won't match the signature you put on it because the changed payee would make it have a different transaction ID.  It would be a transaction that doesn't match its signature, and he couldn't put it on the blockchain because every other client would reject it.



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on January 18, 2014, 10:09:01 AM
You would never sign it.
But how would you know? If only one Wikileaks donation makes it into the final txn,  wouldn't each participant just assume it was their donation? How could they tell otherwise?

A possible solution:

Each participant must have all the information from all participants to create the transaction for themselves (i.e. know all inputs and outputs).  If both Participant A and Participant B create unique identifiers for their outputs (both for 1BTC, both to address 1HB5XMLmzFVj8ALj6mfBsbifRoD4miY36v, but each with a unique identifier, X and Y, respectively), then when the Controller C specifies the full inputs and outputs to create the Transaction, it will also need to indicate the unique output identifiers.

When Participant A and Participant B create the Transaction from the information from Controller C, they will only create and sign a transaction where Controller C indicates the correct output amount, address, and identifier.  Participant A will only sign a transaction that has an output with identifier X and Participant B will only sign a transaction with identifier Y.

Participant A and B then send the correct signatures to the Controller who recreates the same transaction from the inputs and outputs, but now with the signatures of Participant A and B.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on January 18, 2014, 10:12:19 AM
If you and someone else both send money to Wikileaks, you both sign your transactions.  The transactions, even for identical amounts, are not identical.  For one thing they will name different unspent txouts to spend; for another they'll have different timestamps.  For a third thing they will specify different addresses for "change" to come back to.  All of these things will be combined in a hash function to give your transaction a transaction ID which is unique.

There is no way in a transaction to determine what is "my output" and "your output".  That is what makes coin join work, but also brings up the problem originally posed.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on January 18, 2014, 10:28:06 AM
If you and someone else both send money to Wikileaks, you both sign your transactions.  The transactions, even for identical amounts, are not identical.  For one thing they will name different unspent txouts to spend; for another they'll have different timestamps.  For a third thing they will specify different addresses for "change" to come back to.  All of these things will be combined in a hash function to give your transaction a transaction ID which is unique.

There is no way in a transaction to determine what is "my output" and "your output".  That is what makes coin join work, but also brings up the problem originally posed.

Your output is the one that you have the key to spend.  What's hard about that?  There may be no way for anyone *else* to tell whose output is whose, but you are the guy who created that key pair, you still have the private key, and you know damn well whether a given output has the corresponding public key.  In a coinjoin everyone can identify their own outputs.  But they can't distinguish anyone else's, and no third-party observer can distinguish them at all.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on January 18, 2014, 10:33:19 AM
If you and someone else both send money to Wikileaks, you both sign your transactions.  The transactions, even for identical amounts, are not identical.  For one thing they will name different unspent txouts to spend; for another they'll have different timestamps.  For a third thing they will specify different addresses for "change" to come back to.  All of these things will be combined in a hash function to give your transaction a transaction ID which is unique.

There is no way in a transaction to determine what is "my output" and "your output".  That is what makes coin join work, but also brings up the problem originally posed.

Your output is the one that you have the key to spend.  What's hard about that?  There may be no way for anyone *else* to tell whose output is whose, but you are the guy who created that key pair, you still have the private key, and you know damn well whether a given output has the corresponding public key.  In a coinjoin everyone can identify their own outputs.  But they can't distinguish anyone else's, and no third-party observer can distinguish them at all.

We might be talking about different outputs.  The original question was not about the TxOut that is an input to the CoinJoin transaction, but instead the outputs of the CoinJoin Transaction itself. AFAIK, there is no way for me to get Wikileak's private key. :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: prezbo on January 18, 2014, 10:49:56 AM
You would never sign it.
But how would you know? If only one Wikileaks donation makes it into the final txn,  wouldn't each participant just assume it was their donation? How could they tell otherwise?
My reasoning exactly.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: prezbo on January 18, 2014, 11:59:26 AM
If you and someone else both send money to Wikileaks, you both sign your transactions.  The transactions, even for identical amounts, are not identical.  For one thing they will name different unspent txouts to spend; for another they'll have different timestamps.  For a third thing they will specify different addresses for "change" to come back to.  All of these things will be combined in a hash function to give your transaction a transaction ID which is unique.
I suggest you carefully read the first post of this thread. We aren't discussing the usual bitcoin transactions here but coinjoin specifics.

When Participant A and Participant B create the Transaction from the information from Controller C, they will only create and sign a transaction where Controller C indicates the correct output amount, address, and identifier.  Participant A will only sign a transaction that has an output with identifier X and Participant B will only sign a transaction with identifier Y.
I guess one could include an indentifier in the tx_out using OP_DROP, that might work.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Crowex on January 18, 2014, 03:25:56 PM
It's a bit more convoluted but if everybody signs a dummy transaction with identifiers for the outputs then you could just remove the identifiers and everybody signs again if the transaction is exactly the same in terms of tx_out and tx_in.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: prezbo on January 18, 2014, 04:16:34 PM
It's a bit more convoluted but if everybody signs a dummy transaction with identifiers for the outputs then you could just remove the identifiers and everybody signs again if the transaction is exactly the same in terms of tx_out and tx_in.
I don't quite understand, what exactly do you mean?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Crowex on January 18, 2014, 04:36:02 PM
I hope I've understood the problem correctly.

I just meant that if you didn't want to include the identifiers in the actual multi signature coin join transaction then everybody would sign a dummy transaction.
This dummy transaction would contain everybody's outputs with identifier so that they know that the controller hasn't redirected any duplicate payments to himself. The dummy transaction would not be broadcastable or valid but everybody would use it to agree to the tx_outs and tx_ins by everybody signing it.
 Once they had agreed by all signing the controller could create a valid transaction with the same inputs and outputs but without identifiers and then they would all sign this.
 
..or maybe I've misunderstood something?
 


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: prezbo on January 18, 2014, 04:58:32 PM
I hope I've understood the problem correctly.

I just meant that if you didn't want to include the identifiers in the actual multi signature coin join transaction then everybody would sign a dummy transaction.
This dummy transaction would contain everybody's outputs with identifier so that they know that the controller hasn't redirected any duplicate payments to himself. The dummy transaction would not be broadcastable or valid but everybody would use it to agree to the tx_outs and tx_ins by everybody signing it.
 Once they had agreed by all signing the controller could create a valid transaction with the same inputs and outputs but without identifiers and then they would all sign this.
 
..or maybe I've misunderstood something?
 

I see. The problem is if the service chooses the identifiers they would just send the two users different dummy transactions to sign, with such identifiers both would be convinced the donation is actually their own, so I think it has to be users who choose identifiers beforehand. I think just adding (random) id's to the outputs that are dropped off the stack using OP_DROP wold work though - so for each output I choose random number, add it (as <rnd number> OP_DROP), send inputs and outputs to the service, when I get the transaction back I check if the outputs match with what I sent, if they do I sign the transaction.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Crowex on January 18, 2014, 05:07:10 PM
I meant the users do choose their own identifiers, the dummy transaction is created with these.
I just thought the identifiers might be able mark out the transaction as a coin join transaction if they were part of the transaction which might not be desirable.
I'm not really familiar with OP_DROP, maybe it achieves the same thing.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on January 18, 2014, 05:55:31 PM
But how would you know? If only one Wikileaks donation makes it into the final txn,  wouldn't each participant just assume it was their donation? How could they tell otherwise?

Reference the original offers in the join request, so that anyone considering signing the transaction can make sure that not just the correct outputs, but also the correct number of outputs are present. My Python implementation does this.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: prezbo on January 18, 2014, 06:03:21 PM
But how would you know? If only one Wikileaks donation makes it into the final txn,  wouldn't each participant just assume it was their donation? How could they tell otherwise?

Reference the original offers in the join request, so that anyone considering signing the transaction can make sure that not just the correct outputs, but also the correct number of outputs are present. My Python implementation does this.
Can you link to your implementation, please? I'd like to have a look because I don't fully understand.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on January 18, 2014, 06:08:42 PM
https://github.com/maaku/coinjoin


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: prezbo on January 18, 2014, 06:24:32 PM
https://github.com/maaku/coinjoin

thanks!

edit: hoped there would be a protocol draft of some sorts, unfortunately don't have the time to work it out how it works from the code.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Murphant on January 18, 2014, 09:39:36 PM
The way I understand it, the problem can be phrased in the following way.

Suppose that both Alice (address A) and Mallory (address M) want to buy an item from seller Steve. Alice and Mallory create a CoinJoin transaction (A,M) -> (S,M') where M' is another address controlled by Mallory. Alice signs the transaction as she sees that the correct amount is sent to Steve and expects to receive her service. However, Mallory may also later claim that he sent the money to Steve and that he should receive the service. From Steve's point of view, both claims are equally valid.

I believe that maaku's solution would work as long as the join requests are signed and kept by each party. One downside of this is that it might reduce the anonymity of the system since each user can later prove the other user's intentions to a third party.

Reference the original offers in the join request, so that anyone considering signing the transaction can make sure that not just the correct outputs, but also the correct number of outputs are present. My Python implementation does this.

Another, simpler solution would be to make sure to never send funds to a public address in a CoinJoin transaction and for sellers to always use fresh receiving addresses.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: prezbo on January 18, 2014, 09:58:48 PM
Suppose that both Alice (address A) and Mallory (address M) want to buy an item from seller Steve. Alice and Mallory create a CoinJoin transaction (A,M) -> (S,M') where M' is another address controlled by Mallory. Alice signs the transaction as she sees that the correct amount is sent to Steve and expects to receive her service. However, Mallory may also later claim that he sent the money to Steve and that he should receive the service. From Steve's point of view, both claims are equally valid.

This is not exactly what I meant.

Alice uses input A and sends 1 btc to address S. Bob uses input B and sends 1 btc to address S. Legit coinjoin transaction would look like [A, B] -> [(S,1), (S,1)], but here the service could change it to  [A, B] -> [(S,1), (X,1)], where X is service's address. Since Alice isn't aware of Bob's transaction and vice versa none would suspect that the (S,1) output is not theirs, thus signing the transaction. As I said I don't really understand how maaku solves this problem. As I see it the only way to solve it is for users to provide some kind of a nonce with the outputs that can later be checked.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Murphant on January 18, 2014, 10:05:53 PM
Suppose that both Alice (address A) and Mallory (address M) want to buy an item from seller Steve. Alice and Mallory create a CoinJoin transaction (A,M) -> (S,M') where M' is another address controlled by Mallory. Alice signs the transaction as she sees that the correct amount is sent to Steve and expects to receive her service. However, Mallory may also later claim that he sent the money to Steve and that he should receive the service. From Steve's point of view, both claims are equally valid.

This is not exactly what I meant.

Alice uses input A and sends 1 btc to address S. Bob uses input B and sends 1 btc to address S. Correct coinjoin transaction would look like [A, B] -> [(S,1), (S,1)], but here service could change it to  [A, B] -> [(S,1), (X,1)], where X is services' address. Since Alice isn't aware of Bob's transaction and vice versa none would suspect the (S,1) output is not theirs, thus signing the transaction. As I said I don't really understand how maaku solves this problem. As I see it the only way to solve it is for users to provide some kind of a nonce with the outputs that can later be checked.

I was imagining more of a decentralized CoinJoin where people got together to create the transaction instead of asking a service to do it, but both situations are similar. In the centralized case, maaku's solution does not seem to work as it requires communication between the participants. However, sellers not reusing addresses that receive payments does solve the problem even in the centralized case as Alice and Bob cannot simultaneously think that they are paying Steve.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: prezbo on January 18, 2014, 10:07:48 PM
However, sellers not reusing addresses that receive payments does solve the problem even in the centralized case as Alice and Bob cannot simultaneously think that they are paying Steve.

That is true, but the protocol shouldn't limit users in such a way. But you are correct, in a world with perfect information this is not a problem.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: piotr_n on January 18, 2014, 10:12:12 PM
Of course you cannot trust any service more than to provide you the entire transaction you get to sign - not only its hash.
Then you make sure that at least one of its outputs satisfies your input.
And then you get to know more about a possible connections between the txs inputs and output. Which inforamtion, who knows, maybe you'll be able to sell one day in a future so you may want to keep it :)

Its really not as cool as you think, unless you build a huge and anonymous infrastrtuctere for it.
Who's going to do it? Jesus is dead for all I know. We're talking about tor at least, otherwise it dont make no sense. And what: SR style, or p2p? Is there even a p2p in tor? Who's going to pay for it to profit from it? Or it won't happen...

Anyway, understand that the weakest link here is the ip that sends your money to the network. Sharing the tx with your pals or strangers picked by some system to increase privacy - give me a break


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Crowex on January 18, 2014, 10:52:28 PM
However, sellers not reusing addresses that receive payments does solve the problem even in the centralized case as Alice and Bob cannot simultaneously think that they are paying Steve.

That is true, but the protocol shouldn't limit users in such a way. But you are correct, in a world with perfect information this is not a problem.

the example was a donation address, it would be difficult to imagine this changing for each donation

Quote
As I said I don't really understand how maaku solves this problem

nor me, his approach seems to be more de-centralised, but I can't quite grasp how he can guarantee that this problem can't occur


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on January 19, 2014, 02:06:00 AM
Quote
maaku's solution does not seem to work as it requires communication between the participants

No, the server can include this signed information in the message it sends to participants.

The solution is simple: each participants sign what outputs they want to see on the chain. No participant signs the transaction unless they receive invoices separately signed by every single input which cumulatively add up to the transaction. Cryptographic blinding is used to make sure that users can specify hidden outputs not subject to this check.

Quote
the example was a donation address, it would be difficult to imagine this changing for each donation

Google "bitcoin stealth address"


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: kjj on January 19, 2014, 06:58:34 AM
Rather than adding more steps and layers to the system, I propose ignoring the chance of the joiner operator skimming merges.

If it bothers anyone, they can send their donation to a new address in their own wallet, then send that to the donation address in the normal way.  This operation could even be scripted.  (Your wallet searches google for your payment address.  If there are no results, it is more or less impossible for another coin join user to be sending to that address.  If there are results for it outside of the explorer sites, it automatically switches into 2-stage mode.)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Crowex on January 19, 2014, 05:17:12 PM
Quote
maaku's solution does not seem to work as it requires communication between the participants

No, the server can include this signed information in the message it sends to participants.

The solution is simple: each participants sign what outputs they want to see on the chain.
Are they signing a set of all outputs randomly mixed up? This wouldn't solve the problem.
Or are they signing their individual outputs? There is no anonymity now.

Quote
No participant signs the transaction unless they receive invoices separately signed by every single input which cumulatively add up to the transaction.
I can't see how this helps to solve the problem.

Quote
Cryptographic blinding is used to make sure that users can specify hidden outputs not subject to this check.
I'm not really sure what you're saying here. If you're talking about a blind signature protocol can you be more specific about how it can work in this case.

Quote
the example was a donation address, it would be difficult to imagine this changing for each donation
Quote

Google "bitcoin stealth address"
I didn't say that it wasn't possible to change the address for each donation. This could be done without stealth addresses. I just think that most people asking for donations will just put up an address and ask people to send coins to it. :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on January 19, 2014, 08:27:28 PM
They sign a list of their outputs, some of which are explicit, some of which are blinded. The blind signed outputs are separately checked (the server blind signed them without knowing what they were, so couldn't later skim them without detection). So each participant has a list of non-mixed outputs signed by their owners, and a list of blinded outputs signed by the server before it had a chance to do any funny business. Together these should add up to the entire transaction (modulo facilitator and miner fees).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Murphant on January 30, 2014, 10:35:31 PM
I am looking to compare different implementations of CoinJoin, but I don't feel like going through 20 pages. Would someone be considerate enough to list them here, or maybe in the original post?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ajsubtronic on January 31, 2014, 08:25:55 AM
where can i find a comparison of coinjoin? is there a website?  :o ???


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Amitabh S on January 31, 2014, 07:01:34 PM
Is the bounty still open? I can see the funds are still there.

How do I cite CoinJoin?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gaston909 on February 01, 2014, 07:18:26 PM
This is a great idea!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on February 02, 2014, 03:07:04 AM
Hey all,

I've spent the last two/three months working on a CoinJoin implementation that I call Coinmux.  It is open source and mostly P2P / decentralized.

The source is in Ruby (JRuby) and on Github: https://github.com/michaelgpearce/coinmux.  The project home page has quite a bit of information so its worth reading through.

Here is an example transaction created with Coinmux for 3 participants: http://test.webbtc.com/tx/963d6a87c2f0c3e715d0550539ffa3fed0731abd4b3b081d52f29891592f400d.  (You'll notice some change address re-use due to this making my testing easier.)  The commands used were:
bin/coinmux --participants 3 --amount 0.0625 --output-address muTpTtZSGyEbH2xt47SS3J45XG4Dx5F9DE --change-address mwU8DyTw2fBQmyCDJNRyHBDXk7KUDJ7vEA
bin/coinmux -p 3 -a 0.0625 -o mynWtUyX3UmEfvbU6oESCuXWJXA2vjbJw8 -c mjfCi3t1jBsizt9MKtNDxpn3qdd73CRyhQ --data-store p2p?port=14142
bin/coinmux -p 3 -a 0.0625 -o mpexwCiUhDVNYEMWqzoLn8C4UkMdDdZCQo -c mjfCi3t1jBsizt9MKtNDxpn3qdd73CRyhQ --data-store p2p?port=14143


Its setup to use Testnet (i have not tried it on mainnet as its alpha software!).  It can be easily configured to use either a local filesystem to communicate or P2P over the Internet.  The filesystem communication is fairly robust while the P2P Internet mode works reasonably well, but will require a lot more testing and work to prevent bad actors.

There is a protocol specification: https://github.com/michaelgpearce/coinmux/blob/master/docs/spec.md
The peers communicate using JSON messages.  None of the connected peers can associate input with output ownership from the messages themselves, only by IP addresses.  This is a pretty big privacy leak, but can be solved by integrating Tor or Freenet to communicate the messages.

I've only implemented a command line interface for now, but the CLI is event driven and built with a GUI in mind.  I don't want non-developers trying it yet so a CLI seems like a good place to start.

The easiest way to try it out locally is to use "--data-store filesystem" and invoke the command from a couple of different terminal sessions on your computer.  Again, its setup to use Testnet, so you need a Testnet wallet / private keys.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on February 02, 2014, 04:08:03 AM
... and of course, you can generate an address from bitaddress.org and get some Testnet coins from TP's faucet.

https://www.bitaddress.org/bitaddress.org-v2.6.5-SHA1-fa763c2bbc97e1b37bc6d3945647aed869ec8c18.html?testnet=true (https://www.bitaddress.org/bitaddress.org-v2.6.5-SHA1-fa763c2bbc97e1b37bc6d3945647aed869ec8c18.html?testnet=true)
http://tpfaucet.appspot.com/ (http://tpfaucet.appspot.com/)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on February 06, 2014, 04:50:27 AM
Hey all, i just released v0.1.0 of Coinmux (followed quickly by 0.1.1 to fix a couple of minor UI issues) which is my milestone for having things functional on Testnet.  I'm ready to move on to building a GUI to sit on top of the code already there and make it easier to use.

But before I do that, I want to try it out on the Bitcoin MAINNET and with some STRANGERS on the Internet!  I've never done either!

I'm hoping a couple of you are brave enough to try it with me.  I want to do a small CoinJoin transaction, 0.001 BTC (a little less than 1USD) .  To get a suitable wallet, I simply went to bitaddress.org, created a new wallet for the CoinJoin input, and then sent 0.0015 BTC to it from my main wallet (a little extra for miner fees).  Any address with a balance > 0.0015 will work, but I would not recommend using your primary wallet.  There shouldn't be any issues, but better to be safe than sorry.

If you are interested, there is a link to download the latest Java client here: https://github.com/michaelgpearce/coinmux (https://github.com/michaelgpearce/coinmux).  To use the Mainnet Bitcoin network instead of Testnet, you'll simply need to set an environment variable COINMUX_ENV=production.  On a Unixy OS, you should be able to just type this command in the terminal/console where you run the Java command.  On Windows, i believe you use the SET command, but its been years since i've used Windows.

I'm on Freenode IRC at #coinmux via webchat: https://webchat.freenode.net (https://webchat.freenode.net).  Hopefully one or two people will come find me.

Thanks!!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on February 06, 2014, 06:08:04 AM
Hey all.  Short update, here is the first transaction that Coinmux has created on the main Bitcoin network and a transcript of the output as shown on the console from one of the peers.

https://blockchain.info/tx/b5b8c60836d22964138d05c0bd42f9f06ccef81cd3150641a9436f6173ded6c0 (https://blockchain.info/tx/b5b8c60836d22964138d05c0bd42f9f06ccef81cd3150641a9436f6173ded6c0)

(Its kinda cool that it confuses Blockchain.info's "Estimated BTC Transacted" for the transaction!)

Code:
~/Downloads $ COINMUX_ENV=production java -jar coinmux-latest.jar -p 2 -a 0.001 -o 1GQypfLSim1xndF5jupFrNoJi9U9LFLLzp -c 1Jd7Hiv43MeHMkPKU4bbSJqvQeZxqLj5iu
Enter your private key:
***************************************************
Starting...
[Participant]: Finding coin join message
[Participant]: No available coin join
   [Director]: Inserting coin join message
   [Director]: Inserting status message
   [Director]: Waiting for inputs
[Participant]: Finding coin join message
[Participant]: Inserting input
[Participant]: Waiting for other inputs
   [Director]: Inserting message verification message
   [Director]: Waiting for outputs
[Participant]: Inserting output
[Participant]: Waiting for other outputs
   [Director]: Inserting transaction message
   [Director]: Waiting for signatures
[Participant]: Inserting transaction signatures
[Participant]: Waiting for completed
   [Director]: Publishing transaction
   [Director]: Completed
[Participant]: Completed - Transaction ID: b5b8c60836d22964138d05c0bd42f9f06ccef81cd3150641a9436f6173ded6c0
CoinJoin successfully created!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Rassah on February 07, 2014, 09:47:00 PM
How does Coinmux find other users? And if it doesn't, can it implement a Bitmessage chan?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gweedo on February 07, 2014, 09:53:55 PM
How does Coinmux find other users? And if it doesn't, can it implement a Bitmessage chan?

It uses a java p2p library http://tomp2p.net/ to create DHT of users.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on February 07, 2014, 10:36:48 PM
How does Coinmux find other users? And if it doesn't, can it implement a Bitmessage chan?

It uses a java p2p library http://tomp2p.net/ to create DHT of users.

Yep. It uses TomP2P. My initial implementation was going to use Freenet, but I didn't want to require needing any external applications running.

In Coinmux, I call the communication layer a Data store in the code. There is an implementation using TomP2P, the file system and one that uses only memory for testing purposes. It's straight forward to implement these and I did also consider Bitmessage. Unfortunately, the Bitmessage JSON API looked to be very heavily tied to a specific user in the UI with no way to create a new user via API or send messages as a specific user. This lead me to stop investigating it further.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: piotr_n on February 07, 2014, 10:51:11 PM
Good stuff - I hope it will explode


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on February 08, 2014, 01:24:49 AM
Good stuff - I hope it will explode

Thanks! There's a bit of a trust issue with any new Bitcoin software project (especially with one that asks you to enter your private key!), so i'm having a hard time finding people to try it out. Hopefully time will be the solution to that.  I'm planning on giving a presentation at the SF Bitcoin Meetup to increase CoinJoin and Coinmux awareness.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gweedo on February 08, 2014, 01:59:48 AM
Good stuff - I hope it will explode

Thanks! There's a bit of a trust issue with any new Bitcoin software project (especially with one that asks you to enter your private key!), so i'm having a hard time finding people to try it out. Hopefully time will be the solution to that.  I'm planning on giving a presentation at the SF Bitcoin Meetup to increase CoinJoin and Coinmux awareness.

I think this is a great start, your protocol needs a little work and I am writing something off of it.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on February 08, 2014, 03:55:06 AM
Good stuff - I hope it will explode

Thanks! There's a bit of a trust issue with any new Bitcoin software project (especially with one that asks you to enter your private key!), so i'm having a hard time finding people to try it out. Hopefully time will be the solution to that.  I'm planning on giving a presentation at the SF Bitcoin Meetup to increase CoinJoin and Coinmux awareness.

I think this is a great start, your protocol needs a little work and I am writing something off of it.

Feel free to share your thoughts.  I haven't gotten any feedback on the protocol yet.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on February 08, 2014, 04:37:30 AM
Good stuff - I hope it will explode

Thanks! There's a bit of a trust issue with any new Bitcoin software project (especially with one that asks you to enter your private key!), so i'm having a hard time finding people to try it out. Hopefully time will be the solution to that.

Testnet is the proper solution to that.  Let people test it using testnet coins and the problem about the bitcoin private key risk goes away.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on February 08, 2014, 04:46:08 AM
Good stuff - I hope it will explode

Thanks! There's a bit of a trust issue with any new Bitcoin software project (especially with one that asks you to enter your private key!), so i'm having a hard time finding people to try it out. Hopefully time will be the solution to that.

Testnet is the proper solution to that.  Let people test it using testnet coins and the problem about the bitcoin private key risk goes away.

I totally agree. It is set up right now to work off testnet by default (the user needs to set an environment variable to connect to Mainnet). Unfortunately, the testnet knowledgeable audience is a lot smaller, and CoinJoining needs multiple people running it at the same time.  Hopefully in time, this will resolve itself.

And i'm not sure i really made this clear in my original posting, but the only thing needed to run Coinmux is Java and the Jar file available from http://github.com/michaelgpearce/coinmux (http://github.com/michaelgpearce/coinmux).  You don't need to have BitcoinQT installed and it does not require downloading the blockchain to your computer.  I'm trying to make something that an average Bitcoin user will be able to understand and use.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on February 09, 2014, 04:21:31 PM
After reviewing your coinmux code, I can identify a problem.  And a solution.

The good: no evidence appears in the blockchain about whose inputs are associated with which output.  That's part 1 of the solution.  

The bad:  Someone eavesdropping on the protocol messages, including a nonparticipant, can associate both inputs and outputs with IP addresses.  Fixing this is completely necessary before coinmux is viable, especially since the primary attack on network privacy is via traffic analysis.

The solution:  Implement a Dining Cryptographers Network among the participants, and you are immune to traffic analysis.  Here's a wikipedia article about the Dining Cryptographers' problem which it's based on.  

http://en.wikipedia.org/wiki/Dining_cryptographers_problem

In a DCN, topologically the participants are arranged in a circle, where Alice is next to Zebulon and Bob, Bob is next to Alice and Carol, Carol is next to Bob and Estelle, etc.  

Each adjacent *pair* of participants generates a shared key stream - which can be as simple as repeatedly incrementing a nonce and encrypting it to get each new block of the key stream.  You can use Diffie-Hellman key agreement to create a shared secret to key the stream.

Then each participant publishes XOR of the keystreams he shares with his two adjacent participants and the message he wishes to broadcast.  When all of these published messages are XOR'd together, the broadcast message magically appears because each keystream has been XOR'd with it twice thereby cancelling out the keystreams.  Different participants can write on different parts of the block, creating different messages.  And the participants can iteratively publish the block with updates, if they use a different hunk of their shared keystreams each time.  I'm thinking that the obvious implementation here has the 'block' that's getting updated include the image of a transaction.  The participants would each add their inputs and their outputs, then signatures (not valid if anybody changes outputs) in a later round.

The benefit is that nobody monitoring the protocol messages can tell where the messages (or the parts of messages, IE inputs and outputs) originated, even if they saw every last message and every published XOR.  Not even the participants can tell anything about the origins of any part of the message written by someone else.

It has some limitations;  For example if two people both try to write on the same blob of bits at the same time, then the 'message' that appears in that blob is binary garbage.  So there are conventions about 'reserving' blocks in previous rounds, where you agree that whoever reserved the block can write things in it and others shouldn't, and ways to detect which participant has broken the convention so that they can be cut out of subsequent rounds, etc.  Also, it requires O(n^2) overhead where n is the number of participants, so it doesn't scale well past a few dozen people per mux. It's kinda clunky.  

But it does work, and it's completely trustless in that NOBODY can de-anonymize, or even distinguish, the participants.  


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on February 09, 2014, 09:36:16 PM
The cryptographer in me says I should do this, while the engineer in me thinks this may be (too) difficult to implement.  (And I'm a much stronger engineer than cryptographer!)  I still haven't totally wrapped my head around it from an engineering perspective, I'll do that once I get the GUI for Coinmux working.  But I am a believer in keeping Coinmux simple.  Bitcoin has some warts, but its really pretty simple as far as crypto goes.  I'd like to keep that same philosophy for Coinmux.

One of the easiest things I can do to limit who sees the the IP address of published messages is to encrypt them.  Both the Director and Participants have a public key as part of their first message broadcast.  Other than the Director's first announcement message and the Director's subsequent status updates, all other messages can be encrypted so only the involved parties can decrypt the messages.  The IP address would still be leaked, but only those in the mix can make sense of what's going on.  While not a cryptographically perfect solution, this would make traffic analysis more difficult and less useful. This may make put Coinmux in the "good enough to be useful" category. This wouldn't be great, but as an engineer, I realize everything has tradeoffs.

The Coinmux protocol itself was not designed to hide IP addresses/participants, only to facilitate communication.  As i first imagined what the protocol would look like, I had always considered using Freenet for message communication and to provide anonymity at the "network layer." Coinmux was designed with a Freenet like system in mind with the following properties: untraceable message insertion, immutable messages, ability to post multiple messages to a known location/key, and all messages publicly retrievable from a known key.  TomP2P allows for all of these except the untraceable message insertion.  TomP2P was really only selected due to it being available as a Java library and ready to be embedded in an application.  Well, that and it's faster than Freenet.

I'd rather try to solve this at the network layer than the protocol layer.  This allows for the network layer to be easily changed (I have 3 implementations now - TomP2P, the filesystem, and a memory implementation used for testing).  I am still actively considering switching to using Freenet as originally planned. Bitmessage is another option, though i believe their API is inadequate.  Maybe there is a way to use Tor.  Or maybe some new Altcoin becomes a viable option in the future. Or maybe i can push harder on TomP2P: is it possible to shuffle messages around the TomP2P peer network before inserting them to provide anonymity?  The protocol doesn't care who inserted the message, only that it gets inserted.  As it is right now, none of the options outside of TomP2P meet the requirement of "easy to use" as they require an additional application running.

Anyway, there are lots of different options and all of them have tradeoffs, but I am pretty open to anything that will work.  I'll need to let what you wrote settle on my brain a little more.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: randomguy7 on February 09, 2014, 11:13:18 PM
Maybe you can use i2p (https://geti2p.net) for the network layer (comes with nice java bindings :)).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on February 10, 2014, 12:44:25 AM
Maybe you can use i2p (https://geti2p.net) for the network layer (comes with nice java bindings :)).

I had looked at I2P for this project previously but ruled it out due to it not behaving as a data store (which Freenet and TomP2P both are).  Looking at the I2P documentation again, they did mention someone adding Tahoe-LAFS support (https://geti2p.net/en/comparison/freenet (https://geti2p.net/en/comparison/freenet)), but I don't have any information about that.

I also looked at I2P before I knew about TomP2P.  Since I2P supports both TCP and UDP (https://geti2p.net/en/comparison/tor (https://geti2p.net/en/comparison/tor)), it may be possible to combine it with TomP2P.  AFAIK, Tor does not support UDP so TomP2P + Tor is not possible.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on February 10, 2014, 12:48:39 AM
Maybe you can use i2p (https://geti2p.net) for the network layer (comes with nice java bindings :)).

I had looked at I2P for this project previously but ruled it out due to it not behaving as a data store (which Freenet and TomP2P both are).  Looking at the I2P documentation again, they did mention someone adding Tahoe-LAFS support (https://geti2p.net/en/comparison/freenet (https://geti2p.net/en/comparison/freenet)), but I don't have any information about that.

I also looked at I2P before I knew about TomP2P.  Since I2P supports both TCP and UDP (https://geti2p.net/en/comparison/tor (https://geti2p.net/en/comparison/tor)), it may be possible to combine it with TomP2P.  AFAIK, Tor does not support UDP so TomP2P + Tor is not possible.

I just saw this: https://geti2p.net/en/docs/applications/supported#decentralized-file-storage (though i can't view eepsites right now since i don't have I2P installed).  I2P definitely goes back on my investigation list. :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Trader Steve on February 10, 2014, 04:50:56 AM

Question: Does anybody know how Blockchain.info implements their CoinJoin?



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gweedo on February 10, 2014, 04:57:04 AM

Question: Does anybody know how Blockchain.info implements their CoinJoin?

https://github.com/blockchain/Sharedcoin it is written in JavaEE


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Trader Steve on February 10, 2014, 05:53:16 AM

Question: Does anybody know how Blockchain.info implements their CoinJoin?

https://github.com/blockchain/Sharedcoin it is written in JavaEE

Thanks!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on February 11, 2014, 06:12:45 AM
After reviewing your coinmux code, I can identify a problem.  And a solution.

The good: no evidence appears in the blockchain about whose inputs are associated with which output.  That's part 1 of the solution.  

The bad:  Someone eavesdropping on the protocol messages, including a nonparticipant, can associate both inputs and outputs with IP addresses.  Fixing this is completely necessary before coinmux is viable, especially since the primary attack on network privacy is via traffic analysis.

The solution:  Implement a Dining Cryptographers Network among the participants, and you are immune to traffic analysis.  Here's a wikipedia article about the Dining Cryptographers' problem which it's based on.  

http://en.wikipedia.org/wiki/Dining_cryptographers_problem

In a DCN, topologically the participants are arranged in a circle, where Alice is next to Zebulon and Bob, Bob is next to Alice and Carol, Carol is next to Bob and Estelle, etc.  

Each adjacent *pair* of participants generates a shared key stream - which can be as simple as repeatedly incrementing a nonce and encrypting it to get each new block of the key stream.  You can use Diffie-Hellman key agreement to create a shared secret to key the stream.

Then each participant publishes XOR of the keystreams he shares with his two adjacent participants and the message he wishes to broadcast.  When all of these published messages are XOR'd together, the broadcast message magically appears because each keystream has been XOR'd with it twice thereby cancelling out the keystreams.  Different participants can write on different parts of the block, creating different messages.  And the participants can iteratively publish the block with updates, if they use a different hunk of their shared keystreams each time.  I'm thinking that the obvious implementation here has the 'block' that's getting updated include the image of a transaction.  The participants would each add their inputs and their outputs, then signatures (not valid if anybody changes outputs) in a later round.

The benefit is that nobody monitoring the protocol messages can tell where the messages (or the parts of messages, IE inputs and outputs) originated, even if they saw every last message and every published XOR.  Not even the participants can tell anything about the origins of any part of the message written by someone else.

It has some limitations;  For example if two people both try to write on the same blob of bits at the same time, then the 'message' that appears in that blob is binary garbage.  So there are conventions about 'reserving' blocks in previous rounds, where you agree that whoever reserved the block can write things in it and others shouldn't, and ways to detect which participant has broken the convention so that they can be cut out of subsequent rounds, etc.  Also, it requires O(n^2) overhead where n is the number of participants, so it doesn't scale well past a few dozen people per mux. It's kinda clunky.  

But it does work, and it's completely trustless in that NOBODY can de-anonymize, or even distinguish, the participants.  

I've thought through this some more.  I could implement this, and it wouldn't be terribly difficult. In fact, I think I can even implement it without changing my current communication API (see my data store requirements in a previous post).  My main problem with it is that it only solves one thing that i can't solve by simply encrypting every message published to the Director and a DCN doesn't solve a larger issue.

With using TomP2P and adding message encryption, the Director can still connect IP addresses to Inputs/Outputs but the Participants cannot.  A DCN will solve this.  But an outside observer would most likely still be able to connect IP addresses with the resulting published transaction just by watching the Coinmux network and watching the Bitcoin network.  While the observer cannot directly correlate an IP to a specific Bitcoin output address, just knowing the transaction and the IP addresses involved is still a pretty big leaked piece of information.

If I use an anonymity network (i.e. Freenet), it would solve both issues.  Neither the participants nor the director would be able to associate an IP address to a specific input/output, and an observer would not be able to associate a transaction to any IP addresses.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on February 11, 2014, 11:22:57 PM
I like the DCN because it's elegant and comes with an honest-to-goodness proof of security against all traffic analysis.  Even with just two honest participants, nobody else can tell which of them sent a message even if they  can see (and even modify!) every message in the whole network.

I guess I trust anonymity networks less, because I consider them to be potentially fakeable; I can imagine code running on a network of servers that presents all honest participants an interface indistinguishable to them from an anonymity network while compromising their communication.  In an anonymity network, you only need to compromise the two or three or four nodes that your messages are getting routed through.  Or the routing tables that tell you where they are.  Or the messages from the DNS servers that relay that information to you.  Or .... 

I've been reading about the lengths that eavesdroppers are going to, and that just seems like something they'd do.  Or something which, if they haven't done it yet, they eventually will.  Maybe I'm excessively cynical; I just think that if you leave a target surface, then sooner or later someone is going to exploit it.  Massive sybil attacks, fake nodes, backbone router trojans, etc...  They've drawn the line at nothing so far.  The NSA even went so far as to put a zero-day exploit against the browser that TOR is used with at a fake site, intercepted traffic on backbone nodes, and redirected requests at it in realtime from computers where TOR traffic had been detected.  And that's the government - the people who are supposed to be on our side. What the heck are straight-up crooks ready to do?





Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: marcus_of_augustus on February 12, 2014, 12:28:25 AM
Quote
the people who are supposed to be on our side. What the heck are straight-up crooks ready to do?

You're assuming that the "straight out crooks" aren't the NSA? (All evidence to the contrary.)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on February 12, 2014, 01:31:25 AM
Quote
the people who are supposed to be on our side. What the heck are straight-up crooks ready to do?

You're assuming that the "straight out crooks" aren't the NSA? (All evidence to the contrary.)

I'm just saying that they can't possibly be the worst crooks out there.  I mean, hell, I figure we know who the NSA are.  If they were really the worst crooks out there we *WOULDN'T* know who they are. 

They had public PR problems, boo-hoo, because they accidentally hired someone honest.  My heart bleeds for them.  But the absolute worst crooks wouldn't have that problem.

People keep forgetting that the NSA isn't the only thing like itself that exists in the world; probably not even the best.  And people keep forgetting that among those things, the NSA is probably only about average in terms of its honesty and morality.  And that just addresses government agencies, not even starting on whatever parasitic criminal organizations have infiltrated them. Hell, if the NSA is doing all the stuff in the Snowden files, and failed to even keep that a secret, I hate to imagine what NAPSS, BBN, GRU, SAVAK, Mossad etc, are up to.



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on February 16, 2014, 10:24:23 PM
Hey all.  I released a new version of Coinmux that now has a graphical user interface.  It still defaults to using the Testnet network, but you can now easily change that in the preferences menu if you are adventurous with your Bitcoin.

You can view an animated GIF with two participants mixing their coins on the Coinmux homepage http://www.coinmux.com (http://www.coinmux.com).

Here is a full-sized direct link to the animated GIF http://coinmux.com/images/animated-coinmux.gif (http://coinmux.com/images/animated-coinmux.gif).

And of course, all of the code is available on Github at: http://github.com/michaelgpearce/coinmux (http://github.com/michaelgpearce/coinmux).



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: cypherdoc on February 17, 2014, 12:49:25 AM

Question: Does anybody know how Blockchain.info implements their CoinJoin?

https://github.com/blockchain/Sharedcoin it is written in JavaEE

Thanks!

how well is it working?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: philipmicklon on February 17, 2014, 05:15:23 AM
Hey all.  I released a new version of Coinmux that now has a graphical user interface.  It still defaults to using the Testnet network, but you can now easily change that in the preferences menu if you are adventurous with your Bitcoin.

And of course, all of the code is available on Github at: http://github.com/michaelgpearce/coinmux (http://github.com/michaelgpearce/coinmux).



It looks awesome! Keep up the good work!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on February 17, 2014, 08:40:03 AM
Hey all.  I released a new version of Coinmux that now has a graphical user interface.  It still defaults to using the Testnet network, but you can now easily change that in the preferences menu if you are adventurous with your Bitcoin.

And of course, all of the code is available on Github at: http://github.com/michaelgpearce/coinmux (http://github.com/michaelgpearce/coinmux).



It looks awesome! Keep up the good work!

Thanks! I forgot what a pain in the ass making a desktop app is. This was a good reminder. :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: piotr_n on February 18, 2014, 01:26:05 PM
What about adding this into server based clients with matching via the server? (Electrum, Blockchain.info, Mycelium...)
And make them to not store the logs?
That would probably be the quickest way to get whoever run these servers arrested by US nazi law enforcement (aka national security services) - at some airport somewhere in the world... :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Rassah on February 20, 2014, 10:19:08 PM
What about adding this into server based clients with matching via the server? (Electrum, Blockchain.info, Mycelium...)
And make them to not store the logs?
That would probably be the quickest way to get whoever run these servers arrested by US nazi law enforcement (aka national security services) - at some airport somewhere in the world... :)

I think Mycelium has CoinJoin as one of the things on their future To Do list. If not, I'll add it  ;D


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: piotr_n on February 20, 2014, 11:25:06 PM
Yeah, but I'm just saying that it's pretty worthless if they store the logs.
And if they don't store the logs... well, that's probably illegal, at least in US and Russia :)

The only safe CoinJoin solution I see is p2p based, with some tricky encryption.

But still I think this will never beat services like bitcoinfog, assuming that they indeed remove the logs as they claim.
I mean: you deposit your money and withdraw ~98% of it, while your deposit is still unspent - destroying a log at this moment leaves absolutely no traces and it's actually a perfect "privacy for the real world".
Though it has two big disadvantages, over p2p coin mixing:
1) You need to trust the service to really destroy the logs
2) It doesn't come for free.

So I also find CoinJoin as a nice and possibly useful project, but IMHO centralizing it around a server would just defeat the purpose.
Not to mention that it would be dangerous for whoever runs this server.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: okashira on February 20, 2014, 11:28:30 PM
Yeah, but I'm just saying that it's pretty worthless if they store the logs.
And if they don't store the logs... well, that's probably illegal, at least in US and Russia :)

The only safe CoinJoin solution I see is p2p based, with some tricky encryption.

But still I think this will never beat services like bitcoinfog, assuming that they indeed remove the logs as they claim.
I mean: you deposit your money and withdraw ~98% of it, while your deposit is still unspent - destroying a log at this moment leaves absolutely no traces and it's actually a perfect "privacy for the real world".
Though it has two big disadvantages, over p2p coin mixing:
1) You need to trust the service to really destroy the logs
2) It doesn't come for free.

So I also find CoinJoin as a nice and possibly useful project, but IMHO centralizing it would just defeat the purpose.

Is that exactly what Darkcoin is doing? Decentralized and encrypted coinjoin.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ShadowOfHarbringer on February 20, 2014, 11:34:44 PM
Yeah, but I'm just saying that it's pretty worthless if they store the logs.
And if they don't store the logs... well, that's probably illegal, at least in US and Russia :)

The only safe CoinJoin solution I see is p2p based, with some tricky encryption.

But still I think this will never beat services like bitcoinfog, assuming that they indeed remove the logs as they claim.
I mean: you deposit your money and withdraw ~98% of it, while your deposit is still unspent - destroying a log at this moment leaves absolutely no traces and it's actually a perfect "privacy for the real world".
Though it has two big disadvantages, over p2p coin mixing:
1) You need to trust the service to really destroy the logs
2) It doesn't come for free.

So I also find CoinJoin as a nice and possibly useful project, but IMHO centralizing it around a server would just defeat the purpose.
Not to mention that it would be dangerous for whoever runs this server.
Piotr_n, you seem to be an intelligent and experienced low level (C++ or lower) programmer.

Wouldn't it suit you better simply to write your own CoinJoin implementation instead of just talking about it ?

After studying your posts on these forums, I am fairly certain that you have the skill. The question is, whether you want to do something with it, or just keep discussing the topic ?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on February 20, 2014, 11:48:05 PM
Yeah, but I'm just saying that it's pretty worthless if they store the logs.
And if they don't store the logs... well, that's probably illegal, at least in US and Russia :)

The only safe CoinJoin solution I see is p2p based, with some tricky encryption.

But still I think this will never beat services like bitcoinfog, assuming that they indeed remove the logs as they claim.
I mean: you deposit your money and withdraw ~98% of it, while your deposit is still unspent - destroying a log at this moment leaves absolutely no traces and it's actually a perfect "privacy for the real world".
Though it has two big disadvantages, over p2p coin mixing:
1) You need to trust the service to really destroy the logs
2) It doesn't come for free.

So I also find CoinJoin as a nice and possibly useful project, but IMHO centralizing it around a server would just defeat the purpose.
Not to mention that it would be dangerous for whoever runs this server.

The CoinJoin client I wrote, Coinmux https://github.com/michaelgpearce/coinmux (https://github.com/michaelgpearce/coinmux) is P2P and open source.  Its still in its early development phase though.  Having spent the last 10 years building web applications, building a true P2P application is definitely more difficult than building a server-side solution (which you have to trust).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: piotr_n on February 21, 2014, 12:04:34 AM
After studying your posts on these forums, I am fairly certain that you have the skill. The question is, whether you want to do something with it, or just keep discussing the topic ?
Honestly, I just don't need it, so I don't really feel the urge to create such a thing.

If the solution was easy I would have probably done it even when not needing it, but in such case someone else would have already done it before me. The problem is that it doesn't seem so much straight forward. At the other hand providing feedback on the forum is easy - this I can do by the way of having another beer before sleep, nothing hard about it :)

Still I believe it can be done and since it can be done, someone will do it one day - it is just a matter of time.
But to design it well, you first need to define what kind of privacy this technology is supposed to target.
I mean you can identify a different kind of threads.
The first one is of course that all the internet traffic is recorded.
The second: that the peers with who you are sharing your transaction may (and surely will, after you launch the project) be malicious - e.g I can imagine a network of bots flooding the p2p system with many txs to themselves, just to learn about your transactions.
A third... probably also something.

But if you just want to do a "p2p CoinJoin", without caring about any of these things, then you might just as well look for people to share your tx with at IRC; you all make a joined tx and each party signs manually its part. There already is a software that can do it - not only mine, for what I know.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on February 21, 2014, 12:38:10 AM

It's possible to implement coinjoin that can be trusted, even if nobody deletes the logs.  You can secure it against the ability to associate inputs or outputs with each other, or with IP addresses, to an opponent using blockchain evidence, server logs, or realtime packet sniffing. 

The "tricky cryptography" is a stream cipher with multiple keys, each key being known to exactly two participants  (aka, a dc-net).  There is a requirement that there must be more than one honest participant in the "join" whose stream key is unknown to the opponent.   An opponent listening to packet traffic can associate inputs/outputs with any participant whose key that opponent has compromised, so if there is only one honest participant whose key is uncompromised, the opponent can associate inputs/outputs with that participant by process of elimination.

I'll implement it if nobody else has by the time I get around to it, but it isn't my highest priority right now; I have a higher-paying bounty to pursue in programming, which is (arguably) even more important to Bitcoin in terms of adoption and remaining decentralized, and that is to limit the size of the blockchain download needed to run a full node.





Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on February 21, 2014, 02:00:10 AM
Cryddit, did you read the op? Blind signatures require no honest nodes.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on February 21, 2014, 09:21:21 AM
Cryddit, did you read the op? Blind signatures require no honest nodes.

True.  But Blind signatures alone are not sufficient to implement reliably untraceable coinmixing.

In the solution with blind signatures, you still have someone listening to the packet traffic able to associate inputs and outputs with particular IP addresses - and therefore with each other. 


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ShadowOfHarbringer on February 21, 2014, 09:53:52 AM
After studying your posts on these forums, I am fairly certain that you have the skill. The question is, whether you want to do something with it, or just keep discussing the topic ?
Honestly, I just don't need it, so I don't really feel the urge to create such a thing.
(...)
Still I believe it can be done and since it can be done, someone will do it one day
Ok then, so you prefer to sit and wait for someone to do it for you.

Wow
So laziness
Much not giving fuck
Such a shame
Wow


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on February 21, 2014, 10:36:08 AM
In the solution with blind signatures, you still have someone listening to the packet traffic able to associate inputs and outputs with particular IP addresses - and therefore with each other. 

Yes, you need an anonymous network. But we have solutions for that...


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on February 21, 2014, 06:38:25 PM

The extant solution for anonymous networks (Tor) requires extra steps that many users won't do, many of those who do will get wrong, and many of those who get wrong won't be aware that they've got wrong.  It is subject to attacks where the compromises of a few selected machines outside your control (your route and exit nodes) can cause your privacy to be sacrificed even if every other node in the mix is honest.  And it is subject to traffic rerouting in transit on the backbone, which is known to be done by at least one sophisticated attacker specifically in response to the fact that it is Tor traffic in the first place. That attacker, and presumably others, specifically reroutes Tor traffic through attack sites which use browser flaws to compromise the machines that originate the traffic.

Tor was a good design once; but the attacks on it are in place, sophisticated, only getting worse, and not easily detectable from the originating node.  So I think that its usefulness is closer to its end than to its beginning.  While Tor may still be good more than 90% of the time, I'm not willing to trust it in the long run. Nor am I willing to trust that people using it can keep their machines from getting compromised by reroutes to attack sites which are using zero-day exploits against their browsers.  Most of them don't even fully disable scripts and cookies in their Tor browser sessions.

The dc-net solution requires you to trust only that there exists at least one other node (ANY participating node) that is not compromised; that's a strictly stronger guarantee than Tor.  If it's built into the protocol then it involves no steps that many users will not do, nor steps that users will attempt but do wrongly.  It is not dependent on the security of machines other than those directly participating, and does not expose machines to attack via a browser as Tor in normal use generally does.

Further, its guarantees are orthogonal to those provided by a (properly functioning) Tor network;  With Tor alone, (if the critical path machines and your own remain uncompromised) you can't associate nodes with IP addresses, but if you're sniffing packet traffic you can associate inputs and outputs with particular nodes.  With the DC-net alone, you can't associate inputs or outputs with particular nodes, but if you're sniffing packet traffic you can produce a list of the IP addresses of the nodes.   So I claim the proper solution is to implement the DC-net as the "fundamental" basis of the protocol, and then let people use it over Tor if they want the extra layer of obfuscation and can correctly use Tor.   That way, even if they fail at configuring Tor, or get unlucky with their Tor network routing, or fail in keeping their own machines secure while using Tor, they still have some fundamental amount of protection.  And if they use Tor correctly, they get additional protection that the DC-net alone could not provide.




Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: randomguy7 on February 21, 2014, 08:22:53 PM
After studying your posts on these forums, I am fairly certain that you have the skill. The question is, whether you want to do something with it, or just keep discussing the topic ?
Honestly, I just don't need it, so I don't really feel the urge to create such a thing.
(...)
Still I believe it can be done and since it can be done, someone will do it one day
Ok then, so you prefer to sit and wait for someone to do it for you.

Wow
So laziness
Much not giving fuck
Such a shame
Wow

Wtf maybe you should contribute something on your own (code, money) instead of telling other people which type of unpaid work they should do for you in their free time.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: hozer on February 22, 2014, 01:40:49 AM
After studying your posts on these forums, I am fairly certain that you have the skill. The question is, whether you want to do something with it, or just keep discussing the topic ?
Honestly, I just don't need it, so I don't really feel the urge to create such a thing.
(...)
Still I believe it can be done and since it can be done, someone will do it one day
Ok then, so you prefer to sit and wait for someone to do it for you.

Wow
So laziness
Much not giving fuck
Such a shame
Wow

Wtf maybe you should contribute something on your own (code, money) instead of telling other people which type of unpaid work they should do for you in their free time.

My thoughts exactly. If you are serious about anonymity and privacy, PAY FOR IT. Cause you have this big problem of how do you test it to make sure it's working. I'm sure the EFF or some other non-profit could be found to hold some money to pay for development and testing.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ShadowOfHarbringer on February 22, 2014, 01:43:02 PM
After studying your posts on these forums, I am fairly certain that you have the skill. The question is, whether you want to do something with it, or just keep discussing the topic ?
Honestly, I just don't need it, so I don't really feel the urge to create such a thing.
(...)
Still I believe it can be done and since it can be done, someone will do it one day
Ok then, so you prefer to sit and wait for someone to do it for you.

Wow
So laziness
Much not giving fuck
Such a shame
Wow

Wtf maybe you should contribute something on your own (code, money) instead of telling other people which type of unpaid work they should do for you in their free time.
WTF, I already did. Look at my sig, genius.

And that is NOT what I am talking about. I am actually criticising piotr_n for coming to this thread and complaining, instead of coding it himself.
And (as he confirmed himself) he could actually do it, he just does not care.

I cannot code CoinJoin anyway, too complex for my skill level.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: therealbigcoin on March 02, 2014, 04:58:35 PM
Is this the thing darkcoin will implement?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: philipmicklon on March 02, 2014, 06:52:53 PM
Is this the thing darkcoin will implement?
Yes, I believe this is the general idea behind the darksend feature. But the darksend feature hasn't been rolled out yet.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on March 03, 2014, 01:46:22 AM
The extant solution for anonymous networks (Tor) requires extra steps that many users won't do,
Tor is actually quite easy to bundle, and some other programs (like torchat) already do. I'd assume that someday there would be bitcoin clients offered with bundled tor.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on March 03, 2014, 01:52:39 AM
The extant solution for anonymous networks (Tor) requires extra steps that many users won't do,
Tor is actually quite easy to bundle, and some other programs (like torchat) already do. I'd assume that someday there would be bitcoin clients offered with bundled tor.

I was looking at Orchid (a Tor library) today and saw Mike Hearn's name on a github pull request: https://github.com/subgraph/Orchid/pull/9 with the comment: "I need this fix for bitcoinj."


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on March 03, 2014, 02:16:13 AM
The dc-net solution requires you to trust only that there exists at least one other node (ANY participating node) that is not compromised; that's a strictly stronger guarantee than Tor

My understanding of dc-nets is it is impractical to stop denial-of-service. Generally speaking the stronger the anonymity of the mixing, the more difficult to deal with denial-of-service.

I have more comments about what actually works for anonymity at another thread (https://bitcointalk.org/index.php?topic=439357.msg5454853#msg5454853).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: therealbigcoin on March 03, 2014, 07:42:22 AM
The extant solution for anonymous networks (Tor) requires extra steps that many users won't do,
Tor is actually quite easy to bundle, and some other programs (like torchat) already do. I'd assume that someday there would be bitcoin clients offered with bundled tor.

I was looking at Orchid (a Tor library) today and saw Mike Hearn's name on a github pull request: https://github.com/subgraph/Orchid/pull/9 with the comment: "I need this fix for bitcoinj."

how about security? I think most exit nodes are under nsa controll, how could that improved?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gweedo on March 03, 2014, 07:54:00 AM
The extant solution for anonymous networks (Tor) requires extra steps that many users won't do,
Tor is actually quite easy to bundle, and some other programs (like torchat) already do. I'd assume that someday there would be bitcoin clients offered with bundled tor.

I was looking at Orchid (a Tor library) today and saw Mike Hearn's name on a github pull request: https://github.com/subgraph/Orchid/pull/9 with the comment: "I need this fix for bitcoinj."

how about security? I think most exit nodes are under nsa controll, how could that improved?

I am pretty sure since bitcoind nodes support only tor interactions and many people run them in that state, their would be no reason to hit an exit node if you don't want to, since you would be routed to the bitcoind nodes on tor.

Even if you do hit an NSA controlled exit node, the worst they can do is act like a cancer node to you, and give you false data, and you send rejected transactions on the network.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on March 11, 2014, 08:55:57 AM
Comments please on my technical statement herein?

Yes, I think CoinJoin should be a very good start.  But do any really decentralised and fully working implementations of CoinJoin exist already?  I don't think so and would be interested to know if they are.

I'm not aware of any either but don't let that deter you from using one of the already existing solutions even if they aren't perfect.

A decentralized CoinJoin will have difficulty forming transactions (including unequal or equal transaction amounts) that look like this if anyone can join:

https://blockchain.info/tx/e4abb15310348edc606e597effc81697bfce4b6de7598347f17c2befd4febf3b?show_adv=true

A sharedcoin transaction will look something like this: https://blockchain.info/tx/e4abb15310348edc606e597effc81697bfce4b6de7598347f17c2befd4febf3b (picked at random). As you can see multiple inputs and outputs make the determining the actual sender and receiver more difficult.

The server does not need to keep any logs and transactions are only kept in memory for a short time. However If the server was compromised or under subpoena it could be force...

Because the way it must work is the users sign the transaction first with their requested outputs, then in the second round they sign their payments as inputs to the transaction. If the payment inputs are less than the total, then the transaction is invalid. There is no way to determine who cheated and rate limit them. Thus the saboteur can stomp on every attempt to create a CoinJoin transaction and destroy the decentralized system.

DarkCoin says they can solve this by charging a fee, but you will see I originally proposed that idea in the CoinJoin thread and the requirement is all the participants must be permanently identified and then must use divide-and-conquer to whittle down to who was the saboteur. But identification defeats the mixing!

Thus I have not yet seen a workable decentralized CoinJoin that can scale. And I don't expect one.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on March 11, 2014, 02:13:16 PM
AnonMint, Every post you've made here has been error and confusion.

The very first post in the thread points out that decentralized versions take more work because of the anti-DOS proofing. A couple posts down (https://bitcointalk.org/index.php?topic=279249.msg2984051#msg2984051) I give some examples of how it can be done.

You're presuming a broken model that I don't believe anyone here has ever suggested. You'd always being the protocol by specifying the inputs in which you intend to sign. Signature authority over inputs is the principle scarcity that allows you to may the system dos-attack resistant. After the inputs are signed, outputs can be specified in a cheat proof way, and then the only avenue for disruption is refusing to sign which can be addressed by blacklisting your inputs (and other rate limiting tokens) and restarting.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on March 11, 2014, 03:41:59 PM
AnonMint, Every post you've made here has been error and confusion.

Keep your ad hominem attacks out of it please. I asked kindly for technical comments.

The very first post in the thread points out that decentralized versions take more work because of the anti-DOS proofing.

And my post to which you are replying is in fact explaining the DOS (denial-of-service) is insoluble if you can't identify the participants in order to rate-limit them.

[A couple posts down](https://bitcointalk.org/index.php?topic=279249.msg2984051#msg2984051) I give some examples of how it can be done.

And again in that post you admit there is a DOS problem. You didn't solve it. And you can't solve it in a decentralized setting unless you have non-ephemeral identification of the participants. Which is precisely the point of my prior post to which you are replying

You're presuming a broken model that I don't believe anyone here has ever suggested.

Incorrect. What I wrote is functionally equivalent to what you described. The point is the transaction can be jammed in the final round.

Since you didn't see the equivalence let me explain it. I thought you were smart enough to deduce such things. I chose to let the signatures of inputs go in the second and final round and point to a transaction because I envisioned using ring signatures. And the transaction won't be valid (blockchain will reject it) if the inputs are less than the outputs, so my version is just as safe as yours. And the DOS problem is equivalent. Come on you are a math guy, you can surely see that without me needing to explain it you.

And if you think about it a while you will realize, by inverting the operations and using a ring signature, mine has advantages suchas that not all have to sign in the first round before proceeding to the second round (they get excluded from second round too). Yet the DOS issue remains in the final.

You'd always being the protocol by specifying the inputs in which you intend to sign. Signature authority over inputs is the principle scarcity that allows you to may the system dos-attack resistant. After the inputs are signed, outputs can be specified in a cheat proof way, and then the only avenue for disruption is refusing to sign which can be addressed by blacklisting your inputs (and other rate limiting tokens) and restarting.

Well now you see your error. You can reread my post again, and admit I was correct.

From your upthread post:

If a party fails to sign, everyone else is convinced that its because they are jamming the process (intentionally or maliciously) and then can all ban (ignore in the future) whatever costly identity they used to enter the mix, or — if there is no other mechanism— that particular txin which they used.

And exactly how do you propose to identify that adversary in a decentralized setting?  ;) My point is you can't, at least not without breaking anonymity, and anonymity was the entire point of mixing.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on March 11, 2014, 05:40:08 PM
And my post to which you are replying is in fact explaining the DOS (denial-of-service) is insoluble if you can't identify the participants in order to rate-limit them.
And again in that post you admit there is a DOS problem. You didn't solve it. And you can't solve it in a decentralized setting unless you have non-ephemeral identification of the participants. Which is precisely the point of my prior post to which you are replying
You are asserting it, (over and over again) but it doesn't make it true. It was explained in adequate detail previously enough for other people to understand it and implement tools that address it.

Quote
Incorrect. What I wrote is functionally equivalent to what you described. The point is the transaction can be jammed in the final round.
It's actually not, since it's not actually possible in the Bitcoin protocol to do what (it sounds like) you're describing, but more importantly performing the operation in that order defeats the anti-dos. If you lead with the inputs they provide a trivial anti-dos mechanism.

Quote
And exactly how do you propose to identify that adversary in a decentralized setting?  ;) My point is you can't, at least not without breaking anonymity, and anonymity was the entire point of mixing.
Because they fail to sign. There is no need to identify them beyond identifying their input coins to achieve rate limiting, and no need to identify the input/output correspondence.

I'll repeat it, since maybe other people are having problems following the link:

An example (using the blind signature approach, simplified for equal values) is that each participant cryptographically blinds their desired output, and then signs their blinded output using the keys from their intended inputs.  They then present to the group their inputs (and assuming those inputs are not black-listed) everyone in the group blind-signs each of the outputs. Then everyone connects again with new connections (e.g. a new circuit in tor) and presents their unblinded outputs and their signatures. Now everyone knows that all of the provided outputs were from authorized parties— but not the correspondence. The transaction is composed and— back on their original connections— they all sign. If someone doesn't sign, it means they're jamming the process, everyone blacklists theirs inputs and automatically restarts.  The network naturally rate limits them via the finite supply of available outputs.  (of course, if you want you can attack other valuable identities to the first step, like coin burning or what have you, if the natural network rate limit isn't enough).

This is just one example of a way to address this. There are several other ones possible— and discussed early on in this thread.  Other ones include publishing commitments and then if the process fails having everyone reveal their intended outputs (which they then discard and never use) in order to avoid being banned, or using an anonymous accumulator instead of blind signing to control access.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: wheatstone on March 11, 2014, 07:28:29 PM
Keep your ad hominem attacks out of it please. I asked kindly for technical comments.

I think you misunderstand what an ad hominem attack is. If gmaxwell had called you are blithering fool, that would qualify. As it were, he pointed out that your posts have been incorrect and confused, and then backed it up with specifics. That's not attacking the man, that's attacking the content (which was full of errors and confused).

You might try answering gmaxwell's assertion that ratelimiting is, in fact, not an issue instead of merely stipulating that it is insoluble.

For my own part, I would question that there is a non-ephemeral identification of participants, namely by requiring the inputs first. The inputs would serve as an identification and if any problems were subsequently to arise, they could be blacklisted.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: solex on March 11, 2014, 07:54:50 PM
I have had the AnonyMint on ignore for months now and my experience of this forum is much improved. Shame that quotes still occur, however.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Crowex on March 11, 2014, 08:24:02 PM
For my own part, I would question that there is a non-ephemeral identification of participants, namely by requiring the inputs first. The inputs would serve as an identification and if any problems were subsequently to arise, they could be blacklisted.

But if the inputs are really not connectable to the outputs could I jam the transaction by using outputs that add up to greater than my inputs?
In this case could anyone work out that it was me that put in the outputs that made the transaction not balance?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on March 11, 2014, 09:33:59 PM
But if the inputs are really not connectable to the outputs could I jam the transaction by using outputs that add up to greater than my inputs?
In this case could anyone work out that it was me that put in the outputs that made the transaction not balance?
No, instead they prevent you from doing that in the first place.

E.g. in the blinded example: When you provide your inputs everyone sees your values, and you specify "this is a blinded X btc output" and they all sign that output with a key which corresponds to X btc, and obviously refuse to do so if your input isn't at least X.  Later you reveal your output, and they know its value by which keys signed it.

This isn't to say that implementing any of this is interesting. The state machine to achieve success in all cases ends up very complicated. (This is also why I think that blinded but quasi-centeralized e.g. where a semi trusted party coordinates are probably more interesting for initial deployment).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: itsunderstood on March 11, 2014, 11:34:46 PM
Anonymint is one of these who thinks bitcoin is broken and will pursue that to the end.  He is interesting to talk to, but still ignored by the world.  If bitcoin is broken, then go away, thanks.

Now whats all this about bitcoin using the Naval asset called "Tor"?  Seems legit.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on March 12, 2014, 04:12:26 AM
And my post to which you are replying is in fact explaining the DOS (denial-of-service) is insoluble if you can't identify the participants in order to rate-limit them.

And again in that post you admit there is a DOS problem. You didn't solve it. And you can't solve it in a decentralized setting unless you have non-ephemeral identification of the participants. Which is precisely the point of my prior post to which you are replying

You are asserting it, (over and over again) but it doesn't make it true. It was explained in adequate detail previously enough for other people to understand it and implement tools that address it.

Quote
Incorrect. What I wrote is functionally equivalent to what you described. The point is the transaction can be jammed in the final round.

It's actually not, since it's not actually possible in the Bitcoin protocol to do what (it sounds like) you're describing, but more importantly performing the operation in that order defeats the anti-dos. If you lead with the inputs they provide a trivial anti-dos mechanism.

And precisely how do you identify which input is the adversary when the correlation of the inputs and the outputs is necessarily cryptographically blinded?

As far as I can see, you can't.

I am confident that now you see the functionally w.r.t. to anti-DOS of what I described and what you described are equivalent, i.e. any one who is the least bit mathematical can see that the salient mathematical foundation of CoinJoin is that the correlation between the inputs and outputs must be cryptographically blinded, thus it makes no difference mathematically for anti-DOS whether the inputs or outputs are specified in the first round of the protocol.

As for whether my proposed protocol of putting the outputs in the first round is implementable on the Bitcoin blockchain, it is irrelevant since we are talking about a general protocol here and an altcoin could be designed to allow a transaction where outputs and inputs can be signed to point to the transaction nonce (a hash of any number) plus the addresses of the inputs OR outputs. I didn't bother to check how Bitcoin signs the transactions, because it is conceptually irrelevant to our discussion. Perhaps in Bitcoin the signature of the transaction must include all the inputs AND outputs. The reason I presented my formulation (in fact I mentioned the ring signatures idea from Adam Back in the Zerocoin thread months ago in this thread) is because it is more powerful conceptually than one gmaxell described. I thought gmaxell would appreciate that since I think he is a math guy.

Quote
And exactly how do you propose to identify that adversary in a decentralized setting?  ;) My point is you can't, at least not without breaking anonymity, and anonymity was the entire point of mixing.

Because they fail to sign. There is no need to identify them beyond identifying their input coins to achieve rate limiting, and no need to identify the input/output correspondence.

I'll repeat it, since maybe other people are having problems following the link:

I will quote from your more detailed description upthread.

This is an extremely interesting idea.  Could you elaborate on how the Zerocoin transaction stages map to the stages of CoinJoin transaction creation?

For non-decenteralized coincoin, you simply pass around a transaction and sign it. It's a single sequence and an atomic transaction, you'd make two loops through the users, one to discover the inputs and outputs, and another to sign them. There really aren't stages to it.

Making a decenteralized CoinJoin secure, private, and resistant to DOS attack (people refusing to sign in order to make it fail) is trickier... for the privacy and dos attack resistance you can use ZC:

Presume the participants for a transaction are sharing some multicast medium and can all communicate.  They need to accomplish the task of offering up inputs (txid:vout) for inclusion in the transaction and then, in an unlinkable way, providing outputs to receive their coins.

Each participant connects and names bitcoin input(s), an address for change (if needed), and the result of performing a ZC mint transaction to add to the ZC accumulator. They sign all this with the keys for the corresponding inputs proving its theirs to spend.

Then all the parties connect again anonymously and provide ZC redeem transactions which specify where the resulting bitcoins should go.

Zerocoin (ZC) requires a trusted party to generate the parameters, thus it is the antithesis of decentralized, so you have a logical error above.

https://github.com/Zerocoin/libzerocoin/wiki/Generating-Zerocoin-parameters

This isn't the only way to do this in a decentralized manner, the way to do it with blind signatures is fairly similar:

Each participant connects, names Bitcoin input(s), an address for change (if needed), a key for blind signing, and a blinded hash of the address they want paid. They sign all this with the keys for the corresponding inputs proving its theirs to spend.

Each participant then blind signs the blinded hashes of all participants (including themselves).

And so how can you correlate which input is the one who didn't blind sign all?

As far as I can see, you can't.

I've dug very deep (into cryptography research papers) lately into trying to find a way to delink inputs from outputs without a trusted party, and I have realized that mathematically it can't be done. It is a fundamental conceptualization.

The only way to delink without anti-DOS is to use an accumulator commitment scheme with common NP-hard parameters that can be presented in an NIZKP (non-interactive zero knowledge proof) which will always require a trusted party to generate the common parameters for the trapdoor math.

This is just one example of a way to address this. There are several other ones possible— and discussed early on in this thread.  Other ones include publishing commitments and then if the process fails having everyone reveal their intended outputs (which they then discard and never use) in order to avoid being banned, or using an anonymous accumulator instead of blind signing to control access.

That isn't anti-DOS.

Each spender commits a hash of his intended output. Then everyone does the blinded protocol. If the blinded protocol fails, everyone including the adversary reveals the link between inputs and outputs, because by definition the output key must be an abundant resource so that it is not costly to reveal it and generate a new one to try again.

, or using an anonymous accumulator instead of blind signing to control access.

A ZKP + accumulator isn't decentralized as I explained above.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on March 12, 2014, 06:57:34 AM
And precisely how do you identify which input is the adversary when the correlation of the inputs and the outputs is necessarily cryptographically blinded?
As far as I can see, you can't.
The input is identified by the fact that it fails to sign a provably valid transaction.

Quote
And exactly how do you propose to identify that adversary in a decentralized setting?  ;) My point is you can't, at least not without breaking anonymity, and anonymity was the entire point of mixing.
Quote
Because they fail to sign. There is no need to identify them beyond identifying their input coins to achieve rate limiting, and no need to identify the input/output correspondence.
...by the fact that they fail to sign.

Quote
I will quote from your more detailed description upthread.
You're now quoting from a different approach. I listed several. The one which I specifically identified in our discussion here used plain chaum blinded signature. (The others should work fine too— but if you mix things up its hard to have a coherent discussion)

Quote
Zerocoin (ZC) requires a trusted party to generate the parameters, thus it is the antithesis of decentralized, so you have a logical error above.
ZC initialized with an RSA UFO has no trusted initialization, in fact— they make the updates much larger but thats harmless for data not going in the blockchain. Additionally if you do use the efficient trusted initialization the ZC accumulator approach still has perfect zero knoweldge. Compromise of the state allows someone to make false proofs (dos attacks in this context).   Though these points are not terribly relevant because I wasn't talking about the ZC approach.

Quote
And so how can you correlate which input is the one who didn't blind sign all?
Because they refuse to sign the transaction. Everyone knows that all the outputs provided in the transaction were the unique outputs provided by the inputting parties (because they have been signed by all participants). So they all know the transaction is valid.

(of course, if it fails before you finish the unblinding, — you explain below how thats handled)

Quote
I've dug very deep (into cryptography research papers) lately into trying to find a way to delink inputs from outputs without a trusted party, and I have realized that mathematically it can't be done. It is a fundamental conceptualization.
The only way to delink without anti-DOS is to use an accumulator commitment scheme with common NP-hard parameters that can be presented in an NIZKP (non-interactive zero knowledge proof) which will always require a trusted party to generate the common parameters for the trapdoor math.
You've apparently not done much research at all, as you are not aware of RSA UFOs (which are described in some of the very first papers about those sorts of accumulators), you are not aware of non-trapdoor NIZK (e.g. fiat-shamir/random oracle only), and ... apparently you're not aware of anything as simple as a blind signature.

Quote
Each spender commits a hash of his intended output. Then everyone does the blinded protocol. If the blinded protocol fails, everyone including the adversary reveals the link between inputs and outputs, because by definition the output key must be an abundant resource so that it is not costly to reveal it and generate a new one to try again.
I'm glad you agree that the case where the protocol fails before all the blind signatures are collected is easily resolved. If it fails after transaction signing has begun, then—because the blind signatures assure everyone that the transaction was correct— you know the non-signer is the adversary.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on March 12, 2014, 08:40:14 AM
Something doesn't add up...

First I want to make sure that gmaxell's protocol is first we sign inputs, then we blind sign outputs, then we unblind.

But if the inputs are really not connectable to the outputs could I jam the transaction by using outputs that add up to greater than my inputs?
In this case could anyone work out that it was me that put in the outputs that made the transaction not balance?
No, instead they prevent you from doing that in the first place.

E.g. in the blinded example: When you provide your inputs everyone sees your values, and you specify "this is a blinded X btc output" and they all sign that output with a key which corresponds to X btc, and obviously refuse to do so if your input isn't at least X.  Later you reveal your output, and they know its value by which keys signed it.

Don't the inputs need to be signed to a specific block chain transaction?

Each participant connects, names Bitcoin input(s), an address for change (if needed), a key for blind signing, and a blinded hash of the address they want paid. They sign all this with the keys for the corresponding inputs proving its theirs to spend.

Each participant then blind signs the blinded hashes of all participants (including themselves).

Each participant then reconnects anonymously and discloses their unblinded values and all the signatures. Because all the participants can see all the signatures, they know all are authentic. They sign, and if they refuse to sign everyone is convinced that the refusing signer is attempting to jam and bans them.

Check.




And precisely how do you identify which input is the adversary when the correlation of the inputs and the outputs is necessarily cryptographically blinded?
As far as I can see, you can't.
The input is identified by the fact that it fails to sign a provably valid transaction.

Could you please explain to me how an input can sign a "provably valid" block chain transaction without knowing the outputs?


Quote
And exactly how do you propose to identify that adversary in a decentralized setting?  ;) My point is you can't, at least not without breaking anonymity, and anonymity was the entire point of mixing.
Quote
Because they fail to sign. There is no need to identify them beyond identifying their input coins to achieve rate limiting, and no need to identify the input/output correspondence.
...by the fact that they fail to sign.

Quote
I will quote from your more detailed description upthread.
You're now quoting from a different approach. I listed several. The one which I specifically identified in our discussion here used plain chaum blinded signature. (The others should work fine too— but if you mix things up its hard to have a coherent discussion)

I will not respond to this part of your reply at this time, so as to not further confuse the line of discussion above and below.


Quote
Zerocoin (ZC) requires a trusted party to generate the parameters, thus it is the antithesis of decentralized, so you have a logical error above.

ZC initialized with an RSA UFO has no trusted initialization, in fact— they make the updates much larger but thats harmless for data not going in the blockchain. Additionally if you do use the efficient trusted initialization the ZC accumulator approach still has perfect zero knoweldge. Compromise of the state allows someone to make false proofs (dos attacks in this context).   Though these points are not terribly relevant because I wasn't talking about the ZC approach.

I was aware of the RSA UFO claim from the ZC research paper, but Adam Back's comments seem to imply (?) it isn't a realistic option (so to save time I trusted what I interpreted to be his expert opinion). I just now skimmed this research paper:

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.28.4015&rep=rep1&type=pdf

Efficient Accumulators Without Trapdoor Extended Abstract
Tomas Sander

There are some assumptions made when I would need to think more deeply about.

Apparently there is some reason ZC did not adopt the UFO approach by default. I suppose those assumptions have not be been sufficiently attacked by cryptanalysis yet.

Compromise of the trusted PQ in ZC allows the trusted party to double-spend coins. Thus I assume for the CoinJoin case, it would cause the number of outputs to not match inputs, so thus a form of DOS.

I'm glad you've admitted that your proposal for CoinJoin employing ZC doesn't work decentralized, unless UFOs are a valid solution (are they and why?).

Quote
And so how can you correlate which input is the one who didn't blind sign all?

Because they refuse to sign the transaction. Everyone knows that all the outputs provided in the transaction were the unique outputs provided by the inputting parties (because they have been signed by all participants). So they all know the transaction is valid.


But the DOS can occur during the blinding signing of the outputs.

(of course, if it fails before you finish the unblinding, — you explain below how thats handled)

So how isn't that a DOS vulnerability? I repeat this question below.

Quote
I've dug very deep (into cryptography research papers) lately into trying to find a way to delink inputs from outputs without a trusted party, and I have realized that mathematically it can't be done. It is a fundamental conceptualization.
The only way to delink without anti-DOS is to use an accumulator commitment scheme with common NP-hard parameters that can be presented in an NIZKP (non-interactive zero knowledge proof) which will always require a trusted party to generate the common parameters for the trapdoor math.

You've apparently not done much research at all, as you are not aware of RSA UFOs (which are described in some of the very first papers about those sorts of accumulators), you are not aware of non-trapdoor NIZK (e.g. fiat-shamir/random oracle only), and ... apparently you're not aware of anything as simple as a blind signature.

I was aware of RSA UFOs as stated above. I was also aware of the Fiat-Shamir research paper below where the square roots (on mod n curve) stored on a smart card can't be factored (mod n) by the verifier (in polynomial time) and thus these roots are hidden by multiple interactive challenge rounds that employ a mathematical product that hides the actual values but requires the sum to be equal, and this can be converted to non-interactive (NI) via the Fiat-Shamir transformation by employing a one-way cryptographic hash function to issue the random challenges.

http://www.cs.rit.edu/~jjk8346/FiatShamir.pdf

Quote
Each spender commits a hash of his intended output. Then everyone does the blinded protocol. If the blinded protocol fails, everyone including the adversary reveals the link between inputs and outputs, because by definition the output key must be an abundant resource so that it is not costly to reveal it and generate a new one to try again.

I'm glad you agree that the case where the protocol fails before all the blind signatures are collected is easily resolved.

How is that not a DOS attack on the input signatures that were already made?

Everyone must start again, and the adversary is not identified.

If it fails after transaction signing has begun, then—because the blind signatures assure everyone that the transaction was correct— you know the non-signer is the adversary.

Yes but if I understand correctly, the DOS attack can occur while the blind signatures of outputs are being made as I explained above.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on March 12, 2014, 10:13:14 AM
Quote
Zerocoin (ZC) requires a trusted party to generate the parameters, thus it is the antithesis of decentralized, so you have a logical error above.

ZC initialized with an RSA UFO has no trusted initialization, in fact— they make the updates much larger but thats harmless for data not going in the blockchain. Additionally if you do use the efficient trusted initialization the ZC accumulator approach still has perfect zero knoweldge. Compromise of the state allows someone to make false proofs (dos attacks in this context).   Though these points are not terribly relevant because I wasn't talking about the ZC approach.

I was aware of the RFC UFO claim from the ZC research paper, but Adam Back's comments seem to imply (?) it isn't a realistic option (so to save time I trusted what I interpreted to be his expert opinion). I just now skimmed this research paper:

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.28.4015&rep=rep1&type=pdf

Efficient Accumulators Without Trapdoor Extended Abstract
Tomas Sander

There are some assumptions made when I would need to think more deeply about.

Apparently there is some reason ZC did not adopt the UFO approach by default. I suppose those assumptions have not be been sufficiently attacked by cryptanalysis yet.

Compromise of the trusted PQ in ZC allows the trusted party to double-spend coins. Thus I assume for the CoinJoin case, it would cause the number of outputs to not match inputs, so thus a form of DOS.

I'm glad you've admitted that your proposal for CoinJoin employing ZC doesn't work decentralized, unless UFOs are a valid solution (are they and why?).

On further reading, apparently UFOs are impractical because there isn't an entropy source that can be trusted to be random over such large domains. Please feel free to correct me if I am mistaken about the requirement.

We shift our unreliability of trust from unknowing if someone intercepted the computation of N = PQ to the unreliability of unknowing whether our input entropy could be attacked at any time in the future.

The research paper suggests in "2.1 On the generation of public random strings" to use stock market data, but there is hidden periodicity in the stock market data:

http://armstrongeconomics.com/2014/03/09/research-shocking-there-is-order-in-the-chaos/

Just in case you believe that guy's model is nonsense, then you can try to explain how his cyclic model has predicted (in advance, this isn't just model that fits what happened) everything accurately:

https://bitcointalk.org/index.php?topic=495527.msg5464897#msg5464897

https://bitcointalk.org/index.php?topic=365141.msg5642957#msg5642957


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on March 12, 2014, 03:38:01 PM
Quote
E.g. in the blinded example: When you provide your inputs everyone sees your values, and you specify "this is a blinded X btc output" and they all sign that output with a key which corresponds to X btc, and obviously refuse to do so if your input isn't at least X.  Later you reveal your output, and they know its value by which keys signed it.
Don't the inputs need to be signed to a specific block chain transaction?
Eventually, after the transaction is formed according to the blind signatures.
Quote
Could you please explain to me how an input can sign a "provably valid" block chain transaction without knowing the outputs?
At the point they sign the transaction they know the outputs (or else the transaction wouldn't yet exist).

Quote
I was aware of the RSA UFO claim from the ZC research paper, but Adam Back's comments seem to imply (?) it isn't a realistic option (so to save time I trusted what I interpreted to be his expert opinion). I just now skimmed this research paper
Zerocoin itself was already not realistic inside Bitcoin due (among other reasons) to the large transaction that you have to put into the blockchain. UFOs make them larger by a small multiple. Sending a few extra tens of KB outside of Bitcoin probably isn't an issue.
Quote
On further reading, apparently UFOs are impractical because there isn't an entropy source that can be trusted to be random over such large domains. Please feel free to correct me if I am mistaken about the requirement.
WTF?! Like in everything else you use a cryptographically strong PRNG which holds as long as some underlying hash function holds, and if the hash function is distinguishable with unknown inputs from a random oracle you're already hosed in every other protocol (including your DSA signatures).
Quote
Compromise of the trusted PQ in ZC allows the trusted party to double-spend coins. Thus I assume for the CoinJoin case, it would cause the number of outputs to not match inputs, so thus a form of DOS.
Yes? and so what? First— I note that you're continuing to waste time discussing the more complicated ZC thing when that wasn't what I was speaking about and do not recommend people implement (I noted it as a possibility for those were excited about ZC to find a potential application for the technology). Secondly— who cares if maybe someone kept a trapdoor and could just DOS attack? If you were really worried about that case you can just keep around a couple parameter sets, track how often you fail in each case and prefer ones where you've never been dos attacked (with the users taking a majority decision or something like that).

Quote
I'm glad you've admitted that your proposal for CoinJoin employing ZC doesn't work decentralized
I did no such thing. Your frequent misrepresentation in discussion makes it very difficult to justify continuing to respond to you.

Quote
Quote
And so how can you correlate which input is the one who didn't blind sign all?
Because they refuse to sign the transaction. Everyone knows that all the outputs provided in the transaction were the unique outputs provided by the inputting parties (because they have been signed by all participants). So they all know the transaction is valid.

But the DOS can occur during the blinding signing of the outputs.
Great. If the DOS attack occurs during the blind signing of the output tokens then everything is totally trivial then. Since every inputting user is required to blind sign everyone else output token, if they don't— you know who's jamming the process and you ban them.

Here is an overview of all the places a user could refuse to participate further:

(0) If a user refuses to sign an initial introduction message that specifies their input and their blinded output (and other parameters like blind signing keys to be used), then they're just not participating as producing that message is how they join in.

(1) If a user refuses to sign the blinded outputs of all the other users their inputs are blacklisted as the blind signing of everyone's output tokens is not anonymous (relative to inputs).

(2) If a user (now reconnected anonymously relative to inputs) refuses to reveal their unblinded outputs, this attempt is aborted, all honest users reveal their blinding factors and withholder is deanonymized and their inputs banned.

If we've made it this far we have a set of outputs which were provably created by the people who created the inputs, though we don't know the correspondence. We can form a transaction and know that the transaction matches their wishes. So we do.

(3) If any input does not sign for the resulting transaction we blacklist them because we know the transaction is accurate at this point.

I really cannot understand why you find this difficult to understand.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on March 12, 2014, 05:44:40 PM
I'm glad you've admitted that your proposal for CoinJoin employing ZC doesn't work decentralized

I did no such thing. Your frequent misrepresentation in discussion makes it very difficult to justify continuing to respond to you.

You removed part of the logic of the sentence. Here is what I wrote:

I'm glad you've admitted that your proposal for CoinJoin employing ZC doesn't work decentralized, unless UFOs are a valid solution (are they and why?).

Surely you understand that the word "unless" means that if UFOs are not a solution, then I'm asserting you've admitted and if UFOs are a solution then I'm not asserting you have admitted.

So I did not (intentionally) misrepresent your stance. You are still claiming that UFOs are a solution, thus you haven't admitted and I have never claimed you have.

Note the logic of "unless" also (unintentionally) meant that you admitted couldn't think of a way to use a trusted PQ instead of a UFO. But you have apparently presented a workable idea below. Kudos!

I was aware of the RSA UFO claim from the ZC research paper, but Adam Back's comments seem to imply (?) it isn't a realistic option (so to save time I trusted what I interpreted to be his expert opinion). I just now skimmed this research paper

Zerocoin itself was already not realistic inside Bitcoin due (among other reasons) to the large transaction that you have to put into the blockchain. UFOs make them larger by a small multiple. Sending a few extra tens of KB outside of Bitcoin probably isn't an issue.

I agree the extra size is not likely a factor for use offchain such as a decentralized CoinJoin.

Zerocoin is also not realistic inside Bitcoin because if a trusted party could create unlimited Bitcoins, that would violate basic principle of Bitcoin. That same trust issue may or may not apply if used in CoinJoin.

I elaborate below why am not convinced UFOs would solve that trust issue if used in Bitcoin.

On further reading, apparently UFOs are impractical because there isn't an entropy source that can be trusted to be random over such large domains. Please feel free to correct me if I am mistaken about the requirement.

WTF?! Like in everything else you use a cryptographically strong PRNG which holds as long as some underlying hash function holds, and if the hash function is distinguishable with unknown inputs from a random oracle you're already hosed in every other protocol (including your DSA signatures).

I would need to look and think more deeply about the math he showed there, but seemed like he was saying that we can predict the occurrence of primes in a product probabilistically thus I am having the conjectured thought (to explore more when I have more time) that the requirements on the period (in the applicable domain space) over which the assumption that the (approximation to the) Random Oracle model must hold true may be implicitly much more vast than when we apply hash functions in Z. I am curious to think more about what he actually proved and didn't prove.

I think there is much more depth to this than we can go into now. And I haven't had the time yet to wrap my mind completely around the math in that paper on UFOs.

Why don't we ask Adam Back? He is a neutral party and I think he may know more about the deeper implications of the mathematical assumptions in that RSA-UFO paper.

Or we can simply agree to stop discussing about Zerocoin or RSA-UFOs, which would be fine by me.


Compromise of the trusted PQ in ZC allows the trusted party to double-spend coins. Thus I assume for the CoinJoin case, it would cause the number of outputs to not match inputs, so thus a form of DOS.

Yes? and so what? First— I note that you're continuing to waste time discussing the more complicated ZC thing when that wasn't what I was speaking about and do not recommend people implement (I noted it as a possibility for those were excited about ZC to find a potential application for the technology).

I am replying to your comments. If you stop talking about Zerocoin, then I can stop responding about Zerocoin.

I am curious about Zerocoin as a solution for CoinJoin since I am fairly certain that your proposed protocol for CoinJoin can be DOS-attacked (see my reason below).


Secondly— who cares if maybe someone kept a trapdoor and could just DOS attack? If you were really worried about that case you can just keep around a couple parameter sets, track how often you fail in each case and prefer ones where you've never been dos attacked (with the users taking a majority decision or something like that).

That is a very interesting idea! Since knowing PQ doesn't allow you to snoop on the other participants' anonymity, that might be workable.

And then we don't need RSA-UFOs.

I don't see why you need to track how often there is failure. You simply discard a PQ where there was a DOS attack, because that is 100% evidence that PQ is compromised.

Quote
E.g. in the blinded example: When you provide your inputs everyone sees your values, and you specify "this is a blinded X btc output" and they all sign that output with a key which corresponds to X btc, and obviously refuse to do so if your input isn't at least X.  Later you reveal your output, and they know its value by which keys signed it.

Don't the inputs need to be signed to a specific block chain transaction?

Eventually, after the transaction is formed according to the blind signatures.

Quote
Could you please explain to me how an input can sign a "provably valid" block chain transaction without knowing the outputs?

At the point they sign the transaction they know the outputs (or else the transaction wouldn't yet exist).


Quote
Quote
And so how can you correlate which input is the one who didn't blind sign all?

Because they refuse to sign the transaction. Everyone knows that all the outputs provided in the transaction were the unique outputs provided by the inputting parties (because they have been signed by all participants). So they all know the transaction is valid.


But the DOS can occur during the blinding signing of the outputs.

Great. If the DOS attack occurs during the blind signing of the output tokens then everything is totally trivial then. Since every inputting user is required to blind sign everyone else output token, if they don't— you know who's jamming the process and you ban them.

Here is an overview of all the places a user could refuse to participate further:

(0) If a user refuses to sign an initial introduction message that specifies their input and their blinded output (and other parameters like blind signing keys to be used), then they're just not participating as producing that message is how they join in.

(1) If a user refuses to sign the blinded outputs of all the other users their inputs are blacklisted as the blind signing of everyone's output tokens is not anonymous (relative to inputs).

(2) If a user (now reconnected anonymously relative to inputs) refuses to reveal their unblinded outputs, this attempt is aborted, all honest users reveal their blinding factors and withholder is deanonymized and their inputs banned.

If we've made it this far we have a set of outputs which were provably created by the people who created the inputs, though we don't know the correspondence. We can form a transaction and know that the transaction matches their wishes. So we do.

(3) If any input does not sign for the resulting transaction we blacklist them because we know the transaction is accurate at this point.

I really cannot understand why you find this difficult to understand.

Two orthogonal issues.

First, an adversary could make a 1 Satoshi input and DOS on the (3) step. You ban that address but adversary has billions more at neglible cost.

I suppose you could set a minimum input amount to avoid this. But still no problem for the adversary, he passes his BTC through a mixer can comes to hit you again and again.

I am sorry to bring you bad news Gregory but with a non-atomic operation in the decentralized case you can always be DOS-attacked.  Zerocoin may be the solution?


Second and orthogonal to my point above, I don't understand this:

But if the inputs are really not connectable to the outputs could I jam the transaction by using outputs that add up to greater than my inputs?
In this case could anyone work out that it was me that put in the outputs that made the transaction not balance?
No, instead they prevent you from doing that in the first place.

E.g. in the blinded example: When you provide your inputs everyone sees your values, and you specify "this is a blinded X btc output" and they all sign that output with a key which corresponds to X btc, and obviously refuse to do so if your input isn't at least X.  Later you reveal your output, and they know its value by which keys signed it.

Appears you are saying that as a participant when I provide my input, I also specify the amount of my output?

So how is there unlinking of output amounts from input amounts?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: malevolent on March 12, 2014, 06:14:47 PM
Two orthogonal issues.
First, an adversary could make a 1 Satoshi input and DOS on the (3) step. You ban that address but adversary has billions more at neglible cost.
I suppose you could set a minimum input amount to avoid this. But still no problem for the adversary, he passes his BTC through a mixer can comes to hit you again and again.
I am sorry to bring you bad news Gregory but with a non-atomic operation you can always be DOS-attacked.  Zerocoin may be the solution?

Transaction fees and confirmation times should slow down the attacker.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on March 12, 2014, 06:34:15 PM
Two orthogonal issues.
First, an adversary could make a 1 Satoshi input and DOS on the (3) step. You ban that address but adversary has billions more at neglible cost.
I suppose you could set a minimum input amount to avoid this. But still no problem for the adversary, he passes his BTC through a mixer can comes to hit you again and again.
I am sorry to bring you bad news Gregory but with a non-atomic operation you can always be DOS-attacked.  Zerocoin may be the solution?

Transaction fees and confirmation times should slow down the attacker.

As for slowing down, the adversary can have many parallel addresses in play so I don't think so.

Transaction fees might work if they are significant enough. I haven't studied how much the tx fees are in Bitcoin much. I think I read that certain txs can be 0 for some cases?

If the adversary is mixing through CoinJoin transactions (hehe, uses what he also DOS-attacks against itself), then the blockchain tx fee is going to be shared between all parties of the CoinJoin transaction, so could it be insignificant?

Edit: I've just realized the adversary can eliminate the transaction fees too, by spending those banned amounts as he normally would (e.g. day trading), thus he doesn't incur any extra cost.

Edit#2: unless all decentralized CoinJoins share their ban lists (which is quite impractical to achieve as it is the antithesis of decentralization), adversary can just round-robin through them.

So I've won the argument. Checkmate.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on March 12, 2014, 07:06:00 PM
Surely you understand that the word "unless" means that if UFOs are not a solution,
Actually I think they're fine for this without the UFOs, I only brought them up because you were insisting things that were add odds with their e
Appears you are saying that as a participant when I provide my input, I also specify the amount of my output?

Quote
So how is there unlinking of output amounts from input amounts?
Derp. Your output is equal to your input. Privacy comes from equalizing amounts.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on March 12, 2014, 09:25:30 PM
Derp.

You just can't resist the ad hominem even after I've shown you were wrong all along about DOS attacks on your protocol.

Sigh.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: piotr_n on March 12, 2014, 10:38:40 PM
I'm sometimes reading this topic, occasionally, and it seems always the same. Actually, its getting worse.
Like with almost everything: plenty of ideas, but no solution whatsoever.

As for this specific topic, it basically seems like the level of the misery is just increasing.
My advise: talk less, do more - it will solve all your problems, I promise!

Why do people even care to waste their time on pointless discussions?
I could have saved so much of my own time, if I had only known an answer to such a stupid question :)
I guess it must be some kind of entertainment, like watching TV, because I cannot believe someone would be wasting his time on this kind of pointless forum arguments, though still thinking that he actually somehow helps the mankind.
We are talking about tens of pages of a "technical" topic (and not only this one!), lasting for years, with practically no actual applications - it must be just an entertainment, what else?
Unless it's a new kind of science: a theoretical engineering... Though I would still rather count it as a stupid kind of philosophy  :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AnonyMint on March 13, 2014, 03:57:57 AM
Quote
So how is there unlinking of output amounts from input amounts?

Derp. Your output is equal to your input. Privacy comes from equalizing amounts.

And thus my original statement was correct:

Comments please on my technical statement herein?

A decentralized CoinJoin will have difficulty forming transactions ... that look like this if anyone can join:

https://blockchain.info/tx/e4abb15310348edc606e597effc81697bfce4b6de7598347f17c2befd4febf3b?show_adv=true

Also my statement that the CoinJoin protocol can be DOS-attacked was correct.

It was a bit difficult to explain these facts w.r.t. to gmaxell's semi-coherent, incomplete explanations of his protocol. But I think I was able to help him to specify the essential requirements of his protocol.

As for this specific topic, it basically seems like the level of the misery is just increasing.
My advise: talk less, do more - it will solve all your problems, I promise!

The solution was provided by gmaxell. Use Zerocoin which is an atomic operation from inputs -> available outputs. But it won't work for Bitcoin's current block chain design, because even if we could (which we currently can't) we don't want to put the Zerocoin accumulator on the block chain because we don't want to trust the PQ thus we want to the accumulator to have a preset short-term lifespan and all inputs and outputs must specify themselves with that time limit. However this can't work in Bitcoin because inputs have to sign the output addresses. Thus in Bitcoin the specification of the output addresses would make it a non-atomic operation thus it can be DOS-attacked.

The solution for an altcoin (or Bitcoin if we can make such a radical change) is to make the transaction id a nonce and have the inputs and outputs sign that nonce. If the outputs are greater than inputs, then the transaction is invalid. In the rare event the outputs are greater than inputs, then we know to throw away and don't reuse the Zerocoin accumulator's PQ (because its trust is compromised) and try again.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: nanobit on March 30, 2014, 12:22:58 PM
Could someone kindly give a status update on when will we have a real-world, usable CoinJoin (besides the implementation on Blockchain.info)? This thread is huge, and I'm sure many casual readers would like to see a tl;dr to learn will this result in a usable client soon, or what's the plan?

I found the thread when reading this article from 7 months ago. What has happened since?
http://bitcoinmagazine.com/6630/trustless-bitcoin-anonymity-here-at-last/


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Suzuki on March 30, 2014, 04:19:17 PM
I find it a good idea to create a site where you enter a P2SH address, it gives back a traditional address, and when it receives money at the traditional address, it immediately forwards the unconfirmed BTC to the P2SH address. Hope someone will manage it!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on March 30, 2014, 04:25:57 PM
Could someone kindly give a status update on when will we have a real-world, usable CoinJoin (besides the implementation on Blockchain.info)? This thread is huge, and I'm sure many casual readers would like to see a tl;dr to learn will this result in a usable client soon, or what's the plan?

I found the thread when reading this article from 7 months ago. What has happened since?
http://bitcoinmagazine.com/6630/trustless-bitcoin-anonymity-here-at-last/
can someone kindly give a status update when we will havemoney distributed to developers to work on a free and fair and decentralized coin join?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on March 30, 2014, 07:56:56 PM
Could someone kindly give a status update on when will we have a real-world, usable CoinJoin (besides the implementation on Blockchain.info)? This thread is huge, and I'm sure many casual readers would like to see a tl;dr to learn will this result in a usable client soon, or what's the plan?

I found the thread when reading this article from 7 months ago. What has happened since?
http://bitcoinmagazine.com/6630/trustless-bitcoin-anonymity-here-at-last/

I'm still actively working on the implementation I have started Coinmux (http://coinmux.com).  I have taken a break for the last month after spending 3+ months working on it nights and weekends. Hopefully there is a Bitcoin God that wants to offer me a job to work on it full time. :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: solex on March 30, 2014, 11:37:27 PM
There is now 42 BTC donated: https://blockchain.info/address/3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk

Was the plan to pay 100% to the author of the first complete implementation, or for piece-work in progress?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on March 30, 2014, 11:53:51 PM
@solex, I don't know if it's ever been articulated. That and the fact that the coins haven't moved was basically my gripe, not a specific jab at @nanobit (although, this is open-source software developed by volunteers: asking for time estimates is bad form).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on March 30, 2014, 11:55:20 PM
There is now 42 BTC donated: https://blockchain.info/address/3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk

Was the plan to pay 100% to the author of the first complete implementation, or for piece-work in progress?


I'd be curious to know what a "complete" implementation is.  I'm guessing no one other than the owners of the donated BTC can say for sure... and AFAIK, they haven't said yet.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: solex on March 31, 2014, 02:17:39 AM
I'd be curious to know what a "complete" implementation is.  I'm guessing no one other than the owners of the donated BTC can say for sure... and AFAIK, they haven't said yet.

The OP mentions "complete", which I imagine would be a coinjoin implementation which would be considered by Core Dev worthy of inclusion in the reference client (needing cosmetic, standardizing and/or translation changes or only). Now this may remain a theoretical assessment if the goal is to see 3rd party implementations such as blockchain.info's.

Coinmux *seems* very good, and must be a front-runner, subject to informed criticism such as the input from Cryddit.

@solex, I don't know if it's ever been articulated. That and the fact that the coins haven't moved was basically my gripe, not a specific jab at @nanobit (although, this is open-source software developed by volunteers: asking for time estimates is bad form).

Agreed.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on March 31, 2014, 03:58:57 AM
I'd be curious to know what a "complete" implementation is.  I'm guessing no one other than the owners of the donated BTC can say for sure... and AFAIK, they haven't said yet.

The OP mentions "complete", which I imagine would be a coinjoin implementation which would be considered by Core Dev worthy of inclusion in the reference client (needing cosmetic, standardizing and/or translation changes or only). Now this may remain a theoretical assessment if the goal is to see 3rd party implementations such as blockchain.info's.

Coinmux *seems* very good, and must be a front-runner, subject to informed criticism such as the input from Cryddit.

@solex, I don't know if it's ever been articulated. That and the fact that the coins haven't moved was basically my gripe, not a specific jab at @nanobit (although, this is open-source software developed by volunteers: asking for time estimates is bad form).

Agreed.

I'll not take the "seems" statement as an insult. :)  Coinmux has got quite a way to go from where it is now to where i envision it when finished.  And if "complete" means that the implementation is merged into the reference client, i'll never get there as i did not write it in C/C++ (and i'd probably end up writing some pretty shitty C/C++ anyway).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: solex on March 31, 2014, 04:28:21 AM
I'll not take the "seems" statement as an insult. :)  Coinmux has got quite a way to go from where it is now to where i envision it when finished.  And if "complete" means that the implementation is merged into the reference client, i'll never get there as i did not write it in C/C++ (and i'd probably end up writing some pretty shitty C/C++ anyway).

My IT experience is not in the area which means I can determine for sure how good it is. It sounds good!! :-)
Shouldn't have to be ready for merging, or in c++, and that's why I mentioned translating. It is the prototype which matters.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: nanobit on March 31, 2014, 10:04:04 PM
Could someone kindly give a status update on when will we have a real-world, usable CoinJoin (besides the implementation on Blockchain.info)? This thread is huge, and I'm sure many casual readers would like to see a tl;dr to learn will this result in a usable client soon, or what's the plan?

I found the thread when reading this article from 7 months ago. What has happened since?
http://bitcoinmagazine.com/6630/trustless-bitcoin-anonymity-here-at-last/

I'm still actively working on the implementation I have started Coinmux (http://coinmux.com).  I have taken a break for the last month after spending 3+ months working on it nights and weekends. Hopefully there is a Bitcoin God that wants to offer me a job to work on it full time. :)

Themgp, that looks really interesting! I'm sure others wish you could work on it full time, too! :)
How far away is it from being usable for an average Bitcointalker?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on April 01, 2014, 12:43:50 AM
Was the plan to pay 100% to the author of the first complete implementation, or for piece-work in progress?
Any payouts would need to be discussed with the other signers, but my thinking had been to pay most of it to to the most substantive complete and usable implementation, and partial amounts to smaller efforts (e.g. people who built toy tools and things only a developer could love).  I had also planned on doing the payout itself as a coinjoin, and using a small bit of the funds to pay people to join into the coinjoin. :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on April 01, 2014, 01:15:15 AM
Could someone kindly give a status update on when will we have a real-world, usable CoinJoin (besides the implementation on Blockchain.info)? This thread is huge, and I'm sure many casual readers would like to see a tl;dr to learn will this result in a usable client soon, or what's the plan?

I found the thread when reading this article from 7 months ago. What has happened since?
http://bitcoinmagazine.com/6630/trustless-bitcoin-anonymity-here-at-last/

I'm still actively working on the implementation I have started Coinmux (http://coinmux.com).  I have taken a break for the last month after spending 3+ months working on it nights and weekends. Hopefully there is a Bitcoin God that wants to offer me a job to work on it full time. :)

Themgp, that looks really interesting! I'm sure others wish you could work on it full time, too! :)
How far away is it from being usable for an average Bitcointalker?


The main problem right now is getting an available set of users to do a CoinJoin - the idea doesn't work if no one is using it.  I think if i had a few weeks of solid work on Coinmux, it would be something where a user with a general understanding of bitcoin addresses and public/private keys that wanted to increase their privacy would want to use it.  Hopefully I can find the time soon.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: spooderman on April 27, 2014, 03:08:49 PM
Excellent work. Thank you for this.

As a computer n00b I will not be contributing code, but as an early adopter I can contribute some btc.

Thank you.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: caedes on May 02, 2014, 03:40:29 PM
Some coinjoin news from darkwallet:

The alpha version of the coinjoin is just barely working but is allowing us to test the basic usability concepts, we're polishing it during next days, and the wallet is going to take some time to come out of alpha/beta, nonetheless people is playing with it both in testnet and mainnet.

https://blockchain.info/tx/c38aac9910f327700e0f199972eed8ea7c6b1920e965f9cb48a92973e7325046
https://blockchain.info/tx/85f5f2b2e57535b42a30596f8d2a048b0b0c426f953e54dd96c72a77a21a6468

Some description about this:

https://wiki.unsystem.net/index.php/DarkWallet/Alpha#Mixing

More technical details:

The coinjoin now is simple two people coinjoin, as such we just make sure the 2 parties are the only ones who know the outputs correspondence, no need to hide from each other.

This is accomplished by talking over an unsecured channel where each peer publishes their pubkey with coinjoin announces, then others will answer doing ecdh, the initiator will choose one and they will continue talking to each other till they reach an agreement.

Our usability goes like this:

Anyone can set (a branch or pocket in) their wallet in "mixing" state, meaning it will be listening for coinjoin offers to mix available funds into new addresses.

For people sending, the wallet always tries to mix by announcing a coinjoin for the send value. If it can't mix it will send anyways in 60 seconds (at the moment).

Our idea is that this simple form of coinjoin can take off then we can add more complex coinjoin announcements or protocols. It is fully integrated in the normal workings of the wallet and it should work with other features like above you can see a coinjoin that went together with a stealth since the user is just sending stealth.

It seems to work pretty all right as long as at least a few wallets are mixing, and even if the current implementation is almost the simplest trustless mixing implementation i hope you can appretiate the potential.

Also looking forward to implement more advanced forms of coinjoin although our focus now would be to finish off what we have so it will be solid and easily extendable as a platform for development of other protocols. Also to note other wallets or tools can definitely join the same lobby and join together with darkwallets, but there is none yet, we plan to at least make one such simple tool.

Please feedback :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on May 02, 2014, 04:03:40 PM
Is there a central server involved in your implementation? I'm not trying to spread FUD, it's just there is conflicting information out there on the net. What you describe here sounds like it is p2p. Where are the announce messages posted?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Gyrsur on May 02, 2014, 04:36:32 PM
Some coinjoin news from darkwallet:

...

Please feedback :)



how much is libbitcoin (http://libbitcoin.dyne.org/) (Bitcoin core implementation of Dark Wallet as I understand so far) compatible to "Bitcoin Core" the reference implementation of the Bitcoin protocol?

as I understood central servers are necessary like the Electrum central servers. are they Open Source software? where can I find this implementation? until now the client is Open Source but is the server code also available?

EDIT: found some information for myself.

https://wiki.unsystem.net/index.php/DarkWallet/Alpha#Server

https://wiki.unsystem.net/index.php/Obelisk

http://libbitcoin.dyne.org/obelisk/

https://wiki.unsystem.net/index.php/Obelisk/Servers

https://wiki.unsystem.net/index.php/DarkWallet/Gateway

https://github.com/darkwallet/gateway

https://github.com/libbitcoin


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: MiniBlockChain on May 02, 2014, 11:55:29 PM
like zerocoin with mixer


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: caedes on May 03, 2014, 12:24:33 PM
Is there a central server involved in your implementation? I'm not trying to spread FUD, it's just there is conflicting information out there on the net. What you describe here sounds like it is p2p. Where are the announce messages posted?

The clients meet in a lobby, that right now is the gateway they connect for other services. This works as an irc room. We're not making security assumptions there and the clients encrypt for the channel (useless for public announcement channel like this case) and then for the peer (using curve25519 dh).

What there is not is a pool, all mixing is coinjoin and the funds would never leave the client till signed together with someone.

Clients are sharing public keys and will engage in private communications after the initial announce, for now always through the "chat". Nothing is cleartext and the server has no role other as work like a broadcast medium with channel selection.

The gateway servers are now isolated but the plan soon is have them federate over a tuple space (probably through python entangled) (so anyone can join through tuple space instead of the websocket channel)

The clients can later choose other transports, as our protocol is purely logical.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: caedes on May 03, 2014, 12:30:35 PM

how much is libbitcoin (http://libbitcoin.dyne.org/) (Bitcoin core implementation of Dark Wallet as I understand so far) compatible to "Bitcoin Core" the reference implementation of the Bitcoin protocol?

as I understood central servers are necessary like the Electrum central servers. are they Open Source software? where can I find this implementation? until now the client is Open Source but is the server code also available?



About how compatible it is, I can't really answer myself just that it should be following the bitcoin protocol and we don't have any "propietary" extensions or anything like that. Of course it's going to need heavy testing, auditing etc and we are open and wellcome anyone that helps on that.

About servers, yes the model is similar to electrum. Since the server is opensource you can install it in you server, and in the future there is nothing against you can just run it in you laptop or some parts of it, ie we have no long running assumption everyone *has to be connected to our lobby or to a server*.

We're soon releasing more installers and howtos about server configuratiojn or autonomous config by installing everything (or some part) in your computer.

Edit: A little detail here. DarkWallet itself is javascript and uses bitcoinjs-lib as its core bitcoin implementation. Then our "obelisk server" runs libbitcoin.

Edit2: We have a thread for discussing DarkWallet technicals: https://bitcointalk.org/index.php?topic=592493.0. Will be better if we leave this thread for coinjoin specifics and do any dw specifics there.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: caedes on May 03, 2014, 12:59:49 PM
Also, to make it clear:

Our approach does depend that different wallets can find a common medium to broadcast for coinjoin announces.

Other than that, the technique doesn't depend on the server itself, our mechanics is like ctx: https://gist.github.com/luke-jr/5409899 but we don't do it over the bitcoin network.

So the clients, after having chosen a common place to announce, in our case our gateway lobby:

0. Some are listening for offers
1: Send announcements to start a join (now looking for a peer, but could look for more), with a pubkey (now its using the same one, but can be one per-announcement and will be).
2. Other peers answer over ecdh, they will both offer inputs outputs, sign and broadcast over the private encrypted channel.

We believe the base we have can now have more hardened approaches tested, we provide a framework. This is a medium where we can do cryptographers dinner, or dissent protocols. This is just the beginning but it's a minimum that should work for getting the whole thing running.

Our goal is now apply the minimum necessary improvements, so on release this will also be making some claims about privacy, it's not making them right now, we're just offering information about where we are, so together with you people we can make it best.

We also invite other's to join forces and implement their techniques on our platform.

Edit: Added more detailed information about how we do it right now at: https://wiki.unsystem.net/index.php/DarkWallet/CoinMixing#Alpha_mixer


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on May 03, 2014, 04:23:58 PM
@caedes, why not have a peer-to-peer broadcast-flood channel for announcing joint transaction availability? Maybe even reuse one that is already available, well maintained, and has known security properties, like say the bitcoin network itself? And then do direct connections to the followon stages?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: genjix on May 03, 2014, 08:27:06 PM
@caedes, why not have a peer-to-peer broadcast-flood channel for announcing joint transaction availability? Maybe even reuse one that is already available, well maintained, and has known security properties, like say the bitcoin network itself? And then do direct connections to the followon stages?

We're waiting on a spec from Peter Todd.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: caedes on May 04, 2014, 05:03:17 AM
@caedes, why not have a peer-to-peer broadcast-flood channel for announcing joint transaction availability? Maybe even reuse one that is already available, well maintained, and has known security properties, like say the bitcoin network itself? And then do direct connections to the followon stages?

Yes as genjix says we're waiting for specific proposal of how to approach it, when we designed the system that was the idea that we could use the bitcoin network to overcome some of the adversary problems.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on May 04, 2014, 06:11:50 AM
Yeah okay. I'll see if I can find time to finish the half-written BIP I've already started.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on May 18, 2014, 10:26:24 PM
extremely interesting thread...what struck my eye was the slow validations which can cause a major clog with transactions when Dark Coin (based off of CoinJoin) gets bigger, right? The more coins transacted the slower the confirmations am I right in saying that?
No, not in a meaningful sense. Validation is very cheap. You do run into block size limits if you're trying to transact too much at once, but any privacy system is limited in its privacy by transaction volume.

"Dark Coin" really strikes me as pointless. The whole idea in coinjoin is that coinjoin is already part of the design of Bitcoin. There is no advantage in having a new and different system. If you're going to do something incompatible, losing Bitcoin's network effect in the process, then you can do something much stronger.

It also depresses me somewhat to see people talking about darkcoin (or even zerocoin/zerocash) when bytecoin (https://bytecoin.org/) has a privacy system with much better properties than CoinJoin (it's similar to CJ except you safely join with offline coin holders, and all users are participants), something made possible by the fact that it doesn't have to fit within the existing Bitcoin network, and it's completely practical, reasonably performant and deployed for some time now. But strangely, it's virtually unheard of...  Bytecoin's privacy properties are in some sense weaker than zerocoin's— since its like a supercharged coinjoin— but the cryptography is much stronger and much more efficient, so in practice I'd expect it to have better anonymity just due to it being much more practical (also as evidence to it existing as a deployed system).  ... so yea, if you actually are interested in privacy technology in a non-bitcoin system, Bytecoin seems to have pretty much nailed it.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: telepatheic on May 18, 2014, 11:03:48 PM
It also depresses me somewhat to see people talking about darkcoin (or even zerocoin/zerocash) when bytecoin (https://bytecoin.org/) has a privacy system with much better properties than CoinJoin (it's similar to CJ except you safely join with offline coin holders, and all users are participants), something made possible by the fact that it doesn't have to fit within the existing Bitcoin network, and it's completely practical, reasonably performant and deployed for some time now. But strangely, it's virtually unheard of...  Bytecoin's privacy properties are in some sense weaker than zerocoin's— since its like a supercharged coinjoin— but the cryptography is much stronger and much more efficient, so in practice I'd expect it to have better anonymity just due to it being much more practical (also as evidence to it existing as a deployed system).  ... so yea, if you actually are interested in privacy technology in a non-bitcoin system, Bytecoin seems to have pretty much nailed it.

Thanks for introducing me to Bytecoin/CryptoNote. Some solid cryptography being used (in theory) and some great improvements over bitcoin. Unfortunately the fact that there is another coin called bytecoin (http://bytecoin.biz/) is very confusing and bytecoin doesn't really have any formal documentation other than this page (https://wiki.bytecoin.org/wiki/Protocol_rules). Time to do some source code reading!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on May 19, 2014, 12:54:58 AM
Thanks for introducing me to Bytecoin/CryptoNote. Some solid cryptography being used (in theory) and some great improvements over bitcoin. Unfortunately the fact that there is another coin called bytecoin (http://bytecoin.biz/) is very confusing and bytecoin doesn't really have any formal documentation other than this page (https://wiki.bytecoin.org/wiki/Protocol_rules). Time to do some source code reading!
Yea, the Bytecoin/Bytecoin thing caused me to not notice it for a long time.

The cryptographically interesting Bytecoin has a reasonable whitepaper: https://bytecoin.org/old/whitepaper.pdf  Some of the things it does appear to be pointless or ill-advised to me and I would have counciled otherwise— but as far as the privacy aspect goes, the ring signature approach appears top notch. The privacy depends on the decisional DH problem, so perhaps you could argue that its privacy has a slightly weaker cryptographic story than the basic discrete log stuff (computational DH) but in the curve they're using its believed to be equally strong.  In any case, anything that has reduced the privacy question to asking about cryptographic assumptions has gone pretty good.

Sorry for the OT tangent here. Though there may be some good bitcoin-relevant privacy things to mine out of the bytecoin design.



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: anonymousxx1503 on May 19, 2014, 10:58:01 PM
Thanks for introducing me to Bytecoin/CryptoNote. Some solid cryptography being used (in theory) and some great improvements over bitcoin. Unfortunately the fact that there is another coin called bytecoin (http://bytecoin.biz/) is very confusing and bytecoin doesn't really have any formal documentation other than this page (https://wiki.bytecoin.org/wiki/Protocol_rules). Time to do some source code reading!
Yea, the Bytecoin/Bytecoin thing caused me to not notice it for a long time.

The cryptographically interesting Bytecoin has a reasonable whitepaper: https://bytecoin.org/old/whitepaper.pdf  Some of the things it does appear to be pointless or ill-advised to me and I would have counciled otherwise— but as far as the privacy aspect goes, the ring signature approach appears top notch. The privacy depends on the decisional DH problem, so perhaps you could argue that its privacy has a slightly weaker cryptographic story than the basic discrete log stuff (computational DH) but in the curve they're using its believed to be equally strong.  In any case, anything that has reduced the privacy question to asking about cryptographic assumptions has gone pretty good.

Sorry for the OT tangent here. Though there may be some good bitcoin-relevant privacy things to mine out of the bytecoin design.



It's hard to believe you're not a major bytecoin holder of some sort? Monero is a fork without the massive premine/instamine/slowmine without release whatever it was of bytecoin, I imagine your opinion about it is the same if they share cryptonote?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on May 20, 2014, 12:08:03 AM
It's hard to believe you're not a major bytecoin holder of some sort? Monero is a fork without the massive premine/instamine/slowmine without release whatever it was of bytecoin, I imagine your opinion about it is the same if they share cryptonote?
As hard as it is to believe, people other than me do occasionally have really good ideas. :)  ... (No, I'd only heard about it a couple months ago and looked into it in depth until the last week).  I think all these altcoins are horribly ill-advised in their altcoinness. You're in the wrong subforum and thread if you want to talk about cryptocurrency speculation— my interest here is just in the techniques— and I'm not going to credit some random code aping fork for other people's work when talking about them.

(In case anyone had the impression that I thought bytecoin was all love and wonder: the implementation is currently really immature and somewhat buggy— and perhaps not likely to improve if its authors are now getting voted off the island in a fork. The POW is very slow to validate, and seems generally ill-advised to me (see https://download.wpsoftware.net/bitcoin/asic-faq.pdf), the adaptive blocksize stuff seems dangerous and the coin burning excuse for it can't work as expected in the long run since miners can get paid out of band, ... but the privacy design is very good, though even there its incompatible with pruning (but so is everything else). Of course, all these concerns also apply to forks that just aped the code.).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: telepatheic on May 20, 2014, 12:34:46 AM
Looking through the white paper, it seems like ring signatures don't actually sign the bytecoin transactions, they only sign the inputs.

I wonder if anyone with an expertise in ring signatures has reviewed the paper, its a little out of my comfort zone.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Gyrsur on May 25, 2014, 10:12:30 AM
It's hard to believe you're not a major bytecoin holder of some sort? Monero is a fork without the massive premine/instamine/slowmine without release whatever it was of bytecoin, I imagine your opinion about it is the same if they share cryptonote?
As hard as it is to believe, people other than me do occasionally have really good ideas. :)  ... (No, I'd only heard about it a couple months ago and looked into it in depth until the last week).  I think all these altcoins are horribly ill-advised in their altcoinness. You're in the wrong subforum and thread if you want to talk about cryptocurrency speculation— my interest here is just in the techniques— and I'm not going to credit some random code aping fork for other people's work when talking about them.

(In case anyone had the impression that I thought bytecoin was all love and wonder: the implementation is currently really immature and somewhat buggy— and perhaps not likely to improve if its authors are now getting voted off the island in a fork. The POW is very slow to validate, and seems generally ill-advised to me (see https://download.wpsoftware.net/bitcoin/asic-faq.pdf), the adaptive blocksize stuff seems dangerous and the coin burning excuse for it can't work as expected in the long run since miners can get paid out of band, ... but the privacy design is very good, though even there its incompatible with pruning (but so is everything else). Of course, all these concerns also apply to forks that just aped the code.).


did you had the chance to get a look into Darkcoin, too? thank you!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dewdeded on May 26, 2014, 08:56:13 PM
http://sharedcoin.com/ is trustless centralized CoinJoin by Greg Maxwell.
Darksend in DarkCoin is dezentralized CoinCoin by Evan Duffield.

Haters/FUDers/trolls hate on DarkCoin saying it's insecure because bad actors like Goverments could run many Masternodes.


Leeds me to the question:

Is dezentralized trustless CoinJoin possible?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on May 26, 2014, 10:20:04 PM
Greg has nothing to do with sharedcoin (and sharedcoin has little to do with coinjoin).

To your question, read the op. This whole thread is a description of how to do decentralized, trustless mixing.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: genjix on May 26, 2014, 10:33:59 PM
kinda sad darkcoin isnt implementing ring sigs
masternodes are coinjoin servers where miners must pay tax
i'm interested to understand how that differs to federated darkwallet gateways
still, all power to drk... 4th crypto now


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dewdeded on May 26, 2014, 10:52:05 PM
maaku: Thank you very much. SharedCoin is based on what technology then?

All: As its basically the same. Any reasons why is DarkCoins DarkSend attacked as insecure, but DarkWallet is not?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on May 27, 2014, 12:00:18 AM
Sharedcoin is a blockchain.info product. You can read about it on their website, but I don't think it was based on any external design, just a mixing service cooked up by one of their engineers.

Darkcoin and darkwallet also have nothing in common either. Despite co-opting the name, darkcoin's darksend doesn't appear to have anything to do with coinjoin. Their description and illustration in their thread shows some sort of centralized mixing service (more akin to sharedcoin), and indeed their distribution mechanism involves a reward for "masternodes" which perform the mixing with these fresh coins. It would be nice if someone from that project could chime in here and explain just what it is trying to accomplish, because the available technical descriptions are scarce and contradictory.

Darkwallet does indeed implement coinjoin, albeit using a centralized matchmaking service to setup the mixes. I have been informed by the developers that this is a temporary mechanism and they are working towards a fully p2p solution. They do not use the blind signing or ring signature mechanisms which are required to scale to more than 2 participants without revealing ownership of outputs.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dewdeded on May 27, 2014, 12:11:58 AM
Now I am confused.

e.g. on https://darkcointalk.org/threads/coinjoin-in-bitcoin-and-darksend.560/
or http://www.reddit.com/r/DRKCoin/comments/1zlv36/what_does_darkcoin_offer_that_couldnt_be_done/
or some/alot other sites they talk about CoinJoin in DarkSend


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: cbeast on May 27, 2014, 12:15:57 AM
Showing a brother he is going the wrong way.

https://bitcointalk.org/index.php?topic=626425.msg6959794#msg6959794


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: genjix on May 27, 2014, 11:08:14 AM
maaku, the mixers are connected through a p2p protocol so anyone can set one up, however I think the idea (according to Peter Todd) is to use the Bitcoin network as a mixnet.
I don't think we can use ring signatures unless bitcoin adopted ed25519... or am I mistaken?
also it can scale >2 participants, because you do multiple rounds (share outputs, share inputs, give signatures).

cbeast, self-censorship is why threat is so effective. the real people who will adopt our tools won't be yuppie students buying coffee at the bar, it will be new digital black markets & we market to them. the tools go beyond mere payments into governance, markets and new forms of association between humans. the effect is deeper. bitcoin is more than a payments innovation despite what others want to make us believe. I'm not shuffling its massive potential under the carpet through fear of retribution and spending my time making Facebook apps.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on May 27, 2014, 11:47:24 AM
Showing a brother he is going the wrong way.

https://bitcointalk.org/index.php?topic=626425.msg6959794#msg6959794
Let's see.

I think dark cryptocurrencies are too powerful a tool for our civilization in its current state. Governments must use whatever means necessary to control its development for the safety and security of law-abiding citizens.

The problem here is that you don't know the difference between reality and projection. Your apocalypse fantasy (bitcoin=plutonium) is something you should be talking about with a therapist - it has nothing to do with Bitcoin.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Peter Todd on May 27, 2014, 12:11:42 PM
genjix: Yup. Scaling works out nicely too because the additional CoinJoin traffic will never be more than a small multiple of the existing transaction traffic, so doing all the CoinJoin communication via global broadcast messages is actually reasonably and efficient enough; gives good privacy for that communication. You can also reuse bitcoin age as a limited resource for anti-dos.

It's not as pretty as more clever crypto, e.g. the zerocash project that I'm also now working with, but has the huge advantage that its flaws are easy to understand and predictable. We want diversity in the level of engineering in the solutions we come up for to solve problems; CoinJoin + zerocash are two totally different approaches, and if one day we can use both we're more likely to actually achieve privacy.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: cbeast on May 27, 2014, 07:17:22 PM
The problem here is that you don't know the difference between reality and projection. Your apocalypse fantasy (bitcoin=plutonium) is something you should be talking about with a therapist - it has nothing to do with Bitcoin.
At worst it is an exaggerated analogy. The analogy relates to the newness of the technology. Bitcoin is based in math theory and the technology is accessible to all. Just because we have a technology, does that mean everyone should be allowed to use it? Does that go for any technology? Howabout drug manufacturing? Howabout explosives? Should anyone be able to do anything they want without restrictions?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: genjix on May 27, 2014, 08:12:39 PM
The problem here is that you don't know the difference between reality and projection. Your apocalypse fantasy (bitcoin=plutonium) is something you should be talking about with a therapist - it has nothing to do with Bitcoin.
At worst it is an exaggerated analogy. The analogy relates to the newness of the technology. Bitcoin is based in math theory and the technology is accessible to all. Just because we have a technology, does that mean everyone should be allowed to use it? Does that go for any technology? Howabout drug manufacturing? Howabout explosives? Should anyone be able to do anything they want without restrictions?

Your morals are not my morals. Who is the decider? Do you support a free and open internet?
And yes, I definitely would like cheap medicinal knock off drugs flooding into the markets, and more kids playing with explosives and becoming scientists. Maybe you want to arrest people who write virus coding tutorials also?

Your mistake is thinking that compliance buys curries you special favour... but at the risk of what? There are bigger things at stake here (https://wiki.unsystem.net/index.php/Bitlaw). Bitcoin is not unmovable code and math, it is consensus. It's imperative we develop this technology, strong, resilient and decentralised. Part of my goal is getting people to think and question things they've held as true. I think we can inspire an ideal through symbolic acts of disobedience, inspiring courage in others to stand with us.

As you demonstrated in your post, the threat is real and here. The world has changed and it's time to adapt, survive and thrive. Either that or go extinct the way of the dinosaurs. And you know what? Maybe that threat you saw was more imagined than you realised. And maybe those threats, just maybe they were a paper tigers and fears unfounded. We will always be on the right side of history because we are about humanity. Dynamism, love, art, energy, change, passion, reality, risk, colour, soul.

http://cultureandempire.com/



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on May 27, 2014, 08:45:49 PM
Please stay on topic.

@genjix, I think you misunderstood my point about multiple parties. Without blinding or ring signatures or other crypto magic, it is not possible to have multiple participants where the other participants don't know which outputs correspond with which participants (the exception for 2 users is simply that if there is only one other person participating, then obviously whatever outputs are not yours are his, not matter what fancy crypto is used). This is important because CoinJoin is useful for far more than mere mixing. Joint transactions are also the mechanism by which matching donations or crowdfund campaigns can be organized (see Mike Hearn's Lighthouse app), exchange transactions of colored coin assets can be arranged, and various cross-chain atomic trade protocols. Scaling up these applications to multiple participants without loss of privacy is very important.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: genjix on May 27, 2014, 09:54:59 PM
Please stay on topic.

@genjix, I think you misunderstood my point about multiple parties. Without blinding or ring signatures or other crypto magic, it is not possible to have multiple participants where the other participants don't know which outputs correspond with which participants (the exception for 2 users is simply that if there is only one other person participating, then obviously whatever outputs are not yours are his, not matter what fancy crypto is used). This is important because CoinJoin is useful for far more than mere mixing. Joint transactions are also the mechanism by which matching donations or crowdfund campaigns can be organized (see Mike Hearn's Lighthouse app), exchange transactions of colored coin assets can be arranged, and various cross-chain atomic trade protocols. Scaling up these applications to multiple participants without loss of privacy is very important.

I think it is.

Here's how we did it in the initial CoinJoin implementation we made.

* There's an anonymous chatroom (pre-negotiated shared secret in public room) accessible over Tor.
* Some dudes submit various outputs.
* Some dudes submit various inputs.
* Server replies back with a tx.
* Some dudes submit valid signatures.

We also did it for fixed units.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: caedes on May 28, 2014, 10:02:24 AM
Darkwallet does indeed implement coinjoin, albeit using a centralized matchmaking service to setup the mixes.

Just to clarify, we (darkwallet) don't exactly use a centralized matchmaking service, nor did we do at any point (as I would define it anyways). We did use a centralized matchmaking server in our first proof of concept on this thread.

The current scheme works on top of any chat service, where we initially integrated a simple chat in our lobby and now it's the same lobby but the channels exist in a p2p network of all gateways so clients can connect to any gateway or gateways seed from any other gateway.

You are right otherwise we don't yet use ring or blind signatures at the moment, so restricted to 2 party coinjoins, but the general design is done so we can (more or less) easily implement more complex coinjoin protocols.

cheers!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on May 28, 2014, 12:45:58 PM
Here's how we did it in the initial CoinJoin implementation we made.

* There's an anonymous chatroom (pre-negotiated shared secret in public room) accessible over Tor.
* Some dudes submit various outputs.
* Some dudes submit various inputs.
* Server replies back with a tx.
* Some dudes submit valid signatures.

If you are not linking outputs to inputs in the submission (say, by signing the request containing the outputs with the keys of the inputs), then you are leaving the protocol vulnerable to very easy to execute denial of service attacks. If you do close that DoS hole by signing the outputs with the inputs, then the sever operator at the very least knows the linkages and could log this information.

The solution, as explained in the OP, is blinding: link the inputs to the blinded outputs, and later anonymously reveal the outputs and the unblinded signature from the server. Then the participants know that the output was one of the original blinded outputs (because the server signed it), but they don't know which one. Even in a two-party mix with a facilitating server, the server doesn't know which output belongs to whom. If there is a DoS withholding of a signature at the end, the honest participants can elect to back out and reveal their blinding factors, thereby demonstrating their own linkages and preventing themselves from being DoS banned.

BTW, blinding is super easy to do. Using RSA it like a half-dozen lines of code.

We also did it for fixed units.

There is absolutely no reason to use fixed units. It adds no anonymity, and increases blockchain traffic.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: genjix on May 28, 2014, 01:34:32 PM
ok thanks for the clarification, makes sense now.
caedes also gave me a similar explanation.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: christianlundkvist on May 30, 2014, 12:02:07 AM
There is absolutely no reason to use fixed units. It adds no anonymity, and increases blockchain traffic.

This surprised me. Surely a transaction with inputs 5,5,5,5 and outputs 5,5,5,5 will have better privacy characteristics than one with inputs 15, 5 and outputs 1,2,3,14?  Or am I misunderstanding what "fixed units" mean?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: jeffersonairplane on May 30, 2014, 12:24:52 AM
Pretty interesting OP. I find the complexity hinders from anonymity.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: anti-scam on May 30, 2014, 12:57:39 PM
The promised update to the original Zerocoin/Zerocash paper (http://zerocash-project.org/media/pdf/zerocash-extended-20140518.pdf) has been released and it claims to reduce the size of a Zerocash transaction to under 1 kB and the time to verify a coin's spending transaction to under 6 ms. I have not fully read the paper yet, but am wondering if anyone has investigated these claims and whether or not these improvements would fully remove the barriers that previously prevented the protocol's integration into Bitcoin?

I am posting this here since I assume that there is a reasonable degree of overlap between those interested in Zerocash and those interested in CoinJoin. I apologize if this has already been addressed but I have been away for a while and am trying to catch up. I know that Peter Todd is advising the Zerocash team so I'm sure he has some valuable insight.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on May 30, 2014, 03:18:45 PM
anti-scam: off-topic. please use the zerocash thread.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Carlton Banks on May 30, 2014, 04:52:53 PM
anti-scam: off-topic. please use the zerocash thread.

maaku, you do actually have to read the post before making OT admonishments


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: genjix on May 31, 2014, 12:35:53 PM
The promised update to the original Zerocoin/Zerocash paper (http://zerocash-project.org/media/pdf/zerocash-extended-20140518.pdf) has been released and it claims to reduce the size of a Zerocash transaction to under 1 kB and the time to verify a coin's spending transaction to under 6 ms. I have not fully read the paper yet, but am wondering if anyone has investigated these claims and whether or not these improvements would fully remove the barriers that previously prevented the protocol's integration into Bitcoin?

I am posting this here since I assume that there is a reasonable degree of overlap between those interested in Zerocash and those interested in CoinJoin. I apologize if this has already been addressed but I have been away for a while and am trying to catch up. I know that Peter Todd is advising the Zerocash team so I'm sure he has some valuable insight.

It sounds exciting from what I've heard, but it probably won't go into Bitcoin directly. We need to keep Bitcoin's consensus pure and untouched. We don't nearly know enough.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: anti-scam on May 31, 2014, 01:11:31 PM
The promised update to the original Zerocoin/Zerocash paper (http://zerocash-project.org/media/pdf/zerocash-extended-20140518.pdf) has been released and it claims to reduce the size of a Zerocash transaction to under 1 kB and the time to verify a coin's spending transaction to under 6 ms. I have not fully read the paper yet, but am wondering if anyone has investigated these claims and whether or not these improvements would fully remove the barriers that previously prevented the protocol's integration into Bitcoin?

I am posting this here since I assume that there is a reasonable degree of overlap between those interested in Zerocash and those interested in CoinJoin. I apologize if this has already been addressed but I have been away for a while and am trying to catch up. I know that Peter Todd is advising the Zerocash team so I'm sure he has some valuable insight.

It sounds exciting from what I've heard, but it probably won't go into Bitcoin directly. We need to keep Bitcoin's consensus pure and untouched. We don't nearly know enough.

I find this response a bit confusing. In what way would Zerocash affect Bitcoin's consensus, assuming a one-to-one conversion rate? As for not knowing nearly enough, the whitepaper is pretty detailed and still seems to make provisions for including the protocol directly into Bitcoin. I don't mean to be argumentative, but I consider truly anonymous payments to be a "killer feature" that could very negatively affect Bitcoin's value if it lags behind. Of course there's no rush but it would seem prudent to me to start collecting a bounty.


Title: CoinJoin/DarkCoin does not guarantee anonymity
Post by: Michael_S on May 31, 2014, 03:24:50 PM
Hope that this thread is appropriate:

I think the wide perception that CoinJoin (or DarkCoin) as such brings full anonymity is wrong.

I tried to write an educational memo to illustrate why only using CoinJoin (or DarkCoin) does not yet guarantee anonymity.

You can find it here: http://de.scribd.com/doc/227369807 (http://de.scribd.com/doc/227369807)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on May 31, 2014, 03:31:04 PM
maaku, you do actually have to read the post before making OT admonishments

He was asking about Zerocash. Zerocash has nothing to do with CoinJoin, and has it's own thread. I'd happy to discuss it there. In very short summary: Zerocash is not and never has been considered for inclusion on the bitcoin block chain. When the author references bitcoin he means the bitcoin protocol generally.

@Michael_S the point is that you multiple mixes, as well as opportunistic mixes each time you transact. Each mix increases the anonymity set. No one is claiming perfect anonymity a la Zerocash.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: genjix on May 31, 2014, 03:36:52 PM
yep that's how ZeroCash and CoinJoin could work together. Both are pretty cool systems.

CoinJoin would be for your day to day payments.

ZeroCash would be for anonymising your savings.

(I'm just projecting here don't know full details) It seems like their plan is to build a layer on top of Bitcoin like how MasterCoin works. And that the ZC ledger tracks the Bitcoin one so you can convert to and from the ZC system. That's really exciting if so.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dewdeded on May 31, 2014, 04:41:28 PM
AFAIK ZeroCash needs a trusted accumulator. So it's just a science prototype and wont become a cryptocurrency, no one will use a cryptocurrency where:

- if an NSA agent contributed to the "trusted setup" there will be no privacy
or
- if an Mark Karpeles guy contributed to the "trusted setup" he can generate/create more coins than announced (as his crime would be invisible in the block chain)



Why use technologies based on trust, when we have trustless ones. Satoshi created Bitcoin specifically with the idea/key feature of not depending on trusting a third party.





Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Carlton Banks on May 31, 2014, 08:09:02 PM
maaku, you do actually have to read the post before making OT admonishments

He was asking about Zerocash. Zerocash has nothing to do with CoinJoin, and has it's own thread. I'd happy to discuss it there. In very short summary: Zerocash is not and never has been considered for inclusion on the bitcoin block chain. When the author references bitcoin he means the bitcoin protocol generally.

@Michael_S the point is that you multiple mixes, as well as opportunistic mixes each time you transact. Each mix increases the anonymity set. No one is claiming perfect anonymity a la Zerocash.

Surely a discussion about the way new developments in the Zerocash project relate to Coinjoin actually belong in their own exclusive thread, no? Technically, I mean.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: anti-scam on May 31, 2014, 10:35:02 PM
In very short summary: Zerocash is not and never has been considered for inclusion on the bitcoin block chain

Considering the billions of dollars of other people's money that's at stake here, that seems like something that needs a public discussion and not a decree by fiat.

Quote from: maaku
When the author references bitcoin he means the bitcoin protocol generally.

Here's a direct quote from page 10 of the paper: "Zerocash can be integrated into Bitcoin or forks of it (commonly referred to as "altcoins"); we later describe how this is done."

Quote from: genjx
(I'm just projecting here don't know full details) It seems like their plan is to build a layer on top of Bitcoin like how MasterCoin works. And that the ZC ledger tracks the Bitcoin one so you can convert to and from the ZC system. That's really exciting if so.

I think that's being considered but I'm not sure if it's their final plan. It seems to me that, given some BTC developers' hostility toward their technology, they'd have an incentive to strike out on their own. As far as I know the infrastructure for Bitcoin sidechains is not yet in place so they can't go that route.

Quote from: dewdeded
AFAIK ZeroCash needs a trusted accumulator. So it's just a science prototype and wont become a cryptocurrency, no one will use a cryptocurrency where:

- if an NSA agent contributed to the "trusted setup" there will be no privacy
or
- if an Mark Karpeles guy contributed to the "trusted setup" he can generate/create more coins than announced (as his crime would be invisible in the block chain)

Why use technologies based on trust, when we have trustless ones. Satoshi created Bitcoin specifically with the idea/key feature of not depending on trusting a third party.

Zerocash needs a "one time trusted setup of public parameters". It's not unique in that sense. Many cryptography systems can be broken if certain constants are chosen in a particular way. Bitcoin itself could potentially be broken if its curve parameters were backdoored in some way (see https://bitcointalk.org/index.php?topic=151120.0). I don't know exactly what the Zerocash team's plan to instill confidence in their public parameters is but it seems like a surmountable complaint.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on June 01, 2014, 03:03:11 AM
Bitcoin itself could potentially be broken if its curve parameters were backdoored in some way (see https://bitcointalk.org/index.php?topic=151120.0).
Incorrect.  People have speculated that potentially an attacker powered by non-public mathematical breakthroughs could select parameters in a way to make a system weaker against publicly-unknown attacks which require specific improbable curve characteristics. This is pure conjecture, however— though it's something prudent to be cautious about, it is not a known backdoor vector by itself. The process for selecting curve parameters already excludes known classes of bad curves, if we knew about any other classes we'd exclude those too.  In the case of Bitcoin our parameters were selected in a way where performance considerations removed their degrees of freedom (like the ed25519 parameters were selected), and are all explicable from first principles. In fact, they have an additional property that even if you drop some of the performance characteristics, and increment from the smallest possible parameter requirement the first curve of prime order you find is the one Bitcoin uses. Other cryptosystems also use nothing up my sleeve numbers, where an abundance of caution demands the designers pick them in a way that limit their degrees of freedom but at the same time no one knows of a way where control could be used secretly to do something bad— it's just a good practice, not a backdoor closed.

In the case of the GGPR'12 based SNARKs there is no comparable way to generate the parameters: The creation of the prover/verification keys requires computation using secret values, which— if known— completely compromise the soundness of the proofs. Here the backdoor is very concrete— not theoretical— when you know just a couple of the secrets you can do a few multiplies and have a false proof. Worse, there is no known way to use a nothing up my sleeve number to pick the parameters to convince people that no one could know the secrets. The best you can do is use process, like the CA system does (but potentially way better) to convince people of security.  This isn't insurmountable for _many_ applications, but it is not at all comparable to EC curve parameters, there is nothing in curve parameter selection that looks like a magic number where if the attacker knows it all is lost. As far as I know there nothing like this in widespread use, the nearest parallel I can think of is the backdoor in DUAL_EC DRBG, though in that case the backdoor was a "surprise" and no process to prove that the potential backdoor wasn't weaponized (because it was)— which certantly makes it more concerning. There are a fair number of proposed _theoretical_ cryptosystems which have similar assumptions (e.g. Any of the neat uses of obfuscation involve the obfuscation being established by a trusted party), but I'm not aware of these systems being put into production. One reason for this may be because theoreticians find trusted initialization to be more acceptable than practitioners do— the theoreticians just posit "A spherically honest cow in random-oracle derived motion faithfully creates the parameters", the practitioners are the ones that have to figure out how to approximate the spherical cow using three chickens, a reed-solomon code, and a priest.

Quote
It seems to me that, given some BTC developers' hostility toward their technology, they'd have an incentive to strike out on their own
Funny, I've seen similar disinformation published before (http://www.reddit.com/r/Bitcoin/comments/25wo3s/zerocash/chloalr)— that person was unwilling (unable) to substantiate it— can you do better?   The comments I made on Zerocoin (https://bitcointalk.org/index.php?topic=175156.msg1826596#msg1826596) were, I think, reasonably positive— but at the same time the system as it was wasn't suitable for deployment, and was later replaced by a complete reboot with much better performance (also evidence by the fact that no altcoin has deployed it, though they made a nice implementation of the cryptosystem available). I don't think there was anything hostile there, I've spent time with the developers of it and I think they're great guys, ... and I don't know any other developers who have been hostile about it either, so I'd really like to know what you're talking about.

This has really gone off-topic, but I thought leaving the FUD sitting around would be harmful.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Kiwigoeswest on June 01, 2014, 05:45:43 AM
Interesting read. Perhaps someone can make test QT soon :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: laurentmt on June 03, 2014, 09:15:33 PM
Follow-up of discussion from this thread (https://bitcointalk.org/index.php?topic=635317.msg7114054#msg7114054)

A careless join is one in which the correct solution is obviously the most plausible. Note that evaluating different solutions to the matrix lends itself well to parallel processing, there is no time limit since everything is permanently recorded in the blockchain, and mass surveillance doesn't require 100% accuracy.

Probably the only way to make CoinJoin useful in real-world situations is to build into the clients the exact same type of analysis tools attackers will use to reverse the joins so that clients can evaluate any proposed join prior to agreeing to it. (That's a good subject for the other thread).

I like your remark about time limit and 100% accuracy. It remembers me an interview of a computer scientist working for an US intel agency. He was explaining how they were building a different paradigm for search: sometimes you ask a question and you don't get an answer because it's just too early. If you don't ask again later, you'll never know the answer. But if you let the question pending, till the "right" data is gathered and aggregated, then you start to get something very efficient.

You can apply the same principle to transaction graph analysis. Even if you're very carefull about the privacy of your transactions, one-time coinjoin is not enough if others participants are less carefull and can be deanonymized later.
For now, systematic coinjoin (as proposed by DarkWallet) seems the most serious option to enhance privacy since it would create a combinatorial explosion and would significantly raise the cost of deanonymisation. But I guess it also comes with a lot of others issues to solve (delay required, constraints on amounts, ...).

Moreover, till now, main heuristics used for analysis of the transaction graph are "quite simple" (tainting, "address reuse" and "change address" patterns) and I guess it's just the first generation (at least which is publicized). I'm quite sure that more elaborated tools (temporal patterns, behavorial patterns) combined with side-channels attacks (data gathered from peripheral systems like exchanges, merchants, ...) could provide stunning results.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on June 03, 2014, 09:29:15 PM
Moreover, till now, main heuristics used for analysis of the transaction graph are "quite simple" (tainting, "address reuse" and "change address" patterns) and I guess it's just the first generation (at least which is publicized). I'm quite sure that more elaborated tools (temporal patterns, behavorial patterns) combined with side-channels attacks (data gathered from peripheral systems like exchanges, merchants, ...) could provide stunning results.
The problem is that those tools are all being developed behind closed doors, which gives the attackers an advantage. Too many people think a low taint score displayed on blockchain.info provides them with meaningful protection.

I'll predict though that for all this investment money flowing into Bitcoin startups, not one VC is going to fund investment into open source graph analysis tools that could help individuals measure their privacy and warn them before they do something that will compromise it.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on June 03, 2014, 09:48:28 PM
Andytoshi and I spent some time trying to formalize a notion of "coinjoin entropy"— e.g. how many possible mappings of inputs to outputs are possible given the values. A result of that was that discussion was the realization that if you allow for the possibility that coinjoin participants might also be paying each other then basically all coinjoin's have perfect entropy because there is some payment matrix that permits any of the output parties to be any of the input parties.

We didn't actually solve the entropy question for the non-concurrent payment case, it's an interesting question.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: laurentmt on June 03, 2014, 09:53:47 PM
The problem is that those tools are all being developed behind closed doors, which gives the attackers an advantage. Too many people think a low taint score displayed on blockchain.info provides them with meaningful protection.

I'll predict though that for all this investment money flowing into Bitcoin startups, not one VC is going to fund investment into open source graph analysis tools that could help individuals measure their privacy and warn them before they do something that will compromise it.
100% agree.
I'm interested in this subject and I thought about the opportunity to build such a tool for the community since data and technology are available.

But I came up with the following conclusions :
- it seems very difficult to fund a company like this one (well, you could plan to sell a closed product to some agencies like Fincen, banks... but it sounds like a small market)
- human analysts are still required and I'm not sure that many people in the community are ready to invest a lot of time as unpaid volunteers. So it seems difficult to build a sustainable community around an open platform like this one.

BTW, I would be glad to be proven wrong and be funded to build a tool like this one.  ;)




Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on June 03, 2014, 10:22:32 PM
well, you could plan to sell a closed product to some agencies like Fincen, banks... but it sounds like a small market
I'm sure there's plenty of money available to fund that.

The question is whether or not you can get funding to produce the tools that let the general public protect themselves from it.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on June 03, 2014, 10:56:17 PM
A result of that was that discussion was the realization that if you allow for the possibility that coinjoin participants might also be paying each other then basically all coinjoin's have perfect entropy because there is some payment matrix that permits any of the output parties to be any of the input parties.
So the Payment Protocol should be CoinJoin.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: laurentmt on June 04, 2014, 06:52:05 PM
well, you could plan to sell a closed product to some agencies like Fincen, banks... but it sounds like a small market
I'm sure there's plenty of money available to fund that.

The question is whether or not you can get funding to produce the tools that let the general public protect themselves from it.

Agree with that.

Unfortunately, I fear there's an asymmetry which isn't in favor of this kind of project for now.

Projects are funded by entities which have some interest in the project and projects "tracking" users are more appealing to corporations and VC since there's a big data trend in the corporate world with an expected financial ROI. I guess it's not a political or ideological choice. They just do what they're supposed to do: business.

On the other hand, privacy friendly projects have not a clear financial ROI. For now.
Funding this kind of project is more a "militant" choice than a financial one. For now.
Moreover, Bitcoin is still presented as an anonymous and shadowy financial system by a majority of mainstream media, which is far from the reality but does not help people to understand the challenges at stake. I fear it's not specific to Bitcoin and that very few people are really aware of the challenges posed by technologies like internet or cryptocurrencies in term of privacy.

Dark activities have nothing to do with that (sorry eric schmidt). We need to think a new model of society, interconnected, in which a resource (data) has gained a massive increased value without any market mechanism fixing this value. For now.

Sorry for this "philosophical" off-topic (barely checked with google translate - a "free" product provided by Google Inc. -)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: anti-scam on June 05, 2014, 06:38:50 AM
Incorrect.  People have speculated that potentially an attacker powered by non-public mathematical breakthroughs could select parameters in a way to make a system weaker against publicly-unknown attacks which require specific improbable curve characteristics. This is pure conjecture, however— though it's something prudent to be cautious about, it is not a known backdoor vector by itself. The process for selecting curve parameters already excludes known classes of bad curves, if we knew about any other classes we'd exclude those too.  In the case of Bitcoin our parameters were selected in a way where performance considerations removed their degrees of freedom (like the ed25519 parameters were selected), and are all explicable from first principles. In fact, they have an additional property that even if you drop some of the performance characteristics, and increment from the smallest possible parameter requirement the first curve of prime order you find is the one Bitcoin uses. Other cryptosystems also use nothing up my sleeve numbers, where an abundance of caution demands the designers pick them in a way that limit their degrees of freedom but at the same time no one knows of a way where control could be used secretly to do something bad— it's just a good practice, not a backdoor closed.

In the case of the GGPR'12 based SNARKs there is no comparable way to generate the parameters: The creation of the prover/verification keys requires computation using secret values, which— if known— completely compromise the soundness of the proofs. Here the backdoor is very concrete— not theoretical— when you know just a couple of the secrets you can do a few multiplies and have a false proof. Worse, there is no known way to use a nothing up my sleeve number to pick the parameters to convince people that no one could know the secrets. The best you can do is use process, like the CA system does (but potentially way better) to convince people of security.  This isn't insurmountable for _many_ applications, but it is not at all comparable to EC curve parameters, there is nothing in curve parameter selection that looks like a magic number where if the attacker knows it all is lost. As far as I know there nothing like this in widespread use, the nearest parallel I can think of is the backdoor in DUAL_EC DRBG, though in that case the backdoor was a "surprise" and no process to prove that the potential backdoor wasn't weaponized (because it was)— which certantly makes it more concerning. There are a fair number of proposed _theoretical_ cryptosystems which have similar assumptions (e.g. Any of the neat uses of obfuscation involve the obfuscation being established by a trusted party), but I'm not aware of these systems being put into production. One reason for this may be because theoreticians find trusted initialization to be more acceptable than practitioners do— the theoreticians just posit "A spherically honest cow in random-oracle derived motion faithfully creates the parameters", the practitioners are the ones that have to figure out how to approximate the spherical cow using three chickens, a reed-solomon code, and a priest.

Thank you for correcting my misleading statement. There are definitely are significant trust differences between the two processes. Your explanation will come in handy as more discussions about Zerocash surface.

Quote from: gmaxwell
I don't think there was anything hostile there, I've spent time with the developers of it and I think they're great guys, ... and I don't know any other developers who have been hostile about it either, so I'd really like to know what you're talking about.

I don't think that you in particular are hostile to anonymity nor am I suggesting that any of the Bitcoin developers have personal issues with any of the Zerocash developers. But I also know that there are many agendas at play in the Bitcoin world and not all of them include the type of anonymity that Zerocash provides.

I still think that there will have to be a public conversation about Zerocash, particularly after its developers have revealed how they plan on instilling confidence in their parameters, but I will save it for another thread.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: waxwing on June 05, 2014, 11:56:45 AM
Andytoshi and I spent some time trying to formalize a notion of "coinjoin entropy"— e.g. how many possible mappings of inputs to outputs are possible given the values. A result of that was that discussion was the realization that if you allow for the possibility that coinjoin participants might also be paying each other then basically all coinjoin's have perfect entropy because there is some payment matrix that permits any of the output parties to be any of the input parties.

Sound logic, but it's not even necessary - since there is no such thing as "a Bitcoin", it is impossible to make a deterministic linkage between inputs and outputs. If the system was designed to actually transfer distinguishable units ('things') from one account to another, then the many-many mapping of txs wouldn't actually make sense (because somewhere in the guts of the code it would be deciding which bill with which serial number goes to which output, which would mean that de facto it was a set of one-one txs in disguise).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on June 05, 2014, 12:03:36 PM
since there is no such thing as "a Bitcoin", it is impossible to make a deterministic linkage between inputs and outputs.
That is a true, but useless, statement.

As I mentioned before, mass surveillance doesn't require 100% accuracy.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: instagibbs on June 05, 2014, 01:01:38 PM
Andytoshi and I spent some time trying to formalize a notion of "coinjoin entropy"— e.g. how many possible mappings of inputs to outputs are possible given the values. A result of that was that discussion was the realization that if you allow for the possibility that coinjoin participants might also be paying each other then basically all coinjoin's have perfect entropy because there is some payment matrix that permits any of the output parties to be any of the input parties.

We didn't actually solve the entropy question for the non-concurrent payment case, it's an interesting question.

The "entropy" will depend upon the model of attacker. Start by enumerating those.



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Peter Todd on June 05, 2014, 03:43:00 PM
Academic discussions aside, in any case what has been actually implemented in Dark Wallet is that you have two classes of users: people who want to send money now, and people who have coins that they want to mix. The latter don't have any particular requirements on the exact amounts they want mixed, so they copy the amounts the former are sending, guaranteeing that at least two outputs are identical and have two possible senders. Blockchain.info's CoinJoin implementation is similar, with blockchain.info operating maintaining a pool of funds that is used to copy exact output amounts.

Future implementations can and will improve on these concepts, but again, what's implemented now takes output indistinguishably into account and provides reasonably good privacy already.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on June 05, 2014, 10:26:50 PM
The "entropy" will depend upon the model of attacker. Start by enumerating those.
The attacker knows everything in the blockchain. The attacker knows the identity of the payer or payee of some small number of transactions. The attacker wants to follow these identified funds forwards or backwards and expand their knoweldge recursively. The CJ users want the attackers analysis to fail, for themselves (most importantly) and for third parties.

I think of two main attack objectives— where the attacker is trying to identify a single user and where success/failure depends on how persuasive the evidence the attacker can extract for that single user.  And one where the attacker is trying to broadly deanonymize everyone in order to feed larger scale analysis. For this latter attack the defender's is successful if they're able to increase the noise level of the analysis by a non-trivial amount at low cost to themselves, e.g. success in this latter cases is completely continuous.

I outlined some more specific attack objectives in the original post— things like people you do business with being able to determine your income, net worth, supplies costs, or prices.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on June 06, 2014, 02:39:20 AM
Andytoshi and I spent some time trying to formalize a notion of "coinjoin entropy"— e.g. how many possible mappings of inputs to outputs are possible given the values. A result of that was that discussion was the realization that if you allow for the possibility that coinjoin participants might also be paying each other then basically all coinjoin's have perfect entropy because there is some payment matrix that permits any of the output parties to be any of the input parties.

We didn't actually solve the entropy question for the non-concurrent payment case, it's an interesting question.

I'm ready to accept that CoinJoin can be viable with outputs of different sizes.

Next question: what about information leaked via script types?

I think we can assume that in the near future there will be several types of scripts in common use: P2PKH, multisig, and stealth. We can also assume that the frequency with which these scripts types are used will vary between different classes of users (merchants vs customers).

Even if the amounts associated with inputs and outputs don't make the join trivially reversible, how do you stop the scripts from acting as a side channel that can deliver enough information to make the join reversible?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Ozziecoin on June 06, 2014, 05:03:40 AM
I think gmaxwell should clarify that the bitcoin coinjoin model is centralised whereas Darkcoin has decentralised coinjoin. So, I can't see that it is pointless. His support for ring signatures is academic in the sense of "nice in theory but frankly not workable in real life". Those that have experience ring sigs know how buggy and alpha the software is.

Gmaxwell and his bitcoin devs should also realise that the IRS has already mapped out all significant bitcoin addresses to social security numbers, whilst they debate the alpha tech of ring sigs but yet are doing nothing to fix the privacy issue. The bitcoin dev team are looking like they are stalling on privacy. It's time they do something about it instead of opining this and that.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on June 06, 2014, 05:52:30 AM
I think gmaxwell should clarify that the bitcoin coinjoin model is centralised whereas Darkcoin has decentralised coinjoin.
I think you should keep your garbage pump and dump crap out of this thread, put it someplace people won't annoy me by reporting it.

The things I described above in this thread can be implemented in a decentralized manner, as is described in some depth in post five. What darkcoin does doesn't sound decentralized at all— it depends on selected servers— but whos to say? Last I checked software was both closed source and not even working. When darkcoin was announced it claimed what it was implementing, however, was coinjoin.

Quote
looking like they are stalling
Bitcoin is openly developed software, anyone who wants to work on it can contribute to it, and last I checked none of the people who have ever worked on it are your payroll. If you're honestly concerned about privacy in Bitcoin you could do some things to help improve it. Pumping some sketchy altcoin in the wrong sub-forum, however, is not going to help, nor is attacking people who have no responsibility to serve your interests.

For some context for those confused about where this little OT tangent came from, someone wrote a fairly scathing analysis of DarkCoin (https://bitcointalk.org/index.php?topic=641178.0), basically making a case that it's a substanceless effort promoted by misleading marketing. Unfortunately, in making their argument they linked back here... drawing along some vigilant defenders. I'll continue deleting any more darkcoin posts that show up.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Propulsion on June 06, 2014, 06:35:51 AM
I think gmaxwell should clarify that the bitcoin coinjoin model is centralised whereas Darkcoin has decentralised coinjoin.
I think you should keep your garbage pump and dump crap out of this thread, put it someplace people won't annoy me by reporting it.

The things I described above in this thread can be implemented in a decentralized manner, as is described in some depth in post five. What darkcoin does doesn't sound decentralized at all— it depends on selected servers— but whos to say? Last I checked software was both closed source and not even working. When darkcoin was announced it claimed what it was implementing, however, was coinjoin.

Quote
looking like they are stalling
Bitcoin is openly developed software, anyone who wants to work on it can contribute to it, and last I checked none of the people who have ever worked on it are your payroll. If you're honestly concerned about privacy in Bitcoin you could do some things to help improve it. Pumping some sketchy altcoin in the wrong sub-forum, however, is not going to help, nor is attacking people who have no responsibility to serve your interests.

Sorry Greg.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: laurentmt on June 06, 2014, 07:28:26 PM
The "entropy" will depend upon the model of attacker. Start by enumerating those.

My attempt to collect a few random thoughts on the subject (long post).

1/ First studies in this field have modeled the blockchain as transactions graph and/or addresses graph. In a generic way, the enlarged blockchain ecosystem can be modeled as a graph in which nodes are:
- Txo : associated to a given amount and controlled by a given script
- Entity (human / organizational / machine) : controls txos by controlling associated scripts (alone or with others entities)
- Tx : acts like "micro-mixers" of txos (amounts of input txos are mixed/splitted and forwarded to output txos)
Note: the description is purposefully simplified, but it should be enough for the discussion.

2/ An attacker has 2 objectives:
      - deanonymization of entities
      - determination of the links between input and output of transactions

These 2 objectives are not orthogonal. They're mutually reinforcing. Every information gained for one can be used for the other.


Deanonymization of entities

3/ It often starts with side-channel attacks:
- information gathering (bitcoin addresses, id, emails, ...) from various sources (forums, social networks, db managed by exchanges, merchants, ...). These information allow to associate deanonymized entities to a subset of the txos. Solutions like Stealth addresses help to address this issue.
- network eavesdropping (like the one described here (https://bitcointalk.org/index.php?topic=632124.0)). It's a 2-steps process (at least):
      a - association of an ip address to a tx
      b - association of an entity (person, ...) to the ip address
      c - for more complex scenarii (mixed or coinjoin txs) ip address has to be associated to a subset of the input txos of the tx.

4/ As stated by gmaxwell, starting from the txos associated to deanonymized entities, the attackers want to follow the deanonymized funds forwards or backwards and expand their knowledge recursively. It leads us to the second objective.


Determination of links between inputs and outputs of transactions

5/ I think the problem can (should ?) be addressed in a probabilistic way. An attacker doesn't need 100% certainty before deciding of an action. She just needs to be above a given threshold of confidence. If a bunch of the analysis can be automated, the attacker can study several alternative hypotheses and decide which one seems the best.

6/ Taint analysis is the first tool usable for this kind of analysis. The result has 100% certainty (it's just a basic "read" of the blockchain) but produces limited insights.

7/ You can use some heuristics to enrich information provided by taint analysis. First studies in the domain used very simple heuristics like multi-input transactions and shadow addresses (see the paper "Evaluating User Privacy in Bitcoin") but gave quite good results. This privacy issue was addressed by avoiding address reuse and some new proposal like mixers or coinjoin txs. You can also use some "best-guess" heuristics like the one used by blockchain.info to determine which output is payment and which one is change.

8/ The more you know about entities, the more you can use sophisticated heuristics. For example, an attacker can use a specific knowledge (2 persons live in the same city and are occasional users of localbitcoin) in order to infer that the input of a coinjoin tx is linked to a specific output (if she already knows which input/output is controlled by these 2 persons). The attacker has not 100% certainty about this inference but it could be a reasonable hypothesis.

9/ Coinjoin has been proposed as an additional solution to strengthen privacy. As already stated by gmaxwell, it does not provide 100% anonymity but can provide better privacy. With proper design it helps to increase the cost to retrieve a given quantity of information (links between input and output). But as stated above, coinjoin remains attackable if you have side-channel informations.

Here's a "dumb" example. The attacker is an intel. agency with access to a huge amount of side-channel infos. As an analyst of this agency, I investigate on a man (let's call him Charlie) suspected to finance a terrorist attack by repeated small bitcoin transactions. Our hypothesis is that funds are received by another person (Mr. X) suspected to sell the coins on localbitcoin to gather dollars which will be used to buy some materials for the attack (I told you, it's a dumb scenario). Today, I want to analyze a given coinjoin transaction because I know that Charlie controls one of its inputs. Let's say that this coinjoin tx has 3 inputs and 3 outputs, all with same amount. The agency has a program of massive surveillance which tells me that :
- input A is controlled by a woman suffering a cancer (information retrieved from her facebook account)
- input B is controlled by Charlie
- input C is controlled by a teenager (boy - information retrieved from snapchat)
- output D is controlled by a small e-commerce website running on tor and selling weed
- output E is controlled by a porn website
- output F is controlled by an unknown entity, for now.

According to additional information that I can access, I will be able to build different hypotheses with more or less confidence:
Hyp1) The woman has bought some weed to cure her pain and the teenager has watched some porn. Charlie may have send some coins to Mr. X and I should investigate deeper the output F
Hyp2) If I know that Charlie smokes weed may be this tx is just a false positive for my investigation => Charlie has bought some weed. The woman has nothing against a porn movie from time to time and the teenager...has bought a video game.
Hyp3) [use your own fantasy here]
...

I think you get the idea. This thought experiment illustrates a few interesting facts:
- to be effective, this kind of attack requires side-channels informations. The more information you have, the more effective you are.
- let's forget the "paranoïd" scenario that intel. agencies want to do massive surveillance just because they can do it or because they pursue some nasty goals. This experiment shows that to do their job (investigating potential serious threats) intel. agencies "have to" break privacy of all users (I don't argue it's good or bad, I just draw a logical conclusion. So please, do not yell at me)
- to strengthen his privacy Charlie could chain several coinjoin txs but this solution has a major drawback: if coinjoin txs are rare among "normal" users, chaining several txs becomes a real red flag telling "Hey ! I prepare (do) something illegal"
- as proposed by others persons, systematic coinjoin txs for all users would produce a combinatorial explosion. It's not perfect anonymity but it would raise very significantly the cost of this kind of attack. 


Automated analysis (machine learning algorithms, ...)

10/ To my knowledge, few studies have used this kind of tool until now but they could be very effective (see the paper "Unsupervised Approaches to Detecting Anomalous Behavior in the Bitcoin Transaction Network"). By trying to detect repeated patterns in the blockchain, this approach helps to infer additional information. The rationale is simple : some activities are associated to very specific patterns. For example, it's likely that transactions corresponding to mining pools paying the miners or gambling sites paying the players have very specific characteristics.

Another example is provided by the MTGox's source code which was leaked a few month ago. It was quickly identified that there was an automatic process in place to split/merge amounts in their hot wallet. This knowledge was later used to detect that some funds were transfered according to this pattern (a few days before MTGox officially states that some funds had been retrieved). In this case, the pattern has been provided by a leak but you get the idea on how this kind of information can be used to reach the 2 objectives of the attacker.

11/ Patterns corresponding to automated (and non-random) processes should be the easiest to detect but it does not seem impossible that human operations could also be processed by studying temporal or behavorial patterns. For example, if you live in Europe it's likely that you send your txs at very different GMT hours compared to american or asian users.


Conclusion

12/ The current model provided by bitcoin (or by bitcoin with occasional coinjoin txs) is ultimately very close to the current situation of the interweb. Thus, it's quite straightforward to deduce the different levels of attacks and attackers:
- Group A : Intel. agencies
They have access to a massive amount of side-channel information already gathered from various sources. They will get the best results. Since not all side-channels information are not obtained by legal (official) means, these information don't always allow an official (legal) reaction.
- Group B : Large corporations
They have access to some amounts of side-channel information by providing paying services requiring the user to provide some personal informations. They'll be able to extract additional information by merging these data with data from the blockchain but at a lower level than group A. They'll an incentive to monetize these information by selling them to others entities (marketing, ads, ...).
- Group C : Basically the rest of the world
We have occasional access to some side-channel information by our direct interaction with others bitcoiners. Individually, it'll be difficult to extract significant information by merging these data with data from the blockchain.

13/ A bitcoin bank located in an exotic island and providing offchain transactions could remain the best solution for those wanting to hide illegal activities like money laundering.

14/ In this matter, I would say that the current bitcoin model does not change a lot of things compared to the current statu quo (even if bitcoin remains a great technology and a great innovation)

Disclosure : english is not my mother tongue ::)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: instagibbs on June 06, 2014, 08:10:46 PM

2/ An attacker has 2 objectives:
      - deanonymization of entities
      - determination of the links between input and output of transactions

These 2 objectives are not orthogonal. They're mutually reinforcing. Every information gained for one can be used for the other.


I think defining it as a submodular function of those two concerns is a great starting point. Not a lot to be done on #1, at least on-blockchain, is there?

If we are just comparing between what we have now and what we could have, I think it's vastly superior. For now, at least in the US, the feds snoop on all our credit card purchases, without a warrant. Probably enough evidence for a warrant, but not for conviction of any particular crime.

Getting beyond that with reasonably not too much effort will be the real challenge.

p.s. Anyone know of any good annotated datasets of transactions? Unsupervised learning is notoriously  ??? to interpret.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: laurentmt on June 07, 2014, 04:50:11 PM
I think defining it as a submodular function of those two concerns is a great starting point. Not a lot to be done on #1, at least on-blockchain, is there?
Well, bitcoin can't prevent an attacker to gather side-channel information but it can try to obfuscate links between personal information (email, social network id, ...) and addresses in the blockchain. Stealth addresses seem a promising solution for this. Moreover, deanonymization of entities is a recursive process fed by all the results obtained while working on the 2nd objective. Thus, coinjoin seems a useful tool to raise the cost of deanonymization.

If we are just comparing between what we have now and what we could have, I think it's vastly superior. For now, at least in the US, the feds snoop on all our credit card purchases, without a warrant. Probably enough evidence for a warrant, but not for conviction of any particular crime.
I could be wrong but I think it's just a matter of time before the 2 situations converge. The current trend seems to be more and more SPV clients and web wallets operated by regulated corporate entities. I guess merchants will have some duties too. Thus, if US feds have access to credit card purchases, accessing raw deanonymized informations should not be a problem for them. Of course, it remains solutions like coinjoin but I think they'll be a niche if they're opt-in features.

Getting beyond that with reasonably not too much effort will be the real challenge.
It's a very interesting point. My take is that it has 2 parts :
  - what is technically doable
  - which level of privacy is desired (according to the 3 groups defined in previous post)

It's easy to feel the tensions created inside the community by the latter. But even if the community was able to reach a consensus (an utopia) it would have huge consequences. Imagine the reaction of governments, corporations, investors if the whole community states that it wants perfect privacy and be protected from all kind of attacks. Ultimately, having a blurred position on this subject is surely the "best" option to increase the acceptance of bitcoin and reach mass adoption. But the price to pay is that it introduces a ghost in the place which exacerbates tensions (a good example here https://bitcointalk.org/index.php?topic=635317.0).

p.s. Anyone know of any good annotated datasets of transactions? Unsupervised learning is notoriously  ??? to interpret.
Nope. Possible solutions to cope with this problem:
  - use an experimental approach (by injecting coins in the system as done by Moser for his paper "Anonymity of Bitcoin Transactions - An Analysis of Mixing Services")
  - rely on the community to get additional data (think to people who've shared their Gox addresses with the community to help investigate the bank run)

This point highlights the gap between the 3 groups of attackers (group A has an obvious advantage with its ability to gather side-channel information).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Summer,69 on June 09, 2014, 10:00:26 AM
If all of the coins would be mixed, how can they be blacklisted and allowed by governments to intervene?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on June 10, 2014, 04:13:01 AM
In two weeks, this site is going to release an open source tool that purports to de-anonymize Shared Coin transactions.

http://www.coinjoinsudoku.com/advisory/

Coming from the perspective that it's impossible to improve that which is not measured, I'm glad to see tools like this appear. Hopefully in the future we'll be able to evaluate privacy claims in a more empirical and objective way and so be more likely to have tools that actually work.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: laurentmt on June 10, 2014, 03:48:25 PM
Peter Todd has made an interesting statement in the comments of this coindesk's article (http://www.coindesk.com/blockchains-sharedcoin-users-can-identified-says-security-expert/).

Quote
What Dark Wallet actually implements is to have two classes of users, those who need a transaction done immediately, and those who are mixing coins. The latter group simply copies the output amounts of the former group, providing a set of two outputs in every CoinJoin transaction whose ownership is unknown. SharedCoin does the same thing, but with blockchain.info acting as that coin mixing group.

I may be wrong but it seems likely that bc.i uses a same pool of coins over and over for the sharedcoin txs. It's not impossible that, with some efforts, someone could identify which txos in the transaction graph are concerned (i.e. belong to bc.i), decreasing a bit more the level of privacy offered. To be effective and avoid this kind of privacy leak, coinjoin should use a large pool of mixing coins (the 2nd group of users in Peter's comment) and avoid reusing the same mixing coins over and over (with a frequency which allows to identify them).

Btw, it's likely that decentralized solutions like darkwallet are the easiest way to achieve this goal if they have enough traction and can maintain a large mixing pool.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: sile16 on June 24, 2014, 05:31:24 AM
There should be an open protocol that can help coordinate people who want to coinjoin.  Is there already something else out there that can automate that?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Nite69 on June 24, 2014, 05:52:49 AM
I'm implementing distributed coinjoin to a couple of alt coins. I guess it can be applied to bitcoin also.

Shortly the algo:
Coinjoin offers are broadcasted as normal transactions, but on other channel, using message "ctx".
These offers are collected to a complete coinjoin transaction by first sorting the offers, then all participants sign it in turns based on sorting order and transmits them on the ctx channel. When the last finds it is complete, it transmits the complete transaction using normal tx message.

https://bitcointalk.org/index.php?topic=607919.7860


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on June 24, 2014, 05:31:29 PM
So it's trivially identifiable whose outputs are whose based on the observed offers?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Nite69 on June 24, 2014, 08:10:21 PM
So it's trivially identifiable whose outputs are whose based on the observed offers?

I have been wondering that too.
Coinjoin itself protects transactions on blockchain only. However it requires someone to log all transactions 24 hours / day.

It is one improvement which should be done some day. The offers should be encrypted, so only the participants can decrypt all inputs. Then it would reveal only one address, and that might be generated to be used only once, maybe with 0 output. Other possibility would be to share the offers throught encrypted channel.

Any other ideas to improve it?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: maaku on June 24, 2014, 10:41:11 PM
Read the first page of this thread. There's a solution involving blinded outputs.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ShakyhandsBTCer on June 24, 2014, 11:25:36 PM
Peter Todd has made an interesting statement in the comments of this coindesk's article (http://www.coindesk.com/blockchains-sharedcoin-users-can-identified-says-security-expert/).

Quote
What Dark Wallet actually implements is to have two classes of users, those who need a transaction done immediately, and those who are mixing coins. The latter group simply copies the output amounts of the former group, providing a set of two outputs in every CoinJoin transaction whose ownership is unknown. SharedCoin does the same thing, but with blockchain.info acting as that coin mixing group.

I may be wrong but it seems likely that bc.i uses a same pool of coins over and over for the sharedcoin txs. It's not impossible that, with some efforts, someone could identify which txos in the transaction graph are concerned (i.e. belong to bc.i), decreasing a bit more the level of privacy offered. To be effective and avoid this kind of privacy leak, coinjoin should use a large pool of mixing coins (the 2nd group of users in Peter's comment) and avoid reusing the same mixing coins over and over (with a frequency which allows to identify them).

Btw, it's likely that decentralized solutions like darkwallet are the easiest way to achieve this goal if they have enough traction and can maintain a large mixing pool.
The more times your output is the same address the easier it would become to trace your coins.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: mitchellmint on July 03, 2014, 03:45:47 AM
I havent read the whole thread so this might not be a new idea but... it was something I accidentally discovered sending coins to a different coin with the same digit.

This concept is not promised to be implemented by VVV but was kicked around.

https://docs.google.com/a/mitchellmint.com/presentation/d/1X0QHjzkVtGJf5sf1vtiIjGQ_AvPg2GdPSYrc5vb9NIo/edit#slide=id.g35a51815e_040 (https://docs.google.com/a/mitchellmint.com/presentation/d/1X0QHjzkVtGJf5sf1vtiIjGQ_AvPg2GdPSYrc5vb9NIo/edit#slide=id.g35a51815e_040)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AdNarim on July 18, 2014, 03:23:39 AM
I have an idea about a way to perform a decentralized Coinjoin so that individual participants are unable to map inputs to outputs - without the need for an anonymity network or blinded signatures.

As a disclaimer, although I have experience programming I am not well-practiced in cryptography, so forgive me if I make any egregious mistakes and waste everyone’s time.

Given the IP addresses and public keys for all N Coinjoin participant nodes, I envision the following onion routing protocol (inspired by what is used in Tor):

1.   Decide upon a random path which visits every node once and ends up back at our node.

2.   Using Onion Routing, send a multi-level encrypted message along this path. Each node by using its private key to decrypt the message will be able to see where the message was supposed to originate from, the bitcoin addresses to be used as inputs, and where to send the message to next. The rest of the message will only be able to be further decrypted by the next destination. When the message gets back to us, it should have visited every node in the path.
See: http://en.wikipedia.org/wiki/Onion_routing

3.   Same protocol, but with output addresses (can be done in parallel with the input addresses).

4.   Same protocol, but with our signature of the completed transaction.

5.   Broadcast transaction.


In theory, each node will be unable to tell from what node the input and output addresses originated. However, I see several serious issues with this proposal, and would welcome even more critique:

  • Timing Attacks: If a node receives the message early in the process, it is more likely that that the sender owns the associated addresses. This may be mitigated through random delays or other, more clever schemes.
  • Message Size: A node may be able to analyze the size of the message to determine how far along it is. To counter this, a randomly-sized allotment of junk data should be included in the inner-most message.
  • Slow: this protocol takes N time, as the message must be forwarded to each node.
  • DDOS: What is to stop some other node from screwing everyone over? It is possible to see if our message was tampered with (using random numbers, accumulating counters, etc.), but it would still be difficult to make the protocol resistant to malicious nodes mucking everything up and wasting everyone’s time.
  • Sybil Attacks: You’re pretty much screwed. Tor has similar issues, this is one thing you really can’t do anything about (other than favoring IP addresses that are likely to be in physically separate locations)
  • Other stuff: It’s probably out there, I just can't think of it at the moment.

Well, what about the positives? Assuming all the negative obstacles are surmountable:

  • Inputs are not linked to IP addresses.
  • Outputs are not linked to IP addresses.
  • Inputs are not linked to outputs any more than can be determined from looking at the finalized transaction.
  • No anonymity network required. This is important as P2P over, say, Tor is a pain.
  • No reconnecting required. You are not required to meet up with the same nodes again.
  • If you are behind a NAT router or firewall blocking inbound connections, you can hire an open node as a proxy. As only you have access to your private key, you can have this node forward/receive your messages without worrying about it snooping (granted, it can still cause as much trouble as the other nodes, and you probably have to compensate the proxy owner by including a small transfer in your transaction).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dillpicklechips on July 26, 2014, 02:13:55 AM
Would using ring signatures work as a method of mixing without having to trust a server even though they are using one? Provably fair mixing?

Have the clients connect and have all the inputs define the initial state of the cryptonote type ring signatures. Each person then shuffles the ring and they are only able to follow their own coins. They then specify the outputs in the ring whatever they are. Once everyone is happy they are getting paid they all sign. No one, not even server would be able to follow who is getting what. And even if the person had one input they could have multiple outputs depending on what they specify in the ring.

Kind of like my idea here: https://bitcointalk.org/index.php?topic=706000.0


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on July 26, 2014, 02:19:00 AM
Would using ring signatures work as a method of mixing without having to trust a server even though they are using one? Provably fair mixing?
Please see the fifth post in the thread. :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AdNarim on August 01, 2014, 05:23:04 PM
I am currently working on a Java library which facilitates decentralized CoinJoin-ing using a BitcoinJ backend.

As of this moment the library only works with fixed CoinJoin participants, I have yet to implement participant discovery (that's next on the list).
It also is very insecure at the moment, as I hacked together some sections in order to test general principles. It will be some time before the code is solid enough to not be embarrassing :\

Current plan:
1. Implement peer discovery (perhaps using a DHT)
2. Fix error handling and enhance verification of transaction components
3. simplify, refactor, rename
4. post source code (under a permissive OSS license)
5. Make CoinJoin process more anonymous.
6. ALPHA release?

example:
http://tbtc.blockr.io/tx/info/c4d86d7a054e5979172b223a15d5d9594f703d6376ab294ee4b2da45ff77b0eb

This is a test CoinJoin transaction between only 2 users. In this example I set the change and output address to be the same. The general caveats of a CoinJoin transaction still apply: each change address is clearly linked with an output address, and therefore by using blockchain analysis it may still be possible to link addresses. True anonymity requires minimal address reuse and tools for managing taint.

For now, though, I just send an unconfirmed transaction to a new address of fixed size, then use that unconfirmed transaction as part of the CoinJoin. Needless to say, for this scheme 0 confirmation coinjoins should not be accepted! Regardless, I am trying to write the library to be adaptable as possible to different types of CoinJoins, including coinjoins where each user has multiple inputs, casual coinjoins, and coinjoins without any change address.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AdNarim on August 05, 2014, 10:16:29 PM
Currently peer discovery is implemented with a centralized server. The server waits for N users to connect, then sends a message containing the IP Address and port of all participants. This approach is vulnerable to denial of service and is a single point of failure, but on the up-side any compliant server can be used. I still believe distributed peer discovery is ideal, but that can always be added later.

The centralized method is also NAT-friendly if Tor is used. Here is an idea for anonymous peer discovery and communication:

1. Each participant starts a Tor Hidden Service.
2. Using Tor, each participant connects to a peer discovery server, which is itself a Hidden Service. It announces the ID of its Hidden Service and open port.
3. The server then sends each participant a list of the Hidden Services. The participants then connect to these Servers and proceed with the decentralized CoinJoin process.

+ No traffic ever leaves the Tor network
+ No port forwarding / NAT traversal is required (in this sense it is more user-friendly than a non-anonymous

It should be noted that in order to prevent inputs and outputs from being linked by participants more complicated measures such as the blind signatures discussed on the first page must be used.

P.S.
Here is an example of a 10-way CoinJoin I generated using my library:
http://tbtc.blockr.io/tx/info/894d10fea8e017789e80e2965d3421572e42e19ba8c6f51ce4a22b3c40b0f831

This is similar to what a CoinJoin transaction would look like in practice, except a more secure implementation would mix the outputs around better.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: BTCfan668 on August 06, 2014, 03:52:26 AM
How safe is doing this bitcoin transaction?
This is very safe, however it is not very private. It is essentially not possible to "lose" your coins doing this, however it has been proven that these types of transactions can be traced by inspecting the blockchain.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: gmaxwell on August 06, 2014, 09:01:03 AM
This is very safe, however it is not very private. It is essentially not possible to "lose" your coins doing this, however it has been proven that these types of transactions can be traced by inspecting the blockchain.
Don't confuse blockchain.info's completely broken "Shared Send"— they provide no privacy at all for reasons unrelated with this thread. The privacy implications of well constructed CoinJoins are discussed in some depth in the initial post and some other posts in this thread.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: belcher on August 08, 2014, 08:23:12 PM
I have coded a simple implementation of CoinJoin.
https://bitcointalk.org/index.php?topic=730321.msg8254585

It makes no assumptions about how peers communicate but instead provides ascii-armored raw transactions similar to the PGP format which can be shared on any text-based protocol such as a Tor hidden service forums, Bitmessage chans, I2P eepsites, Freenet pages or something like that.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: molecular on August 08, 2014, 08:37:55 PM
I am currently working on a Java library which facilitates decentralized CoinJoin-ing using a BitcoinJ backend.

I applaud!

Current plan:
1. Implement peer discovery (perhaps using a DHT)
2. Fix error handling and enhance verification of transaction components
3. simplify, refactor, rename
4. post source code?
5. Make CoinJoin process more anonymous.
6. ALPHA release?

I think it would be good if you removed the "?" from number 4, no?

I don't have much time currently, but let me know if you need testers.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: themgp on August 12, 2014, 04:48:15 AM
Currently peer discovery is implemented with a centralized server. The server waits for N users to connect, then sends a message containing the IP Address and port of all participants. This approach is vulnerable to denial of service and is a single point of failure, but on the up-side any compliant server can be used. I still believe distributed peer discovery is ideal, but that can always be added later.

The centralized method is also NAT-friendly if Tor is used. Here is an idea for anonymous peer discovery and communication:

1. Each participant starts a Tor Hidden Service.
2. Using Tor, each participant connects to a peer discovery server, which is itself a Hidden Service. It announces the ID of its Hidden Service and open port.
3. The server then sends each participant a list of the Hidden Services. The participants then connect to these Servers and proceed with the decentralized CoinJoin process.

+ No traffic ever leaves the Tor network
+ No port forwarding / NAT traversal is required (in this sense it is more user-friendly than a non-anonymous

It should be noted that in order to prevent inputs and outputs from being linked by participants more complicated measures such as the blind signatures discussed on the first page must be used.

P.S.
Here is an example of a 10-way CoinJoin I generated using my library:
http://tbtc.blockr.io/tx/info/894d10fea8e017789e80e2965d3421572e42e19ba8c6f51ce4a22b3c40b0f831

This is similar to what a CoinJoin transaction would look like in practice, except a more secure implementation would mix the outputs around better.

If you are writing a Java library and are planning on using a DHT, have a look at TomP2P.  Its what i used in http://coinmux.com (http://coinmux.com).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Wafel16 on August 15, 2014, 04:37:08 PM
This is amazing, i will definitly keep an eye on this.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: MarisaFea on August 17, 2014, 10:37:10 PM
So let me try and figure this out this is a little out of my league but here it goes:

Effectively you are creating a mixing service within the Bitcoin network itself? Making privacy better because no one can track where you sent your Bitcoin because it is split up and combined with other peoples transactions. Surely this has already been done by several mixing services?

Wouldn't this create more legal problems for Bitcoin? If this is what you want to achieve surely it's illegal because this can be abused very easily.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: marcus_of_augustus on August 17, 2014, 10:43:50 PM
So let me try and figure this out this is a little out of my league but here it goes:

Effectively you are creating a mixing service within the Bitcoin network itself? Making privacy better because no one can track where you sent your Bitcoin because it is split up and combined with other peoples transactions. Surely this has already been done by several mixing services?

Wouldn't this create more legal problems for Bitcoin? If this is what you want to achieve surely it's illegal because this can be abused very easily.

It also has technical benefits for the network in terms of reduced overheads.

btw, bitcoin is legal, it has no "legal problems". You are probably confused by the enormous legal complexities of handling government fiat.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: MarisaFea on August 17, 2014, 10:53:52 PM
So let me try and figure this out this is a little out of my league but here it goes:

Effectively you are creating a mixing service within the Bitcoin network itself? Making privacy better because no one can track where you sent your Bitcoin because it is split up and combined with other peoples transactions. Surely this has already been done by several mixing services?

Wouldn't this create more legal problems for Bitcoin? If this is what you want to achieve surely it's illegal because this can be abused very easily.

It also has technical benefits for the network in terms of reduced overheads.

btw, bitcoin is legal, it has no "legal problems". You are probably confused by the enormous legal complexities of handling government fiat.

I was talking about how people compare Bitcoin users to criminals we all know it happens because of laundry for one example. Then this would just give those accusers more leverage because with this enabled technically everyone would be breaking the law.


Making Bitcoin illegal in every country if this is enabled. Unless I'm not fully grasping something I think that's what this is all about and could cause a few problems.

I can see why this would be beneficial to the network and the general user of Bitcoin but I can also see it enabling thieves even more.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on August 17, 2014, 11:26:44 PM
I was talking about how people compare Bitcoin users to criminals we all know it happens because of laundry for one example. Then this would just give those accusers more leverage because with this enabled technically everyone would be breaking the law.
You're gonna *love* my next blog post...


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: MarisaFea on August 17, 2014, 11:28:42 PM
I was talking about how people compare Bitcoin users to criminals we all know it happens because of laundry for one example. Then this would just give those accusers more leverage because with this enabled technically everyone would be breaking the law.
You're gonna *love* my next blog post...

Link it to me and I'll tell you if I "love" it or not ;)


/ot

I'm really trying to figure this out and try to address some of my concerns and I believe this would result in a lot of accusations flying out.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: marcus_of_augustus on August 17, 2014, 11:29:04 PM
... like cash enables thieves "even more" ...  ::)

money needs to be functional as an economic unit ... rather than fulfill every utopian fantasy bestowed upon it


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: MarisaFea on August 17, 2014, 11:35:15 PM
... like cash enables thieves "even more" ...  ::)

money needs to be functional as an economic unit ... rather than fulfill every utopian fantasy bestowed upon it

Well that's always been my defense when explaining Bitcoin to people and they point out the issues with recent happening with mt gox and money laundering. Bitcoin does nothing less than cash does related to the legal side of things.

But, I'm just saying this sort of thing is adding fuel to the engine and could potentially make things a lot worse.




Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: justusranvier on August 18, 2014, 02:57:53 AM
I was talking about how people compare Bitcoin users to criminals we all know it happens because of laundry for one example. Then this would just give those accusers more leverage because with this enabled technically everyone would be breaking the law.
You're gonna *love* my next blog post...

Link it to me and I'll tell you if I "love" it or not ;)


/ot

I'm really trying to figure this out and try to address some of my concerns and I believe this would result in a lot of accusations flying out.
I'm going to explain how Bitcoin can be used as a defencive weapon that allows the younger generation to avoid paying the debts bestowed upon them by the older generation, and how if they wield it correctly they'll collapse the fiat debt ponzi scheme, the tax base, and the US Dollar itself, with specific instructions for how to get started.

It's going to do great things for the public perception of Bitcoin.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: doldgigger on August 18, 2014, 03:17:08 PM
1. Each participant starts a Tor Hidden Service.

This would require all nodes to run Tor! Why not do the CoinJoin negotiation over BTC's network protocol, which the nodes participate in anyway? This way, those who use BTC through Tor also do the negotiation through Tor, but no one has to.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: AdNarim on August 18, 2014, 05:38:22 PM
1. Each participant starts a Tor Hidden Service.

This would require all nodes to run Tor! Why not do the CoinJoin negotiation over BTC's network protocol, which the nodes participate in anyway? This way, those who use BTC through Tor also do the negotiation through Tor, but no one has to.

There is little benefit to negotiation over the Bitcoin network protocol for traditional CoinJoin's besides eliminating the need for an additional networking layer.

On the downside, adding additional messages to the network protocol is likely an irksome process, and is not very flexible. A separate network may be rapidly iterated upon, and other shared transactions other that traditional CoinJoins may be added.

In regards to Tor, for Java there exists the Orchid library, which allows Tor to be easily integrated within Java applications. The main benefit of using Tor Hidden Services (to me at least, if I am understanding things correctly) is not really anonymity, but rather NAT traversal. Without Tor, you have to keep a port open to allow users to connect to you node and perform a decentralized CoinJoin. Tor hidden services connect to Tor Relays, and therefore do not require any ports to be open. As long as the NAT/firewall allows outgoing Tor connections, everything works out.

EDIT:
I forgot to mention, a downside of using Tor is that TomP2P and all other Java DHT libraries that I know of require ports to be open to ensure the integrity of DHT (if no nodes are hosting the DHT information, what's the point?). As such, in order to make the DHT robust the code would have to be extended to facilitate Tor Hidden services. This doesn't even address the fact that using a DHT to facilitate CoinJoining between number of users n>2 is a real pain.

Hence, decentralizing peer discovery is a job for another day week month.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Rassah on August 21, 2014, 03:28:10 AM
FYI, Mycelium's development roadmap is

1) Implement HD wallets (about 95%+ done, and works fine in testnet Dev build, but still need to update LocalTrader and other minor things to work with it)
2) Move the entire infrastructure to Tor, meaning our nodes will be run as hidden servers, only accessible through Tor, and Mycelium Wallet will have Tor built in (hopefully this won't cause problems in blocked countries, like China or Iran)
3) Implement CoinJoin, using our nodes that are used for address lookup and broadcasts, to collect and broadcast mixing requests. Likely enable this as a default feature. We'll have to figure out if we'll need to follow the DarkWallet model of letting some users leave their coins to mix, or if we have enough transaction volume to do it on the fly. Maybe we'll even link with DarkWallet servers, and use the people looking to mix there.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dillpicklechips on August 21, 2014, 03:30:28 AM
3) Implement CoinJoin, using our nodes that are used for address lookup and broadcasts, to collect and broadcast mixing requests. Likely enable this as a default feature. We'll have to figure out if we'll need to follow the DarkWallet model of letting some users leave their coins to mix, or if we have enough transaction volume to do it on the fly. Maybe we'll even link with DarkWallet servers, and use the people looking to mix there.
The larger the pool the better and it might make it easier for ad hoc transactions if everyone cooperated on using popular servers.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: evanito on August 22, 2014, 03:06:13 AM
This is cool to know, but I speculate that the average user wouldn't want this functionality. Of course those with security concerns or those trying to hide coins would absolutely love this service.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Rassah on August 22, 2014, 05:53:27 AM
This is cool to know, but I speculate that the average user wouldn't want this functionality. Of course those with security concerns or those trying to hide coins would absolutely love this service.

That's why some wallet makers will be implementing this as the default transaction method. Average users won't even know they are doing it.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dillpicklechips on September 07, 2014, 09:20:52 PM
Cross posting a coinjoin conversation:

As part of ongoing efforts of the Monero Project, a small program has been generated that allows you to do 1-of-N ring signatures using a secp256k1 keypair and a keyring of public keys. The program signs both binaries and text files.

https://github.com/monero-project/urs

To build and install, use this command after installation of Go:
Code:
go get -u -v github.com/monero-project/urs/...

According to the paper, unique ring signatures are anonymous except in the case of signing the same message multiple times (in which case X and Y in the signature appear to be the same).

http://csiflabs.cs.ucdavis.edu/~hbzhang/romring.pdf

A potential usage might be to sign gitian asserts from a trusted keyring anonymously that contains well known members of the Bitcoin project. Another usage would be for members of a trusted community of Bitcoin users to anonymously vote for some proposal by signing it separately and publishing their signatures.

Thanks to Hein Meling for the initial URS implementation, Conformal Systems for their immensely useful libraries, and gmaxwell for inspiration.

Another interesting use could be a type of ring signature coinjoin? A group gets together and determines the inputs. The ring signatures are used for each person to pick their outputs and can even have multiple outputs of different values. Once the group has enough messages specifying the output addresses the coinjoin transaction is created and signed. If any party of the group cheats the output values will total to be too high and the transaction is discarded.

This is a good idea. In the original coinjoin thread (https://bitcointalk.org/index.php?topic=279249.0) gmaxwell described a blinding scheme wherein users would initially provide their outputs in blinded form, have them blindsigned by the central server (or the "leader" node in a p2p setup) (or all participating parties, which is bandwidth-heavy), then reconnect anonymously to unblind them. For a p2p setup this means that somebody has to produce the blind signatures: either a leader must be selected, which adds complexity to the protocol, or every party signs every output, which leads to O(n^2) scaling.

With a ring signature on the other hand, each party would anonymously sign only their own outputs -- all nodes participate equally, with O(n) signatures. (Of course, the ring signatures are O(n) in size, so you might say this is still O(n^2) scaling. But since every signature uses the same keyring, this doesn't need to be passed around. Just the signature itself plus a blinding factor Q (one per signature, no need to use different ones per key in this case) as described in an earlier post.)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dillpicklechips on October 01, 2014, 03:35:53 PM
Some links from reddit.

https://www.youtube.com/watch?v=YDGUUtDqNV0
Coinshuffle: Trustless, Peer-to-Peer Bitcoin Mixing


Links:
Demos
http://shuffle.devbtc.com
http://simulator.devbtc.com
Github
https://github.com/bryanvu/coinshuffle-server
https://github.com/bryanvu/coinshuffle-sim
https://github.com/bryanvu/bitcoinjslib-wallet


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Trader Steve on October 01, 2014, 06:13:27 PM
Some links from reddit.

https://www.youtube.com/watch?v=YDGUUtDqNV0
Coinshuffle: Trustless, Peer-to-Peer Bitcoin Mixing


Links:
Demos
http://shuffle.devbtc.com
http://simulator.devbtc.com
Github
https://github.com/bryanvu/coinshuffle-server
https://github.com/bryanvu/coinshuffle-sim
https://github.com/bryanvu/bitcoinjslib-wallet

I cannot code but I would love to see this project develop. If anybody wants to develop a wallet I'm sure there are many people like myself that would donate to help make it happen.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Trader Steve on October 01, 2014, 10:32:47 PM
FYI, Mycelium's development roadmap is

1) Implement HD wallets (about 95%+ done, and works fine in testnet Dev build, but still need to update LocalTrader and other minor things to work with it)
2) Move the entire infrastructure to Tor, meaning our nodes will be run as hidden servers, only accessible through Tor, and Mycelium Wallet will have Tor built in (hopefully this won't cause problems in blocked countries, like China or Iran)
3) Implement CoinJoin, using our nodes that are used for address lookup and broadcasts, to collect and broadcast mixing requests. Likely enable this as a default feature. We'll have to figure out if we'll need to follow the DarkWallet model of letting some users leave their coins to mix, or if we have enough transaction volume to do it on the fly. Maybe we'll even link with DarkWallet servers, and use the people looking to mix there.

Fantastic!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dillpicklechips on October 03, 2014, 03:47:52 AM
For CoinShuffle:
Are denominations best? I'm just wondering if each user specified multiple output addresses in separate encrypted containers would the amounts provide some type of clue to the originator?

I'm thinking of CoinShuffle while doing payments. If an item costs 1.2 btc then the wallet could do a CoinShuffle for 2 btc sending one output to the actual payment and the change to an address they control.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: belcher on October 30, 2014, 05:34:50 PM
I posted this relevant text to the darkwallet mailing list.

Summary:
One party waits for a mix (by enabling mixing on a pocket). Another wants to mix on demand.

Allow waiting party to specify a mixing fee that will be paid to its change address by the other side.

I suggest this will create a mixing market and increase mixing volume.


----------------------------------------------------------


A proposal for an improvement to darkwallet's coinjoin system.

Darkwallet's coinjoin works with two parties. One party will wait around with bitcoins they wish to mix. Another party will connect with them whenever they want to do a transactions and the two parties will do a coinjoin. By analogy with exchange matching engines, I will call the first party the coinjoin maker and the second the coinjoin taker.

The idea is that there will be people acting as makers who will slowly mix their coins for the benefit of the takers who want to immediately mix.

Here is an example of a darkwallet coinjoin transaction
https://blockchain.info/tx/c38aac9910f327700e0f199972eed8ea7c6b1920e965f9cb48a92973e7325046

As you can see, the change addresses can be linked with the inputs but the address with outputs of 0.01btc cannot be linked. Mixing is achieved.
The maker/taker model solves the problem of having to wait around for someone who wants to coinjoin exactly the same amount as you.

There are a few small problems with this. I will propose an improvement.

First, the only people motivated enough to mix will be people who already have desire privacy. So, for the example of someone wanting to privately buy contraception and hide the fact from their parents, mixing may result in their coins being mixed with drug money. It is easy to imagine this ecosystem being split between 'clean' coins mostly owned by investors and 'dirty' coins owned by 'undesirables' of society. It's easy to imagine a blacklist system being made which these two groups are seperated and cannot cross the barrier of blacklists, which would be highly damaging to bitcoin fungiblility.

Secondly, there is little incentive to act as a coinjoin maker when you could just be a coinjoin taker and get your mixing done without any waiting.

Thirdly, a small number of coinjoin makers leaves open the possiblity of three-letter agencies offering coinjoin making, and using that role to deanonymize darkwallet coinjoins.

Proposal: Pay the coinjoin makers. They will put up offers to do coinjoin along with a fee they ask. The coinjoin transaction would be built up in a similar way to the above example, with the coinjoin maker fee being added to the associated change address and taken away from the coinjoin taker's change address.

An implication of this is that darkwallet coinjoin mixing will become like an almost-riskless savings account. We already see that holders of bitcoin are willing to earn just 0.006% per day by lending btc on the bitfinex exchange, and that contains a substantial risk that bitfinex will go disappear or be hacked taking all the bitcoins with it.
Darkwallet coinjoin with a maker's fees would be far less risky, the bitcoin private keys would never leave the owner's computer. This would likely result in investors pouring in. The huge relative supply of bitcoins along with the drought of other worthy bitcoin investments is likely to drive down the fees of mixing as the investors bid each other down.

The coinjoin takers will have access to tens of thousands of clean, untainted bitcoins to mix with at a very low price. The makers will have access to a very low risk investment for their bitcoins. Bitcoin fungiblility as a whole will benefit because the entire economy and flow of money will be more interrelated, making blacklists completely unfeasable. The market for coinjoin makers may end up so deep and liquid that three-party or even four-party coinjoins may become managable to organise.


~Belcher
PGP fingerprint: 0A8B 038F 5E10 CC27 89BF  CFFF EF73 4EA6 77F3 1129


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: 2586 on October 30, 2014, 05:55:42 PM
Proposal: Pay the coinjoin makers. They will put up offers to do coinjoin along with a fee they ask. The coinjoin transaction would be built up in a similar way to the above example, with the coinjoin maker fee being added to the associated change address and taken away from the coinjoin taker's change address.

Doesn't seem like a terrible idea. I do wonder though, could this potentially compromise the privacy of coinjoin makers based on the unique fee amounts that they charge? If I'm charging 0.5773% per transaction, that might make it easy to identify which transactions I'm involved in. Or does this not matter?

If it does, perhaps some sort of fee standardization or fuzzing should be included. Makers could be required to choose a specific fee tier (1%, 0.5%, 0.1%, 0.05%, etc). Alternatively, makers could choose a range in which to make offers (such as 0.1%-0.9%), and randomly change their offer every time their offer is taken or every 10 minutes that it sits untaken.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: laurentmt on October 30, 2014, 06:22:48 PM
I like this idea.

Providing a financial incentive seems a good way to increase adoption of privacy tools and transform dormant bitcoins in active money.

Moreover, some coinjoin txs (like the example in your post) provide a low entropy and it's really easy to link outputs.
By transferring a fee from taker to maker, the tx becomes more similar to a regular tx in term of entropy and you can't link outputs with 100% certainty.
The "downside" is that these txs still have a specific signature (#outputs >=4) different from the most usual txs (#outputs = 2).

Just a detail: Don't think your proposal will "solve" the third point from your post. Having more makers is nice but it won't remove attackers. And some could argue that your proposal will just help to fund them ;)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: belcher on October 30, 2014, 07:07:30 PM
I do wonder though, could this potentially compromise the privacy of coinjoin makers based on the unique fee amounts that they charge? If I'm charging 0.5773% per transaction, that might make it easy to identify which transactions I'm involved in. Or does this not matter?

An individual maker's fees won't be too different from anyone else because of market forces. There will surely be many many people offering to make coinjoin at almost exactly the same fee.

But you're right that coinjoin doesnt hide the fact that coinjoin is taking place. In the posted example (tx hash: c38aac9...) we know its a coinjoin but have no idea which 0.01btc output belongs to whom.



Moreover, some coinjoin txs (like the example in your post) provide a low entropy and it's really easy to link outputs.
By transferring a fee from taker to maker, the tx becomes more similar to a regular tx in term of entropy and you can't link outputs with 100% certainty.
The "downside" is that these txs still have a specific signature (#outputs >=4) different from the most usual txs (#outputs = 2).

Yep, it's inherent in coinjoin that you cant hide easily the fact that a coinjoin took place.
Individual outputs are still mixed though.

Just a detail: Don't think your proposal will "solve" the third point from your post. Having more makers is nice but it won't remove attackers. And some could argue that your proposal will just help to fund them ;)

I never said it would :)
(Maybe implied it)

It's similar to the situation with tor nodes. More honest nodes make it harder for the NSA.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: HostFat on October 31, 2014, 12:16:42 AM
I's a very good idea, I like it :)

Maybe this idea can be even used to give more funds to the DarkWallet team.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: little tiger on October 31, 2014, 03:59:14 AM
it's a cool idea, but is there any simpler way to maintain the btc privacy?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: molecular on October 31, 2014, 05:09:40 AM
here's an idea by belcher@irc regarding coinjoin implementation in darkwallet:

A proposal for an improvement to darkwallet's coinjoin system.
 
Darkwallet's coinjoin works with two parties. One party will wait around with bitcoins they wish to mix. Another party will connect with them whenever they want to do a transactions and the two parties will do a coinjoin. By analogy with exchange matching engines, I will call the first party the coinjoin maker and the second the coinjoin taker.
 
The idea is that there will be people acting as makers who will slowly mix their coins for the benefit of the takers who want to immediately mix.
 
Here is an example of a darkwallet coinjoin transaction
https://blockchain.info/tx/c38aac9910f327700e0f199972eed8ea7c6b1920e965f9cb48a92973e7325046
 
As you can see, the change addresses can be linked with the inputs but the address with outputs of 0.01btc cannot be linked. Mixing is achieved.
The maker/taker model solves the problem of having to wait around for someone who wants to coinjoin exactly the same amount as you.
 
There are a few small problems with this. I will propose an improvement.
 
First, the only people motivated enough to mix will be people who already have desire privacy. So, for the example of someone wanting to privately buy contraception and hide the fact from their parents, mixing may result in their coins being mixed with drug money. It is easy to imagine this ecosystem being split between 'clean' coins mostly owned by investors and 'dirty' coins owned by 'undesirables' of society. It's easy to imagine a blacklist system being made which these two groups are seperated and cannot cross the barrier of blacklists, which would be highly damaging to bitcoin fungiblility.
 
Secondly, there is little incentive to act as a coinjoin maker when you could just be a coinjoin taker and get your mixing done without any waiting.
 
Thirdly, a small number of coinjoin makers leaves open the possiblity of three-letter agencies offering coinjoin making, and using that role to deanonymize darkwallet coinjoins.
 
Proposal: Pay the coinjoin makers. They will put up offers to do coinjoin along with a fee they ask. The coinjoin transaction would be built up in a similar way to the above example, with the coinjoin maker fee being added to the associated change address and taken away from the coinjoin taker's change address.
 
An implication of this is that darkwallet coinjoin mixing will become like an almost-riskless savings account. We already see that holders of bitcoin are willing to earn just 0.006% per day by lending btc on the bitfinex exchange, and that contains a substantial risk that bitfinex will go disappear or be hacked taking all the bitcoins with it.
Darkwallet coinjoin with a maker's fees would be far less risky, the bitcoin private keys would never leave the owner's computer. This would likely result in investors pouring in. The huge relative supply of bitcoins along with the drought of other worthy bitcoin investments is likely to drive down the fees of mixing as the investors bid each other down.
 
The coinjoin takers will have access to tens of thousands of clean, untainted bitcoins to mix with at a very low price. The makers will have access to a very low risk investment for their bitcoins. Bitcoin fungiblility as a whole will benefit because the entire economy and flow of money will be more interrelated, making blacklists completely unfeasable. The market for coinjoin makers may end up so deep and liquid that three-party or even four-party coinjoins may become managable to organise.
 
 
~Belcher
PGP fingerprint: 0A8B 038F 5E10 CC27 89BF  CFFF EF73 4EA6 77F3 1129
 
 
some notes on the darkwallet example transactions
 
INPUTS
1FDCg = 0.0067
1FAkh = 0.0056
total = 0.0123
 
OUTPUTS
1MUZn = 0.001   total = 0.0062 => fee = 0.0005
1231P = 0.0052
1Fufj = 0.001   total = 0.0055 => fee = 0.0001
1iYSY = 0.0045
total = 0.0117
 
fee = 0.0006
 
so we can see the 1FDCg input address has the same owner as 1231P
 and that 1FAkh is owned by the same person as 1iYSY
 but cant tell from this tx which of those owns 1MUZn or 1Fufj
 
so we can see the owner of 1FDCg address paid 0.0005 for the miner fee
 while 1FAkh only paid 0.0001

it's mainly about incentivizing people to offer to be a coinjoin mixing partner by creating a market for this with a fee takers would pay.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: 2586 on October 31, 2014, 05:47:16 AM
You're late to the party, molecular.  :)

Another idea: Instead of or in addition to specifying a max fee they're willing to pay, takers could specify an amount of time that they're willing to wait, and their wallet would pick a max fee based on that (similar to the new dynamic transaction fees in bitcoin-qt).

If a taker specifies a max fee of zero, in addition to looking for a zero-fee maker to pair with, their wallet should also look for other takers with similar transaction sizes to pair them with. Senders could even specify that they want to receive a fee rather than paying one, effectively turning them into makers as well, except that they want to send bitcoins in the process, rather than just idly mixing their funds.

These options do increase the complexity of the pairing algorithm, but would allow for a wider variety of preferences to be expressed on the mixing market. Incentivizing idle-mixing is a great idea, but we don't want to discourage send-mixing just because all the idle-mixers start expecting payment for it.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: HostFat on October 31, 2014, 01:20:00 PM
As it seems that just-mined-bitcoins have a higher value on privacy, it would be cool to have something that show this to the end user.
Something that show that some "offers" are better than others.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: laurentmt on October 31, 2014, 01:29:32 PM
@belcher:
The idea surely requires some more thoughts (potential incentives for sybil attacks, ...) but I like the analogy with mining.
Miners are incentivized to ensure network security by blocks rewards and txs fees.
With this model, users are incentivized to ensure better network privacy thanks to "coinjoin fees".
Note that people at unsystem may have considered a similar idea (see bottom of this page (https://wiki.unsystem.net/en/index.php/DarkWallet/CoinMixing)).


Another idea: Instead of or in addition to specifying a max fee they're willing to pay, takers could specify an amount of time that they're willing to wait, and their wallet would pick a max fee based on that (similar to the new dynamic transaction fees in bitcoin-qt).

If a taker specifies a max fee of zero, in addition to looking for a zero-fee maker to pair with, their wallet should also look for other takers with similar transaction sizes to pair them with. Senders could even specify that they want to receive a fee rather than paying one, effectively turning them into makers as well, except that they want to send bitcoins in the process, rather than just idly mixing their funds.

These options do increase the complexity of the pairing algorithm, but would allow for a wider variety of preferences to be expressed on the mixing market.
Interesting idea.
IMHO,we should make a distinction between what is defined at protocol level (e.g pairing of maker & taker if fees match) and more complex behaviours implemented by wallets (e.g. taker defines the max fee he wants to pay and how long he can wait and the wallet applies a strategy to get a coinjoin which optimizes user's goals).
But I fully agree that UX will be key for adoption and that we should avoid too complex schemes.


Incentivizing idle-mixing is a great idea, but we don't want to discourage send-mixing just because all the idle-mixers start expecting payment for it.
That's another very good point but I'm not sure I reach the same conclusion.

Being a "constant" maker implies a few things :
- your computer remains online and consumes energy => being a maker implies a cost (not comparable to mining costs but there's a cost)
- you keep mixable coins in an hot wallet instead of a cold wallet => being a maker implies some risks

I'm sure that privacy enthusiasts may accept the cost and risk and become "constant" makers without a reward but this free model doesn't incentivize others people to become "constant" makers. The risk is that send-mixing is discouraged because there isn't enough makers and mixing takes too much time.

With fees, we may expect a range of offers (from 0 fee proposed by privacy enthusiasts to some X,Y, ... fees proposed by others makers).
It seems reasonable to think that a fair "market price" should appear even if some makers may still propose 0 fee mixing in order to maintain the system.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: belcher on October 31, 2014, 05:27:25 PM
@belcher:
The idea surely requires some more thoughts (potential incentives for sybil attacks, ...) but I like the analogy with mining.
Miners are incentivized to ensure network security by blocks rewards and txs fees.
With this model, users are incentivized to ensure better network privacy thanks to "coinjoin fees".
Note that people at unsystem may have considered a similar idea (see bottom of this page (https://wiki.unsystem.net/en/index.php/DarkWallet/CoinMixing)).

Yes. There's some good points raised by waxwing and others on the reddit thread that appeared.
https://pay.reddit.com/r/Bitcoin/comments/2ku4tc/darkwallet_forward_from_irc_coinjoin_proposal/

Also painlord2k had suggested an idea like this too on the dev mailing list in Nov 2013. The idea is quite obvious so I'm not surprised its been thought of a few times.


So Sybil attacks.
On the one hand it seems more honest coinjoin makers, motivated by their income, is a good thing because they crowd out the sybils.
On the other hand, now the sybils get paid too so their cost of maintaining a maker (running a computer online, owning large amounts of bitcoins) is slightly reduced.
Then there's also the coinjoin makers who were there in the status quo, people who just want to mix coins, don't mind waiting and would be willing to mix for free.
I'm not sure which way it would swing. I intuitively think Sybils will find it harder in the fee-paying model but I'm not sure how to prove or disprove that.

Now for a Sybil attack new identities need to be cheap and easy to create. But Sybil coinjoin makers are actually expensive to create and maintain because they must have bitcoins which cant be used anywhere else while the attack goes on. If bitcoiners are happy with mining power being proportional to processor power, I imagine they will be happy with coinjoin making power proportional to bitcoin ownership.

Maybe an analogy helps to clarify somehow? If tor nodes were paid would sybils find it harder or easier? If bitcoin nodes were paid would sybil nodes find it harder or easier to operate?

Would appreciate thoughts.


As it seems that just-mined-bitcoins have a higher value on privacy, it would be cool to have something that show this to the end user.
Something that show that some "offers" are better than others.

IMHO I would be against reducing the fungibility of bitcoins. Part of the purpose of all this coinjoin stuff is to keep bitcoins fungible so that it can be a good form of money.
But your idea could be implemented by the makers publishing the UTXO they will use, and the takers can scan the entire blockchain to see how close it is to a coinbase transaction.



To people who like this idea. Be honest, how much did you like the part about generating an income from your own hoarded bitcoins. :)
I'm guessing the psychological effect of earning interest on your coins, even if its only a few thousand satoshis a day, will be very strong.
You all love getting money for doing nothing. Of course you do, that's part of the reason you chose to save and invest (In bonds, shares, and yes, bitcoins) rather than consume your entire income.

So we have to be careful our greed and entrepreneurial rapture don't blind us to some problem (sybil attack, etc)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: 2586 on October 31, 2014, 06:52:52 PM
So Sybil attacks.
On the one hand it seems more honest coinjoin makers, motivated by their income, is a good thing because they crowd out the sybils.
On the other hand, now the sybils get paid too so their cost of maintaining a maker (running a computer online, owning large amounts of bitcoins) is slightly reduced.
Then there's also the coinjoin makers who were there in the status quo, people who just want to mix coins, don't mind waiting and would be willing to mix for free.
I'm not sure which way it would swing. I intuitively think Sybils will find it harder in the fee-paying model but I'm not sure how to prove or disprove that.

Now for a Sybil attack new identities need to be cheap and easy to create. But Sybil coinjoin makers are actually expensive to create and maintain because they must have bitcoins which cant be used anywhere else while the attack goes on. If bitcoiners are happy with mining power being proportional to processor power, I imagine they will be happy with coinjoin making power proportional to bitcoin ownership.

Performing a coinjoin makes the maker's funds unavailable for a little while, right? Or can it be done safely with unconfirmed outputs? Either way, it might make sense to require inputs to have a certain number of confirmations in order to drive up the cost of a sybil attack. If the attacker can't make their funds available again immediately after performing a mix, they'll be severely limited in the number of mixes they're able to participate in. Perhaps takers could specify a minimum number of confirmations that they want the maker's inputs to have.

Takers will need to be wary of automatically accepting the lowest-priced mix offers, since that will give attackers a way to get their offers taken more often than those of comparatively higher-fee honest makers. Some sort of fuzzing is probably in order, i.e. "pick a random offer from available offers with fee from 0% to 0.5%" rather than "pick the lowest offer available, not to exceed 0.5%". Depending on how paranoid the taker is, they may want to do one or more coinjoin sends back to themselves, then a final coinjoin send to their intended recipient, increasing their odds of getting at least one good mix.

Quote
To people who like this idea. Be honest, how much did you like the part about generating an income from your own hoarded bitcoins. :)
I'm guessing the psychological effect of earning interest on your coins, even if its only a few thousand satoshis a day, will be very strong.
You all love getting money for doing nothing. Of course you do, that's part of the reason you chose to save and invest (In bonds, shares, and yes, bitcoins) rather than consume your entire income.

So we have to be careful our greed and entrepreneurial rapture don't blind us to some problem (sybil attack, etc)

Got me. I'm currently lending a significant chunk of my bitcoin savings on Bitfinex, though I'm not entirely certain that my income from it outweighs the counterparty risk. I'd love to be able to eliminate the counterparty risk entirely.

Without fees, I'd still operate as a coinjoin maker, since I want financial privacy for myself, I want to "stick it to the man", and I want to help others gain financial privacy as well. However, being paid would make the difference between acting as a maker part time with small amounts and doing so full time with large amounts. Which is the whole point of this proposal, after all.  :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: laurentmt on October 31, 2014, 06:54:01 PM
So Sybil attacks.
...
Would appreciate thoughts.
A quick thought : I think the answer will depend on the type of attacker you consider.
My previous comment about 3 letters agency was almost a joke but I think that for this kind of "attacker", reward/no reward doesn't make any difference because of their financial resources. Having a financial incentive may increase the number of makers and you can expect that some people won't be catched by the attacker but I'm not really sure it will make a big difference.

To people who like this idea. Be honest, how much did you like the part about generating an income from your own hoarded bitcoins. :)
I'm guessing the psychological effect of earning interest on your coins, even if its only a few thousand satoshis a day, will be very strong.
You all love getting money for doing nothing. Of course you do, that's part of the reason you chose to save and invest (In bonds, shares, and yes, bitcoins) rather than consume your entire income.

So we have to be careful our greed and entrepreneurial rapture don't blind us to some problem (sybil attack, etc)
Human "greed" is precisely the interesting factor for this model.
Privacy usually comes with a cost (in term of UX or financial cost, ...) and no "obvious" reward (except for people having a "shadow" activity).
The outcome is that digital privacy is at a very low level for many people.
IMHO, introducing a reward may be an important factor to increase adoption.

Let's make a parallel with bitcoin security. This security is enforced by mining and full nodes.
Mining comes with a reward and hashpower is skyrocketing. Full nodes have no reward and their number is almost constant or decreasing...




Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Duky on November 05, 2014, 03:55:57 PM
Hi everybody, i have a question regarding the cascads and transaction fees.

So, in the first post it says that you can get better anonymity when you cascade your outputs.

If i have 5 BTC and find e.g. 3 People who also want to anonymize 5 BTC i can make a CoinJoin transcation tx_1 with them. The first (minor) problem is, that we have to pay transaction fees. So every praticipant have inputs with at least 5.1 BTC (0.1 BTC for fees). If we have that, we can make the transaction tx_1 where the outputs have a value of 5 BTC.
The problem that i see is, that if i want to cascade, say 3 times, i have to pay transaction fees every time.
I see two ways one could do that.

1. The transaction fees for the second transaction, which uses the output from transaction tx_1 is paid only from that output/input. So i have to find participants who want to make a CoinJoin Transaction with an Output of 4.9 BTC (5BTC - 0.1 Fee) which could be hard, or i find participants who want to make a transaction with less than 4.9 BTC. If i allow participants with lower values the rest is send to an change address of mine. But in this case i can't , in the beginning, know how much Bitcoins i have left in the output after say three cascades.
So if i want a cascade of three and at the end i want to have 5 anonymous BTCs the first Input must be 5.3 BTC -> output ist 5.2. The second Input is 5.2 BTC -> output 5.1 BTC. The third Input is 5.1 BTC -> 5.0 output.
I think it could be hard to find participants with exactly the amount of Inputs that i need. Furthermore i have to know in advance how long my cascade has to be and how much bitcoins i want in the end.

2. The transaction fees is paid by another Input.
So Alice makes transaction tx_1 with an  Input of 5.1 BTC -> output is 5.0 BTC.
The second transaction tx_2 consists of the Input with 5.0 BTC from the last transaction, and a new Input with 0.1 BTC for my fees.
Assume an attacker who can match all Bitcoin addresses to the person behind these addresses excluding the output addresses used for outputs in CoinJoin transactions.
If Alice uses an address  for the transaction fees input , which the attacker can match to Alice, the attacker knows which output of tx_1 belongs to Alice.
Why?
The attacker knows who participates in tx_1 because he knows the persons behind the inputs. The only thing he doesn't knows is, which ouput belongs to which participan. But if one output is used in a second transaction in which Alice pays the fees for, and no other input in that transaction could come from Alice, the only plausible way is, that Alice is the owner of the ouput from tx_1 which is used in tx_2. In that case the anonymity of the CoinJoin Transaction tx_1 is broken.
This even works if the fee Input comes from another CoinJoin transaction. You just have to look at the inputs of the CoinJoin transaction uses for the fee input, if one input matches an address of Alice you can be pretty sure, that the output from tx_1 also belongs to Alice.

So my question is, am i missing something, or is this really a problem when using cascades in CoinJoin. Cause i see no other option than the first case, if you want to use cascades and don't want the anonymity broken by the fees.

I hope you can unterstand what i mean.

Greetings
Duky




Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Gyrsur on November 22, 2014, 02:55:34 PM
is this live already?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: belcher on November 23, 2014, 03:28:47 PM
I'm coding an implementation of my idea. Stay tuned.

By the way, does anyone have any ideas for the name of the project?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: HostFat on November 23, 2014, 04:27:02 PM
I'm coding an implementation of my idea. Stay tuned.

By the way, does anyone have any ideas for the name of the project?
Yup, I hope to see it implemented on Darkwallet :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Sir Lagsalot on November 23, 2014, 05:06:00 PM
I'm coding an implementation of my idea. Stay tuned.

By the way, does anyone have any ideas for the name of the project?

Good idea, belcher.

Mixtape!

edit: MixTip is probably better.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: teukon on November 23, 2014, 09:53:51 PM
Hi everybody, i have a question regarding the cascads and transaction fees.

So, in the first post it says that you can get better anonymity when you cascade your outputs.

If i have 5 BTC and find e.g. 3 People who also want to anonymize 5 BTC i can make a CoinJoin transcation tx_1 with them. The first (minor) problem is, that we have to pay transaction fees. So every praticipant have inputs with at least 5.1 BTC (0.1 BTC for fees). If we have that, we can make the transaction tx_1 where the outputs have a value of 5 BTC.
The problem that i see is, that if i want to cascade, say 3 times, i have to pay transaction fees every time.
I see two ways one could do that.

1. The transaction fees for the second transaction, which uses the output from transaction tx_1 is paid only from that output/input. So i have to find participants who want to make a CoinJoin Transaction with an Output of 4.9 BTC (5BTC - 0.1 Fee) which could be hard, or i find participants who want to make a transaction with less than 4.9 BTC. If i allow participants with lower values the rest is send to an change address of mine. But in this case i can't , in the beginning, know how much Bitcoins i have left in the output after say three cascades.
So if i want a cascade of three and at the end i want to have 5 anonymous BTCs the first Input must be 5.3 BTC -> output ist 5.2. The second Input is 5.2 BTC -> output 5.1 BTC. The third Input is 5.1 BTC -> 5.0 output.
I think it could be hard to find participants with exactly the amount of Inputs that i need. Furthermore i have to know in advance how long my cascade has to be and how much bitcoins i want in the end.

2. The transaction fees is paid by another Input.
So Alice makes transaction tx_1 with an  Input of 5.1 BTC -> output is 5.0 BTC.
The second transaction tx_2 consists of the Input with 5.0 BTC from the last transaction, and a new Input with 0.1 BTC for my fees.
Assume an attacker who can match all Bitcoin addresses to the person behind these addresses excluding the output addresses used for outputs in CoinJoin transactions.
If Alice uses an address  for the transaction fees input , which the attacker can match to Alice, the attacker knows which output of tx_1 belongs to Alice.
Why?
The attacker knows who participates in tx_1 because he knows the persons behind the inputs. The only thing he doesn't knows is, which ouput belongs to which participan. But if one output is used in a second transaction in which Alice pays the fees for, and no other input in that transaction could come from Alice, the only plausible way is, that Alice is the owner of the ouput from tx_1 which is used in tx_2. In that case the anonymity of the CoinJoin Transaction tx_1 is broken.
This even works if the fee Input comes from another CoinJoin transaction. You just have to look at the inputs of the CoinJoin transaction uses for the fee input, if one input matches an address of Alice you can be pretty sure, that the output from tx_1 also belongs to Alice.

So my question is, am i missing something, or is this really a problem when using cascades in CoinJoin. Cause i see no other option than the first case, if you want to use cascades and don't want the anonymity broken by the fees.

I hope you can unterstand what i mean.

Greetings
Duky

I think I have a rough understanding of what you're pondering.  I believe that OP has dropped transaction fees from the introduction for simplicity and from the tone it should be clear that he's primarily interested in a little extra privacy as opposed to hardened secrecy.

If we assume the hostile environment of your scenario 2 and desire regular, thorough mixing then I would first think about dropping the "all inputs/outputs should be of the same size" assumption.  Of course, we'd have to take care here not to allow varying input/output sizes to reveal too much information.  If we want regular mixing we really also ought to tackle the issue of combining outputs (always a pain).  Here's a first thought:

Inputs(5)     Outputs(110)
Party_A:1.5671 BTC1 x1 BTC
0.3894 BTC29 x0.1 BTC
0.0015 BTC25 x0.01 BTC
Party_B:1.5000 BTC33 x0.001 BTC
Party_C:0.7082 BTC22 x0.0001 BTC
0.0203 BTC
(Fee: 0.0013 BTC)

I'm afraid I lack the time to explain everything I'm thinking here but I hope this example transaction gives you an idea or two.  I'll happily try to tackle a follow-up question if you have one.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: belcher on November 25, 2014, 12:51:25 PM
I'm coding an implementation of my idea. Stay tuned.

By the way, does anyone have any ideas for the name of the project?
Yup, I hope to see it implemented on Darkwallet :)

Yep I agree.
Hopefully something like this will be in many kinds of wallets. An Electrum plugin also seems like a low-hanging fruit.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: belcher on January 09, 2015, 09:50:13 PM
Last few months I've been working on an implementation of my idea.

I'm calling it Joinmarket.

https://bitcointalk.org/index.php?topic=919116.msg10096718

The coinjoiner bots meet in an IRC channel. The bots announce their orders in an open-outcry trading pit style. Transaction data is sent between users as IRC private messages. Encryption is a planned feature to stop the IRC server eavesdropping. I have plans one day to move away from IRC entirely and have the users meet in some kind of peer to peer network.

Github: https://github.com/chris-belcher/joinmarket
IRC: irc.freenode.net #joinmarket


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: molecular on January 11, 2015, 02:47:39 PM
Last few months I've been working on an implementation of my idea.

I'm calling it Joinmarket.

https://bitcointalk.org/index.php?topic=919116.msg10096718

The coinjoiner bots meet in an IRC channel. The bots announce their orders in an open-outcry trading pit style. Transaction data is sent between users as IRC private messages. Encryption is a planned feature to stop the IRC server eavesdropping. I have plans one day to move away from IRC entirely and have the users meet in some kind of peer to peer network.

Github: https://github.com/chris-belcher/joinmarket
IRC: irc.freenode.net #joinmarket

I checked it out, it's a great idea that already works! Thank you!

Looking at the TODO and some of the code it seems there's still quite a bit of work to be done, though.

Seems to me electrum integration would be a rather low-hanging fruit, no?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: belcher on May 08, 2015, 12:11:26 AM
I'm pleased to announce the mainnet version of JoinMarket.

Expect glitches and a command line interface. But it works.

Here's some CoinJoins people have already done
https://blockchain.info/tx/601d9c15bc1edd2fe3e5c853ed111d11e9c0a5fb66c75571c7f10fa0d8ab23bb 5-party coinjoin
https://blockchain.info/tx/b85a3b563474ca98ba1809460e61a50053899c21f9869afb6a3a6d4b4cb00b7c 4-party coinjoin
https://blockchain.info/tx/e8b793b3464641df9404993c3101f81208b2d774f51a1ec748a608fbc9e22629 3-party coinjoin
https://blockchain.info/tx/665a9d7848cc0d28869ef866ca9a1117f20358e1e372dbbb01f1b75054584e70 3-party coinjoin

Only pocket change amounts for now, if anyone found an exploit bug they could theoretically clean out your wallet. My yield generator bot is running happily right now, I've already earned about 25000 satoshi.

I will be working on an Electrum plugin to make it easy to use. Electrum doesn't have a testnet version which is one reason we've moved to the mainnet now.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Mixles on June 12, 2015, 12:13:32 PM
In order to further incentivize work in this space there is now a multisignature escrow bounty fund:

   3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk (bitcoin:3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk)
                    (yes, Bitcoin addresses can also start with a 3)

This is a two-of-three multisignature escrow with myself, Theymos, and Pieter Wuille as signers. To release any coin sent to this address at least two of these people must sign the transaction.

The bounty fund will pay out as funds are available according to the signers best judgment for completed work proposed in this thread that furthers the goal of making improved transaction privacy a practical reality for Bitcoin users.

Please feel free to contribute to the above address to support work on this infrastructure.

I would like to make a claim on this fund for work done on Compact Confidential Transactions (subject to the ongoing peer review).

https://bitcointalk.org/index.php?topic=1085436.msg11597427

CoinJoin should 'just work' in this scheme, and has a similar interface to gmaxwell's Confidential Transactions for keeping participant's balances hidden from other participants.

Participants generate some random inputs, and same number of random outputs, to themselves with a zero sum, and ensure that they do not introduce any fuzz over/underflow, so the fee is fixed.

An alternative approach, is to let participants share only their fee delta, guaranteeing that everyone makes the same fee adjustment, in which case the number of outputs can also differ to the number of inputs for each participant.

If anyone puts in too much or too little, their sum, and the whole transaction sum, won't come out as zero and the transaction will be invalid.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: belcher on June 16, 2015, 01:28:04 PM
In order to further incentivize work in this space there is now a multisignature escrow bounty fund:

   3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk (bitcoin:3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk)
                    (yes, Bitcoin addresses can also start with a 3)

This is a two-of-three multisignature escrow with myself, Theymos, and Pieter Wuille as signers. To release any coin sent to this address at least two of these people must sign the transaction.

The bounty fund will pay out as funds are available according to the signers best judgment for completed work proposed in this thread that furthers the goal of making improved transaction privacy a practical reality for Bitcoin users.

Please feel free to contribute to the above address to support work on this infrastructure.

I would like to make a claim on this fund for work done on Compact Confidential Transactions (subject to the ongoing peer review).

https://bitcointalk.org/index.php?topic=1085436.msg11597427

CoinJoin should 'just work' in this scheme, and has a similar interface to gmaxwell's Confidential Transactions for keeping participant's balances hidden from other participants.

Participants generate some random inputs, and same number of random outputs, to themselves with a zero sum, and ensure that they do not introduce any fuzz over/underflow, so the fee is fixed.

An alternative approach, is to let participants share only their fee delta, guaranteeing that everyone makes the same fee adjustment, in which case the number of outputs can also differ to the number of inputs for each participant.

If anyone puts in too much or too little, their sum, and the whole transaction sum, won't come out as zero and the transaction will be invalid.


It looks like you might need to write some code, as the post says "for completed work proposed in this thread that furthers the goal of making improved transaction privacy a practical reality for Bitcoin users."


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: Mixles on June 17, 2015, 02:36:34 AM
It looks like you might need to write some code, as the post says "for completed work proposed in this thread that furthers the goal of making improved transaction privacy a practical reality for Bitcoin users."

Just as well that it does not say "for completed code". Otherwise I would be going against the thing. In a knowledge economy, new knowledge (and new code) takes a lot of completed works. Anyway, the review is not complete yet so my claim might not be valid. And even if it is valid or invalid logically, the fund is ultimately at the discretion of two individuals. If they want to encourage or discourage this kind of research is up to them.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: phelix on October 29, 2015, 05:19:29 PM
In order to further incentivize work in this space there is now a multisignature escrow bounty fund:

   3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk (bitcoin:3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk)
                    (yes, Bitcoin addresses can also start with a 3)

This is a two-of-three multisignature escrow with myself, Theymos, and Pieter Wuille as signers. To release any coin sent to this address at least two of these people must sign the transaction.

The bounty fund will pay out as funds are available according to the signers best judgment for completed work proposed in this thread that furthers the goal of making improved transaction privacy a practical reality for Bitcoin users.

Please feel free to contribute to the above address to support work on this infrastructure.

Multisig address construction details:
Code:
Key from Theymos:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Here is a public key of mine, usable for the CoinJoin bounty fund:
02d5f2b9c68b22006161dfe58a78b37dc2b577e8bb4e4522940830264eb3b3a38b
-----BEGIN PGP SIGNATURE-----

iF4EAREIAAYFAlISs5MACgkQxlVWk9q1kednkgD/WvE3F1hSoKHIr+y7q3O6xbGp
FM+P/lVbi/nZugrlNKABALMhYih2Ov80OS1PLMX9UpONn2eE2Xu+ZkxZ2SkQFfCU
=lFI0
-----END PGP SIGNATURE-----

Key from Gmaxwell:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Here is a public key of mine, usable for the CoinJoin bounty fund:
027b48575c15712867a8a1e6c9f52f510946130bbdf3b1e2feb344b8b68232ffb1
-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAlIbCV4ACgkQrIWTYrBBO/ooAgCdG9twTEFH5q+5Pip9qDOGsoww
a7YAoLfVP4CBaxk5mnpMXVHpQXqgVwxL
=k1JR
-----END PGP SIGNATURE-----

Key from Pieter:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
 
Here is a public key of mine, usable for the CoinJoin bounty fund:
0292782efcb08d621c360d055f407c8e75ffbbd06f6b7009c1432ca9eaa6732592
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
 
iQGcBAEBCAAGBQJSpLf6AAoJEI9lMlXIeZLgtRkL/3ufWgLyhTKM9T30JqA0a/Xh
5KUMD0csuxTMYraVOy9x7tRVZh+fETt4Y3clhErZj8g6VraC5ku+4pyHxtFztWor
N6QadkAvwuCAqmBxbAmb7hTq41eXjptzwqyUWh/z6YecBKeRIxIi/8LGqX/+gODd
GlKj66Ex27wgp9gJp/1Ot+hrTmmasxXAEjXYJTKr4LjJeajH/HJJQeCI6jTy4fdm
TsplX7rUgzhdZQ60malyn1MCmtdXRviWyWuAvKgpIaEMaZsFCSMfvNzUtKHiMv3n
HPxe9OAv1V2rdwU9oa7gxHLSvF7BER1XpWcA0UKTeD1w2/vzPZj3exDDHT8A35Ro
nhK6cJPYTdnzXLavpFqRD85R1G9W3rl4IzqfflXwWB2rRByyLROvrMfVG8iLMYP0
JcaB+8kttzqTa0vBiaosCvSbFZAfw2seyXxxF5anH4Q0ueMJKglLp6rE/51s1bQa
Hz6rsSAAdvx/OSCitKp1+JMzSKA/SwNMRUy4VqKQ4g==
=70Dh
-----END PGP SIGNATURE-----

2-of-3 Address construction:
$ bitcoind createmultisig 2 '["02d5f2b9c68b22006161dfe58a78b37dc2b577e8bb4e4522940830264eb3b3a38b","027b48575c15712867a8a1e6c9f52f510946130bbdf3b1e2feb344b8b68232ffb1","0292782efcb08d621c360d055f407c8e75ffbbd06f6b7009c1432ca9eaa6732592"]'
{
    "address" : "3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk",
    "redeemScript" : "522102d5f2b9c68b22006161dfe58a78b37dc2b577e8bb4e4522940830264eb3b3a38b21027b48575c15712867a8a1e6c9f52f510946130bbdf3b1e2feb344b8b68232ffb1210292782efcb08d621c360d055f407c8e75ffbbd06f6b7009c1432ca9eaa673259253ae"
}

Would this suite Joinmarket? https://bitcointalk.org/index.php?topic=919116


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: dooglus on October 29, 2015, 05:26:45 PM
The bounty fund will pay out [...] for completed work proposed in this thread that furthers the goal of making improved transaction privacy a practical reality for Bitcoin users.

Would this suite Joinmarket? https://bitcointalk.org/index.php?topic=919116

Was the work proposed in this thread?

If so, JoinMarket definitely qualifies.


Title: Re: CoinJoin: Bitcoin privacy for the real world (someday!)
Post by: phelix on October 29, 2015, 05:39:56 PM
The bounty fund will pay out [...] for completed work proposed in this thread that furthers the goal of making improved transaction privacy a practical reality for Bitcoin users.

Would this suite Joinmarket? https://bitcointalk.org/index.php?topic=919116

Was the work proposed in this thread?
I guess only gmaxwell knows the answer to this question. In my eyes Joinmarket is going further than what has been suggested in this thread as it adds the incentive necessary for CoinJoin to actually go somewhere.



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: tommorisonwebdesign on October 30, 2015, 08:24:30 PM
It is definitely an interesting idea. I would definitely like to see am implementation of the concept coded and implemented.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dooglus on October 30, 2015, 11:17:57 PM
It is definitely an interesting idea. I would definitely like to see am implementation of the concept coded and implemented.

Check out JoinMarket (https://github.com/chris-belcher/joinmarket/wiki).

It's an implementation of the concept coded and implemented.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: tailsjoin on October 31, 2015, 02:55:26 AM
I can't see any reason for why JoinMarket development shouldn't be give some or all of this fund.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: bassmaster on November 16, 2015, 01:22:50 AM
+1 for JoinMarket (and perhaps TailsJoin getting a small percentage as well)

Would love to have gmaxwell take a look at the implementation and provide feedback.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ABISprotocol on January 07, 2016, 02:46:02 AM
Probably nobody will care, but....

1) https://github.com/bitcoin/bitcoin/issues/3226#issuecomment-164755098

2) https://github.com/bitcoin-dot-org/bitcoin.org/pull/1129#issuecomment-155241130

Cheers


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ABISprotocol on January 25, 2016, 06:18:15 AM
I'm pleased to announce the mainnet version of JoinMarket.

Expect glitches and a command line interface. But it works.

(...)

I will be working on an Electrum plugin to make it easy to use. Electrum doesn't have a testnet version which is one reason we've moved to the mainnet now.

At this point, do you have an Electrum plugin?  If so, where to go to find it?
Am assuming at this point, it's probably here..
https://github.com/JoinMarket-Org/joinmarket/issues/44
and also
https://github.com/JoinMarket-Org/joinmarket/tree/electrum-plugin
If there's a particular file that needs attention/work pls. advise.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: belcher on January 25, 2016, 11:08:56 AM
The electrum plugin would work by having a sidecar daemon that the plugin sends transaction information to and obtains an unsigned coinjoin transaction. The files are electrum-plugin-daemon.py and electrum-plugin.py, although that branch is probably quite stale.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: mamadmankan on January 25, 2016, 04:26:26 PM
IMHO, it could be used as a load balancing device for a system with a fixed block size limit. CoinJoins happen automatically to help compress more transactions into the available block space. This could provide a good argument against a scheme with a continuously variable block size, or to a scheme with no limit at all (although I don't think anyone has yet made any serious proposal for the latter). It also illustrates that CoinJoin really is just that, joining inputs and outputs into single transactions, regardless of the utility you're seeking from doing so.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: marcus_of_augustus on January 25, 2016, 11:12:12 PM
IMHO, it could be used as a load balancing device for a system with a fixed block size limit. CoinJoins happen automatically to help compress more transactions into the available block space. This could provide a good argument against a scheme with a continuously variable block size, or to a scheme with no limit at all (although I don't think anyone has yet made any serious proposal for the latter). It also illustrates that CoinJoin really is just that, joining inputs and outputs into single transactions, regardless of the utility you're seeking from doing so.

Interesting. What is the effective 'compression' of doing several individual TX versus a single CoinJoin containing the same TXs?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Carlton Banks on January 25, 2016, 11:50:37 PM
IMHO, it could be used as a load balancing device for a system with a fixed block size limit. CoinJoins happen automatically to help compress more transactions into the available block space. This could provide a good argument against a scheme with a continuously variable block size, or to a scheme with no limit at all (although I don't think anyone has yet made any serious proposal for the latter). It also illustrates that CoinJoin really is just that, joining inputs and outputs into single transactions, regardless of the utility you're seeking from doing so.

Interesting. What is the effective 'compression' of doing several individual TX versus a single CoinJoin containing the same TXs?

There's a fair proportion of header/data for single output -> pair of outputs, but mamadmankan is only identifying the first steps in the line of thinking that led to stuff like SegWit and Lightning.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Dabs on May 15, 2016, 03:41:21 AM
Sorry for bumping this thread ... I'm just curious.

...

3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk

...

The bounty fund will pay out as funds are available according to the signers best judgment for completed work proposed in this thread that furthers the goal of making improved transaction privacy a practical reality for Bitcoin users.

If JoinMarket did not qualify, and CoinShuffle (or ShuffleCoin?) did not also qualify, what would do it? Does it have to be completely decentralized? Can it be something that relies on a "super-node" or even a third party website, bot or api? (Someone collects possible transactions and makes everyone sign it once a day or once an hour or something.)

How do you define "practical reality for Bitcoin users"?

Did I miss any other attempts at implementing this aside from CoinShuffle and JoinMarket?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: waxwing on May 15, 2016, 05:23:14 AM
Sorry for bumping this thread ... I'm just curious.

...

3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk

...

The bounty fund will pay out as funds are available according to the signers best judgment for completed work proposed in this thread that furthers the goal of making improved transaction privacy a practical reality for Bitcoin users.

If JoinMarket did not qualify, and CoinShuffle (or ShuffleCoin?) did not also qualify, what would do it? Does it have to be completely decentralized? Can it be something that relies on a "super-node" or even a third party website, bot or api? (Someone collects possible transactions and makes everyone sign it once a day or once an hour or something.)

How do you define "practical reality for Bitcoin users"?

Did I miss any other attempts at implementing this aside from CoinShuffle and JoinMarket?

Coinshuffle is really an enhancement protocol on top of any coinjoin implementation, it's not a coinjoin implementation itself. There hasn't as yet been an implementation using it (correct me if I'm wrong), so from that point of view the question doesn't apply to coinshuffle, although Mycelium are currently working on one.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: schnuber on May 20, 2016, 04:18:13 PM
I have a question:
When I am doing a transaction and I send my signed tx to the network. Could someone else take that transaction and add a additional signed input to the tx. So this would mean that my tx gets coinjoined without my approval, would that be accepted by the network?

Greets


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Dabs on May 20, 2016, 04:28:10 PM
I have a question:
When I am doing a transaction and I send my signed tx to the network. Could someone else take that transaction and add a additional signed input to the tx. So this would mean that my tx gets coinjoined without my approval, would that be accepted by the network?

Greets

From what I understand, that is not possible; or not practical. You'll have to coinjoin your transactions first before sending it to the network.

It may be possible with the replace-with-fee thingie, but if the first transaction gets confirmed, then the second one won't work anymore as it will be a double-spend.

For CoinJoin to work, people need to join their signed tx first. The only way I see this working is some sort of third-party that does the joining, or some app that does it for everyone involved, at the same time, or waiting within a set time.

I think what's happening is people meet up and then agree to do a CoinJoin, either in chat or through some app or website, the third-party not being able to steal any coins in the process.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on May 20, 2016, 10:09:15 PM

Effective coinjoin that doesn't create metadata patterns of its own is hard. 

If you want the capital-S Solution, the Zerocoin protocol is down the hall - but it wasn't, and won't be, implemented in Bitcoin because the cryptographic accumulator comes with ridiculous compute-time overhead for verifying spends. 

If you want a lowercase-s Solution, Dash has its mixing masternodes; some node operator posts a big bond to the block chain to get to be trusted for pooling, and then people run their transactions through a dozen different masternodes that cant see what each other are doing to get them thoroughly mixed before they go on to the block chain.  This doesn't suck, but it's also not ideal; those masternodes are "trusted" in the sense that if they cooperate they can de-anonymize transactions. 

But coinjoin, in the absence of mixing services (aka masternodes) to join transactions between arbitrary people who've never heard of each other, creates exactly the kind of metadata it seeks to avoid.  People analyze the block chain and coinjoined transactions attract attention because they are anomalous in terms of how their inputs and outputs are connected to other tx.  When the chain is analyzed further, the snoops can identify which actors know each other and cooperated together to create the coinjoin. 



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Dabs on May 21, 2016, 03:24:23 AM
But coinjoin, in the absence of mixing services (aka masternodes) to join transactions between arbitrary people who've never heard of each other, ...

That's the thing. The only missing element is a decentralized version of this. Mixing services that do CoinJoin can exist, I'm just wondering if that qualifies for the bounty here.

The few CoinJoin transactions that exist now can be analyzed, but when the volume and frequency of such transactions get big enough and often enough, it's practically impossible to analyze, especially if all actors are anonymous ...

All that people really need to give up is a little inconvenience, because they have to run their coins through such "masternodes", it's not automatic.

Normal people can send their CoinJoin transactions and their coins to some "masternode" while they sleep. A few hundred people to a few thousand people do this and in 8 hours to a day later you don't know who owns what coins. If this is done daily or with other mixers, every day, every month, the whole year ... do we achieve our goal then?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on May 21, 2016, 04:44:39 AM
Well, consider the RSA/ extended Diffie-Hellman construction:

When you have XAB mod G, (where X and G are public) you can find B if you know A, or you can find A if you know B, but you can't find AB, or A, or even B, unless you know the factors of G. 

So you can multiply the exponent by a couple of factors and produce a new accumulator - and nobody can tell what the factors were.  But later you can undo it, because you know what the factors were.  And you can do this even if a dozen other people have since added or removed values to the accumulator, in any order. 

In a lot of ways, what the people forming a coinjoin are doing is passing around an accumulator.  None of them knows what the others are putting in, but each is able to check the final accumulator and make sure their own input is part of it (ie, their values are still factors of the exponent).  And then if they break it down in a different order, at no time does it acquire the same value as it had at any previous state or one easily related to such - but it returns to the same initial state when everybody's value has been taken out of it.

That's sort of a truncated version of what Zerocoin does - but if you work out the details, you might be able to do it without that horrible zero-knowledge signature of knowledge proof.  People would only have to verify steps and final result of a single join per block.

I'm just sort of brainstorming here... 


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: twinkletoes007 on May 21, 2016, 10:04:55 PM
Somebody please "CoinJoin for Dummies".


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on May 21, 2016, 10:34:29 PM
Heh.  Okay.

The way things are now, snoops looking at the block chain can mostly tell which transactions were made by the same people as other transactions.  If they identify a single thing as belonging to a particular person (which is usually easy, because among other things they listen on the network to get the IP addresses where tx originate) then they can generally walk it back and identify every other transaction that person has ever made from that wallet. 

People generally don't think this is okay.  Even if they're not crooks they don't necessarily want everybody else to know when and where they bought a dirty magazine and some hand lotion - or, you know, bondage gear or any number of other things that are just plain private. 

So they look for a way to mix up transactions; store txOuts in the block chain somehow where snoops can't tell which belongs to whom.  When a hundred people do a coinjoin, you take a bunch of different transactions, and make them into one giant transaction, with maybe hundreds of different txIns and txOuts - and now the snoops can't tell any more which of the txOuts belongs to whom.  If you then open a new wallet and put the txOuts from the coinjoin into it and no txOuts from your old wallet, they'll never be able to link the purchases you made (or payments you received)  before the coinjoin with the ones after it.  At most they'll be able to tell such-and-such a purchase group of purchases after the coinjoin was made by one of the hundred people who participated in this coinjoin transaction. 

But it's dastardly hard to do this in such a way that when you're exchanging messages to set up the coinjoin, you don't give the eavesdropping snoops enough information to suss out which txOuts from the coinjoin belong to whom.  Especially since everybody has to be able to verify that the transactions are correct. 

So what you try to do is things like Diffie-Hellman key exchange, where you can have two people (or in this case way more than two) find a secret value together (in diffie-hellman a key; in coinjoin a whole transaction) without giving snoops any clues. 

This is made harder by the difference between the two use cases.  In Diffie-Hellman the parties don't care much what the value winds up being; only that they agree on what it is and nobody who's been listening to them can suss it out.  But with coinjoin you care a whole lot about exactly what the value is, because the value you're trying to agree on has to be a valid transaction that does what you want it to do. 

So we need things more complicated than just hashes and bit commitments and signatures; we need things like cryptographic accumulators and commutative encryption, which are sort of esoteric and usually really compute expensive.

Somebody figured out a way to do it with a compound-exponential accumulator under a modulus (called the ZeroCoin protocol) but it's ridiculously compute-intensive; it would mean everybody has to spend five minutes or so just checking correctness after each block, and people with 'weak' machines couldn't check those tx at all.  I've been wondering about a way to do it using single-exponential accumulators and bit commitments. 

Note:  An 'accumulator' is a keyed transformation such that

A ==> Encrypt with key1, key2, key3, etc, in any order ==> Decrypt with key1, key2, key3, etc in any order ==> A.

You could use something like that to show that you have one of the keys that went into creating it, without revealing which.  That is, assuming you  manage to not reveal the key that went into creating it when you encrypt it the first time.  Which, if you don't, makes the transaction hard to check....



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Dabs on May 22, 2016, 02:39:03 AM
Cryddit,

Is there a difference between a CoinJoin transaction and a regular bitcoin transaction that has many inputs and many outputs? What I mean is, for example, I have a large wallet with 10 different and unconnected unspent bitcoins, in 10 separate addresses. Then since I am the owner of that wallet, I can do a transaction and use those 10 as inputs to a transaction that pays out or sends out bitcoins to 20 different addresses.

What I'm wondering is if there is a fundamental difference between that, and a CoinJoin transaction with 9 other people.

Yes, I've read and re-read the original post and this entire thread, I'm just seeking clarification if I am understanding this correctly.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dooglus on May 22, 2016, 05:53:55 PM
Cryddit,

Is there a difference between a CoinJoin transaction and a regular bitcoin transaction that has many inputs and many outputs? What I mean is, for example, I have a large wallet with 10 different and unconnected unspent bitcoins, in 10 separate addresses. Then since I am the owner of that wallet, I can do a transaction and use those 10 as inputs to a transaction that pays out or sends out bitcoins to 20 different addresses.

What I'm wondering is if there is a fundamental difference between that, and a CoinJoin transaction with 9 other people.

Yes, I've read and re-read the original post and this entire thread, I'm just seeking clarification if I am understanding this correctly.

There's no difference other than that with a coinjoin the inputs are owned by different people whereas with the transaction you made all the inputs were owned by you.

Before coinjoin, you could look at a transaction and be pretty certain that all its inputs were owned by the same wallet. People would use this information to cluster addresses into groups.

After coinjoin that assumption is no longer valid. Multiple parties can cooperate to sign a single transaction where they each own some of the inputs. This makes clustering by ownership harder to do.

Here's an early example:

  http://i.imgur.com/YLg3Emt.png (https://blockchain.info/tx/c3962bbe60d5a22a67e6814b28342e3affdc07357cae2e9abab3f2bc01f251eb)

It looks like gmaxwell owns both input addresses, but he doesn't. He only owns the smaller one.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on May 22, 2016, 06:51:38 PM
Cryddit,

Is there a difference between a CoinJoin transaction and a regular bitcoin transaction that has many inputs and many outputs? What I mean is, for example, I have a large wallet with 10 different and unconnected unspent bitcoins, in 10 separate addresses. Then since I am the owner of that wallet, I can do a transaction and use those 10 as inputs to a transaction that pays out or sends out bitcoins to 20 different addresses.

What I'm wondering is if there is a fundamental difference between that, and a CoinJoin transaction with 9 other people.

In terms of the bytes that appear in the transaction itself, there is no difference. 

The difference is all in what the snoops can infer from the bytes.  When you make that transaction you described, the snoops would look at the block chain and say,

Oh, these twenty new addresses were all funded by the same transaction.  Therefore all the funding came from the same source (because almost always it's a single source sending money).  And since this doesn't look like a purchase (purchases typically have one large output and one much smaller "change" output) it must have been a logistical or bookkeeping movement of coins.  So we're going to assume that now all twenty of these new addresses are owned by the same person. 

Later on, they'll confirm it if, say, one of those 20 outputs gets spent, and you get a millibitcoin of change, and then later that millibitcoin of change gets spent in the same transaction as another of those 20 outputs, or as change from another of those 20 outputs - they go, Aha, look!  This new evidence means that what we thought about the addresses being owned by the same person, is now confirmed!  These two txOuts were owned by the same person, and now we can link all the purchases that were made with both of them! 

Now consider what happens with a coinjoin.  Alice is buying an Anvil, Bob is buying a Book. Carol is buying a Coat, Dave is buying a duck, and so on....  Maybe Zebulon is buying a Zebra, who knows.  They do a coinjoin transaction, and there's an output to the blacksmith shop and an output to the bookstore, and an output to the clothier, and also outputs to Alice, Bob, Dave, Carol, and everybody else - and the outputs are all kinds of different sizes instead of just being clearly "payment" and "change." 

Superficially, it looks like the same transaction.  Some number of inputs, some number of outputs.  But the snoops looking at it say, "Oh, all these inputs must have come from the same person, and it doesn't look like a regular purchase, so we'll assume all the outputs are going to the same person too...."  except this time they're wrong.  They'll pretty quickly figure out (because the way merchants combine the money that they get paid is very obvious) which outputs went to merchants and how much each merchant got.  They may be able to backtrace a lot of the unconnected txIns to figure out who owned them before the transaction.  But they will never figure out who it was that bought the duck, who it was that bought the book, and who it was that bought the zebra.  The best they'll be able to say is, "one of these people whose coins went into the transaction." 

And by the same token, even after they figure out which outputs were paid to merchants, they won't know which of those people now have the other outputs, until or unless those other people spend them along with txOuts they can link to that person.  Again, best they'll be able to say is "one of these people whose coins went into the transaction." 

But this requires that Alice, and Bob, and Carol, and Dave, etc have a way to set up the coinjoin that Eve can't figure out.  Even if Eve is one of the people putting coins into the coinjoin and getting coins out, she shouldn't be getting information about what other people are putting in and getting out.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: waxwing on May 22, 2016, 07:10:57 PM

But it's dastardly hard to do this in such a way that when you're exchanging messages to set up the coinjoin, you don't give the eavesdropping snoops enough information to suss out which txOuts from the coinjoin belong to whom.  Especially since everybody has to be able to verify that the transactions are correct. 

So what you try to do is things like Diffie-Hellman key exchange, where you can have two people (or in this case way more than two) find a secret value together (in diffie-hellman a key; in coinjoin a whole transaction) without giving snoops any clues. 


I realise this doesn't fully speak to what you're musing on in that post, but thought it might add to the discussion:

In Joinmarket we use E2E encryption authenticated to the bitcoin pubkeys that the different parties use as inputs to prevent MITM. This prevents a non-participant from learning the linkages.

As to preventing counterparties knowing the linkages, that's discussed in the first post(s) here. There are several ways to do it. The simplest is to have a server that's trusted, obviously suboptimal. You can add blind signing with network-level anonymisation to cut the connection between the proposal and the signing. To achieve the same effect you can use Coinshuffle. But, these two approaches don't address the Sybil problem - if all your counterparties are the same person, they learn the linkages by elimination.

Joinmarket allows one of the participants to act as the central coordinator - called the taker - and so only the taker gets the full defence against others knowing linkages - and so pays for that privilege (albeit in practice the payment is ultra-small). the other participants still get the defence against outside parties knowing the linkage due to the E2E encryption. And the Sybil problem remains; while we have some ideas about making it harder (see e.g. here: https://gist.github.com/AdamISZ/9cbba5e9408d23813ca8 , although there are other ideas/things to be said), we haven't implemented it.

The network level snooping: as where tx broadcasts originate - can be addressed with Tor to some extent. We also have things like randomising which participant broadcasts the transaction (a feature that belcher recently added). But as you mention there's also the issue of where you source the data to verify inputs (e.g. if you use a centralised blockchain API it's decidedly suboptimal).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: waxwing on May 22, 2016, 07:22:18 PM
On the topic of whether a coinjoin is discoverable/watermarkable let's say, I'd say a couple of things: if coinjoins follow an identifiable pattern, it certainly doesn't mean that they're useless; the main effect that a coinjoin output (i.e. equal sized output) is fundamentally indistinguishable from its neighbour coinjoin outputs is still true. That's the main effect we're looking for. The only conceivable negative is that the inputs to such a transaction are marked "This wallet closure is suspicious"; although I think any good "Bitcoin citizen" should prefer to use coinjoins where it's practical, since this is a currency and it's intended to be fungible. I've tried to make most of my recent retail payments with coinjoins.

Wallet closure analysis *is* damaged (severely) by use of coinjoins and that's the intention. Trying to make them invisible (i.e. not have properties distinct from non-coinjoins) seems like a high bar to set, and a moving target. I know Kristov Atlas has been looking into how transaction structures could be standardized to facilitate this; it seems like a hard goal to reach, but worth looking into.

Second, Joinmarket coinjoins are fairly easily found (with some false positives of course), see e.g.: https://github.com/AdamISZ/JMPrivacyAnalysis/blob/master/tumbler_privacy.md#identifying-joinmarket-transaction-types and Adlai's even made a tool to automate finding them on the blockchain: https://github.com/adlai/cjhunt.

TLDR I don't think coinjoins being identifiable is such a bad thing; even the most brain-dead construction is better for privacy than a non-coinjoin in any case, and by a long way.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: waxwing on May 22, 2016, 07:26:42 PM
I have a question:
When I am doing a transaction and I send my signed tx to the network. Could someone else take that transaction and add a additional signed input to the tx. So this would mean that my tx gets coinjoined without my approval, would that be accepted by the network?

Greets

Not possible unless you explicitly chose to use non-standard sighash flags (and even then! possibly it could happen with SIGHASH_SINGLE|SIGHASH_ANYONECANPAY).


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dooglus on May 22, 2016, 08:57:35 PM
I have a question:
When I am doing a transaction and I send my signed tx to the network. Could someone else take that transaction and add a additional signed input to the tx. So this would mean that my tx gets coinjoined without my approval, would that be accepted by the network?

Greets

Not possible unless you explicitly chose to use non-standard sighash flags (and even then! possibly it could happen with SIGHASH_SINGLE|SIGHASH_ANYONECANPAY).

Or in layman's terms, by default every signature is signing the complete set of inputs and outputs. If you change any input or output the signatures become invalid.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Dabs on May 23, 2016, 02:56:34 AM
Oh. Ok. I get it. This is good then.

But for people to do the CoinJoin, they all have to sign the same transaction, thus the possibility of a denial of service attack (by pretending to be part of the process but not signing the transaction.)

From what I understand, this "network level snooping" can only be done live, or someone or something is watching a good number of nodes, because the blockchain data itself does not store ip addresses. The transaction doesn't have any ip address information either. And where the transaction is first relayed is no indication that that is the one that actually sent it. And in any case, with a CoinJoin with a good number of real people, it doesn't matter who sent it as everyone else signed it, the one who actually broadcasts the transaction can be anyone, or even a completely different entity, or went through Tor or a VPN or from some random internet cafe. (Spammers do it all the time and are rarely or never caught.)

So, the problem is: too big a CoinJoin, (like with a few thousand) is hard to pull off, and some people might not go through with it. Too small, (such as 2 or 3 or 4 inputs and outputs) and its too easy to analyze.

So, if someone comes up with a "trusted" server, or shall I say "trustless" server, even if it is suboptimal, then that's still a good thing as long as that server is not compromised, or it doesn't keep logs after every transaction or something like that.

I mean, I can see at least 2 really big "traditional" mixers on these forums. The biggest one supposedly has a reserve of 3000 BTC. These guys can certainly pull it off, many people already trust them to mix "traditionally", I don't suppose they'd have a problem getting the same users to trust them to "CoinJoin" the whole thing and include their reserve in the process.

I have an idea, and guys, let me know if this is decent or crazy or whatever: or if this is already what is being done by JoinMarket, Shuffle, Whatever.

1. I make a website or a server for this purpose.
2. It asks users to create their transactions, and a given time limit, say 30 minutes or 1 hour.
3. Every 30 minutes, or every hour, it gets back to all the users with the giant CoinJoin transaction formed thus far and asks all the people to sign.
4. The site itself takes a fee, and that's some how inserted into the process.
5. Assuming the site is "trustable", then only outsiders are "attackers" and they're not going to learn much except "I see 100 inputs and 200 outputs, and I own 20 of them. I dunno who the other 80 are."
6. Repeat every hour or every whenever. Or every 100 people. Or once a day.
7. Java script or open source client side signing thingy that can sign for you if you're away from your computer so the site doesn't have to wait an hour when it reaches the minimum number of people.

The other idea I had, which I mentioned a long time ago, is like a traditional mixer, in that the mixer site itself has to be trusted, but it does everything internally, and you just send your coins. Instead of the traditional mixing of unrelated inputs and outputs, it's basically a CoinJoin mixer that gets all deposits and spits out the transactions just like a traditional mixer. The only downside is having to trust the site.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Rampion on May 23, 2016, 08:08:27 AM
BTW (and sorry for being slightly off-topic): did blockchain.info remove "shared coin", their coinjoin implementation? Cannot find it anymore!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: waxwing on May 23, 2016, 08:38:53 AM
I have an idea, and guys, let me know if this is decent or crazy or whatever: or if this is already what is being done by JoinMarket, Shuffle, Whatever.

1. I make a website or a server for this purpose.
2. It asks users to create their transactions, and a given time limit, say 30 minutes or 1 hour.
3. Every 30 minutes, or every hour, it gets back to all the users with the giant CoinJoin transaction formed thus far and asks all the people to sign.
4. The site itself takes a fee, and that's some how inserted into the process.
5. Assuming the site is "trustable", then only outsiders are "attackers" and they're not going to learn much except "I see 100 inputs and 200 outputs, and I own 20 of them. I dunno who the other 80 are."
6. Repeat every hour or every whenever. Or every 100 people. Or once a day.
7. Java script or open source client side signing thingy that can sign for you if you're away from your computer so the site doesn't have to wait an hour when it reaches the minimum number of people.

I don't know if you're aware, but joinmarket exists (has done for a year on mainnet now), it's doing maybe 50-100 transactions per day (hard to get numbers without running the blockchain analysis mentioned above; and false positives there will confuse it). You can see the orderbook at https://joinmarket.me/ob

As for the description above, it's fine (it's the first, simplest design mentioned by gmaxwell in the OP) but having the server know all the linkages is a bit much. Joinmarket has one participant act as the coordinator for each transaction, and pay for the privilege of knowing the linkages for that transaction (I'm repeating myself now, I said this a few posts back). Instead of one server with a global history. To go further, you add Coinshuffle or blind signing so that no-one needs to know the linkages (assuming no Sybil case, i.e. other participants are really distinct).

The economic incentive, while small, helps create more participants. Most joinmarket coinjoins involve 3-6 participants although 10+ is not unheard of  (I myself had a couple of 9,10 party joins recently, e.g. e701bc57fa663eaef4d57a9ea20b3212a90a8be71a32bd3bcb84062e864bdab0).



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: CohibAA on May 23, 2016, 08:51:34 AM

I have an idea, and guys, let me know if this is decent or crazy or whatever: or if this is already what is being done by JoinMarket, Shuffle, Whatever.

1. I make a website or a server for this purpose.
2. It asks users to create their transactions, and a given time limit, say 30 minutes or 1 hour.
3. Every 30 minutes, or every hour, it gets back to all the users with the giant CoinJoin transaction formed thus far and asks all the people to sign.
4. The site itself takes a fee, and that's some how inserted into the process.
5. Assuming the site is "trustable", then only outsiders are "attackers" and they're not going to learn much except "I see 100 inputs and 200 outputs, and I own 20 of them. I dunno who the other 80 are."
6. Repeat every hour or every whenever. Or every 100 people. Or once a day.
7. Java script or open source client side signing thingy that can sign for you if you're away from your computer so the site doesn't have to wait an hour when it reaches the minimum number of people.

The other idea I had, which I mentioned a long time ago, is like a traditional mixer, in that the mixer site itself has to be trusted, but it does everything internally, and you just send your coins. Instead of the traditional mixing of unrelated inputs and outputs, it's basically a CoinJoin mixer that gets all deposits and spits out the transactions just like a traditional mixer. The only downside is having to trust the site.

I think it's at least a decent idea, although implementation might be tricky.  One limitation with JoinMarket is the ability to easily facilitate a transaction with a very large number of parties.  As of right now, there are only about 50 "makers" on the orderbook (https://joinmarket.me/ob/), and likely many of those are actually the same people, running multiple yield generator bots.  The largest coinjoin done using JoinMarket that I am aware of had 17 parties. (that might not even be the most interesting thing about that transaction... (https://btc.blockr.io/tx/info/3e1572ca351d743d7bf627bc844da8f3bdc84eab4a9d27934a8dba30a2e05fe1))

 ???

I think something like this would be possible to build within JoinMarket, such that "takers" are given an option to delay and group their transaction with other takers (and makers, maybe), but again, I'm sure the coding would be substantial.  A better solution for JoinMarket will likely be simple growth.  The GUI is probably helping to bring in more users.  An Electrum plugin could also be potentially huge for JoinMarket, bringing fungibility (is that a word?) to many more users.  I think some privacy conscious websites may also benefit from implementing JoinMarket transactions into their wallet structure (online casinos, darknet markets, etc.) which will also help the current limitations.

Interesting times.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: belcher on May 23, 2016, 11:44:29 AM
New paper on address closures / clustering.

http://arxiv.org/abs/1605.06369



Sorry for bumping this thread ... I'm just curious.

...

3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk

...

The bounty fund will pay out as funds are available according to the signers best judgment for completed work proposed in this thread that furthers the goal of making improved transaction privacy a practical reality for Bitcoin users.

If JoinMarket did not qualify, and CoinShuffle (or ShuffleCoin?) did not also qualify, what would do it? Does it have to be completely decentralized? Can it be something that relies on a "super-node" or even a third party website, bot or api? (Someone collects possible transactions and makes everyone sign it once a day or once an hour or something.)

How do you define "practical reality for Bitcoin users"?

Did I miss any other attempts at implementing this aside from CoinShuffle and JoinMarket?

Would be interested to know as well.
Six months ago I sent a PM to theymos, Pieter Wuille, gmaxwell asking for (some of) the bounty.



I think something like this would be possible to build within JoinMarket, such that "takers" are given an option to delay and group their transaction with other takers (and makers, maybe), but again, I'm sure the coding would be substantial.  A better solution for JoinMarket will likely be simple growth.  The GUI is probably helping to bring in more users.  An Electrum plugin could also be potentially huge for JoinMarket, bringing fungibility (is that a word?) to many more users.  I think some privacy conscious websites may also benefit from implementing JoinMarket transactions into their wallet structure (online casinos, darknet markets, etc.) which will also help the current limitations.


This could be done with a script called patientsendpayment.py, https://github.com/JoinMarket-Org/joinmarket/wiki/Sending-payments-with-CoinJoin#patient-send-payment
Although because the current protocol is flawed and needs updating, you can only send to addresses for which you know the private key.

Using JoinMarket for bitcoin websites could be done today, I've written a brief explanation on how here https://github.com/JoinMarket-Org/joinmarket/issues/293


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Dabs on May 23, 2016, 04:47:15 PM
(that might not even be the most interesting thing about that transaction... (https://btc.blockr.io/tx/info/3e1572ca351d743d7bf627bc844da8f3bdc84eab4a9d27934a8dba30a2e05fe1))

I looked at that, and this one looked interesting to me:

https://btc.blockr.io/address/info/1PavedWithGodAndSomeTeensionXudq5X

It would seem someone intentionally destroyed 1.6 BTC.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: waxwing on May 24, 2016, 10:00:54 AM
It would seem someone intentionally destroyed 1.6 BTC.

Phi to be (more) precise :)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: mangox on May 31, 2016, 07:07:59 PM
Quote
BTW (and sorry for being slightly off-topic): did blockchain.info remove "shared coin", their coinjoin implementation? Cannot find it anymore!

does not exist anymore :(


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Rampion on May 31, 2016, 07:38:41 PM
Quote
BTW (and sorry for being slightly off-topic): did blockchain.info remove "shared coin", their coinjoin implementation? Cannot find it anymore!

does not exist anymore :(

That really sucks.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: K1773R on June 06, 2016, 08:18:33 AM
Quote
BTW (and sorry for being slightly off-topic): did blockchain.info remove "shared coin", their coinjoin implementation? Cannot find it anymore!

does not exist anymore :(

That really sucks.
Just use joinmarket.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Mr.Broker on June 07, 2016, 11:17:47 AM
People appear to have been sending very large numbers of addresses dust as a way to break anonymity. Granted, they also may have been doing it as a way to get signatures from scriptPubKeys due to the 'R' re-use issue, but the script would use bitcoind to spend the dust which is known to not be vulnerable.

Also there's lots of pretty much unspendable dust out there from Satoshidice and others, and again such a script can help.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ABISprotocol on June 08, 2016, 07:08:05 AM
People appear to have been sending very large numbers of addresses dust as a way to break anonymity. Granted, they also may have been doing it as a way to get signatures from scriptPubKeys due to the 'R' re-use issue, but the script would use bitcoind to spend the dust which is known to not be vulnerable.

Also there's lots of pretty much unspendable dust out there from Satoshidice and others, and again such a script can help.

Check with Peter Todd before using (not sure if up to date exactly because was last updated November 2015) but, this could be useful if you are trying to deal with some dust issue (Core)

https://github.com/petertodd/dust-b-gone

I also happen to think that dust isn't as big a deal as people think it is.  It is a gift, not a curse, and it should be treated as such, people just haven't been innovative enough yet to address it well or meaningfully.  See project referred to in my signature.

Also, see BlockCypher's API http://dev.blockcypher.com/#microtransaction-api

(I do not work for BlockCypher, but I consider their work innovative)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Rampion on June 08, 2016, 01:37:41 PM
Quote
BTW (and sorry for being slightly off-topic): did blockchain.info remove "shared coin", their coinjoin implementation? Cannot find it anymore!

does not exist anymore :(

That really sucks.
Just use joinmarket.

Are there any easy, straightforward instructions to use joinmarket? Blockchain's shared coin was easy.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on June 08, 2016, 07:59:29 PM
Bitcoin gambling sites are entirely functional as (probabilistic) mixers, if you trust the gambling sites.

Wanna mix 10BTC? Just make a hundred 0.1BTC bets at even odds.  50 of them pay out double (minus the house cut) and 50 disappear.  So you get your 10BTC back, minus the house cut, and the house cut in that case is just a mixing fee.

But that's not really what coinjoin is supposed to accomplish.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: ABISprotocol on June 08, 2016, 09:50:52 PM
Quote
BTW (and sorry for being slightly off-topic): did blockchain.info remove "shared coin", their coinjoin implementation? Cannot find it anymore!

does not exist anymore :(

That really sucks.
Just use joinmarket.

Are there any easy, straightforward instructions to use joinmarket? Blockchain's shared coin was easy.

Actually, yes, there are -

Joinmarket has a reddit:  https://www.reddit.com/r/joinmarket  May not be a bad place to have questions answered, but you may want to do tor and create a disposable account for it.  I won't use reddit anymore because of this - they are getting NSLs all the time, read in depth into comments... https://www.reddit.com/r/announcements/comments/4cqyia/for_your_reading_pleasure_our_2015_transparency/

However, if you don't want to deal with that, you could just view / lurk in the reddit discussions without having to log in and find out some of what you need, or just check out the right-hand side of the screen (under 'How do I get Started') which has the links you need.

There's also a very handy set of instructions right on github, for the GUI version of it, here:

https://github.com/JoinMarket-Org/JMBinary

Pretty damn handy.  :-)


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Dabs on June 09, 2016, 06:06:34 PM
Bitcoin gambling sites are entirely functional as (probabilistic) mixers, if you trust the gambling sites.

Wanna mix 10BTC? Just make a hundred 0.1BTC bets at even odds.  50 of them pay out double (minus the house cut) and 50 disappear.  So you get your 10BTC back, minus the house cut, and the house cut in that case is just a mixing fee.

But that's not really what coinjoin is supposed to accomplish.

Most gambling sites do off-chain transactions. If you want to mix 10 BTC, you simply deposit. Wait a few days. And then Withdraw. No need to actually gamble or play.

The problem is if you need to exchange the mixed coins, they are tagged as "gambling" coins by such exchanges as coinbase. So you need to bounce them around a few times among your own wallets.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Carlsen on June 10, 2016, 09:00:17 AM
Bitcoin gambling sites are entirely functional as (probabilistic) mixers, if you trust the gambling sites.

Wanna mix 10BTC? Just make a hundred 0.1BTC bets at even odds.  50 of them pay out double (minus the house cut) and 50 disappear.  So you get your 10BTC back, minus the house cut, and the house cut in that case is just a mixing fee.

But that's not really what coinjoin is supposed to accomplish.

In this case I would be just too scared to loose 75 or more of my bets.
That would be a relatively high mixing fee. Personally I would not take that risk.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: savobaby on June 11, 2016, 12:14:03 AM
May I just say, I am so fucking impressed with what everyone has been posting here. That. Is. All.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: smoothie on June 13, 2016, 11:35:33 AM
Couldn't you just use poloniex to get monero bought with BTC, then send it to yourself with a mixin of 5 or 100 or whatever you choose, then convert it with XMR.to back to BTC?



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: PantminerS7 on June 13, 2016, 01:26:44 PM
Somebody please "CoinJoin for Dummies".

Basically, you join payments together to 'anonymize' coins, while trading coins for other coins to make proving someones ownership of a specific coin harder.

Using Joinmarket as an example;
There are makers and takers in the Joinmarket network. Makers run a script that offers their coin for coinjoin transactions in exchange for a small fee. They sit around on the network, looking for a taker who needs coins mixed.

Takers, on the other hand, pay the makers to trade coins with them. Takers will come into Joinmarket announcing that they want to mix a certain amount of coins. Eventually a maker will accept his offer, and the maker and taker (and possibly more parties) all make one big Bitcoin transaction with lots of outputs to different addresses.

Joinmarket is just one of many ways a coinjoin can happen, but this should give you the general idea. 

The whole taker-maker process aims to mix the coins for the takers and the makers, making it harder to tell who owns which coins after the coinjoin-transaction. It will be hard to tell who now owns each output, if someone owns several outputs etc., which is the end goal of the transaction.

Users can run this process as many times as they like, the assumption being that more coinjoin transactions = better privacy.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Equilux on June 13, 2016, 01:41:43 PM
Somebody please "CoinJoin for Dummies".

Basically, you join payments together to 'anonymize' coins, while trading coins for other coins to make proving someones ownership of a specific coin harder.

Using Joinmarket as an example;
There are makers and takers in the Joinmarket network. Makers run a script that offers their coin for coinjoin transactions in exchange for a small fee. They sit around on the network, looking for a taker who needs coins mixed.

Takers, on the other hand, pay the makers to trade coins with them. Takers will come into Joinmarket announcing that they want to mix a certain amount of coins. Eventually a maker will accept his offer, and the maker and taker (and possibly more parties) all make one big Bitcoin transaction with lots of outputs to different addresses.

Joinmarket is just one of many ways a coinjoin can happen, but this should give you the general idea. 

The whole taker-maker process aims to mix the coins for the takers and the makers, making it harder to tell who owns which coins after the coinjoin-transaction. It will be hard to tell who now owns each output, if someone owns several outputs etc., which is the end goal of the transaction.

Users can run this process as many times as they like, the assumption being that more coinjoin transactions = better privacy.

Great post man, thanks! Makes me appreciate more what a cool idea this is.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Dabs on June 13, 2016, 01:42:48 PM
Couldn't you just use poloniex to get monero bought with BTC, then send it to yourself with a mixin of 5 or 100 or whatever you choose, then convert it with XMR.to back to BTC?
That's centralized and you lose control of your coins even if temporarily. Coin Join allows for mixing without ever giving out your coins or control of them.

Any exchange or gambling site or online wallet will do what you suggest. You just have to trust them to be online long enough for you to withdraw, and/or not get hacked, shutdown, or whatever.

I've actually seen a few people deposit to my site, wait a few days (when I "join" all deposits to the cold wallet), then withdraw, without ever playing. Works the same way. But now their coins are "tainted", so don't go try going to coinbase directly from any gambling site. Our wallets are all tagged.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: PantminerS7 on June 13, 2016, 02:44:55 PM
Somebody please "CoinJoin for Dummies".
Snip

Great post man, thanks! Makes me appreciate more what a cool idea this is.

If you like the idea and concept, I encourage you to download the blockchain and get your own Joinmarket-maker script running. Estimates are that the avg. maker gets about a 1% annual increase in their coin. All you need is a computer that can run the script and bitcoind.

You can get the private keys for your addresses, so you are actually in control of your coins the entire time, unlike all other similar services I've seen.

In addition, you'll get that good feeling of supporting both the bitcoin network and Joinmarket!


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dooglus on June 14, 2016, 09:49:43 PM
Great post man, thanks! Makes me appreciate more what a cool idea this is.

Here's an actual example (https://blockchain.info/tx/45a4cd96138ad12a5eacf5321f5e6a713104ec2a2c2d27fac12c3bc98528e6b9) of a CoinJoin transaction (click link for blockchain.info link):

http://i.imgur.com/Osuydri.png

There were 3 people involved in the transaction. There are 6 outputs, 2 per person. 3 of the outputs (coloured yellow) are for the exact same amount. It's impossible to know which of these three yellow outputs belongs to which of the 3 people just from looking at this transaction. The other 3 outputs are change amounts. We can easily tie the change outputs to the inputs, which I did by using the coloured arrows.

The guy who spent 82 BTC got back a yellow 70 BTC and 12 BTC of change - indicated by the blue arrow.
The guy who spent 171 BTC got back a yellow 70 BTC and 101 BTC of change - indicated by the orange arrow.
All the other inputs came from the 3rd guy, and he got back a yellow 70 BTC and 41 BTC of change - indicated by all the red lines.

Hopefully that makes it clearer. It's the yellow outputs that have been anonymised by this transaction, not the inputs or the change outputs.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Dabs on June 15, 2016, 02:31:53 AM
There were 3 people involved in the transaction.

Hopefully that makes it clearer. It's the yellow outputs that have been anonymised by this transaction, not the inputs or the change outputs.

In that particular example, wouldn't it be more anonymous to just have 6 outputs of 61.04976087 BTC? (That's the total amount less tx fees divided by 6, or 3 yellows and 3 change outputs of all exactly the same amount).

That way, even the "change" outputs can no longer be tied to the three people.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: PantminerS7 on June 15, 2016, 05:55:57 AM
There were 3 people involved in the transaction.

Hopefully that makes it clearer. It's the yellow outputs that have been anonymised by this transaction, not the inputs or the change outputs.

In that particular example, wouldn't it be more anonymous to just have 6 outputs of 61.04976087 BTC? (That's the total amount less tx fees divided by 6, or 3 yellows and 3 change outputs of all exactly the same amount).

That way, even the "change" outputs can no longer be tied to the three people.

Sure, it's possible. With a lot of coinjoin services, you can split the amount over several addresses. This is encouraged by some of them, and it should theoretically be better for privacy.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Kevin29 on June 18, 2016, 09:55:17 AM
Nice


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dooglus on June 19, 2016, 12:26:07 AM
In that particular example, wouldn't it be more anonymous to just have 6 outputs of 61.04976087 BTC? (That's the total amount less tx fees divided by 6, or 3 yellows and 3 change outputs of all exactly the same amount).

That way, even the "change" outputs can no longer be tied to the three people.

The three people contributed different amounts to the transaction, so they get different amounts of change.

The person paying for the transaction (the 'taker' in JoinMarket terminology) decides the amount of the yellow outputs, and the other two people (the 'makers') go along with that. It's only the yellow amount which is to be considered 'joined'.

Note that we could figure out which of the three people was the taker by summing the inputs and outputs of each colour. We'll find that two of the thee made a small profit on this transaction (the makers) and one took a loss (the taker).

If the maker had wanted to mix his whole wallet in this transaction he could done so. He must have only needed 70 BTC mixed at this time, for whatever reason.

Also, try following the yellow outputs - you'll see that all three of them went on to further coinjoin transactions for different amounts.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dserrano5 on June 19, 2016, 12:54:59 AM
Are there any easy, straightforward instructions to use joinmarket? Blockchain's shared coin was easy.

Check their thread (https://bitcointalk.org/index.php?topic=919116.msg15148759#msg15148759). There's an electrum plugin under development that, although needs a bit of care at install time, it seems to work (read "worked for me") with a couple of mouse clicks.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on June 24, 2016, 12:58:07 AM
Getting different amounts of change though doesn't have to mean that one is traceable.

Picture the same set of inputs, but a set of outputs all denominated in 30BTC, 10BTC, 3BTC, 0.1BTC, O.03BTC, etc.  Up to whatever set of denominations you can make at least ten each of and down to whatever denomination people are willing to give up as a mixer fee to enhance their anonymity.

Now some participants get more of one denomination, some participants get more of a different denomination, but with ten of each denomination there will always be a way to split up whatever amounts among three participants, and there's no way for an eavesdropper or block chain snoop to know which is whose.  They can't even use the number of each denomination issued as a guide to what particular amounts were paid out. 


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dooglus on June 26, 2016, 06:22:50 AM
Picture the same set of inputs, but a set of outputs all denominated in 30BTC, 10BTC, 3BTC, 0.1BTC, O.03BTC, etc.

I like the idea of using powers of 2 as the change amounts. That way any amount can be created by using at most one of each size of change.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: belcher on June 26, 2016, 12:46:21 PM
Change can be linked if later on the blockchain, change outputs are re-combined with inputs even if they use standard output sizes. That's why JoinMarket has so-called mixing depths which help stop that happening.

The downside of standard output sizes is that it may damage the divisibility of the currency, and also its bad for scalability because it greatly increases the number of outputs. I decided not to implement it in JoinMarket, but it's a tradeoff question so there's no obvious answer really.

A somewhat related idea is this one: https://github.com/JoinMarket-Org/joinmarket/issues/229


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: smoothie on July 04, 2016, 08:53:00 AM
Couldn't you just use poloniex to get monero bought with BTC, then send it to yourself with a mixin of 5 or 100 or whatever you choose, then convert it with XMR.to back to BTC?
That's centralized and you lose control of your coins even if temporarily. Coin Join allows for mixing without ever giving out your coins or control of them.

Any exchange or gambling site or online wallet will do what you suggest. You just have to trust them to be online long enough for you to withdraw, and/or not get hacked, shutdown, or whatever.

I've actually seen a few people deposit to my site, wait a few days (when I "join" all deposits to the cold wallet), then withdraw, without ever playing. Works the same way. But now their coins are "tainted", so don't go try going to coinbase directly from any gambling site. Our wallets are all tagged.

I'm speaking in terms of privacy. What's to stop someone from being all the "other people" in coin join transaction?

Essentially being Sybil attacked in terms of traceability.

The topic was privacy Not security.

The issue you bring up comes back to, how did you acquire the bitcoins you want to "wash" in the first place if you didn't mine them?

Pretty sure there was a "not being in control" aspect to the acquisition of the Bitcoin you are trying to use in a coin join Transaction. Kind of goes against what you just said in terms of centralization and security of your coins.

Concerning your comment about your bitcoins being tagged.
That cannot easily be done in monero due to its protocol based fungibility via ring signatures.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on July 10, 2016, 10:37:32 PM
Picture the same set of inputs, but a set of outputs all denominated in 30BTC, 10BTC, 3BTC, 0.1BTC, O.03BTC, etc.

I like the idea of using powers of 2 as the change amounts. That way any amount can be created by using at most one of each size of change.

WRONG plan! 

You want at least ten outputs of each denomination you're creating. 

The whole idea of standardizing denominations is for txOuts to be indistinguishable.  The only one of a given denomination created in a transaction is VERY distinguishable from all other outputs.



Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dooglus on July 11, 2016, 04:26:21 AM
Picture the same set of inputs, but a set of outputs all denominated in 30BTC, 10BTC, 3BTC, 0.1BTC, O.03BTC, etc.

I like the idea of using powers of 2 as the change amounts. That way any amount can be created by using at most one of each size of change.

WRONG plan! 

You want at least ten outputs of each denomination you're creating. 

The whole idea of standardizing denominations is for txOuts to be indistinguishable.  The only one of a given denomination created in a transaction is VERY distinguishable from all other outputs.

At most one of each size goes to each participant. Each output goes to a different address.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Cryddit on July 12, 2016, 03:50:18 AM

At most one of each size goes to each participant. Each output goes to a different address.

Exactly.  And the people figuring out who got what *KNOW* that at most one of each size went to each participant.  That's why we don't do that.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Dabs on July 12, 2016, 03:32:15 PM
Summary: Get a hundred participants to send to a thousand addresses the exact same amount. Miner gets the change/fee.

If there is a maker/taker/website/bot that takes a fee, it could be part of the participant list.

This is going to be a headache, but I'm sure software can figure it out.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dwgscale11 on September 19, 2016, 06:59:28 PM
Why was Sharedcoin (I'm assuming it utilized CoinJoin?) removed from blockchain.info?  Does CoinJoin exist anymore? (Not JoinMarket) It was super easy to use as it was built into the send of the online wallet on blockchain.info.


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: Dabs on September 19, 2016, 07:29:51 PM
Uh, ShareCoin was a service or feature of blockchain. It wasn't exactly a CoinJoin implementation. JoinMarket does CoinJoin, but I understand why you'd want an easier method.

Which leads me to ask: What qualifies for the bounty? There's 42 BTC up for grabs on the bounty multi-sig address, but JoinMarket doesn't seem to qualify, or maybe it's not considered "practical" enough.

If I make a website that looks like, for example, shapeshift, and you see that you can send coins there, and every hour there is a CoinJoin transaction (even if internal to the site), does that count? Or any form of centralization doesn't count?

See, for CoinJoin to really work the way it was intended, everyone that participates in a CoinJoin transaction needs to be all online and they all need to sign. Perhaps what they're looking for is some Windows Bitcoin Core Qt wallet type that includes a tick box for [X] CoinJoin, then it would automatically look for others.





Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: dwgscale11 on September 19, 2016, 07:58:24 PM
Uh, ShareCoin was a service or feature of blockchain. It wasn't exactly a CoinJoin implementation. JoinMarket does CoinJoin, but I understand why you'd want an easier method.

Which leads me to ask: What qualifies for the bounty? There's 42 BTC up for grabs on the bounty multi-sig address, but JoinMarket doesn't seem to qualify, or maybe it's not considered "practical" enough.

If I make a website that looks like, for example, shapeshift, and you see that you can send coins there, and every hour there is a CoinJoin transaction (even if internal to the site), does that count? Or any form of centralization doesn't count?

See, for CoinJoin to really work the way it was intended, everyone that participates in a CoinJoin transaction needs to be all online and they all need to sign. Perhaps what they're looking for is some Windows Bitcoin Core Qt wallet type that includes a tick box for [X] CoinJoin, then it would automatically look for others.





I'm curious as to WHY it was a service that is no longer?  Who shut it down?  Is the code still out there?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: u15776 on January 17, 2017, 09:18:55 PM
Great post man, thanks! Makes me appreciate more what a cool idea this is.

Here's an actual example (https://blockchain.info/tx/45a4cd96138ad12a5eacf5321f5e6a713104ec2a2c2d27fac12c3bc98528e6b9) of a CoinJoin transaction (click link for blockchain.info link):

http://i.imgur.com/Osuydri.png

There were 3 people involved in the transaction. There are 6 outputs, 2 per person. 3 of the outputs (coloured yellow) are for the exact same amount. It's impossible to know which of these three yellow outputs belongs to which of the 3 people just from looking at this transaction. The other 3 outputs are change amounts. We can easily tie the change outputs to the inputs, which I did by using the coloured arrows.

The guy who spent 82 BTC got back a yellow 70 BTC and 12 BTC of change - indicated by the blue arrow.
The guy who spent 171 BTC got back a yellow 70 BTC and 101 BTC of change - indicated by the orange arrow.
All the other inputs came from the 3rd guy, and he got back a yellow 70 BTC and 41 BTC of change - indicated by all the red lines.

Hopefully that makes it clearer. It's the yellow outputs that have been anonymised by this transaction, not the inputs or the change outputs.

Cool, I first thought that inputs are sent to another bitcoin address and from there to the outputs. But, this seems not to be the case. Is CoinJoin a smart contract or a dAPP as with Ethereum?


Title: Re: CoinJoin: Bitcoin privacy for the real world
Post by: 687_2 on February 02, 2017, 07:12:43 AM
The bounty is still available, and it's pretty significant now:

https://blockchain.info/address/3M8XGFBKwkf7miBzpkU3x2DoWwAVrD1mhk