Skip to content

Commit a88ce9c

Browse files
authored
Merge dd461ea into 45f4ae0
2 parents 45f4ae0 + dd461ea commit a88ce9c

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed

noir_stdlib/src/hash/poseidon/bn254/consts.nr

-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
// Consistent with https://github.com/iden3/circomlib/blob/master/circuits/poseidon.circom and https://github.com/iden3/circomlib/blob/master/circuits/poseidon_constants.circom
66
use crate::hash::poseidon::PoseidonConfig;
77
use crate::hash::poseidon::config;
8-
// Number of full rounds
9-
// Number of partial rounds
10-
fn rp() -> [u8; 16] {
11-
[56, 57, 56, 60, 60, 63, 64, 63, 60, 66, 60, 65, 70, 60, 64, 68]
12-
}
138
// S-box power
149
fn alpha() -> Field {
1510
5

noir_stdlib/src/hash/poseidon/mod.nr

-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
mod bn254; // Instantiations of Poseidon for prime field of the same order as BN254
2-
use crate::field::modulus_num_bits;
32
use crate::hash::Hasher;
43
use crate::default::Default;
54

@@ -166,13 +165,6 @@ fn sigma<let O: u32>(x: [Field; O]) -> [Field; O] {
166165
y
167166
}
168167

169-
// Check security of sponge instantiation
170-
fn check_security(rate: Field, width: Field, security: Field) -> bool {
171-
let n = modulus_num_bits();
172-
173-
((n - 1) as Field * (width - rate) / 2) as u8 > security as u8
174-
}
175-
176168
struct PoseidonHasher{
177169
_state: [Field],
178170
}

noir_stdlib/src/meta/mod.nr

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ mod tests {
122122
quote { 1 }
123123
}
124124

125+
#[test]
125126
fn returning_versus_macro_insertion() {
126127
comptime
127128
{

0 commit comments

Comments
 (0)