Skip to main content

No project description provided

Project description


:thought_balloon:

EZKL


Easy Zero-Knowledge Inference

Test

ezkl is a library and command-line tool for doing inference for deep learning models and other computational graphs in a zk-snark (ZKML). It enables the following workflow:

  1. Define a computational graph, for instance a neural network (but really any arbitrary set of operations), as you would normally in pytorch or tensorflow.
  2. Export the final graph of operations as an .onnx file and some sample inputs to a .json file.
  3. Point ezkl to the .onnx and .json files to generate a ZK-SNARK circuit with which you can prove statements such as:

"I ran this publicly available neural network on some private data and it produced this output"

"I ran my private neural network on some public data and it produced this output"

"I correctly ran this publicly available neural network on some public data and it produced this output"

In the backend we use Halo2 as a proof system.

resources 📖

docs the official ezkl docs page
tutorial end-to-end tutorial using pytorch and ezkl
notebook end-to-end tutorial using pytorch and ezkl in a jupyter notebook
cargo doc --open compile and open the docs in your default browser

Getting Started ⚙️

https://user-images.githubusercontent.com/45801863/236771676-5bbbbfd1-ba6f-418a-902e-20738ce0e9f0.mp4

building the project 🔨

Note that the library requires a nightly version of the rust toolchain. You can change the default toolchain by running:

rustup override set nightly

After which you may build the library

cargo build --release

A folder ./target/release will be generated. Add this folder to your PATH environment variable to call ezkl from the CLI.

# For UNIX like systems
# in .bashrc, .bash_profile, or some other path file
export PATH="<replace with where you cloned the repo>/ezkl/target/release:$PATH"

Restart your shell or reload your shell settings

# example, replace .bash_profile with the file you use to configure your shell
source ~/.bash_profile

You will need a functioning installation of solc in order to run ezkl properly. solc-select is recommended. Follow the instructions on solc-select to activate solc in your environment.

Repos

The EZKL project has several libraries and repos.

Repo Description
@zkonduit/ezkl the main ezkl repo in rust
@zkonduit/pyezkl helper functions in python for processing onnx files
@zkonduit/ezkl-docs official ezkl docs

Contributing 🌎

If you're interested in contributing and are unsure where to start, reach out to one of the maintainers:

  • dante (alexander-camuto)
  • jason (jasonmorton)

More broadly:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

ezkl_lib-0.1.0-cp37-abi3-win_amd64.whl (10.0 MB view details)

Uploaded CPython 3.7+Windows x86-64

ezkl_lib-0.1.0-cp37-abi3-win32.whl (9.1 MB view details)

Uploaded CPython 3.7+Windows x86

ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_x86_64.whl (14.3 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ x86-64

ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_armv7l.whl (12.9 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ ARMv7l

ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_aarch64.whl (13.4 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ ARM64

ezkl_lib-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.2 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ x86-64

ezkl_lib-0.1.0-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (14.5 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ i686

ezkl_lib-0.1.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (21.6 MB view details)

Uploaded CPython 3.7+macOS 10.9+ universal2 (ARM64, x86-64)macOS 10.9+ x86-64macOS 11.0+ ARM64

ezkl_lib-0.1.0-cp37-abi3-macosx_10_7_x86_64.whl (11.5 MB view details)

Uploaded CPython 3.7+macOS 10.7+ x86-64

File details

Details for the file ezkl_lib-0.1.0-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: ezkl_lib-0.1.0-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 10.0 MB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for ezkl_lib-0.1.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a097d2a7520fd128f4494e8d059718d4e8beffd9fd4f7c6c35252a07a85d71cf
MD5 d7c8753c3685f866a0c464cfc0f8bbb6
BLAKE2b-256 80af4cc96a0df96d2af30b0e9c852f8a5ef004509ae0f680dc8ed74d8330c8ec

See more details on using hashes here.

File details

Details for the file ezkl_lib-0.1.0-cp37-abi3-win32.whl.

File metadata

  • Download URL: ezkl_lib-0.1.0-cp37-abi3-win32.whl
  • Upload date:
  • Size: 9.1 MB
  • Tags: CPython 3.7+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for ezkl_lib-0.1.0-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 ed62fe599c9d063d3d25113d0a2db02b161958e1d4aa34b2c4332b8594dbab4e
MD5 514ecffbb487dfd330456889d15d26c5
BLAKE2b-256 3243ff0b16b91c638a06c2e545bd8b2ed8de540e570e8220e32444922013f640

See more details on using hashes here.

File details

Details for the file ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 db32ad521f563f7916ec1c2ab2f73b405f27d076ea8ecc785e49e43c1f25e72f
MD5 3092d6c656c2f448a3d448f59361e1ca
BLAKE2b-256 1dfb7c8551b83115f2f97a2a0e199818f0b2dee032be7772d12a198bdf32a0de

See more details on using hashes here.

File details

Details for the file ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 e54eb55d4a764eec2e0c3c2397b074887c8f5292d910936aa42b55f49ef45736
MD5 2e46594c78e15e4defe433e206de33ef
BLAKE2b-256 2da36b7a0743da54279b82e1980a47533b925a103b05e2330e8b3f1f6058a144

See more details on using hashes here.

File details

Details for the file ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 632abd57424d8e8c15e34c2b381eb418da126cb4a04f6dbc004c65c249f100a5
MD5 d9a967da9a863344a79bc0ed564dd434
BLAKE2b-256 b37d08fd3b1782402203880f424f643b07c92da160c449feb07376009c0d8437

See more details on using hashes here.

File details

Details for the file ezkl_lib-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ezkl_lib-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d5fce7bd4915aedc6a516edc32642e2fbef1b53392a2a71f93baf60467e38c17
MD5 2a9843acd85fcb1bc3afaab2278040cb
BLAKE2b-256 3541deb4553b4ca9897ba3c21fd1b2af59f0615e1dca94fcb9484a1e6b35bb3e

See more details on using hashes here.

File details

Details for the file ezkl_lib-0.1.0-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for ezkl_lib-0.1.0-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 93416c1b245bf0b1e5e5a01f46aa525a84f630f368530ab80f6cdb84570aa976
MD5 277469e101e6b95156b5b45cf766cb18
BLAKE2b-256 209799f5f97403129949145e9a3c96bb7693ce051a2ec6078285c80cc067d8b0

See more details on using hashes here.

File details

Details for the file ezkl_lib-0.1.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for ezkl_lib-0.1.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d0f6b4dd3da01ee4c2f6129f6ce778c75840f628071be0491f0c74182b86404d
MD5 1f5f19898a4d8c49b691d26d780c7e36
BLAKE2b-256 d891ca5b2910746ec1abd21f5d75f1728a7b20c3a6c75c9800303e41a53593fb

See more details on using hashes here.

File details

Details for the file ezkl_lib-0.1.0-cp37-abi3-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for ezkl_lib-0.1.0-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 85f91638e6c1f75e80068d52b8592f74428fb42143d12b3298e7c25a54fd0619
MD5 bd5d73a49d9568578b731392ed048bab
BLAKE2b-256 ec90b7ffdce57ad755a16c6cf57e14b375ad7a9ecaf35ffaffdb221b846efa9c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page