Live data from Hacker News

Programming Zero Knowledge Proofs: From Zero to Hero

zkintro.com

131–140 of 170 posts

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#131

Earlier quoted context omitted.

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

The general takeaway is that you can prove you know something without revealing what it is, or how you know! If you can't think of the possibilities that unlocks beyond the examples others have already discussed(none of which were crypto related), that's a limitation on your end.

> The general takeaway is that you can prove you know something without revealing what it is, or how you know!

And? Why is it better than good old PKI?

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#132

Earlier quoted context omitted.

What do you mean scoped to a particular proof? There are different proof types like there are different hashing algorithms, they can all prove any data just like sha256 and md5 can hash any data. How do you verify the password meets certain requirements sever side without getting that user data? Client side input can't always be trusted as anyone can modify that regex check. Here's a project doing passport verificati…

Re: scoped In response to your comment The ZK proof can prove anything, like that the password has enough special symbols and numbers - you definitely do not need "ZKPs" to do this trivial task. and > There's no way to check that someone's age is old enough with just a hash Yeah you can, you log them in then link them to that userData with an identifier - typically an email address or unique user ID. You can easily w…

> you definitely do not need "ZKPs" to do this trivial task.

You haven't provided an alternative way though? If you're looking for more complicated things they can do see: https://news.ycombinator.com/item?id=41430157

> Yeah you can, you log them in then link them to that userData with an identifier - typically an email address or unique user ID. You can easily write the login API to know nothing but hashes, or you can write it to respond with - to use your example that user's age - if the password is correct (without ever actually knowing the password).

This doesn't make sense, how do you verify someones age without getting their birthday? Hashes are binary yes/no checks, not range checks.

> Anybody can verify any document with enough identifying information about the document and a registry to match it up to.

So your alternate solution is that every government in the world runs an API you can check a passport against? Instead of them just providing a known public key they signed the passport with? Sounds way over complicated compared to a ZK proof.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#133

Earlier quoted context omitted.

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"

And the next question is: why bother? We have well-established protocols for the ID card: a police scanner creates a nonce and sends it to the card, the card signs it with its private key, and provides a certificate signed by the government. The police scanner then verifies the signature and checks that the certificate is correctly signed by the government's public key. No need for ZKP.

You think peoples licenses / passports are little computers with API's built into them that return arbitrary information on demand? Over the internet?

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#134
post #89

Earlier quoted context omitted.

[dead]

> I've created a simple demo program to illustrate the concept of a human passport, inspired by World ID. It uses a zero-knowledge virtual machine (zkVM) to verify certain properties of a password without actually seeing the password itself. Why would I need it in practice?

I'm not sure what you're referring to specifically.

If you're asking why we need zero-knowledge proofs (ZKP) in a human passport system: Imagine you have 6 billion to give away, and all lives worldwide should get their fair share. How could you do this? Giving money to authorities like governments and trusting them? In the context of 'alllivesmatter.world', I propose the DUKI system. Here's how it works:

- Each person has a human passport (they should never have more than one)

- They can directly claim this money on the blockchain using the DUKI system

- This ensures that each unique person gets their share only once at each period

To achieve this and prevent multiple claims per person without considering privacy, we could use national security IDs, but these IDs need to be genuine, assuming that every human gets and only gets one. However, using these IDs directly would compromise privacy. So instead, we let authorities prove that using ZKP:

- A valid national ID was used in creating the passport

- Each national ID is used only once in the system

This way, we preserve privacy while still ensuring the integrity of the distribution process. Other service that focus on real people could also utilize on this. It just like currently wallet as an entry to web3 world, with only one key difference: that wallet represents a unique human in the world.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#135
post #52
post #47

Earlier quoted context omitted.

A toy example: suppose we have some sudoku. You want to show publicly (maybe in a HN comment) that you know the solution, without revealing the solution itself, because then anybody would know it and be able to post that they know it. A zero-knowledge proof enables this. You could also post a hash of the solution, but then you need to know the solution already to verify a submission. (It would also enable others to c…

One place I wish there was zero knowledge proofs involved, or even any kind of cryptography, is when you perform credit assessment for loans outside your bank: an external loan provide peeks at your full bank account history to assess whether you’re eligible. They don’t need to know where I buy my socks, or even how much money I have. Only that I have a big enough deposit and a steady enough cashflow.

this is the example often cited as usecase for zkTLS protocols, which are protocols that use additional trust assumptions to notarize a connection you have with a TLS protected host, and then you can prove the notarization (i.e. a signature over the TLS transcript) in ZK as well as any parsing over request/response data.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#136

Earlier quoted context omitted.

Re: scoped In response to your comment The ZK proof can prove anything, like that the password has enough special symbols and numbers - you definitely do not need "ZKPs" to do this trivial task. and > There's no way to check that someone's age is old enough with just a hash Yeah you can, you log them in then link them to that userData with an identifier - typically an email address or unique user ID. You can easily w…

> you definitely do not need "ZKPs" to do this trivial task. You haven't provided an alternative way though? If you're looking for more complicated things they can do see: https://news.ycombinator.com/item?id=41430157 > Yeah you can, you log them in then link them to that userData with an identifier - typically an email address or unique user ID. You can easily write the login API to know nothing but hashes, or you c…

> Re: Validating passwords > You haven't provided an alternative way though?

Check if it has numbers: \d

Check if it has symbols: \W

Check if it's 6-64 chars long: {6,64}

> This doesn't make sense

Promise you it's how it works.

> Hashes are binary yes/no checks

Nope, just means encrypted text.

> every government in the world runs an API

Hilarious you think a decentralized approach where every participant has a copy of an append-only ledger is simpler than a central server with SQL database. The argument for decentralization was never that it was simpler - it's of course way simpler in many ways to have a single source of truth. If you mean using that passport library on a regular server, then you also have to run an API or nobody can use it.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

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

> we may never be 100% sure

Right, but we may be 99.9999999999% sure.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#138
post #91

Earlier quoted context omitted.

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.

> They'll be using them in a decade, [...]

I'm not so sure. That would only make sense, if the lawyers and regulators are on board.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#139
post #33

Earlier quoted context omitted.

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

Sorry, what is certificate chaining in this context?

ZKP allows you to run arbitrary logic, without the id providers having to anticipate what you are trying to do nor having to cooperate. Eg you could prove that 'either your age is a prime number or that you have green eyes and live in New York'.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#140
post #89

Earlier quoted context omitted.

[dead]

> I've created a simple demo program to illustrate the concept of a human passport, inspired by World ID. It uses a zero-knowledge virtual machine (zkVM) to verify certain properties of a password without actually seeing the password itself. Why would I need it in practice?

Because you can enforce password policies without the password ever leaving the (untrusted) client in clear text. I.e. the server only sees the hash and still knows it's dealing with a strong PW.
Post reply on HN