-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Xor0v0
authored and
Xor0v0
committed
Oct 15, 2024
1 parent
d6405d9
commit f80c594
Showing
127 changed files
with
40,456 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
site | ||
site | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/target | ||
Cargo.lock | ||
param | ||
proof | ||
vk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[package] | ||
name = "cft" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
backtrace = { version = "0.3", optional = true } | ||
ff = "0.13" | ||
halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", default-features = true } | ||
clap = "3.0" | ||
halo2curves = { version = "0.6.0", default-features = false } | ||
rand = "0.8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# ZK CFT - Halo2 - Int Division | ||
|
||
## Overview | ||
1. This is a quiz about Halo2 usage. The standard answer would not be given to participants | ||
2. Instead, a file would be given, with all necessary structs and missing logics. Participants are required to fill in the blanks, compile the program and run tests | ||
3. Multiple test cases would be given, the prover program shall be tested against them | ||
|
||
## Problem description | ||
While doing proof we always face some basic arithematics, such as int division. It is a very intuitive operation on normal programming language, but one might find it a bit harder when doing it in crypto world -- for we always use [Finte Field](https://en.wikipedia.org/wiki/Finite_field). For each non-zero element, it has inverse, so that a normal int division is not obeying ordinary division just like Python. For example, in Fp where p = 11, 10 div 3 = 7 mod 11 -- for inverse of 3 is 4, 11 div 3 = 10 times 4 = 7 mod 11. While we expect an 'ordinary' int division: 10 // 3 = 3. Now you are required to simulate an int division in Halo2. We limit the size as U8. So you are actually implementing an U8 division in a finite file Fr, which is the scalar field of ecliptic curve group BN256. | ||
|
||
## Comand | ||
cargo run | ||
|
||
## Example | ||
Input 10 3 3 | ||
Explain: Proof generates and verifier passes it. It is an U8 division | ||
|
||
## Solve | ||
Sumbit quiz.rs to solve the puzzle. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod quiz; |
Oops, something went wrong.