Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
silence logs in tests
Browse files Browse the repository at this point in the history
thor314 committed Sep 20, 2024

Verified

This commit was signed with the committer’s verified signature.
thor314 Thor 🪁
1 parent 53535d3 commit de26e4c
Showing 5 changed files with 258 additions and 270 deletions.
18 changes: 9 additions & 9 deletions circuits/aes-gcm/gctr.circom
Original file line number Diff line number Diff line change
@@ -47,14 +47,14 @@ template GCTR(INPUT_LEN, nk) {
// total number of bits in the plaintext blocks
var bytesExcludingLastBlock = 16 * (nBlocks);

log("INPUT_LEN");
log(INPUT_LEN);
log("nBlocks");
log(nBlocks);
log("lastBlockSize");
log(lastBlockSize);
log("bytesExcludingLastBlock");
log(bytesExcludingLastBlock);
// log("INPUT_LEN");
// log(INPUT_LEN);
// log("nBlocks");
// log(nBlocks);
// log("lastBlockSize");
// log(lastBlockSize);
// log("bytesExcludingLastBlock");
// log(bytesExcludingLastBlock);

assert(INPUT_LEN == nBlocks * 16 + lastBlockSize);

@@ -137,4 +137,4 @@ template GCTR(INPUT_LEN, nk) {
for (var i = 0; i < lastBlockSize; i++) {
cipherText[bytesExcludingLastBlock + i] <== addLastCipher.out[i];
}
}
}
14 changes: 7 additions & 7 deletions circuits/aes-gcm/nistgmul.circom
Original file line number Diff line number Diff line change
@@ -84,8 +84,8 @@ template debug_1_byte() {
bytesToBits.in <== X;
bitsX <== bytesToBits.out;
for (var i = 0; i < 8; i++) {
log("i", i);
log("bitsX[i]", bitsX[i]);
// log("i", i);
// log("bitsX[i]", bitsX[i]);
z_i_update[i] = Z_I_UPDATE(1);
z_i_update[i].Z <== Z[i];
z_i_update[i].V <== V[i];
@@ -97,7 +97,7 @@ template debug_1_byte() {
mulx[i].in <== V[i];
V[i + 1] <== mulx[i].out;

log("V[i]", V[i][0]);
// log("V[i]", V[i][0]);
}
out <== Z[8];
}
@@ -120,8 +120,8 @@ template debug_2_bytes() {
bytesToBits.in <== X;
bitsX <== bytesToBits.out;
for (var i = 0; i < 16; i++) {
log("i", i);
log("bitsX[i]", bitsX[i]);
// log("i", i);
// log("bitsX[i]", bitsX[i]);
z_i_update[i] = Z_I_UPDATE(2);
z_i_update[i].Z <== Z[i];
z_i_update[i].V <== V[i];
@@ -133,8 +133,8 @@ template debug_2_bytes() {
mulx[i].in <== V[i];
V[i + 1] <== mulx[i].out;

log("V[i][0]", V[i][0]);
log("V[i][1]", V[i][1]);
// log("V[i][0]", V[i][0]);
// log("V[i][1]", V[i][1]);
}

out <== Z[16];
480 changes: 240 additions & 240 deletions circuits/test/gfmulint/nistgfmul.test.ts

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions circuits/test/hashes/polyval.test.ts
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ describe("POLYVAL_HASH_1", () => {
const result = bitArrayToHex(
(_res.out as number[][])[0].map((bit) => Number(bit))
)
console.log("expect: ", EXPECT, "\nresult: ", result);
// console.log("expect: ", EXPECT, "\nresult: ", result);
assert.equal(result, EXPECT);
});
});
@@ -54,7 +54,7 @@ describe("POLYVAL_HASH_2", () => {
const result = bitArrayToHex(
(_res.out as number[][])[0].map((bit) => Number(bit))
);
console.log("expect: ", EXPECT_2, "\nresult: ", result);
// console.log("expect: ", EXPECT_2, "\nresult: ", result);
assert.equal(result, EXPECT_2);
});
});
12 changes: 0 additions & 12 deletions nistgmul.circom

This file was deleted.

0 comments on commit de26e4c

Please sign in to comment.