Crates.io | poseidon-bn128 |
lib.rs | poseidon-bn128 |
version | 0.1.1 |
source | src |
created_at | 2024-09-10 00:12:25.148484 |
updated_at | 2024-09-10 21:03:29.488263 |
description | Poseidon over alt_bn128 compatible with circomlib |
homepage | https://github.com/chancehudson/poseidon-bn128 |
repository | https://github.com/chancehudson/poseidon-bn128.git |
max_upload_size | |
id | 1369903 |
size | 1,008,298 |
Poseidon over alt_bn128 compatible with circomlib. Uses scalarff for representing field elements.
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(())
}