Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
bfde64f
feat: openvm accelerators crate
mansur20478 Jul 28, 2026
d0e81c7
feat: standard interface types
mansur20478 Jul 28, 2026
ac73b9a
feat(ops): keccak256
mansur20478 Jul 28, 2026
396f19f
feat(ffi): keccak256 interface
mansur20478 Jul 28, 2026
97b03ef
feat(ops): sha256
mansur20478 Jul 28, 2026
d74cad2
feat(ffi): sha256 interface
mansur20478 Jul 28, 2026
3955f08
feat(ops): ripemd160
mansur20478 Jul 28, 2026
d743956
feat(ffi): ripemd160 interface
mansur20478 Jul 28, 2026
ecdf489
ci: accelerators tests and guest build
mansur20478 Jul 28, 2026
4f3e13a
feat(ops): blake2
mansur20478 Jul 28, 2026
7ab5001
feat(ffi): blake2 interface
mansur20478 Jul 28, 2026
b17d7a8
feat(ops): secp256k1 ecrecover and verify
mansur20478 Jul 29, 2026
b573278
feat(ffi): secp256k1 ecrecover and verify interfaces
mansur20478 Jul 29, 2026
2b12859
feat(ops): secp256r1 verify
mansur20478 Jul 29, 2026
1d16948
feat(tests): tests for secp256r1 verify
mansur20478 Jul 29, 2026
5f4874b
feat(ffi): secp256r1 verify interface
mansur20478 Jul 29, 2026
c2d5b78
feat(ops): host fallback for secp256k1
mansur20478 Jul 29, 2026
41994b3
feat(tests): tests for secp256k1
mansur20478 Jul 29, 2026
aaa2d9d
feat(ops): split ecdsa by curve
mansur20478 Jul 30, 2026
b810d8b
feat(ops): modexp
mansur20478 Jul 29, 2026
c1f2cd3
feat(ffi): modexp interface
mansur20478 Jul 29, 2026
cb06229
refactor(ops): imports out of functions
mansur20478 Jul 30, 2026
ecb73c7
feat(ops): kzg point evaluation
mansur20478 Jul 29, 2026
df5f4c4
feat(ffi): kzg interface
mansur20478 Jul 29, 2026
c3d60dc
feat(ops): BN254 add and mul
mansur20478 Jul 29, 2026
c57a69b
feat(ops): BN254 pairing check
mansur20478 Jul 29, 2026
fbd44f6
feat(ffi): BN254 add/mul/pairing check interfaces
mansur20478 Jul 29, 2026
05ab825
feat(tests): BN254 tests
mansur20478 Jul 29, 2026
d32ac4d
feat(ops): BLS12-381 add/msm
mansur20478 Jul 29, 2026
c02e2f6
feat(ops): BLS12-381 pairing check
mansur20478 Jul 29, 2026
5b1bf52
feat(ffi): BLS12-381 add/msm/pairing check interfaces
mansur20478 Jul 29, 2026
b3251ee
feat(tests): BLS12-381 tests
mansur20478 Jul 29, 2026
27d3226
fix: expose functions
mansur20478 Jul 29, 2026
37cc4da
refactor: move bls fp length constant into codec
mansur20478 Jul 29, 2026
1e3c851
feat(ops): map-to-curve implementation
mansur20478 Jul 29, 2026
35a9d81
feat(ffi): map-to-curve C Interface
mansur20478 Jul 29, 2026
f4ca98a
feat(tests): map-to-curve tests
mansur20478 Jul 29, 2026
d4d9fa8
refactor: dogfood zkVM accelerator interface
shuklaayush Aug 11, 2026
7b0e120
fix: keep accelerator interface client independent
shuklaayush Aug 11, 2026
e1bd232
refactor: simplify accelerator API
shuklaayush Aug 11, 2026
c8b26b6
perf: inline BLS accelerator boundaries
shuklaayush Aug 11, 2026
b3650e5
refactor: expose zkVM accelerator C interface
shuklaayush Aug 12, 2026
1b10998
refactor: remove old upper case naming
mansur20478 Aug 12, 2026
4a3a1c0
ci: run OpenVM REVM Crypto Tests on accelerator crate changes
mansur20478 Aug 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/tests-accelerators.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: OpenVM Accelerators Tests

on:
pull_request:
paths:
- "crates/accelerators/**"
- "Cargo.toml"
- "Cargo.lock"
- ".github/workflows/tests-accelerators.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
CARGO_NET_GIT_FETCH_WITH_CLI: "true"

jobs:
test:
runs-on:
- runs-on=${{ github.run_id }}
- runner=64cpu-linux-arm64
- extras=s3-cache

steps:
- uses: runs-on/action@v2
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- uses: taiki-e/install-action@nextest

- name: Run tests
run: cargo nextest run -p openvm-accelerators

guest-build:
runs-on:
- runs-on=${{ github.run_id }}
- runner=64cpu-linux-arm64
- extras=s3-cache

steps:
- uses: runs-on/action@v2
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.91.1"
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Cache openvm toolchain
uses: actions/cache@v4
with:
path: ~/.openvm/toolchains
key: openvm-toolchain-openvm-1.94.0-${{ runner.os }}-${{ runner.arch }}

- name: Install OpenVM CLI
run: |
cargo install --git https://github.com/openvm-org/openvm.git --branch develop-v2.1.0 --locked --force cargo-openvm
cargo openvm toolchain install

- name: Build for the guest target
run: |
cd crates/accelerators
cargo openvm build --no-transpile
1 change: 1 addition & 0 deletions .github/workflows/tests-revm-crypto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
paths:
- "crates/revm-crypto/**"
- "crates/accelerators/**"
- "crates/kzg/**"
- "crates/curve-utils/**"
- "Cargo.toml"
Expand Down
32 changes: 23 additions & 9 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ members = [
"crates/curve-utils",
"crates/kzg",
"crates/kzg/tests/programs/verify_kzg",
"crates/accelerators",
]
exclude = []
resolver = "3"
Expand Down Expand Up @@ -58,6 +59,7 @@ zstd = { version = "0.13", default-features = false }

# workspace
openvm-curve-utils = { path = "./crates/curve-utils", default-features = false }
openvm-accelerators = { path = "./crates/accelerators", default-features = false }
openvm-kzg = { path = "./crates/kzg", default-features = false }
openvm-mpt = { path = "./crates/mpt" }
openvm-revm-crypto = { path = "./crates/revm-crypto" }
Expand Down Expand Up @@ -111,6 +113,7 @@ openvm-circuit = { git = "https://github.com/openvm-org/openvm.git", branch = "d
openvm-verify-stark-host = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false }
openvm-ecc-guest = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false }
openvm-keccak256 = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false }
openvm-pairing-guest = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false }
openvm-pairing = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false, features = [
"bn254",
"bls12_381",
Expand Down
33 changes: 24 additions & 9 deletions bin/stateless-guest/Cargo.lock

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

56 changes: 56 additions & 0 deletions crates/accelerators/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[package]
name = "openvm-accelerators"
description = "OpenVM cryptographic accelerator interface"
version.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true

[lints]
workspace = true

[dependencies]
# openvm
openvm-curve-utils = { workspace = true, features = ["bn254", "bls12_381"] }
openvm-ecc-guest.workspace = true
openvm-kzg = { workspace = true, features = ["use-intrinsics"] }
openvm-p256.workspace = true
openvm-pairing = { workspace = true, features = ["bn254", "bls12_381"] }
openvm-keccak256.workspace = true
openvm-sha2.workspace = true

# crypto
ark-bls12-381 = { version = "0.5", default-features = false, features = ["curve"] }
ark-ec = { version = "0.5", default-features = false }
ark-serialize = { version = "0.5", default-features = false }
aurora-engine-modexp = { version = "1.2.0", default-features = false }
ripemd = { version = "0.1.3", default-features = false }

# The OpenVM-accelerated k256 fork; its ECDSA recovery relies on zkVM hints
# and is unimplemented outside the guest.
[target.'cfg(any(target_os = "none", target_os = "openvm"))'.dependencies]
openvm-k256.workspace = true

# Host implementations when not building for the zkVM guest.
[target.'cfg(not(any(target_os = "none", target_os = "openvm")))'.dependencies]
k256 = { version = "0.13", default-features = false, features = ["ecdsa"] }
openvm-keccak256 = { workspace = true, features = ["tiny_keccak"] }
# Not imported directly: enables the host pairing backend used by the KZG
# verification. openvm-pairing's `halo2curves` feature does not forward to
# openvm-pairing-guest, so the inner feature is enabled explicitly.
openvm-pairing = { workspace = true, features = ["halo2curves"] }
openvm-pairing-guest = { workspace = true, features = ["halo2curves"] }
openvm-sha2 = { workspace = true, features = ["import_sha2"] }

[dev-dependencies]
hex-literal.workspace = true

[package.metadata.cargo-shear]
ignored = ["openvm-pairing-guest"]

[package.metadata.cargo-machete]
ignored = ["openvm-pairing-guest"]

[features]
default = []
std = []
Loading
Loading