Live data from Hacker News

Programming Zero Knowledge Proofs: From Zero to Hero

zkintro.com

61–70 of 170 posts

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#61
post #50

Earlier quoted context omitted.

A signature is a zkp. So your example is also a good example :)

A signature is a PoK, but not ZK.

I was not clear enough, thanks. Whether it is a pok or zk depends on the chosen signature scheme. In any case, zk signature schemes exist and are implied by the existence of one way functions and publicly verifiable nizk

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#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? :)

[1] https://github.com/powdr-labs/powdr

Re: Programming Zero Knowledge Proofs: From Zero to Hero

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

You don't necessary get 100% certainty but the probability of success increases exponentially with each new run.

Thus you can get very fast to a probability smaller than you quantum tunnelling through a wall

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#64
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? :) […

For Rust, there is also Sunscreen.

https://github.com/Sunscreen-tech/Sunscreen

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#65
post #42

Earlier quoted context omitted.

I can see applications in multiplayer gamedev - imagine being able to run the whole game simulation on a clients machine and have them assert back to you that they killed 7 goblins, looted a rare sword from a chest, and died 3 times - and you could just trust them. Your server costs would only need to be for the metaprogression/persistence related stuff that could be done relatively infrequently based on updates from…

I agree. Exploring this in game worlds came up in a job interview a few years ago :) ZK proofs are potentially a transformative tool for real-tine distributed systems in general, not just games. They potentially improve laency ("ping"), by changing the communication patterns in a distributed consensus system. That's great for games and other real-time systems.

It would be amazing to have a single authoritative server in an mmo for the EU, USA, Asia, Oceania etc regions and only have bad latency if you were actually directly interacting with people from far away.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#66
post #47
post #2

As someone with zero knowledge regarding Zero Knowledge Proofs in a programming context, can someone give me a basic explanation regarding the utility? I do understand the basic principle of ZKP’s, but as yet I’m failing to understand how this would be applied in industry.

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…

So if we imagine a very rudimentary social hierarchy with a government on top, then thousands of corporations below, and then millions of people below corporations, this feature protects people in a case when government is malicious, but every single corporation is benevolent. Now if the government is not malicious, but corporations are, even part of them, it will allow them to basically take any payment and refuse service or do any other variants of abuse, costing time or money (think how it is bad today, and make it worse). And there is nothing to be done with it, because payment chain information is broken. Which is very useful for criminals who would want to run some business unaccountable and outside of the law system, and not very "useful" for the regular people.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#67
post #57
post #55

Earlier quoted context omitted.

Where you spend can have an impact on a decision… e.g. you may have the income and savings but if you’re regularly spending on gambling that can be a red flag.

You can prove that too with zk!

How could this look like?

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#69

Earlier quoted context omitted.

> Or if the big computer says "this entire Debian distribution of binary files was indeed compiled with this version of GCC", you can quickly verify that all the binaries are exactly what they should be - without having to trust anyone. > So amazed and intrigued that I had to learn how it's done Any chance you could just illustrate this somehow with a basic example? I just don't see how you could possibly verify that…

As far as I understand, you can't just use any gcc binary as it exists today. The program needs to be represented as a specific, mathematical expression that is suitable for zero-knowledge proofs.

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.

Re: Programming Zero Knowledge Proofs: From Zero to Hero

#70

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.

Only some kinds of ZKPs have that drawback; others don’t. There are many examples of such systems with transparent setup that are used in practice. Even for some ZKP scheme that do require trusted setup, you can perform the setup in a multi-party way that allows anybody to contribute randomness, and as long as even one person is honest, the whole thing is private.

The multiparty setup is better than a singular-party setup, but it burdens its deployment. How can users be confident of at least one party they can trust whose preferences vary? Further, how can deployment be made so that a malicious party does not sabotage the setup process or is sabotaged by the organiser or network failures? In other words, who would need to be blamed? Doing these things properly makes the process’s deployment significantly more expensive than centralised deployment. Hence, I don’t see them bearing any practical relevance, as any authority that organises their deployment would also be subject to cost optimisation due to human nature and as security can’t be quantified, it suffers first.

There are zero-knowledge proofs that don’t require a trusted setup phase. A plain old logarithmic equality proof is a very powerful tool, making it possible to ensure correct reencryption shuffle, decryption or encoding. They don’t get the same appeal as generic ZKP systems that get all the hype, which deters practically-minded people from getting familiar with the mechanisms and opportunities. At least, that was my experience when getting into ZKP.

Post reply on HN