News for hackers. Stuff that matters.
Re:Zero-Knowledge Contingent Payment by bramblerose on Sunday February 28, 2016 @10:10AM (#11191060)
It's unfortunate that most bitcoin-related posts require the reader to have a lot of in-depth knowledge about the details of how bitcoin transactions work. As somewhat-interested-person, I can /just/ figure out what the gist of the story is ('Alice can show she knows the answer and can then transfer the answer in an atomic payment'), but it's completely unclear to me how either part works. The "The buyer makes his payment to the following ScriptPubkey" section is maybe the worst offender in that respect -- apparently that script is supposed to be obvious, but it's not clear to me what it does /at all/.
Re:Zero-Knowledge Contingent Payment by ewillbefull on Sunday February 28, 2016 @12:53PM (#11191616)
The simple explanation -- which I unfortunately left out of my slides but did elaborate on during my talk -- is that Bitcoin has a way for you to send money to someone contingent on them producing the preimage of a SHA256 hash. The remainder of the script allows you to get your money back if the person doesn't have or doesn't provide the preimage within a certain amount of time.

If you use a zero-knowledge proof to enforce that the preimage of the hash is a key which unlocks some data you want, this becomes a powerful tool for building exotic protocols or performing risky transactions. It also doesn't cost much on the Bitcoin side of things.

Re:Zero-Knowledge Contingent Payment by ryan-c on Sunday February 28, 2016 @10:34AM (#11191118)
Here's my attempt at explanatory comments - the ScriptPubkey is a program (written in Bitcoin Script) which is attached to an output of a Bitcoin transaction - parameters must be provided that make it return "true".

    # Compute the SHA256 of the value on the top of the stack (spender input),
    # then add the result to the top of the stack
    OP_SHA256
    # Check whether this value is equal to Y, the hash of the key under which
    # the solution was encrypted. 
    <Y> OP_EQUAL
    # If the correct key was provided, add the seller's public key to the stack
    OP_IF
      <Seller Pubkey>
    # Otherwise, if it has been 100 blocks or more, add the buyer's public key
    # to the stack so they may refund themselves if the seller does not complete
    # the protocol 
    OP_ELSE
      <block_height+100> OP_CHECKLOCKTIMEVERIFY OP_DROP
      <Buyer Pubkey>
    OP_ENDIF
    # Verify the signature against the public key on the top of the stack
    OP_CHECKSIG
Re:Zero-Knowledge Contingent Payment by jnbiche on Sunday February 28, 2016 @01:13PM (#11191713)
Good explanation. By way of background, I'll add that Bitcoin Script runs on a stack machine, similar to Forth (except Script is non-Turing complete).
Re:Zero-Knowledge Contingent Payment by bramblerose on Sunday February 28, 2016 @10:39AM (#11191131)
Thank you, that clarifies a lot.
Re:Zero-Knowledge Contingent Payment by Uptrenda on Sunday February 28, 2016 @11:36AM (#11191321)
Believe me - it's not just you. Bitcoin has always been like this. You'll have one smart guy who says something fairly interesting but somehow they never go into enough detail for anyone else to be able to reproduce their results. Because of this - if you want to be able to do anything interesting working by yourself is still the best way to do it.

Coincidentally: I was actually working on using ZKPs before this was posted and I had a hell of time even getting the library installed (Snarkfront.) In the end I resorted to emailing one of the devs who managed to get it to work since I'm probably one of less than 50 people world-wide who have ever used Snarklib before - (a group that would probably include Greg Maxwell too.) So yes - the bleeding edge stuff unfortunately does require a lot of time to master but sometime in the future I hope to post some proper documentation and put a virtual machine online so normal devs can play with this stuff without having to waste hours.

Re:Zero-Knowledge Contingent Payment by ptrincr on Sunday February 28, 2016 @11:12AM (#11191223)
Yep, very true. However the Internet itsself was a mystery to most people during its early life. The technology was refined, made more user friendly and opened up to the masses.

The same happened with Bitcoin (as a payment method) and I'm pretty sure someone will find way to make this simple enough for the layman to use.

Re:Zero-Knowledge Contingent Payment by ssharp on Sunday February 28, 2016 @01:49PM (#11191843)
This drum keeps getting pounded, but a cogent answer to the question "why would I use Bitcoin when I can use existing payment methods?" has yet to be given.

The benefits of the internet were pretty clear and obvious. The benefits of Bitcoin are neither clear nor obvious.

Re:Zero-Knowledge Contingent Payment by stormbrew on Sunday February 28, 2016 @02:00PM (#11191870)
This seems very hindsight driven to me. I didn't realize how powerful the internet could be for news until Di died and I heard about it online something like a half hour before my parents confirmed it on TV. My mother didn't trust the internet for film information until imdb had existed for many years, still relying on yearly Leonard Maltin books all the time.

Obviousness doesn't tend to come until something compels it. But in the meantime, people who recognize it before others do are working to profit off that difference.

Re:Zero-Knowledge Contingent Payment by kanzure on Sunday February 28, 2016 @05:20PM (#11192654)
> "why would I use Bitcoin when I can use existing payment methods?"

Bitcoin can be used for other reasons beyond payment system transactions; for example, a bunch of coins are stored in cold wallets, as a physical store of value which cannot be confiscated. Market fluctuations still happen but that's unrelated to physical coin storage.

Re:Zero-Knowledge Contingent Payment by TylerE on Sunday February 28, 2016 @07:46PM (#11193124)
I've never believed this line of logic at all. You really think in a serious shit-hits-the-fan scenario (be it natural disaster, government takeover, whatever) you are going to have reliable internet connectivity?
Re:Zero-Knowledge Contingent Payment by monort on Sunday February 28, 2016 @09:38PM (#11193352)
During relatively low intensity conflicts mobile networks usually work, e.g. in Syria or Ukraine. I think it's the most common scenario in the modern time for shit-hits-the-fan.

http://www.al-monitor.com/pulse/zh/originals/2015/04/aleppo-...

http://dlca.logcluster.org/display/public/DLCA/3.4+Ukraine+T...

Re:Zero-Knowledge Contingent Payment by kanzure on Sunday February 28, 2016 @08:07PM (#11193174)
Yeah, I expect sneakernet to work pretty well. A few weeks is way better than nothing. Also, you don't need to use an active internet connection to make reliable zero-confirmation transactions (see lightning network, although it's true that monitoring for confirmations requires internet data- so you have to set the timeouts to be way way into the future, which is reasonable and not unexpected).
Re:Zero-Knowledge Contingent Payment by TylerE on Sunday February 28, 2016 @08:47PM (#11193261)
How on earth does that work? Forget double spends, here come the quadruple and quintuple spends!

Zero-conf is fundamentally broken.

Re:Zero-Knowledge Contingent Payment by kanzure on Monday February 29, 2016 @10:49AM (#11196110)
> Zero-conf is fundamentally broken.

Yep. Double-spending zero-conf transactions can work as long as you are using a payment channel (where the other side is receiving each transaction). That's how the "payment channel" concepts work.

Re:Zero-Knowledge Contingent Payment by brianwawok on Sunday February 28, 2016 @08:09PM (#11193183)
If the s hits the fan, the only currency is guns and ammo.
Re:Zero-Knowledge Contingent Payment by EdHominem on Sunday February 28, 2016 @07:29PM (#11193069)
No, it's just that there probably aren't any use-cases you would or should care about. Some fans seem hell-bent on showing that everything should use btc and that's as silly as thinking Visa or US $20 bills are the only solution we need.

But for people who want non-refundable payments, or scriptable m-of-n payment rules, etc, it's almost the only game in town.

Re:Zero-Knowledge Contingent Payment by dayon on Monday February 29, 2016 @11:49AM (#11196491)
One benefit is not having all of your online purchases tracked by your credit card company, which can produce further benefit for you down the road when insurance companies and whoever else is unable to purchase meaningful data about you to exploit you.