Skip to content

Commit

Permalink
compose web_proof.circom
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJepsen committed Nov 1, 2024
1 parent cf2b7f2 commit 69c6129
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 45 deletions.
6 changes: 0 additions & 6 deletions circuits/aes-gctr-nivc.circom

This file was deleted.

5 changes: 0 additions & 5 deletions circuits/extract_value.circom

This file was deleted.

6 changes: 0 additions & 6 deletions circuits/http_body_mask.circom

This file was deleted.

7 changes: 0 additions & 7 deletions circuits/http_lock_header.circom

This file was deleted.

5 changes: 0 additions & 5 deletions circuits/http_parse_and_lock_start_line.circom

This file was deleted.

5 changes: 0 additions & 5 deletions circuits/json_mask_array_index.circom

This file was deleted.

5 changes: 0 additions & 5 deletions circuits/json_mask_object.circom

This file was deleted.

6 changes: 0 additions & 6 deletions circuits/json_parse.circom

This file was deleted.

30 changes: 30 additions & 0 deletions circuits/web_proof.circom
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pragma circom 2.1.9;

include "aes-gcm/nivc/aes-gctr-nivc.circom";
include "http/nivc/parse_and_lock_start_line.circom";
include "http/nivc/lock_header.circom";
include "http/nivc/body_mask.circom";
include "json/nivc/parse.circom";
include "json/nivc/masker.circom";
include "json/nivc/masker.circom";
include "json/nivc/extractor.circom";

// AES -> HTTP Parse -> http lock header -> http body mask -> json parse -> json_mask_object/json_mask_array -> extract value
template WEPPROOF {

component aes_gctr_nivc = AESGCTRFOLD(48);
component http_parse = ParseAndLockStartLine(48, 16, 8, 3, 2);
component http_lock_header = LockHeader(48, 16, 12, 16);
component http_body_mask = HTTPMaskBodyNIVC(48, 16);
component json_parse = JsonParseNIVC(48, 16);
// need logic to specif which json type
// object or array
component json_mask_object = JsonMaskObjectNIVC(48, 16, 4);
component json_mask_array = JsonMaskArrayIndexNIVC(48, 16);
// extract value
component extract_value = JsonParseNIVC(48, 16);
}

// = AESGCTRFOLD(48);
component main = WEPPROOF();

0 comments on commit 69c6129

Please sign in to comment.