Skip to content

Commit

Permalink
Merge pull request #2 from hashcloak/proof_verify
Browse files Browse the repository at this point in the history
BBS+ Signature and Proof Verification
  • Loading branch information
man2706kum authored Nov 5, 2024
2 parents d8a77ad + e17878c commit 567d373
Show file tree
Hide file tree
Showing 9 changed files with 1,079 additions and 2 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:

env:
FOUNDRY_PROFILE: ci

jobs:
check:
strategy:
fail-fast: true

name: Foundry project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Show Forge version
run: |
forge --version
- name: Run Forge fmt
run: |
forge fmt --check
id: fmt

- name: Run Forge build
run: |
forge build --sizes
id: build

- name: Run Forge tests
run: |
forge test -vvv
id: test
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Compiler files
cache/
out/

# Ignores development broadcast logs
!/broadcast
/broadcast/*/31337/
/broadcast/**/dry-run/

# Docs
docs/

# Dotenv file
.env
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# bbs_verifier
BBS+ verifier contract
# BBS+ Signature Verifier Smart Contract
## Warning!
This is a research project, and the smart contract may contain vulnerabilities. Please do not use it in production!
## Overview
This repo contains the solidity implementation of the BBS+ Signature Verification compatible with [this](https://github.com/hashcloak/bbs_sign) BBS+ signature implementation over BN254 pairing curve. Since the This implementation harcodes 32(fixed) randomly sampled points from the G1 subgroup, therefore it supports the verification of upto 32-1 = 31 messages.

- To build: `forge build --via-ir`
- Run test: `forge test --via-ir`
6 changes: 6 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[profile.default]
src = "src"
out = "out"
libs = ["lib"]

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
1 change: 1 addition & 0 deletions lib/forge-std
Submodule forge-std added at 1714be
Loading

0 comments on commit 567d373

Please sign in to comment.