mirror of
https://github.com/logos-storage/logos-storage-proofs-circuits.git
synced 2026-01-05 23:13:06 +00:00
circuit: remove unused templates
This commit is contained in:
parent
fc310a2a39
commit
3bc1000045
@ -2,20 +2,6 @@ pragma circom 2.0.0;
|
|||||||
|
|
||||||
include "poseidon2_sponge.circom";
|
include "poseidon2_sponge.circom";
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
// Hash `n` field elements into 1, with approximately 127-254 bits of preimage security
|
|
||||||
// Note that the output size must be at least twice than the desired security level (?)
|
|
||||||
// (assuming bn128 scalar field. We use capacity=2, rate=1, t=3).
|
|
||||||
|
|
||||||
template Poseidon2_hash_rate1(n) {
|
|
||||||
signal input inp[n];
|
|
||||||
signal output out;
|
|
||||||
|
|
||||||
component sponge = PoseidonSponge(3,2,n,1);
|
|
||||||
sponge.inp <== inp;
|
|
||||||
sponge.out[0] ==> out;
|
|
||||||
}
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Hash `n` field elements into 1, with approximately 127 bits of preimage security
|
// Hash `n` field elements into 1, with approximately 127 bits of preimage security
|
||||||
// (assuming bn128 scalar field. We use capacity=1, rate=2, t=3).
|
// (assuming bn128 scalar field. We use capacity=1, rate=2, t=3).
|
||||||
|
|||||||
@ -201,20 +201,6 @@ template Permutation() {
|
|||||||
// the "compression function" takes 2 field elements as input and produces
|
// the "compression function" takes 2 field elements as input and produces
|
||||||
// 1 field element as output. It is a trivial application of the permutation.
|
// 1 field element as output. It is a trivial application of the permutation.
|
||||||
|
|
||||||
template Compression() {
|
|
||||||
signal input inp[2];
|
|
||||||
signal output out;
|
|
||||||
|
|
||||||
component perm = Permutation();
|
|
||||||
perm.inp[0] <== inp[0];
|
|
||||||
perm.inp[1] <== inp[1];
|
|
||||||
perm.inp[2] <== 0;
|
|
||||||
|
|
||||||
perm.out[0] ==> out;
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------
|
|
||||||
|
|
||||||
template KeyedCompression() {
|
template KeyedCompression() {
|
||||||
signal input key;
|
signal input key;
|
||||||
signal input inp[2];
|
signal input inp[2];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user