Skip to content

Commit

Permalink
bump version and fix tbox
Browse files Browse the repository at this point in the history
  • Loading branch information
yash1io committed Aug 3, 2024
1 parent 1903424 commit fceeb02
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 33 deletions.
2 changes: 1 addition & 1 deletion circomkit.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.1.8",
"version": "2.1.9",
"proofSystem": "groth16",
"curve": "bn128"
}
2 changes: 1 addition & 1 deletion circuits/cipher.circom
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma circom 2.1.8;
pragma circom 2.1.9;

include "key_expansion.circom";
include "circomlib/circuits/comparators.circom";
Expand Down
2 changes: 1 addition & 1 deletion circuits/ctr.circom
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma circom 2.1.8;
pragma circom 2.1.9;

include "cipher.circom";
include "transformations.circom";
Expand Down
2 changes: 1 addition & 1 deletion circuits/key_expansion.circom
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma circom 2.1.8;
pragma circom 2.1.9;

include "sbox128.circom";
include "utils.circom";
Expand Down
18 changes: 9 additions & 9 deletions circuits/mix_columns.circom
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma circom 2.1.8;
pragma circom 2.1.9;

include "transformations.circom";
include "circomlib/circuits/comparators.circom";
Expand Down Expand Up @@ -55,10 +55,10 @@ template S0(){
}

num2bits[0] = Num2Bits(8);
num2bits[0].in <-- TBox(2, in[0]);
num2bits[0].in <-- TBox(0, in[0]);

num2bits[1] = Num2Bits(8);
num2bits[1].in <-- TBox(3, in[1]);
num2bits[1].in <-- TBox(1, in[1]);

xor[0] = XorBits();
xor[0].a <== num2bits[0].out;
Expand Down Expand Up @@ -92,10 +92,10 @@ template S1(){
num2bits[0].in <== in[0];

num2bits[1] = Num2Bits(8);
num2bits[1].in <-- TBox(2, in[1]);
num2bits[1].in <-- TBox(0, in[1]);

num2bits[2] = Num2Bits(8);
num2bits[2].in <-- TBox(3, in[2]);
num2bits[2].in <-- TBox(1, in[2]);

num2bits[3] = Num2Bits(8);
num2bits[3].in <== in[3];
Expand Down Expand Up @@ -134,10 +134,10 @@ template S2() {
}

num2bits[2] = Num2Bits(8);
num2bits[2].in <-- TBox(2, in[2]);
num2bits[2].in <-- TBox(0, in[2]);

num2bits[3] = Num2Bits(8);
num2bits[3].in <-- TBox(3, in[3]);
num2bits[3].in <-- TBox(1, in[3]);

xor[0] = XorBits();
xor[0].a <== num2bits[0].out;
Expand Down Expand Up @@ -173,10 +173,10 @@ template S3() {
}

num2bits[0] = Num2Bits(8);
num2bits[0].in <-- TBox(3, in[0]);
num2bits[0].in <-- TBox(1, in[0]);

num2bits[3] = Num2Bits(8);
num2bits[3].in <-- TBox(2, in[3]);
num2bits[3].in <-- TBox(0, in[3]);

xor[0] = XorBits();
xor[0].a <== num2bits[0].out;
Expand Down
2 changes: 1 addition & 1 deletion circuits/sbox128.circom
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma circom 2.1.8;
pragma circom 2.1.9;

include "circomlib/circuits/comparators.circom";

Expand Down
4 changes: 2 additions & 2 deletions circuits/tbox.circom
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
pragma circom 2.1.8;
pragma circom 2.1.9;

include "transformations.circom";
include "circomlib/circuits/bitify.circom";

//tbox[0] =>> multiplication by 2
//tbox[1] =>> multiplication by 3
function TBox(index, subbyte) {
var tbox[2][16*16] = [
var tbox[2][256] = [
[
0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60,
62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114,
Expand Down
2 changes: 1 addition & 1 deletion circuits/transformations.circom
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma circom 2.1.8;
pragma circom 2.1.9;

include "circomlib/circuits/comparators.circom";
include "circomlib/circuits/bitify.circom";
Expand Down
2 changes: 1 addition & 1 deletion circuits/utils.circom
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma circom 2.1.8;
pragma circom 2.1.9;

include "sbox128.circom";
include "circomlib/circuits/comparators.circom";
Expand Down
15 changes: 0 additions & 15 deletions tests/tbox.test.ts

This file was deleted.

0 comments on commit fceeb02

Please sign in to comment.