Fix limit in poseidon

This commit is contained in:
Jordi Baylina 2021-10-06 14:52:16 +02:00
parent 54847b37fd
commit 7c16ea34c7
No known key found for this signature in database
GPG Key ID: 7480C80C1BE43112
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ const pow5 = a => F.mul(a, F.square(F.square(a, a)));
function poseidon(inputs) {
assert(inputs.length > 0);
assert(inputs.length < N_ROUNDS_P.length - 1);
assert(inputs.length <= N_ROUNDS_P.length);
const t = inputs.length + 1;
const nRoundsF = N_ROUNDS_F;

View File

@ -20,7 +20,7 @@ const pow5 = a => F.mul(a, F.square(F.square(a, a)));
function poseidon(inputs) {
assert(inputs.length > 0);
assert(inputs.length < N_ROUNDS_P.length - 1);
assert(inputs.length <= N_ROUNDS_P.length);
const t = inputs.length + 1;
const nRoundsF = N_ROUNDS_F;