2 releases
0.1.1 | Sep 10, 2024 |
---|---|
0.1.0 | Sep 10, 2024 |
#884 in Cryptography
555KB
150 lines
poseidon-bn128
Poseidon over alt_bn128 compatible with circomlib. Uses scalarff for representing field elements.
Example
cargo add poseidon-bn128
use poseidon_bn128::poseidon;
use scalarff::Bn128FieldElement;
use anyhow::Result;
fn main() -> Result<()> {
let inputs = vec![
Bn128FieldElement::from(99),
Bn128FieldElement::from(100)
];
let result = poseidon(2, &inputs)?;
println!("{:?}", result);
Ok(())
}
Dependencies
~6–13MB
~172K SLoC