neo icon indicating copy to clipboard operation
neo copied to clipboard

Add zkp

Open doubiliu opened this issue 3 years ago • 11 comments

Close #2647 In this PR,we want to support Groth16 in neo-core.

Change list:

doubiliu avatar Apr 08 '22 11:04 doubiliu

welcome to rust.

Jim8y avatar Apr 08 '22 12:04 Jim8y

Where do these dynamic link libraries come from?

erikzhang avatar Apr 11 '22 03:04 erikzhang

Where do these dynamic link libraries come from?

The dynamic link uses the bellman library. For compatibility, we wrap a layer.

Bellman link: [email protected]:zkcrypto/bellman.git Layer link: https://github.com/passer-byzhang/zk/tree/main/neo-zk-tools

Bellman is a zero-knowledge proof library written for the zcash project

doubiliu avatar Apr 11 '22 03:04 doubiliu

The dynamic link uses the bellman library. For compatibility, we wrap a layer.

Some suggestions:

  1. These dynamic link libraries should support Windows, Linux and Mac.
  2. These dynamic link libraries should support x86 and x64.
  3. We should create a separate project to wrap them, and create a nuget package.
  4. For the structure of the nuget package, please refer to SQLite.
The structure of the SQLite nuget package

erikzhang avatar Apr 12 '22 02:04 erikzhang

At present, windows/linux/mac has been supported, I have added 3 kinds of dll, x86 needs additional compilation Since the original project is already wrapped with a rust project, do I need to create a project and wrap it again?

doubiliu avatar Apr 12 '22 05:04 doubiliu

Since the original project is already wrapped with a rust project, do I need to create a project and wrap it again?

You need to create wrapper classes in .NET and create a nuget package.

erikzhang avatar Apr 12 '22 06:04 erikzhang

Since the original project is already wrapped with a rust project, do I need to create a project and wrap it again?

You need to create wrapper classes in .NET and create a nuget package.

Fix

doubiliu avatar Apr 19 '22 03:04 doubiliu

We need to discuss about the gas fee.

doubiliu avatar May 26 '22 11:05 doubiliu

Wait for neo-project/neo-vm#488

erikzhang avatar Jul 22 '22 01:07 erikzhang

Wait for neo-project/neo-vm#488

Maybe we need to move forward

doubiliu avatar Sep 18 '22 07:09 doubiliu

I'd concentrate on #2811 for now, let's roll it out and then plan this thing for the next release.

roman-khimov avatar Sep 18 '22 07:09 roman-khimov

Since v3.5.0 has been released, this can be moved on.

superboyiii avatar Jan 04 '23 07:01 superboyiii

@doubiliu, I just made a minor update on title. Fell free to change it.

vncoelho avatar Jan 04 '23 12:01 vncoelho

@doubiliu, I just made a minor update on title. Fell free to change it.

how about call this zksnark?

Jim8y avatar Jan 04 '23 13:01 Jim8y

@doubiliu, I just made a minor update on title. Fell free to change it.

how about call this zksnark?

Any name is fine, and groth16 is also fine, because there are other solutions for zk. In addition, there are still problems with the algorithm library related to this PR. I am discussing with erikzhang , and it will take some time to update.

doubiliu avatar Jan 05 '23 02:01 doubiliu

Any name is fine, and groth16 is also fine, because there are other solutions for zk. In addition, there are still problems with the algorithm library related to this PR. I am discussing with erikzhang , and it will take some time to update.

I mean, using ZKSnark would attract more people who is interated in zkp to join the discussion..... Groth16 is way less known to the community.

Jim8y avatar Jan 05 '23 04:01 Jim8y

there are still problems with the algorithm library related to this PR

Hi @doubiliu, We could take a look, is it related to the curve BLS12-381 itself?

vncoelho avatar Jan 05 '23 12:01 vncoelho

It is mainly a problem of some encoding formats, not a key problem

doubiliu avatar Jan 09 '23 06:01 doubiliu

there are still problems with the algorithm library related to this PR

Hi @doubiliu, We could take a look, is it related to the curve BLS12-381 itself? it is under https://github.com/neo-project/Neo.Cryptography.BLS12_381

doubiliu avatar Jan 09 '23 06:01 doubiliu

@doubiliu need update

Jim8y avatar Feb 04 '23 19:02 Jim8y