Skip to content

Commit

Permalink
final nivc component
Browse files Browse the repository at this point in the history
final nivc component
  • Loading branch information
0xJepsen committed Oct 31, 2024
1 parent fe20cb0 commit 225bc4b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 98 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pragma circom 2.1.9;

include "gctr-nivc.circom";
include "../../utils/array.circom";
include "aes-gcm/nivc/gctr-nivc.circom";
include "utils/array.circom";


// Compute AES-GCTR
Expand Down Expand Up @@ -67,4 +67,6 @@ template AESGCTRFOLD(INPUT_LEN) {
writeCounter.array_to_write_at_index <== aes.counter;
writeCounter.index <== INPUT_LEN*2;
writeCounter.out ==> step_out;
}
}

component main { public [step_in] } = AESGCMFOLD(4160);
91 changes: 0 additions & 91 deletions circuits/aes_gcm.circom

This file was deleted.

8 changes: 4 additions & 4 deletions circuits/test/aes-gcm/nivc/aes-gctr-nivc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe("aes-gctr-nivc", () => {

it("all correct for self generated single zero pt block case", async () => {
circuit_one_block = await circomkit.WitnessTester("aes-gcm-fold", {
file: "aes-gcm/nivc/aes-gctr-nivc",
file: "aes-gctr-nivc",
template: "AESGCTRFOLD",
params: [16], // input len is 16 bytes
});
Expand All @@ -28,7 +28,7 @@ describe("aes-gctr-nivc", () => {

it("all correct for self generated single non zero pt block", async () => {
circuit_one_block = await circomkit.WitnessTester("aes-gcm-fold", {
file: "aes-gcm/nivc/aes-gctr-nivc",
file: "aes-gctr-nivc",
template: "AESGCTRFOLD",
params: [16], // input len is 16 bytes
});
Expand All @@ -52,7 +52,7 @@ describe("aes-gctr-nivc", () => {

it("all correct for self generated two block case first fold", async () => {
circuit_one_block = await circomkit.WitnessTester("aes-gcm-fold", {
file: "aes-gcm/nivc/aes-gctr-nivc",
file: "aes-gctr-nivc",
template: "AESGCTRFOLD",
params: [32], // input len is 32 bytes
});
Expand All @@ -76,7 +76,7 @@ describe("aes-gctr-nivc", () => {

it("all correct for self generated two block case second fold", async () => {
circuit_one_block = await circomkit.WitnessTester("aes-gcm-fold", {
file: "aes-gcm/nivc/aes-gctr-nivc",
file: "aes-gctr-nivc",
template: "AESGCTRFOLD",
params: [32], // input len is 32 bytes
});
Expand Down

0 comments on commit 225bc4b

Please sign in to comment.