-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from pluto/feat/circuits-build
feat: AES NIVC + build
- Loading branch information
Showing
44 changed files
with
718 additions
and
707 deletions.
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
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 |
---|---|---|
|
@@ -11,7 +11,7 @@ on: | |
branches: [ main ] | ||
|
||
jobs: | ||
circom: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
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 |
---|---|---|
|
@@ -17,3 +17,5 @@ ir_log/* | |
log_input_signals.txt | ||
*.bin | ||
*.r1cs | ||
builds/**/*.bin | ||
builds/**/*.r1cs |
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,35 @@ | ||
# Find all target directories | ||
TARGET_DIRS := $(wildcard builds/target_*b) | ||
|
||
# Find all .circom files in those directories | ||
CIRCOM_FILES := $(wildcard $(addsuffix /*_*b.circom,$(TARGET_DIRS))) | ||
|
||
# Create artifacts directories | ||
$(shell mkdir -p $(addsuffix /artifacts,$(TARGET_DIRS))) | ||
|
||
# Default target | ||
.PHONY: all clean | ||
all: build | ||
|
||
# Build target | ||
.PHONY: build | ||
build: | ||
@for circuit in $(CIRCOM_FILES); do \ | ||
echo "Processing $${circuit}..."; \ | ||
circom "$${circuit}" --r1cs -o "$$(dirname $${circuit})/artifacts" -l node_modules; \ | ||
build-circuit "$${circuit}" "$$(dirname $${circuit})/artifacts/$$(basename $${circuit} .circom).bin" -l node_modules; \ | ||
done | ||
|
||
# Clean target | ||
clean: | ||
rm -rf $(addsuffix /artifacts,$(TARGET_DIRS)) | ||
|
||
# Debug target to show what files were found | ||
.PHONY: debug | ||
debug: | ||
@echo "Found directories:" | ||
@echo $(TARGET_DIRS) | ||
@echo "\nFound circom files:" | ||
@echo $(CIRCOM_FILES) | ||
@echo "\nArtifacts will be generated in:" | ||
@echo $(addsuffix /artifacts,$(TARGET_DIRS)) |
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,6 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/aes-gcm/nivc/aes-gctr-nivc.circom"; | ||
|
||
// the circomkit tests become unhappy when there is a main. | ||
component main { public [step_in] } = AESGCTRFOLD(1024, 10); |
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,6 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/http/nivc/body_mask.circom"; | ||
|
||
component main { public [step_in] } = HTTPMaskBodyNIVC(1024, 10); | ||
|
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 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/http/nivc/lock_header.circom"; | ||
|
||
component main { public [step_in] } = LockHeader(1024, 10, 50, 100); |
5 changes: 5 additions & 0 deletions
5
builds/target_1024b/http_parse_and_lock_start_line_1024b.circom
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 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/http/nivc/parse_and_lock_start_line.circom"; | ||
|
||
component main { public [step_in] } = ParseAndLockStartLine(1024, 10, 20, 20, 20); |
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 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/json/nivc/extractor.circom"; | ||
|
||
component main { public [step_in] } = MaskExtractFinal(1024, 10, 50); |
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 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/json/nivc/masker.circom"; | ||
|
||
component main { public [step_in] } = JsonMaskArrayIndexNIVC(1024, 10); |
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 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/json/nivc/masker.circom"; | ||
|
||
component main { public [step_in] } = JsonMaskObjectNIVC(1024, 10, 10); |
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,6 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/json/nivc/parse.circom"; | ||
|
||
component main { public [step_in] } = JsonParseNIVC(1024, 10); | ||
|
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,6 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/aes-gcm/nivc/aes-gctr-nivc.circom"; | ||
|
||
// the circomkit tests become unhappy when there is a main. | ||
component main { public [step_in] } = AESGCTRFOLD(256, 10); |
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,6 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/http/nivc/body_mask.circom"; | ||
|
||
component main { public [step_in] } = HTTPMaskBodyNIVC(256, 10); | ||
|
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 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/http/nivc/lock_header.circom"; | ||
|
||
component main { public [step_in] } = LockHeader(256, 10, 50, 100); |
5 changes: 5 additions & 0 deletions
5
builds/target_256b/http_parse_and_lock_start_line_256b.circom
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 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/http/nivc/parse_and_lock_start_line.circom"; | ||
|
||
component main { public [step_in] } = ParseAndLockStartLine(256, 10, 20, 20, 20); |
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 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/json/nivc/extractor.circom"; | ||
|
||
component main { public [step_in] } = MaskExtractFinal(256, 10, 50); |
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 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/json/nivc/masker.circom"; | ||
|
||
component main { public [step_in] } = JsonMaskArrayIndexNIVC(256, 10); |
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 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/json/nivc/masker.circom"; | ||
|
||
component main { public [step_in] } = JsonMaskObjectNIVC(256, 10, 10); |
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,6 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/json/nivc/parse.circom"; | ||
|
||
component main { public [step_in] } = JsonParseNIVC(256, 10); | ||
|
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,6 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/aes-gcm/nivc/aes-gctr-nivc.circom"; | ||
|
||
// the circomkit tests become unhappy when there is a main. | ||
component main { public [step_in] } = AESGCTRFOLD(512, 10); |
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,6 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/http/nivc/body_mask.circom"; | ||
|
||
component main { public [step_in] } = HTTPMaskBodyNIVC(512, 10); | ||
|
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 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/http/nivc/lock_header.circom"; | ||
|
||
component main { public [step_in] } = LockHeader(512, 10, 50, 100); |
5 changes: 5 additions & 0 deletions
5
builds/target_512b/http_parse_and_lock_start_line_512b.circom
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 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/http/nivc/parse_and_lock_start_line.circom"; | ||
|
||
component main { public [step_in] } = ParseAndLockStartLine(512, 10, 20, 20, 20); |
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 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/json/nivc/extractor.circom"; | ||
|
||
component main { public [step_in] } = MaskExtractFinal(512, 10, 50); |
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 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/json/nivc/masker.circom"; | ||
|
||
component main { public [step_in] } = JsonMaskArrayIndexNIVC(512, 10); |
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 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/json/nivc/masker.circom"; | ||
|
||
component main { public [step_in] } = JsonMaskObjectNIVC(512, 10, 10); |
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,6 @@ | ||
pragma circom 2.1.9; | ||
|
||
include "../../circuits/json/nivc/parse.circom"; | ||
|
||
component main { public [step_in] } = JsonParseNIVC(512, 10); | ||
|
Oops, something went wrong.