Go to file
Sean Bowe 1e30a9e17c Fixing bugs, renaming stuff. 2015-12-19 20:24:40 -07:00
src Fixing bugs, renaming stuff. 2015-12-19 20:24:40 -07:00
.gitignore Added initial rust stuff 2015-12-11 21:35:23 -07:00
Cargo.lock Added the rest of the decryption stuff 2015-12-12 23:56:39 -07:00
Cargo.toml Added the rest of the decryption stuff 2015-12-12 23:56:39 -07:00
LICENSE Initial commit 2015-12-04 19:40:05 -07:00
Makefile Fixing bugs, renaming stuff. 2015-12-19 20:24:40 -07:00
README.md updated readme 2015-12-13 00:17:44 -07:00
get-libsnark Initial commit 2015-12-04 19:40:05 -07:00

README.md

todo

  • automated sudoku solver
  • cache pk/vk
  • clean up code
  • bitcoin transaction stuff

circuit description for some NxN puzzle:

primary inputs: sodoku puzzle P, key commitment C, encrypted solution E

auxillary inputs: solution S, key K

properties:

  • puzzle subset: S must be a subset of P (the solution must complete the puzzle)
  • solution closure: S must be closed under rows, columns and groups of the solution (the solution must be correct)
  • encryption correctness: E must be S encrypted with K (using a stream cipher produced from SHA256)
  • solution commitment: C must be SHA256(K)

usage:

Alice produces puzzle P and sends Bob P and the zk-SNARK proving key. Bob finds a solution S for the puzzle and constructs K, C, and E. Bob constructs a Proof. Bob sends Alice (Proof, C, E). Alice verifies the proof. Alice sends a CLTV transaction over the blockchain to Bob with the added constraint that Bob must produce the preimage of C (aka K). After Bob redeems the TxOut, Alice uses K to decrypt E, producing S. If Bob does not redeem the TxOut, Alice recovers her value but does not obtain S.

todo:

  • write better tests
  • write interface for interacting with the snark