Skip to content

Commit

Permalink
circuit: refactor SHA circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
saleel committed Mar 28, 2024
1 parent 8e2a119 commit 61ded0b
Show file tree
Hide file tree
Showing 9 changed files with 322 additions and 346 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Everything we write is MIT licensed. Note that circom and circomlib is GPL. Broa
- warning[CA02]: In template "Base64Decode(32)": Subcomponent input/output signal bits_out[10][2].out does not appear in any constraint of the father component
- warning[CA01]: In template "TwitterResetRegex(1536)": Local signal states[1536][0] does not appear in any constraint
- warning[CA02]: In template "EmailVerify(1024,1536,121,17,7)": Subcomponent input/output signal dkim_header_regex.reveal[0] does not appear in any constraint of the father component
- warning[CA02]: In template "RSAVerify65537(121,17)": Array of subcomponent input/output signals signatureRangeCheck[13].out contains a total of 121 signals that do not appear in any constraint of the father component
- warning[CA02]: In template "RSAVerifier65537(121,17)": Array of subcomponent input/output signals signatureRangeCheck[13].out contains a total of 121 signals that do not appear in any constraint of the father component
= For example: signatureRangeCheck[13].out[0], signatureRangeCheck[13].out[100].
- warning[CA02]: In template "LessThan(8)": Array of subcomponent input/output signals n2b.out contains a total of 8 signals that do not appear in any constraint of the father component
= For example: n2b.out[0], n2b.out[1].
Expand Down
104 changes: 0 additions & 104 deletions packages/circuits/helpers/sha.circom

This file was deleted.

123 changes: 0 additions & 123 deletions packages/circuits/helpers/sha256general.circom

This file was deleted.

99 changes: 0 additions & 99 deletions packages/circuits/helpers/sha256partial.circom

This file was deleted.

11 changes: 0 additions & 11 deletions packages/circuits/helpers/utils.circom
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pragma circom 2.1.5;
include "circomlib/circuits/bitify.circom";
include "circomlib/circuits/comparators.circom";
include "circomlib/circuits/mimcsponge.circom";
include "./fp.circom";

// From https://github.com/iden3/circomlib/blob/master/circuits/multiplexer.circom
function log2(a) {
Expand All @@ -19,16 +18,6 @@ function log2(a) {
return r;
}

// returns ceil(log2(a+1))
function log2_ceil(a) {
var n = a+1;
var r = 0;
while (n>0) {
r++;
n \= 2;
}
return r;
}

// returns ceil(log2(a+1))
function count_packed(n, chunks) {
Expand Down
Loading

0 comments on commit 61ded0b

Please sign in to comment.