-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generalize Test #12
Open
grandchildrice
wants to merge
26
commits into
feature/base
Choose a base branch
from
generalize-test
base: feature/base
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Generalize Test #12
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
f95edda
add readme
grandchildrice 3efc700
add specs
grandchildrice efb9488
fix
grandchildrice 3dd2f13
Merge pull request #1 from MynaWallet/add-specs
grandchildrice 890aa16
add issue templates
grandchildrice 7792d6d
feat: signature verification config
hiroism007 af2ffbc
wip: main circuit and test
hiroism007 7b76046
wip: main circuit structure
hiroism007 a34cd65
wip: implement configure fn for the circuit
hiroism007 ad1e2ce
wip: start implementing synthesize logics
hiroism007 8a49c40
wip
hiroism007 ca5e9c4
wip
hiroism007 ff87565
wip
hiroism007 1a08c13
wip: test base
hiroism007 6a48a7d
wip
hiroism007 d3be72c
wip
hiroism007 8656eb7
checked verify signature
motemotech b162c01
refact: lint code with clippy
hiroism007 777de93
refact: lint code and remove println
hiroism007 ba07434
wip
hiroism007 b3b0ade
wip: it worked
hiroism007 365f96c
wip: add hash as a instance
hiroism007 c82043e
Merge branch 'feature/base' of github.com:MynaWallet/halo2-circuits i…
grandchildrice c874a3a
add invalid signature test
grandchildrice 184c1ea
add comment
grandchildrice 8f54aa9
add test for invalid instance
grandchildrice File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Bug report | ||
description: File a bug report | ||
labels: ["bug"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Please ensure that the bug has not already been filed in the issue tracker. | ||
- type: input | ||
attributes: | ||
label: What command(s) is the bug in? | ||
description: Leave empty if not relevant | ||
placeholder: "For example: make test" | ||
- type: textarea | ||
attributes: | ||
label: Describe the bug | ||
description: Please include relevant code snippets as well if relevant. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Concrete steps to reproduce the bug. If it's able reproduce via testool, please share `test_id` from jenkins report | ||
description: Leave empty if not relevant |
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,18 @@ | ||
name: Feature request | ||
description: Suggest a feature | ||
labels: ["feature"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Please ensure that the feature has not already been requested in the issue tracker. | ||
- type: textarea | ||
attributes: | ||
label: Describe the feature you would like | ||
description: Please also describe what the feature is aiming to solve, if relevant. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
description: Add any other context to the feature (like screenshots, resources) |
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,25 @@ | ||
name: Research | ||
description: Share the Research | ||
labels: ["research"] | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: What's the purpose of this research? | ||
description: explain what you want to make sure on this research (please itemize) | ||
placeholder: ex) to make sure what is the difference between A and B | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Concrete milestone by steps | ||
description: explain what we need to do to achieve this research | ||
placeholder: ex) 1. test the library | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Describe references if exists | ||
description: Please refer the related papers, articles or implementations if you know | ||
- type: markdown | ||
attributes: | ||
value: Please share the progress/result on the comment below! |
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,61 @@ | ||
# MynaWallet Halo2 Circuits | ||
|
||
This repository aims to create proofs which verifies the RSA signatures signed by Myna Card(Japan's ID Card). | ||
|
||
## Getting Started | ||
|
||
For a brief introduction to zero-knowledge proofs (ZK), see this [doc](https://docs.axiom.xyz/zero-knowledge-proofs/introduction-to-zk). | ||
|
||
Halo 2 is written in Rust, so you need to [install](https://www.rust-lang.org/tools/install) Rust to use this library: | ||
|
||
```bash | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | ||
``` | ||
|
||
Clone this repo and start off in the `halo2-circuits` directory. | ||
|
||
```bash | ||
git clone [email protected]:MynaWallet/halo2-circuits.git | ||
cd halo2-circuits | ||
``` | ||
|
||
## Run test | ||
|
||
```bash | ||
cargo test -- --nocapture | ||
``` | ||
|
||
## Benchmarks | ||
|
||
```bash | ||
cargo bench | ||
``` | ||
|
||
Result Not Yet | ||
|
||
## Milestones | ||
|
||
- ✅ RSA Verification Circuit Base | ||
- RSA Verification Circuit (SHA2 Hash as input) | ||
- Test & Benchmarks | ||
- Verifier Contracts | ||
- Example Codes which call Prover | ||
- (Phase2) RSA Verification Circuit (DER-encoded certificate as input) | ||
- (Phase3) Selective Disclosure | ||
|
||
See more details on the [issues](https://github.com/MynaWallet/halo2-circuits/issues) | ||
|
||
## Workspace | ||
|
||
Please make sure to cut your own branch from `feature/base`. | ||
|
||
## Specs | ||
|
||
- [Signature Verification](./spec/SignatureVerification.md) | ||
|
||
## References | ||
|
||
You can refer to these repos of RSA verification circuits. | ||
|
||
- [halo2-rsa](https://github.com/zkemail/halo2-rsa/tree/feat/new_bigint) | ||
- [zk-email-verify](https://github.com/zkemail/zk-email-verify) |
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,27 @@ | ||
# RSA Signature Verification Circuit | ||
|
||
The Circuit which Verifies RSA signature. | ||
|
||
## Overview | ||
|
||
This is the circuit overview. | ||
(The input will change in phase2.) | ||
|
||
```mermaid | ||
flowchart LR | ||
hashed-->verify_signature | ||
signature-->verify_signature | ||
modulus-->verify_signature | ||
subgraph circuit | ||
verify_signature | ||
end | ||
verify_signature-->ok | ||
``` | ||
|
||
## Functions | ||
|
||
- `verify_signature()`: verify RSA signature and return assigned set values if signature is valid | ||
|
||
## How verify_signature() works | ||
|
||
(add it later) |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test now fails because the circuit passes any instances