Live data from Hacker News

Programming Zero Knowledge Proofs: From Zero to Hero

zkintro.com

111–120 of 170 posts

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#111

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, bu…

I can also enter a password without revealing my identity, how is it fundamentally different?

If I use an authentication provider, am I now "using ZKPs" because I can log people in without knowing who they are?

Or if I use any identity verification provider (example: Clear), am I using ZKPs since my app doesn't actually see your identity? We just get the OK from Clear?

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#112

Earlier quoted context omitted.

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 scena…

Instead of asking your id police office pass you a circuit. You present your ID to the circuit and pass results to the officer. The officer then verifies you are not a criminal without ever looking at your documents.

This is the same fundamental thing as the password hash example. I can verify you without ever seeing your password, the policeman can verify you without ever seeing your documents - same exact concept.

My question is then: What is unique to ZKPs? Are the ZKP folks just asking us to start calling these techniques "ZKPs"?

When I use Clear for IDV is that a ZKP? Just like your example, they show the ID to Clear, but I never see the ID.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#113

Earlier quoted context omitted.

> Part of growing up On the contrary, your sentiment reads less like wisdom and more like hardheadedness. I am glad there are plenty of others here who do not share such a narrow-minded sentiment. The venn-diagram between cryptocurrency and ZKPs is not a circle, or really even close. They're a mathematical concept first and foremost, and thanks to crypto dumping tons of money into the scaling problem, now much more e…

Can you show me ANY actual practical use for cryptocrap outside of illegal transactions? Like: "Company XYZ uses ABC to provide asset tracking, and it's now used by 99% of the DEF sector". > The venn-diagram between cryptocurrency and ZKPs is not a circle, or really even close. Then it should be treated as such, instead of trying to claim that it has practical applications.

I think you both 1) didn't read the article 2) went into the comments assuming it's about cryptocurrency and brought your baggage on that subject with you. The article mentions them in an offhand way, ZKPs are independent of anything cryptocurrency related.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#114

Earlier quoted context omitted.

Can you show me ANY actual practical use for cryptocrap outside of illegal transactions? Like: "Company XYZ uses ABC to provide asset tracking, and it's now used by 99% of the DEF sector". > The venn-diagram between cryptocurrency and ZKPs is not a circle, or really even close. Then it should be treated as such, instead of trying to claim that it has practical applications.

I think you both 1) didn't read the article 2) went into the comments assuming it's about cryptocurrency and brought your baggage on that subject with you. The article mentions them in an offhand way, ZKPs are independent of anything cryptocurrency related.

Can you provide a single example of their actual use outside of cryptocrap?

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#115

Earlier quoted context omitted.

No, this is more like this. Here is my ZKP to verify you are older than 18. Please pass it your ID card and give me result. I’ll verify result and prove you are above 18. On top of that the proof output would contain your photo from the document so I can visually compare it with your face. In the end all I know is you are older than 18. I don’t know your driver license number or SSN, I don’t know your name. I know no…

Same thing. In my example the function only knows whether the provided hash equals the one on file. Yours is essentially the same - is the provided DOB This is also accomplished by just properly scoping the function. Considering the widespread availability of solutions to this well-known* problem, I wonder why anyone would "use ZKPs" - and what does that even mean? What npm should I install - and why? * where my ACME…

The hash check is binary, you can only check if a password is correct or not. The ZK proof can prove anything, like that the password has enough special symbols and numbers that it's secure.

There's no way to check that someone's age is old enough with just a hash unless you break the hash.

The most common but painful way to write ZK circuits is with Circom. Better more modern ways are with Noir or using SP1 which can prove arbitrary rust code.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#116

Earlier quoted context omitted.

Instead of asking your id police office pass you a circuit. You present your ID to the circuit and pass results to the officer. The officer then verifies you are not a criminal without ever looking at your documents.

How will the circuit determine that you are actually you? How will it make a query to the police database to look for warrants?

The ID would need to have some government digital signature for the ZK circuit to work. The proof would be "this digital ID that has this valid government signature shows XYZ".

The verifier would need the government public key and then can see "This ID that has been signed by the governments private key shows XYZ"

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#117
post #91
post #36

Earlier quoted context omitted.

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.

ZKPs have only become cheap and easy enough to do in the last few years, so of course Goldman Sachs doesn't use them yet. They'll be using them in a decade, for now look at startups. https://github.com/zk-passport/openpassport is one that is working today, worldcoin ID verification is another.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#118

What does everyone think about the 'trusted' setup part of zero-knowledge proofs? Is this a deal breaker for some use-cases or can this phase be done without worrying that the entire process has been hijacked... As has been a core goal of many ah... 'security' councils in the past.

ZK STARKS can be done without a trusted setup, they are slightly different from ZK SNARKS.

I believe it's possible to do a trusted setup with many hundreds or thousands of anonymous people too, someone would need to get every single contribution to recreate the trusted setup.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#119
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?

Yea it's the same as a hash collision, maybe they managed to type some other message that hashes to the same thing but it's very unlikely.

You can also use multiple different types of ZK proofs for the same data, same as using multiple hashing algorithms, for more certainty.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#120

Earlier quoted context omitted.

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, bu…

I can also enter a password without revealing my identity, how is it fundamentally different? If I use an authentication provider, am I now "using ZKPs" because I can log people in without knowing who they are? Or if I use any identity verification provider (example: Clear), am I using ZKPs since my app doesn't actually see your identity? We just get the OK from Clear?

Like I said, I'm not sure the simple password scenario is a very good example, because the app doesn't really care about the details of the secret itself, ie your password. Only that it's the same as you presented when you signed up.

I found the Sudoku example more illustrative, where you want to share your knowledge of the solution without sharing the solution itself. In that case, others do indeed care about the details of your knowledge.

You can't just provide a hash of the solved board and say "lol solved it", as only those who had also already solved it could verify your statement. Maybe I don't trust those others who claim they also solved it, how can I verify that indeed you solved it? You could tell me the solution but then you'd ruin the puzzle for me, which is no good.

So as I understand it, the point of ZKP is that they allow you to share proof of your Sudoku solution to me, in a way where I can be certain you do indeed have the right solution, without me learning what exactly the solution is.

Post reply on HN