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 69c6129 commit 784db46
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion circuits/web_proof.circom
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,28 @@ 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 {

// template AESGCTRFOLD(INPUT_LEN)
component aes_gctr_nivc = AESGCTRFOLD(48);

// template ParseAndLockStartLine(DATA_BYTES, MAX_STACK_HEIGHT, MAX_BEGINNING_LENGTH, MAX_MIDDLE_LENGTH, MAX_FINAL_LENGTH)
component http_parse = ParseAndLockStartLine(48, 16, 8, 3, 2);

// template LockHeader(DATA_BYTES, MAX_STACK_HEIGHT, MAX_HEADER_NAME_LENGTH, MAX_HEADER_VALUE_LENGTH)
component http_lock_header = LockHeader(48, 16, 12, 16);

// template HTTPMaskBodyNIVC(DATA_BYTES, MAX_STACK_HEIGHT)
component http_body_mask = HTTPMaskBodyNIVC(48, 16);

// JsonParseNIVC(DATA_BYTES, MAX_STACK_HEIGHT)
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);
component extract_value = MaskExtractFinal(49, 32, 32);
}

// = AESGCTRFOLD(48);
Expand Down

0 comments on commit 784db46

Please sign in to comment.