Live data from Hacker News

Programming Zero Knowledge Proofs: From Zero to Hero

zkintro.com

91–100 of 170 posts

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#91
post #36
post #30

Earlier quoted context omitted.

I'm asking about real actual examples, not handwaving.

They are useful from a mathematical point of view. (And explore the relationship between P and NP, for example.) Not sure if that counts as a 'real use' to you. See also https://en.wikipedia.org/wiki/PCP_theorem At the moment, producing a zero knowledge proof has roughly a million-fold overhead compared to running a program directly. So there aren't many applications where that's acceptable. So I am very grateful tha…

Again, this is exactly the cryptocrap-derived nonsense I meant.

"Goldman Sachs could..." but they do NOT. Like they don't use blockcrap for interbank settlements, asset tracking, notary, etc.

So basically, no actual uses so far. And it's not even clear _why_ I would want to use ZKP.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#92
post #81
post #69

Earlier quoted context omitted.

There are RISC-V based zero-knowledge virtual machines, to which a GCC version can be compiled. So this should be possible, although probably very slow, maybe a thousand times slower than a normal GCC execution.

Risc Zero runs at about 500hz on high-end desktop hardware. They're working on speed ups though. (Source: their presentation in Brussels in July)

That was 500 KHz, and the latest versions are at 1MHz, so still 1000 times slower than a 1Ghz machine, but it’s easy to parallelize the workload, so it’s really mostly a cost of computation issue.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#93
post #62

If you wanna do it in a flexible way that is very easy to use and essentially the future of ZK, use Powdr [1]. Just write your code in rust nostd and be done with it. It's a compiler, basically. Once you use it, you'll never go back to hand-massaging polynomials. It'd be like writing assembly. Sure, some can do it, and it can be fun, but why do it if there are compilers out there to do the heavy lifting for you? :) […

You sound like you are routinely doing zero knowledge proofs. To me it sounds like a very niche thing. What kind of application area needs knowledge proofs on the regular? Finance?

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#94
I wrote ZKPs off as hype ~2 years ago - is it a legit concept outside blockchain marketing? Someone help me understand how it's different from hashes and access tokens?

> "Zero-knowledge proofs (ZKPs) are a method for one party to cryptographically prove to another that they possess knowledge about a piece of information without revealing the actual underlying information."

So, like this?

1. An app needs to confirm a user login is correct

2. But the app can't know the user's password because it's a secret

3. So the app instead checks for a hash which only the correct password would translate into

4. Now the user can enter their password, and the app can verify the password is correct without actually knowing it

What am I missing?

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#95
post #9

Another demonstration of Zero-Knowledge Proofs: A paper-tech protocol for validating Sudoku solutions without revealing the solution: https://zudoku.xyz/

So with ZK-proofs we may never be 100% sure something is true or not? Is it possible that this may be too computational expensive to have certainty at given (or above) level?

It’s the same thing as regular cryptography, I can’t be 100% sure that you signed this message but I can get arbitrarily close, and prohibitively expensive to fake

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#96
post #17

Are there any real uses of ZKP outside of blockcrap?

Any time I get someone to explain a real world use case they explain the concept of password hashing. Also, the only people who ever talk about "ZKPs" are these obviously non-technical crypto founders - it's possible they think it's a new thing when it's something we deal with everyday as developers.

I can't get anyone to explain how it's different than a password hash other than in these elaborate hypothetical scenarios that don't relate to technology.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#97
post #33
post #3

> We can take a digital identity card and prove that we are over 18 years old > Without revealing anything else, like your full name or address If you are in this articles audience you would simply state the producer of the ID card signs a statement that the person is over 18. No ZKP needed. The article like many others would be improved with a better example.

> If you are in this articles audience you would simply state the producer of the ID card signs a statement that the person is over 18. No ZKP needed. > The article like many others would be improved with a better example. It's easy to make this example better: Assume there are 50 different providers of ID cards, and Alice wants to convince Bob that she's over 18 years old. Bob trusts all 50 issuers, but Alice doesn'…

> Bob trusts all 50 issuers, but Alice doesn't want to reveal who her issuer is.

So, just a form of certificate chaining? With the same old challenges that come up if Bob learns that one of the issuers was compromised for some period of time?

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#98

I wrote ZKPs off as hype ~2 years ago - is it a legit concept outside blockchain marketing? Someone help me understand how it's different from hashes and access tokens? > "Zero-knowledge proofs (ZKPs) are a method for one party to cryptographically prove to another that they possess knowledge about a piece of information without revealing the actual underlying information." So, like this? 1. An app needs to confirm a…

The previous article[1] goes a bit into the difference from a simple has function.

It was very long-winded, so I haven't fully read it yet.

The key difference seems to be that a simple has function has a single argument. To verify the output you need the input value. While a ZKP function has two arguments, and one of them is not needed to verify the output.

Not sure if it makes much sense in a direct login scheme, but the alternative scenarios sound more interesting. For example, proving to an adult website you're over 18 without revealing your identity to that website.

[1]: https://zkintro.com/articles/friendly-introduction-to-zero-k...

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#99

I wrote ZKPs off as hype ~2 years ago - is it a legit concept outside blockchain marketing? Someone help me understand how it's different from hashes and access tokens? > "Zero-knowledge proofs (ZKPs) are a method for one party to cryptographically prove to another that they possess knowledge about a piece of information without revealing the actual underlying information." So, like this? 1. An app needs to confirm a…

I've also found that it's hard to sort out the blockchain hype from the interesting stuff, but trust me, ZK proofs are amazing and have applications way beyond blockchain. They're a new primitive in a space that's being called "programmable cryptography". Some other interesting building blocks in this space are secure multi-party computation (MPC) and fully homomorphic encryption (FHE).

Forgive my simplified/contrived examples but you can do a whole lot more with zero knowledge proofs than you can do with just hashes and access tokens, stuff that has nothing to do with blockchain.

For example:

1. An individual receives a contract via email and needs to confirm that it contains a specific clause ("The client agrees to pay $10,000 within 30 days").

2. However, they don’t want to reveal the rest of the contract to the verifier.

3. The individual uses a ZKP that proves two things:

  a. The contract is digitally signed by the specific email domain of the sender (e.g., @example.com).
  b. The contract contains the specific clause matching a regular expression pattern (e.g., The client agrees to pay \d+\ within \d+ days).
4. The verifier receives the proof, checks its validity, and confirms both the signature and the presence of the clause, all without seeing the full document.

Here's another one:

1. A passenger needs to prove to a ride-sharing app that they are within a specific pickup zone to request a ride.

2. The passenger doesn’t want to broadcast their exact location due to privacy concerns. They're using a device that can attest to the authenticity of their location.

3. The passenger uses a ZKP that proves:

  a) Their current location is within the allowed pickup area.
  b) Their mobile device has provided an attestation that their given location wasn't spoofed.
4. The ride-sharing app verifies the proof, allowing the ride request, while the passenger’s precise location remains private.

5. The rider can choose to share their exact location with a nearby driver when the time comes, but doesn't need to broadcast their exact location to all drivers.

And yet another one:

A user wants to prove that their edited photo originated from an actual physical camera capable of signing images.

For each consecutive edit, the editing software creates a proof that the input image is either an original signed image or comes with a ZK proof that it's derived from a sequence of edits originating from a signed input image. ZK proofs can be combined in such that we can turn a large number of proofs with dependencies on one another into a single, quickly verifiable proof. So in the end you can quickly verify that a heavily edited image does indeed originate from a trusted camera.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#100
post #90

Earlier quoted context omitted.

I'm confused, did you read the other comments?

Yes.

This must be a mistake or misunderstanding, because "blockcrap" is hardly mentioned in contrast with examples like confirming someone is of age, meets certain insurance requirements or has certain financial status without revealing anything about them. No blockchain is needed in any of these examples.
Post reply on HN