I have several posts about the issues with Zerocoin:
https://bitcointalksearch.org/topic/m.5023887
https://bitcointalksearch.org/topic/m.5128980
https://bitcointalksearch.org/topic/m.5147817
https://bitcointalksearch.org/topic/m.5466558
https://bitcointalksearch.org/topic/m.5474960
https://bitcointalksearch.org/topic/m.5519196
https://bitcointalksearch.org/topic/m.5521333
https://bitcointalksearch.org/topic/m.5539088
https://bitcointalksearch.org/topic/m.5540317
https://bitcointalksearch.org/topic/m.5562422
The key problems that remain with even the latest Zerocoin re-design are:
- Can't be resistant to quantum computing nor mathematical advance (as the NSA did with differential crypto-analysis in the 1970s and 80s and no one knew they were cracking us) and it can't be retroactively hardened. Once you put all your faith in that, you are screwed if such an advance comes. Whereas, with Lamport signatures instead of ECDSA at least our normal transactions in an altcoin will be safe (the detailed reason is explained in one of the above linked posts). If someone redesigns Zerocoin to use only cryptographic hash functions, then this weakness will be fixed. This does not appear to be easy to do, as I haven't yet found any research attempting to do so. All the research I've found on zero-knowledge proofs involves some algebraic trap-door.
- It doesn't obscure your IP address, thus it is useless tsuris without such. And Tor+VPNs is likely compromised by the NSA et al.
- The timing and amounts of inputs and outputs to the mixer can be analyzed and much of the anonymity can be crack with such timing and pattern analysis. This is especially worsened if you change it to allow specific amounts in/out as you propose. The amounts should rather always be the same, e.g. 1 BTC.
- The verification time is very slow, thus it encourages further centralization of mining (which already a critical problem with Bitcoin). This makes it very costly to deal with denial-of-service attacks.
- At least the first iteration (and perhaps the re-designed one linked below) required a trusted party to sign the initial input values to the accumulator (each time the accumulator is reset), which is the antithesis of decentralized currency. This trusted party could steal all the coins.
- This is very complex new crypto and thus the likelihood of someone finding a weakness and cracking it is very high. For example, to prevent double-spends the design requires the solution C to be a prime. That may be (I haven't studied enough yet to form an opinion) a potential number theoretic hole for double-spends.
Please come back...I will be adding MUCH more to this post...
The initial model supports both a mixing service using the gateway and a totally decentralized direct "payment" path. However, since NXT doesnt support multisig the mixing is totally centralized on one of the gateway servers. The decentralized part allows (nearly?) undetectable transmission of NXT acct password (or any other data) directly to the destination acct.
Even though I am adding this functionality to the gateway, it is totally independent of the multisig DOGE gateway and also NXTcash. It just shares a lot of the code base, so it was easiest to add to the existing multigateway code. I am using libnacl http://nacl.cr.yp.to/index.html that xyzzyx recommended.
I added the following to the gateway_AM structure:
Code:
struct payment_bundle
{
unsigned char escrow_pubkey[crypto_box_PUBLICKEYBYTES];
unsigned char depositaddr[MAX_NXTADDR_LEN];
unsigned char paymentacct_key[crypto_box_SECRETKEYBYTES];
unsigned char txouts[8][MAX_NXTADDR_LEN];
int64_t amounts[8],sessionid;
};
added to gateway_AM:
struct
{
unsigned char publickey[crypto_box_PUBLICKEYBYTES];
unsigned char nonce[crypto_box_NONCEBYTES];
unsigned char paymentkey_by_prevrecv[crypto_box_PUBLICKEYBYTES + crypto_box_SECRETKEYBYTES + crypto_box_ZEROBYTES];
unsigned char payload_by_escrow[sizeof(struct payment_bundle) + crypto_box_ZEROBYTES];
};
At the high level there are what I call sessions. Initially, when the activity is low, a session might be as long as a day, but as activity grows, the duration of a session will shrink. It is critical that your transaction isnt the only one in a session, otherwise no amount of anything will help anonymity. If there are 1000 transactions, then with a good system, the best anybody should be able to do is 0.1% accuracy, eg. random guessing.
Each session goes as follows:
A. NXTmixer pays out all the funds that cleared during the last session to the depositaddrs for each NXT addr that received anonymous payment during the session
B. NXTmixer publishes new sessionid and its public key for this session
C. ALL participating nodes publish a SEND_ANONYMOUS_PAYMENTS AM. Yes, I said ALL nodes.
D2. ALL nodes process all of the SEND_ANONYMOUS_PAYMENTS from C and they try to decrypt every paymentkey_by_prevrecv. If they are able to decrypt it (first half matches their previous public key) then they have access to the NXTacct that the password in the rest of the message contains.
D2. NXTmixer also scans all SEND_ANONYMOUS_PAYMENTS from C and processes all payment bundles that properly decrypt. paymentacct_key is for a (temporary) account that is funded with the amount necessary to make all the payments specified in the payment bundle. In order to make sure it wont be emptied and to MIX all the NXT together, the funds required to make all the payments are sent to a shared account. Since NXT is totally fungible, this step is actually VERY effective in removing payment source information.
The NXTmixer updates the credits for each NXTacct during session and when there is enough different payments or max time elapsed, the session ends and we go back to A, where the payments are made.
************
The NXTmixer cannot implement all parts of this by itself, the clients need to implement code that synchronizes all participating nodes. The reason for this is that if everybody is broadcasting, then there is no information leaked when you publish your public key and payment bundle. Since everything is on the same broadcast, anybody can receive the message, but nobody knows if they did or not. This allows a direct transmission of a funded NXT acct to somebody else. Let us assume you will trust them to not drain the account during the next two sessions. Since he is the one paying you, if he does, then whatever deal was in place is off.
userA funds acct A with 10000 NXT
userA encrypts password for acct A using public key of B and it goes into paymentkey_by_prevrecv
userB decrypts the AM and gets the password for acctA and locally verifies that it has 10000 NXT
Now, for the next session, userB sets the paymentacct_key to be the key for acctA and payments can be made from this acctA on behalf of userB, even though userB has NEVER used the password for acctA other than locally to encrypt it into the payment_bundle.
Similarly, you can specify your depositaddr to be an acct that you have never used, but know the password for. Then in later sessions, you can use depositaddr's password as the paymentacct_key. As long as you are receiving payments, you are able to make pretty anonymous payments as I am finding it hard to figure out how anybody can determine payment paths.
I was told that knapsacking can penetrate the anonymity of most mixing, but with my design it is possible to set things up so that both the source and destination accounts are inside the encryption.
James