diff --git a/README.md b/README.md index 545a2ba..ddf9a37 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ of generating the round constants. Parameters provided by the library are: * x^5 S-boxes -* t = 2 - 17 (for 1 to 16 inputs) -* 8 full rounds and partial rounds depending on t [56, 57, 56, 60, 60, 63, 64, 63, 60, 66, 60, 65, 70, 60, 64, 68] +* t = 2 - 17 (for 1 to 15 inputs) +* 8 full rounds and partial rounds depending on t [56, 57, 56, 60, 60, 63, 64, 63, 60, 66, 60, 65, 70, 60, 64] The parameters can be generated with: ```$ cargo xtask generate-poseidon-parameters`` @@ -89,7 +89,7 @@ but it was also inspired by the following ones: ### Performance This repository contains a benchmark measuring the performance of this -Poseidon implementation for given 1 - 16 random 32 bytes inputs. +Poseidon implementation for given 1 - 15 random 32 bytes inputs. To run them, simply use: diff --git a/light-poseidon/src/lib.rs b/light-poseidon/src/lib.rs index 2b73040..e9f2bf2 100644 --- a/light-poseidon/src/lib.rs +++ b/light-poseidon/src/lib.rs @@ -10,8 +10,8 @@ //! Parameters provided by the library are: //! //! * x^5 S-boxes -//! * t = 2 - 17 (for 1 to 16 inputs) -//! * 8 full rounds and partial rounds depending on t [56, 57, 56, 60, 60, 63, 64, 63, 60, 66, 60, 65, 70, 60, 64, 68] +//! * t = 2 - 17 (for 1 to 15 inputs) +//! * 8 full rounds and partial rounds depending on t [56, 57, 56, 60, 60, 63, 64, 63, 60, 66, 60, 65, 70, 60, 64] //! The parameters can be generated with: //! ```$ cargo xtask generate-poseidon-parameters`` //! # Output type diff --git a/light-poseidon/tests/bn254_fq_x5.rs b/light-poseidon/tests/bn254_fq_x5.rs index db47153..e091b44 100644 --- a/light-poseidon/tests/bn254_fq_x5.rs +++ b/light-poseidon/tests/bn254_fq_x5.rs @@ -90,7 +90,7 @@ fn test_poseidon_bn254_x5_fq_hash_bytes() { } // test cases were created with circomlibjs poseidon([1, ...]) for 1 to 16 inputs -const TEST_CASES: [[u8; 32]; 16] = [ +const TEST_CASES: [[u8; 32]; 15] = [ [ 41, 23, 97, 0, 234, 169, 98, 189, 193, 254, 108, 101, 77, 106, 60, 19, 14, 150, 164, 209, 22, 139, 51, 132, 139, 137, 125, 197, 2, 130, 1, 51, @@ -151,10 +151,6 @@ const TEST_CASES: [[u8; 32]; 16] = [ 27, 225, 209, 175, 237, 11, 90, 129, 139, 218, 5, 21, 20, 49, 65, 35, 218, 22, 99, 154, 152, 243, 138, 136, 36, 39, 1, 149, 158, 199, 205, 61, ], - [ - 35, 235, 143, 111, 217, 66, 220, 208, 175, 10, 19, 232, 111, 181, 60, 252, 121, 177, 148, - 13, 210, 181, 154, 155, 141, 8, 85, 118, 43, 126, 211, 142, - ], ]; #[test]