Skip to content

Commit

Permalink
chore: crypto blackbox tests (#5614)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves #5427

## Summary\*

Unit test our blackbox crypto instructions.

Preferable to merge after:
- #5559
- #5484

(Because of overlapping helper functions)

## Additional Context

While most of our crypto function implementations are from external
crates, `poseidon2_permutation` is implemented internally. I'm using the
[`zkhash` crate](https://docs.rs/zkhash/0.2.0/zkhash/poseidon2/) to test
our implementation.

## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
michaeljklein authored Aug 26, 2024
1 parent 90f9ea0 commit 86c151a
Show file tree
Hide file tree
Showing 7 changed files with 725 additions and 34 deletions.
220 changes: 217 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions acvm-repo/acvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,7 @@ bls12_381 = [

[dev-dependencies]
ark-bls12-381 = { version = "^0.4.0", default-features = false, features = ["curve"] }
ark-bn254.workspace = true
bn254_blackbox_solver.workspace = true
proptest.workspace = true
zkhash = { version = "^0.2.0", default-features = false }
Loading

0 comments on commit 86c151a

Please sign in to comment.