Skip to content

Commit

Permalink
Update circuits/aes-gcm/nivc/aes-gctr-nivc.circom
Browse files Browse the repository at this point in the history
suggestion from Sambhav

Co-authored-by: Sambhav Dusad <[email protected]>
  • Loading branch information
Autoparallel and lonerapier authored Nov 13, 2024
1 parent 7393f06 commit a9d980f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion circuits/aes-gcm/nivc/aes-gctr-nivc.circom
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ template AESGCTRFOLD(NUM_CHUNKS) {
packedPlaintext[i] += plainText[i][j] * 2**(8*j);
}
}
var hash = 0;
signal hash[NUM_CHUNKS];
for(var i = 0 ; i < NUM_CHUNKS ; i++) {
if(i == 0) {
hash[i] <== PoseidonChainer()([step_in[0],packedPlaintext[i]]);
} else {
hash[i] <== PoseidonChainer()([hash[i-1], packedPlaintext[i]]);
}
for(var i = 0 ; i < NUM_CHUNKS ; i++) {
if(i == 0) {
hash = PoseidonChainer()([step_in[0],packedPlaintext[i]]);
Expand Down

0 comments on commit a9d980f

Please sign in to comment.