Skip to content

Shamir Secret Sharing with Zero Knowledge proofs using gnark.

Notifications You must be signed in to change notification settings

ewynx/zkp_mpc_gnark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MPC with ZKP

Shamir Secret Sharing with Zero Knowledge proofs proving the correct operations were performed. gnark is used to create the ZKP.

This uses a similar approach to https://github.com/hashcloak/shamir-rs, and adds zero knowledge proofs at the points where a calculation is done by a party.

Build & Run

go run . -port=8080 -otherPorts=8081,8082
go run . -port=8081 -otherPorts=8080,8082
go run . -port=8082 -otherPorts=8080,8081

echo "TEST" | nc 127.0.0.1 8080

Test

Run tests:

go test

Next steps

Handle command with given functionality:

  • SEND_SHARES - calculate shares and send RECEIVE_SHARE to other parties
  • RECEIVE_SHARE - store received share
  • SUM_AND_DISTRIBUTE - sum received shares, create ZKP and send both the share and the ZKP to other parties with RECEIVE_SUM_AND_PROOF
  • RECEIVE_SUM_AND_PROOF - verify proof and if it checks out, store sum. Otherwise, store an error (?)
  • GIVE_RESULT - give result if there was no error

Research & fix: the zkp can only handle small numbers, not random numbers.

Optional:

About

Shamir Secret Sharing with Zero Knowledge proofs using gnark.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages